Updating VMware Tools on a Citrix Provisioned Image

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Edit the PVS target device. Make a note of the current MAC address and replace with the E1000 MAC address.
  6. Edit the VM. Enable the E1000 network connection and boot the VM. The VM will now boot the PVS vdisk from the E1000 vNIC.
  7. Update VM Tools and shut down.
  8. Edit the PVS target device and revert the MAC address back to the original value.
  9. Edit the VM and disconnect the E1000 device from the network once more.
  10. 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.
  11. 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.

15 thoughts on “Updating VMware Tools on a Citrix Provisioned Image

  1. Xavier

    Hi,

    Your method seems like a brilliant solution for updating the Vmware tools. I too have been reading the other ways to update vmware tools and do not like them.

    I do have an issue with your method. I do not use PXE to boot my PVS clients, instead I use a boot iso (CD). PXE was already being used in my environment and I didn’t want to mess with it.

    When I add the E1000 nic the dev VM it no longer wants to boot from the Boot iso disc only PXE, any ideas?

     

    Thanks,

     

    Xavier

    Reply
      1. Josh

        As soon as you add a second NIC, the CD boot stops functioning and the BIOS only appears to want to boot from PXE… even if you hit escape and tell the VM to boot from CD it fails (appears to ignore the command altogether). If you remove one of the NIC’s away it goes again – seems strange.

        Reply
        1. Nick Brown Post author

          I’ve always found using a boot ISO problematic with PVS. However, you should obviously not configure either the E1000 or VMXNET3 vNIC for PXE boot in that case. The boot ISO should be agnostic of which of the two vNICs is actually used to stream the vdisk. So I’d suggest disconnecting the VMXNET3 during the VM Tools upgrade (leaving the E1000 connected).
          If that doesn’t work you may have to remove the VMXNET3 entirely so that you only have one vNIC configured at a time. You can then add it back after the upgrade and remove the E1000.

          Reply
  2. Carsten

    I kept it a little bit easier which could even help when booting from ISO.

    I added the E1000 network card when Windows was already booted. This redundant connection to the PVS was sufficant to keep up the connection during VMXNet3 update. So for me there was no requirement to boot up from the E1000 adapter.

     

    Reply
  3. Adrian Beutler

    Carsten’s solution is brilliant. Simple and smooth.
    After months of troubleshooting i was finally able to update VM Tools on our Images.

    We use BDM disk as boot mode.

    Thank you, Carsten!
     

    Reply
  4. Brian

    Upgrading VMware tools on Citrix, maybe Citrix should hire Carsten, added extra e1000 nic while system was up, left mac at automatic, connection remained, VMware tools install finished, shut down, removed e1000 nic, booted.

    Wow, how easy was that.  Of course to be safe, keep a backup copy of your image and snapshot the vm before trying this procedure.

    Thanks Carsten!!!

    Reply
  5. Stefan

    Carsten, what os has your Target device?

    i tested it with 2008 r2 and my vm is crashing.

    Also, if i want to boot from the e1000 adapter, it stops booting with a bluescreen.

    Reply
  6. Carsten

    Hi Stefan,

    tested it with Win7, Win8 and 2008 R2 without any issue.

    Don’t boot from that adapter – might cause some issues. Add it during runtime, check if you have an IP and if you’re able to ping your PVS server through that adapter (ping <IP of PVS> -S <IP of E1000 Adapter>, and if so start the update.

     

    Reply
  7. Amar Honnungar

    Thanks mate. This works too. The other easy way is to use VMware Workstation to open the vDisk and update the Vmware tools, however it only works for VHD format and the latest VHDX is not supported.

    Reply
  8. Roman

    My target device is not boot from e1000. I get the error “bnistack failed, network stack could not initialized before change network add-on with vmxnet3 to e1000”. I found an Internet solution to this problem. It is advised to change the number of the pci slot on VMware. I tried this, but after turning on the power of the VM, the PCI slot again gets the original value. How to download a VM from e1000?

    Reply

Leave a Reply

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