If you use Citrix Provisioning Services (PVS) then you’ll probably appreciate the ease with which updates can be applied to your systems by simply updating the underlying vdisk. However, if you also run your systems on vSphere, updating VM Tools is a little more convoluted.
The first time I came across this problem I was left scratching my head. I kept retrying the VM Tools update, but every time the install would fail. It took some time to realise what the cause was – the VM Tools installer was attempting to update the VMXNet3 network driver that was being used by PVS to stream the vdisk.
Now, most solutions to this problem that I came across suggested converting the PVS vdisk back to a standard system, updating the system and then converting back to a PVs vdisk. This sounded more convoluted than I preferred and so I came up with the solution below.
- First place your vdisk into maintenance mode. If you are using later versions of PVS you can use the vdisk “versions” feature to do this.
- Edit the VM that you are going to use to perform the update on. It’s typical to have a dedicated “maintenance” VM/target device for this purpose. Add an E1000 vNIC to the VM hardware and make a note of the MAC address of the vNIC. At this stage do not connect the vNIC to the network.
- Boot into the VM BIOS and configure the E1000 for PXE boot. Move it to the top of the boot order, then continue to boot into the OS. During the boot process the E1000 boot will fail as there is no network connection, so the system will continue and boot from the VMXNET3.
- Allow the OS to discover the new vNIC hardware and shut down. This step is only needed for the first time you follow this process if you use the same VM/target device/E1000 vNIC for subsequent updates.
- Edit the PVS target device. Make a note of the current MAC address and replace with the E1000 MAC address.
- Edit the VM. Enable the E1000 network connection and boot the VM. The VM will now boot the PVS vdisk from the E1000 vNIC.
- Update VM Tools and shut down.
- Edit the PVS target device and revert the MAC address back to the original value.
- Edit the VM and disconnect the E1000 device from the network once more.
- Boot the VM. The E1000 boot will fail as there is no network connection once, so the system will continue and boot from the VMXNET3.
- Verify that you are satisfied with your updated vdisk, take your usual steps to reseal the image and release to production.
Future VM Tools updates can then be undertaken by simply enabling the E1000 vNIC network connection on your maintenance VM and modifying PVS target device MAC address.