This post has already been read 23120 times!
If you want to use VLANs in your Auto Deploy environment, you must set up the end to end networking properly. When the host is PXE booting, the network card must be set up to tag the frames with proper VLAN ID. You must do this manually by making the correct changes in the BIOS (if supported).
Configuring the correct VLAN on the network card’s bios worked great to download the PXE tramp file and boot up ESXi. But my booted ESXi host ended up not knowing the correct VLAN ID… not receiving DHCP offer.
Since VMware ESXi5 there is a new boot option parameter: vlanid This got me thinking about a possible solution and that is to add the VLANID tag in every boot.cfg file (but that file is auto generated by auto deploy… Let’s take a closer look at those boot files per host:
Access this URL in a web browser:
Click on one of your hosts and click on the boot.cfg link to view information about the cached files being used to boot the server. This looks like this:
title=Loading VMware ESXi kernel=/vmw/cache/c9/598c7dea6b61e9a4a820fd2fa96438/tboot.4891a7c66e8112f5bfbba28856bd4afd kernelopt=BOOTIF=01-00-50-56-b7-62-9d
We would like to achieve this:
Since all Auto Deploy file are auto generated from the SQLite DB it took me a while to figure out…
UPDATE: Seems that there is a nice PowerCLI cmdlet for configuring the vlanid:
Set-DeployOption "vlan-id" 199
Retrieves the Auto Deploy global configuration options. This cmdlet currently supports the vlan-id option, which specifies the default VLAN ID for the ESXi Management Network of a host provisioned with Auto Deploy. Auto Deploy uses the value only if the host boots without a host profile.
check out the Auto Deploy PowerCLI Cmdlet Overview
I ended up looking in and editing the SQLite DB located at: C:\ProgramData\VMware\VMware vSphere Auto Deploy\Data\db To edit the VLAN ID, you have to manually edit the table, Stop the “VMware vSphere Auto Deploy Waiter” service on your Auto Deploy Server Download SQLite.exe Execute: D:\sqlite3.exe “C:\ProgramData\VMware\VMware vSphere Auto Deploy\Data\db” use the following query and change 0 into the VLAN ID you require:
UPDATE config_pairs SET value = '0' WHERE rowid = 16 AND "key" = 'vlan-id';
When the above trick is not working, and your SQLite experience is as bad as mine…
I ended up using RazorSQL: Stop the “VMware vSphere Auto Deploy Waiter” service on your Auto Deploy Server Download http://downloads.razorsql.com/downloads/6_0_3/razorsql6_0_3_windows.zip Unpack and run razorsql.bat Click to connect to database, select SQLite Defina a profile name and select the Auto Deploy DB file (in my case: C:\ProgramData\VMware\VMware vSphere Auto Deploy\Data\db) edit the vlan-id field in the “config_pairs” table Save the table and (re)start the Auto Deploy Waiter service again. This did the trick for me, the boot.cfg was rewritten per host to include the vlan-id at boot. I‘m currently investigating if this workaround is supported by VMware. UPDATE, the above PowerCLI commandlet is supported…
Be sure to also check this great VMware KB article: Troubleshooting Auto Deploy