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

When just networkX_type and networkX_device are provided in the VM's config file, no network device is passed to bhyve #570

Open
EpicureanDigitalEngineer opened this issue Dec 1, 2024 · 5 comments

Comments

@EpicureanDigitalEngineer

After upgrade to version 1.6.0, when a VM's configuration includes only networkX_type, networkX_device and networkX_mac (i.e. no vm-bhyve bridge), there are no Ethernet device arguments passed to bhyve, and hence no Ethernet interface given to the host VM as can be seen in the log file.

File extract for networking:

...
network0_type="virtio-net"
network0_device="tap0"
network0_mac="58:9c:cc:13:17:34"
...

A temporary workaround is to pass the device explicitly to bhyve e.g. to add in the vm configuration file the following:

bhyve_options="-s 5:0,virtio-net,tap0,mac=58:9c:cc:13:17:34"

(FreeBSD 14.1, pkg latest, v1.6.0, debian VMs using grub)

@GogoFC
Copy link

GogoFC commented Dec 12, 2024

Hey, do you also use switch or just manual network devices?

@EpicureanDigitalEngineer
Copy link
Author

No vm-bhyve defined switch used. I have a bridge with a specific setup that I use (to also handle jails). The network devices are created outside vm-bhyve and passed on in the config file.

@hfvk
Copy link

hfvk commented Dec 13, 2024

I have this same issue on FreeBSD 14.2. I have manually configured bridges and tap devices and do not use vm-bhyve switch (leads to other issues in my setup).

Before v 1.6.0 this worked without issues.

Therefore, it would be nice to return the old behavior so that vm-bhyve would support also manual bridge/tap configurations not defined using vm-bhyve switch.

@GogoFC
Copy link

GogoFC commented Dec 13, 2024

I wonder why that happened. I looked at some of the commits and I didn't really see any major changes.

@hfvk
Copy link

hfvk commented Dec 13, 2024

I have two test systems, both are running FreeBSD 14.2 and were working on bhyve v1.5 (rev. 105102). Now:

System A with v1.5 (rev. 105102) works.
System B with v1.6-devel (rev. 106001) does NOT work.

network setup in vm config on both systems:
network0_type="virtio-net"
network0_device="tap0"
network0_mac="..."

System A vm-bhyve.log
Dec 12 20:15:43: [loader: uefi]
Dec 12 20:15:43: [cpu: 4,sockets=1,cores=4]
Dec 12 20:15:43: [memory: 12G]
Dec 12 20:15:43: [hostbridge: standard]
Dec 12 20:15:43: [com ports: com1]
Dec 12 20:15:43: [uuid: ...]
Dec 12 20:15:43: [debug mode: no]
Dec 12 20:15:43: [primary disk: disk0.img]
Dec 12 20:15:43: [primary disk dev: file]
Dec 12 20:15:43: initialising network device tap0
Dec 12 20:15:43: booting

NOTE: "initialising network device tap0"

System B vm-bhye.log
Dec 12 23:10:09: initialising
Dec 12 23:10:09: [loader: uefi]
Dec 12 23:10:09: [cpu: 4,sockets=1,cores=4]
Dec 12 23:10:09: [memory: 8G]
Dec 12 23:10:09: [hostbridge: standard]
Dec 12 23:10:09: [com ports: com1]
Dec 12 23:10:09: [uuid: ...]
Dec 12 23:10:09: [debug mode: no]
Dec 12 23:10:09: [primary disk: disk0.img]
Dec 12 23:10:09: [primary disk dev: file]
Dec 12 23:10:09: booting

NOTE: no information about network initialization.

System B seems to ignore even erroneous network0 statements. For example, even if I try to assign non existent device to the vm, it does not give any error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants