Skip to content

hardcoded vboxnet0 name for networks of type hostonly #34

@bgandon

Description

@bgandon

The only network name accepted is vboxnet0

As a result of #31, when network type is hostonly and a name is specified, then for some reason, only the vboxnet0 is accepted and any other name will produce an error.

Here is a former piece of code that has been kept and has that behaviour:
https://github.com/cloudfoundry/bosh-virtualbox-cpi-release/pull/31/files#diff-388ad6827420e2129237f08af3655515bf7fb084609402c4500deb105649b70dR22-R24

Whereas formerly, one could guess the name of the next “hostonlyif” to be created, and that was accepted to be specified. When the guess was proved being wrong, then an error was returned by the CPI.

Name of created hostonlynet is hardcoded to vboxnet0

With VirtualBox v7+, the CPI creates hostonlynet networks (instead of hostonlyif networks with former version of VirtualBox, v6.x or v5.x)

When no name is specified, the name for the created hostonlynet is hardcoded to vboxnet0.

Here:
https://github.com/cloudfoundry/bosh-virtualbox-cpi-release/pull/31/files#diff-388ad6827420e2129237f08af3655515bf7fb084609402c4500deb105649b70dR12

Here:
https://github.com/cloudfoundry/bosh-virtualbox-cpi-release/pull/31/files#diff-388ad6827420e2129237f08af3655515bf7fb084609402c4500deb105649b70dR79-R82

And there:
https://github.com/cloudfoundry/bosh-virtualbox-cpi-release/pull/31/files#diff-388ad6827420e2129237f08af3655515bf7fb084609402c4500deb105649b70dR97-R102

This implementation is surprising because creating hostonlynet allows to specify a name (whereas creating hostonlyif net does not allow that).

We should allow networks with other names than vboxnet0 to be used.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Pending Merge | Prioritized

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions