Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hardcoded vboxnet0 name for networks of type hostonly #34

Open
bgandon opened this issue Feb 16, 2024 · 0 comments · May be fixed by #36
Open

hardcoded vboxnet0 name for networks of type hostonly #34

bgandon opened this issue Feb 16, 2024 · 0 comments · May be fixed by #36
Assignees

Comments

@bgandon
Copy link
Contributor

bgandon commented Feb 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pending Merge | Prioritized
Development

Successfully merging a pull request may close this issue.

1 participant