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

A network restart is leading missing IP address on vm-public #568

Open
osokin opened this issue Nov 25, 2024 · 6 comments
Open

A network restart is leading missing IP address on vm-public #568

osokin opened this issue Nov 25, 2024 · 6 comments

Comments

@osokin
Copy link

osokin commented Nov 25, 2024

Hi,

I've figured our that service netif restart removes IP address from the vm-public interface, and there's no way (except the manual one) to assign IP address to the interface back, i.e.:

# ifconfig vm-public inet 10.0.0.1/24

Would that be good idea to move vm-public initialization to /etc/rc.conf and make that explicitly.

@akrivulya
Copy link

As a workaround one's can create bridge interface with /etc/rc.conf and make vm's switch of type manual.

@osokin
Copy link
Author

osokin commented Nov 26, 2024

As a workaround one's can create bridge interface with /etc/rc.conf and make vm's switch of type manual.

Just to make that a bit more clear, so /etc/rc.conf records should be something like the following:

cloned_interfaces="vm-public"
ifconfig_vm-public="addm wlan0" # change the interface's name on your taste
config_vm-public="inet 10.0.1.1/24 up"

Is there anything needs to add/change in /vm/.config/system.conf file?

@akrivulya
Copy link

Something like this in /etc/rc.conf:

cloned_interfaces="bridge0"
ifconfig_bridge0="addm wlan0 name vm-public 10.0.1.1/24" # change the interface's name on your taste
ifconfig_wlan0="up"

and then
# vm switch create -t manual -b vm-public vm-public

@osokin
Copy link
Author

osokin commented Nov 27, 2024

Something like this in /etc/rc.conf:

cloned_interfaces="bridge0"
ifconfig_bridge0="addm wlan0 name vm-public 10.0.1.1/24" # change the interface's name on your taste
ifconfig_wlan0="up"

and then # vm switch create -t manual -b vm-public vm-public

That doesn't work. Also, it would be great to avoid using - symbol in the network interfaces names. Would that be good idea to rename vm-public to vmpublic0 or so?

@akrivulya
Copy link

Also, it would be great to avoid using - symbol in the network interfaces names. Would that be good idea to rename vm-public to vmpublic0 or so?

Generally speaking if you need to configure vm-public0 network interface in /etc/rc.conf it must be present as vm_public0, for example:
ifconfig_vm_public0="DHCP"

This configuration works for me:

cloned_interfaces="bridge0"
create_args_bridge0="link 58:9c:fc:b1:dc:6d"
ifconfig_bridge0="192.168.254.1/27 name vm-LAN"

@osokin
Copy link
Author

osokin commented Nov 27, 2024

Also, it would be great to avoid using - symbol in the network interfaces names. Would that be good idea to rename vm-public to vmpublic0 or so?

Generally speaking if you need to configure vm-public0 network interface in /etc/rc.conf it must be present as vm_public0, for example: ifconfig_vm_public0="DHCP"

This configuration works for me:

cloned_interfaces="bridge0"
create_args_bridge0="link 58:9c:fc:b1:dc:6d"
ifconfig_bridge0="192.168.254.1/27 name vm-LAN"

Thanks. I've decided to use bridge0 interface name in the vm-bhyve configuration files.

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

2 participants