Repository navigation
Closed
Description
I've encountered an issue where I am unable to remove a switch by a specific name: "luna".
[root@lunashine /pool/vmstore]# vm switch destroy luna
/usr/local/sbin/vm: DEBUG: Sourcing /etc/rc.conf.d/vm
/usr/local/sbin/vm: DEBUG: checkyesno: vm_enable is set to YES.
/usr/local/sbin/vm: ERROR: failed to remove virtual switch
Other switches can be added and removed just fine:
[root@lunashine /pool/vmstore]# vm switch create moon
/usr/local/sbin/vm: DEBUG: Sourcing /etc/rc.conf.d/vm
/usr/local/sbin/vm: DEBUG: checkyesno: vm_enable is set to YES.
[root@lunashine /pool/vmstore]# vm switch destroy moon
/usr/local/sbin/vm: DEBUG: Sourcing /etc/rc.conf.d/vm
/usr/local/sbin/vm: DEBUG: checkyesno: vm_enable is set to YES.
The vm config file is located here:
[root@lunashine /pool/vmstore/.config]# less system.conf
switch_list="luna test-switch-01"
type_luna="standard"
ports_luna="igb0 tap0 tap1"
type_test-switch-01="standard"
Interestingly, this switch also is causing issues with two virtual machines when they start up:
Jun 24 20:59:52: initialising
Jun 24 20:59:52: [loader: bhyveload]
Jun 24 20:59:52: [cpu: 2]
Jun 24 20:59:52: [memory: 512M]
Jun 24 20:59:52: [hostbridge: standard]
Jun 24 20:59:52: [com ports: com1]
Jun 24 20:59:52: [uuid: d7ad3b4f-bf88-11e8-816e-0cc47a69ad4e]
Jun 24 20:59:52: [utctime: yes]
Jun 24 20:59:52: [debug mode: no]
Jun 24 20:59:52: [primary disk: disk0.img]
Jun 24 20:59:52: [primary disk dev: file]
Jun 24 20:59:52: initialising network device tap0
**************************************************
Jun 24 20:59:52: failed to find virtual switch 'luna'
**************************************************
Jun 24 20:59:52: booting
Jun 24 20:59:52: bhyveload -c /dev/nmdm-ns2.1A -m 512M -e autoboot_delay=3 -d /pool/vmstore/ns2/disk0.img ns2
Jun 24 20:59:56: [bhyve options: -c 2 -m 512M -AHP -U d7ad3b4f-bf88-11e8-816e-0cc47a69ad4e -u]
Jun 24 20:59:56: [bhyve devices: -s 0,hostbridge -s 31,lpc -s 4:0,virtio-blk,/pool/vmstore/ns2/disk0.img -s 5:0,virtio-net,tap0,mac=58:9c:fc:03:0e:b2]
Jun 24 20:59:56: [bhyve console: -l com1,/dev/nmdm-ns2.1A]
Jun 24 20:59:56: starting bhyve (run 1)
Jun 24 22:19:27: bhyve exited with status 1
Jun 24 22:19:27: restarting
Jun 24 22:19:28: bhyveload -c /dev/nmdm-ns2.1A -m 512M -e autoboot_delay=3 -d /pool/vmstore/ns2/disk0.img ns2
Jun 24 22:19:31: [bhyve options: -c 2 -m 512M -AHP -U d7ad3b4f-bf88-11e8-816e-0cc47a69ad4e -u]
Jun 24 22:19:31: [bhyve devices: -s 0,hostbridge -s 31,lpc -s 4:0,virtio-blk,/pool/vmstore/ns2/disk0.img -s 5:0,virtio-net,tap0,mac=58:9c:fc:03:0e:b2]
Jun 24 22:19:31: [bhyve console: -l com1,/dev/nmdm-ns2.1A]
Jun 24 22:19:31: starting bhyve (run 2)
Jun 28 14:14:59: bhyve exited with status 1
Jun 28 14:14:59: destroying network device tap0
Jun 28 14:14:59: stopped
I can show/read this switch from vm:
[root@lunashine /pool/vmstore2]# vm switch info
/usr/local/sbin/vm: DEBUG: Sourcing /etc/rc.conf.d/vm
/usr/local/sbin/vm: DEBUG: checkyesno: vm_enable is set to YES.
------------------------
Virtual Switch: luna
------------------------
type: standard
ident: -
vlan: -
physical-ports: igb0 tap0 tap1
------------------------
Virtual Switch: test-switch-01
------------------------
type: standard
ident: bridge0
vlan: -
physical-ports: -
bytes-in: 0 (0.000B)
bytes-out: 0 (0.000B)
Anyone have ideas where I could find the source of why I'm unable to interact with modifying this switch's config?
Metadata
Metadata
Assignees
Labels
No labels
Activity
SomePoorBastard commentedon Jun 28, 2020
Config file for ns2:
SomePoorBastard commentedon Jun 28, 2020
Not sure if not having a bridge affects the ability for VM to operate on switch config.
SomePoorBastard commentedon Jun 28, 2020
During testing, I created
test-switch-01, to see if I can interact with this just fine. I added the tap interfaces to the switch after starting the vm machines first (as the tap interfaces are created only on start, and destroyed on stop).An ifconfig bridge0; created by using vm switch create test-switch-01:
I was also able to remove the test switch just fine:
My conclusion is that I probably removed the bridge specifically created for "luna" (a boneheaded move when testing other networking issues), which caused the issue.
The workaround was to remove the entries in system.config.
SomePoorBastard commentedon Jun 28, 2020
Proof of workaround after removing the appropriate entries in system.conf:
Adding the tap interfaces:
Left as documentation for others in case they're wondering why they can't delete a switch.