🎬 Intro #
In my apartment, I have an ESXi host that runs some local services including my router/firewall. vCenter is located offsite, which is fine, usually. All my hosts run vDS, and this just caused me a massive headache when doing some maintenance.
So, I finally wanted to migrate from my last pfSense install to OPNsense. Everything was set up, so logically all I had to do was:
- Disconnect both NICs from the pfSense VM
- Network drops as I no longer have routing; this is fine as I put myself in the management L2 segment.
- Enable NICs on the OPNsense VM
- ???
- Profit
So, I disable pfSense NICs, and everything drops; fine. I log into the local console of ESXi to enable the OPNsense NICs, only to remember that, without vCenter, you can do nothing to vDS-related networking.
Usually, when doing something like this, you would create a vSS, move the VMs to the vSS, perform the work, and then move everything back once connectivity to vCSA is restored.
You may see something like this when trying to enable NICs locally on a host:
Next steps here are to change the interfaces on the VM from a vDS switch to vSS, which is fine if you have that ready to go; I did not. This is where I encountered issues. Trying to add NICs to the vSS kept giving me this error:
This error is due to the fact that I had configured all four of the machine’s NICs to ‘auto assign’ uplinks. I had done this to all the NICs so it didn’t matter which I plugged in; it would just work. However, this means that the NICs are not available to be added to the vSS, even though they are available on the host and it does seem to want to let you.
If you’re stuck in this situation and you have one NIC only, then you’re going to have to bust out the OOB or monitor and keeb.
This is where you need to SSH in and do the following:
🔧 Fix #
Get the vDS information with:
|
|
This will give you a list of your vDS’s along with the uplinks and port groups.
For me, this looked something like this:
|
|
Now, we can clearly see here that we have four uplinks assigned; this is my issue:
|
|
To remove a NIC from the vDS, you can use the following command:
|
|
Where:
- -Q: removes the uplink
- -V: specifies the port ID
- {NIC-NAME}: the name of the NIC to remove
- {NIC-PID}: the port ID of the NIC to remove
- {vDS-NAME}: the name of the vDS
The first command gives you everything you need.
For me to remove vmnic1 from lcy-vds01.internal.muffn.io, I would run:
|
|
You will not get any output, but you can verify it worked by running the first command again and verifying that the uplink has been removed.
You can now use that vmnic on a vSS as needed.
Hope this helped ~~muffn.
Sony A7R III + Sigma 24-70mm f/2.8 Art @ 24mm, f/4.5, 1/2000s, ISO 500