Skip to content

Deploy VMware NSX-V in Homelabs with Limited Resources

downsizing-nsxWhen deploying VMware NSX-V in a homelab, its huge resource requirement might be an issue. In the default configuration a small setup with NSX Manager, 3 NSX Controllers and 2 Edge gateways requires 30 GB Memory. Consumer VMs to connect to logical switches requiring additional resources.

This post explains how you can deploy VMware NSX in your homelab with less than 8GB Memory by downsizing each component including:

  • NSX Manager
  • NSX Controllers
  • NSX Edge Gateways
  • Consumer VMs

Any downsizing of NSX Components is not supported by VMware. Don't do this in production.

NSX Manager

In NSX 6.2 the management virtual machine is deployed with 4 vCPU and 16GB memory. In this configuration, the NSX Manager scales up to 256 hypervisors, which is not really necessary in small Homelabs. The VM can be downsized by simply shutting it down and editing its settings. I've constantly removed resources until I noticed issues. CPU utilization was constantly at about 5% so I assume 1 vCPU should be enough. With 5 GB memory the appliance consumes about 80%, I would not recommend going lower.

4vCPU -> 1 vCPU
16GB Memory -> 5 GB Memory
downsized-nsx-manager

NSX Controller

The controlpane of NSX is deployed as a group of three redundant Virtual Machines, each with 4 vCPUs and 4GB memory. This results in a total requirement of 12 vCPU and 12 GB memory. The first option to lower resource consumption is the requirement for redundancy. If you don't need redundancy and don't want to evaluate anything related to controller redundancy, stay with a single controller.

The second potential for savings is the controller configuration itself. Reducing NSX Controller resources is a little bit more tricky because the "Edit settings" function is blocked by the vCenter. To disable vCenter Server protection you have to delete respective entries from the VPX_DISABLED_METHODS table.

  1. SSH to the vCenter Server
  2. Enable Bash
    shell.set --enable True
    shell
  3. Connect to the vCenter Postgres Database with PSQL
    /opt/vmware/vpostgres/current/bin/psql -U postgres
  4. Connect to the VCDB
    \connect VCDB
  5. Identify Object IDs
    select * from VPX_DISABLED_METHODS;
  6. Delete entries
    delete from VPX_DISABLED_METHODS where entity_mo_id_val = 'MO_ID';
    
  7. Restart vCenter Server Service
    service-control --stop vmware-vpxd
    service-control --start vmware-vpxd

nsx-install-unlock-VPX_DISABLED_METHODS-vcsa

NSX Controller resources can now be edited with the vSphere Client. I'm happy with 1 vCPU and 2 GB memory, but I also had no issues with 1GB memory.

4vCPU -> 1 vCPU

4GB Memory -> 1 GB Memory
downsized-nsx-controller

NSX Edge Gateway

During the NSX Edge deployment, the appliance size can be configured. The compact version is deployed with 1vCPU and 512 MB memory. There is no need to go lower.
compact-nsx-edge-deployment

Consumer Virtual Machines

To play around and evaluate VMware NSX you need consumer Virtual Machines that are connected to logical switches and provide services. These VMs should be as lightweight as possible but with the following requirements:

  • Low resource requirements
  • Easy and quick to install/configure/manage
  • Clonable
  • VMware Tools
  • Webserver
  • tcpdump

There are even smaller Linux systems like Tiny Core Linux but due to its ease of use I've decided to use Alpine Linux.

  1. Download Alpine Linux
  2. Create a Virtual Machine with the following specifications
    - Other Linux (32-bit)
    - 1vCPU
    - 128 MB Memory
    - 1GB HDD
  3. Boot the VM from the Alpine Linux ISO
  4. Login as root (no password)
  5. Run setup-alpine and perform a sys mode installation
    To perform a sys mode installation, make sure to enter a disk (sda) during the installation and set the installation mode to sys.
    alpine-linux-sys-mode-installation
  6. Reboot - The VM will now boot from the hard drive.
  7. Login as root (no password)
  8. Install and configure VMware Tools
    apk add open-vm-tools
    rc-service open-vm-tools start
    rc-update add open-vm-tools
  9. Install tcpdump
    apk add tcpdump
  10. Install and configure Lighttpd
    apk add lighttpd
    rc-service lighttpd start
    rc-update add lighttpd
  11. Create a default site for Lighttpd. Add the hostname to the HTML page to identify the server later.
    echo "Lighttpd running on web01" > /var/www/localhost/htdocs/index.html

The Virtual Machine is now ready to be cloned and connected to NSX Logical Switches. All clones are configured with DHCP. If you want to configure the VM with a static IP address, run setup-interfaces and configure the interface according to the logical network configuration.
alpine-vm-reconfigure-network

 

 

11 thoughts on “Deploy VMware NSX-V in Homelabs with Limited Resources”

  1. Hello. The other method to change the controller VM's settings is to do it from the legacy vSphere client. Edit settings option is not disabled there.

    Greate site and great posts!

    1. "Edit Settings..." is also greyed out in my C# Client when the entry in VPX_DISABLED_METHODS exists. What version are you using?

      1. I should have been more specific. I used C# Client to login directly to the ESXi host hosting the controller VM. When you connect to vCenter server via C# Client the option is indeed greyed out.

  2. Nice post! I have also reduced the memory of NSX Manager server, but when I try to integrate NSX Manager with vCenter server, it says Component NSX is not yet in RUNNING phase, current phase STARTING.. It is not started at last. No luck. can you please help me out in this.

  3. I changed this in VMware Fusion, just connect Workstation/Fusion to vCenter and then just change the cpu/mem trough there. easypeasy.

  4. Can you tell me what is the Minimum requirements to build an NSX for home lab
    RAM:
    Physical NIC
    Physical Host\Esxi
    RAM
    CPU

    can i build the NSX lab using two NUC deivces ?? thanks

  5. thanks for the article.
    i followed the steps and I can now see a controller vm under the ESXi host.
    but my problem is the controller deployment finally failed with error message saying cannot power on the controller virtual machine.

Leave a Reply

Your email address will not be published. Required fields are marked *