Adding a second vNIC to the VCSA

Adding a vNICI recently spun up a new homelab using an Intel NUC, which I love. The foot print is small, you can jam a bunch of RAM and a decent CPU in there, and the power draw is minimal. One of the things I wanted to accomplish with my NUC is the ability to bring it places, whether it be for demos, or just for toying with while I am out of the house.

I opted to install ESXi on the NUC, then the VCSA appliance, and then have the VMs running on a separate vSwitch / network. I wanted the VCSA to be connected to the LAN, as well as to the internal network. On that internal network I have an Active Directory domain setup, along with some other basic services such as DNS and DHCP.

The ultimate goal is to be able to connect to the VCSA VM and manage all of the other machines from there via the VMRC (and either Fusion for the Mac or Workstation for the PC). The reason why I wanted to go this route is simplicity: if I take my NUC out and about, I want to be able to plug it into a switch (or AP), hook my laptop up to it, and pop in one IP to manage it. I don’t want to worry about any sort of re-IP’ing. I might even just add an entry to my host file to always point to that IP (e.g NUC-VCSA 192.168.x.x).

EDIT: A tip that I should have mentioned is to make sure that your VCSA is setup with a FQDN (as per best practices). This way you can access it on either network via the DNS name, and not the IP Address. This can alleviate some issues that may arise if you were just using an IP Address.

Adding the Network Card

NOTE: The process described below is unsupported. Do so at your own risk. Thanks to Adam Eckerle (@eck79) for the fair warning.

In theory, adding the second NIC was easy, but I actually had a heck of a hard time finding the commands to do this. I eventually found what I needed and to save me the hassle of trying to find it again, I figured I would document it here. Note that these screenshots were taken after the fact.

  • Add the second NIC via the Edit Settings command on the ESXi host; make sure to use the VMXNET 3 adapter – I didn’t bother checking if the other adapters would work, but the VCSA ships with the VMXNET 3, so it is a safe bet.
  • Configuring VCSA NICConnect to the VCSA (SSH or console) – if you connect via the console, you’ll need to hit Alt+F1 to take you to the login prompt. Login with root / yourPassword. Once you are at the prompt run:
    com.vmware.appliance.version1.networking.ipv4.list

    This will display two NICs – Interface: nic0 is the network card that was deployed with the VCSA. You should also see Interface: nic1 – this is the network card that we added above.

  • Now we want to assign the IP address and networking settings. To do that, run the command below. Note that in this example, I am setting the IP on the second network card to 172.16.100.10
    com.vmware.appliance.version1.networking.ipv4.set –-interface NIC1 –-mode static -–address 172.16.100.10 –-prefix 255.255.255.0

After that, you should be up and running. As I mentioned above, I attached my second network card onto a new, private host-only vSwitch. I had some other machines on that same network and I was able to ping / pass traffic through them without issue.

5 thoughts on “Adding a second vNIC to the VCSA

  1. December 20, 2016 at 10:42 pm

    Nice! Do you happen to know which VCSA versions this technique applies to?

  2. Matt
    December 20, 2016 at 10:46 pm

    Hey Paul!

    I believe I did this on v6. I have since wiped the lab environment.

    I found it super handy for when I needed a ‘self contained’ environment. For example, I could take my NUC to a user group meeting, connect to the ‘external’ NIC and have all the infrastructure running on the ‘internal’ NIC. Totally unsupported, but handy 🙂

  3. December 20, 2016 at 10:53 pm

    Ah, so SuSE rather than Photon OS, would be interesting to see if that matters. Anyhow, good chatting with you!

Leave a Reply