Jump to content
Welcome to our new Citrix community!
  • Updating VMware Tools but Giving you Three Options this Time Around


    raydavis22rnd.jpg by Ray Davis, CTA

    A couple of weeks ago, I was pressed by the security department to update VMware tools across four Citrix PVS sites. The task at hand isn't complex, but it can sometimes be a bit daunting. There are factors that I take into consideration. I needed to ensure that all sites are running the same ESXi version and that the VMware tools' compatibility was okay. Then because I use vGPU, it will allow me to install multiple vGPU profile drivers in the image, reducing the overall image management. There are three ways I do this to achieve it.

    The first one is the E1000 excellent way, the second one is the bcdedit way, and the last one is the old fashion image reverse. Now, this is for VMware in a PVS environment. MCS is different and doesn't require all the work. That is one good benefit of MCS, I would say. Now for those who are wondering about AHV, this guide doesn't cover any AHV stuff. We all know AHV is a different animal. But it's a good animal, and I love it compared to VMware. VMware is good as well, but I am a Nutanix fanboy, and that is how it is for me.

    Okay, enough small talk, let's get started.

    Way 1 - E1000

    1. Launch the PVS console
    2. Place the PVS Vdisk in private mode. (Changes will be persistent)
      1. Note you can't do this while devices are streaming.
      2. Merge the vDisk into a merge base + updates.
      3. Copy the new VHDX that was merged. It will have the same name but appended at the end of the name, and it will say copy.VHDX
      4. Rename the copy.VHDX
      5. Import the NEWNAME.VHDX into vDisk Store.
      6. Assign to PVS Master Target to NEWNAME.VHDX (vDisk)
    3. Make sure vDisk is in Private mode
    1. Power on the VM or, in most cases, the Master Device that is used to update the image. Each setup may be different.
    1. Press 1 to boot into Private Mode
    1. While the machine is booted, navigate to the VMware console, and edit the settings of the VM.
    2. Select add a new device and add in a second network interface card. Ensure the type of card is E1000.
    1. The VM will automatically detect the newly added hardware.
    2.  Wait until Windows installs the network driver and power down the machine.
    1. Navigate back to the VM console and record the MAC address of the newly added E1000 network card.
    1. Return to the PVS console and edit the target device properties. Edit the MAC address to reflect the address of the E1000 card that was recorded in the previous step.




    1.  Change bios settings to access this boot menu:
    1. Select the E1000 card from the boot devices. The machine should boot from the newly added card.
    1. Once booted, update VMware Tools as you normally would any standard VM. The VMXNET3 driver will update without any disconnects from the streamed vDisk.
    1. Once updated, shut down the VM. Navigate back to the VMware console and remove the E1000 network adapter from the VM settings.
    1. Return to the PVS console and edit the target device properties. Edit the MAC address to reflect the original VMXNET3 network card.
    1. Power the machine back on, and it will boot as expected now.
    1. Open device manager and select view hidden items. Expand the network adapters section. Locate the E1000 device, right click and select uninstall. This is done because Ghost nics could slow down the streaming and junk up the OS in time. I have seen it multiple times in the past. I do this with BISF in my sealing process usually as well.
    1. Once uninstalled, power down the VM and head back to the PVS console to switch the vDisk back to standard mode. (Read only)
    1. Your VMware Tools is now updated. You may power on the VMs using the image in standard mode.
    2. Any new vDisk updates now will reflect on the updated version of Tools. If you use this image to copy to other sites, make sure the ESXi host versions match or it will BSOD in another site.

    Way 2: bcdedit

    I have performed this operation three times in my career, and it works like a treat. My screenshots here are older because it was a blog I started about three years ago and never got around to finishing. Well, up until now.

    Windows 7 and newer can boot from VHD files. Build a Windows 7 or unique virtual machine, copy the vDisk VHD to the C: drive of the Windows 7 machine, and then configure bcdedit to boot from the VHD. Newer versions of Provisioning Services create VHDX files instead of VHD. For VHDX files, the bcdedit method requires Windows 8 or newer.

    From <https://support.citrix.com/article/CTX202159>

    1. Copy the VHDX or VHD to a 2012R2(VHDX) or a 2008R(VHD). I didn't use the P2PVS or XenConvert. I followed Carl Stalhood's method.
      1. bcdedit /export C:\bcdbackup\bcd
      2. bcdedit /copy {default} /d "vhd boot (localte)"
    1. bcdedit /set {f63aa0ca-7ae1-11e6-a793-b700492673f5} device vhd=[locate]\XA2012R2
    2. bcdedit /set {f63aa0ca-7ae1-11e6-a793-b700492673f5} osdevice vhd=[locate]\XA2012R2
    1. At this point just restart the machine. Make sure you're connected to the console of the VM in either VSphere or the web sphere.
    1. Log into the machine with the local Admin account.
    2. Same IP, and same name.
    1. Uninstall PVS Target Tools.
    1. Now upgrade VMware tools.
    1. Now reinstall PVS Target Tools. PVS Target Installer must be installed only after VMware tools are updated.
    2. Attach the ISO and Install.
    3. Now reboot the Server, and go into the regular Boot operation, not the VHDX or VHD.
    4. You can rename the VHDX or VHD now if you like.
    1. Copy an existing PVP file, then name it the same as the renamed VHDX.
    1. Import it into PVS.
    1. Search for the new vDisk and click add.
    1. Now go to Target and change the vDisk for the device.
    1. You can also drag the vDisk to the correct collection, and it will replace all vDisk with this new one.
    2. As you can see, it booted.

    Way 3 - Reverse Image

     *NOTE* A while back, I did an in-place upgrade on a PVS target from 2012R2 to 2016. I would not recommend this in a production environment. This was me seeing the outcome and how well it performed. It did fine, but it was a base OS and didn't have tons of applications. The goal here is to show you how to upgrade things in the OS that would only impact the PVS stream/Nic setting. It was not to offer you or to say, "hey, do in-place upgrades." I see some folks ask this at times, and this statement isn't telling you that you can do it. It's just an example of another way I did VMware tools and other tasks. If you do an in-place upgrade, please remember that Way 3 is at your own risk, and my advice is against it. I do not support it officially. I had to get that out of the way so that anyone would say, "hey, he did it. Why can't I?" 😊

    This is what's called a reverse image. Currently, I am going to upgrade the OS from 2012R2 to 2016.

    PVS will blow up with the NIC settings change, so a reverse image is the best choice if you have other heavy actions that need to be completed. It allows you to keep the original intact while creating another base disk.

    1. Merge the vDisk.
    1. Make another Store ( this was something I performed to keep things clean and separated).
    2. Create the folder wherever the vDisk will be stored. For me, its E:\XA7-IT-Applications.
    1. Copy Vdisk





    Now rename the vDisk to the new name. I make it the same across everything.

    1. Import vDisk.

    When you see this, it's okay. The PVP file is supposed to be missing. When it imports the new vDisk, it will add the PVP file.


    Now you see the vDisk in the vDisk pool.


    Make vDisk Private if not already set.

    1. Create a Device in PVS (or use another one if needed).

    Now, we need to have a device boot from this vDisk. I will take on my Reverse Device I created a while back and point it to the vDisk just for now.

    I will use this one:


    I will go into the properties of it and tell it to boot of the new Vdisk.

    You can add and remove it here (the screen shot is an example of what you need to do).


    Now you can see it's changed.


    Let's boot the machine up and ensure it's operating and booting up.


    Add new vDisk to maintenance disk.

    From the Hypervisor, just add a disk to the VM. This is the part that will be used to copy the partition to the newly added drive.

    Give new vDisk ( VMware Drive) an extra drive that is larger or the same size as the existing vDisk (for cloning).

    Turn on vDisk or machine.

    Go into Windows, mark the other drive with a drive letter, and mark it as an active partition.

    Log in, then follow reverse imaging https://support.citrix.com/article/CTX202159

    Reverse imaging

    1. Boot the PVS target device into the vDisk using private\maintenance mode.
    1. If the Provisioning Services target device installed in the system is 7.15 skip the new two steps and use the P2PVS.exe in the Provisioning Services target device installed directory (C:\Program Files\Citrix\Provisioning Services by default) to do reverse imaging.
    1. Install PVS_UpgradeWizard.exe or PVS_UpgradeWizard_x64.exe from the Upgrade folder of the ISO image of the latest Provisioning Services release to get the latest P2PVS.exe.  The upgrade wizard can also be installed with the Provisioning Services meta-installer using the Target Device Installation > Install Upgrade Wizard option.  This is done because the upgrade wizard has the latest version of P2PVS.exe.
    1. I updated the Target to PVS 7.19 (1808). I was able to get the latest P2PVS file. ( I know it says 1808, It was a blog I started and just now finishing)
    1. Run P2PVS.exe from the Provisioning Services Upgrade Wizard directory (by default, this directory is C:\Program Files\Citrix\Provisioning Services UpgradeWizard).
    1. I had to go into disk manager and initialize the 80GB disk, I added from VMware. (It's labeled as a new volume.)
    2. Click the drop-down menu and choose Citrix Provisioning vDisk to this machine and click Next.

    For this, I had to remove all network drives and make sure the only thing listed here was the C:


    Once the reverse image is completed, shutdown the machine.

    Go into PVS, and tell it to boot from the hard disk now.


    Disable ISO (because we boot to that machine up to the native drive now that was reverse imaged). The extra drive we added and the copy is now on.


    Power the machine up, and go into the BIOS settings.

    Change the boot order to boot off the drive you reverse imaged.


    It should boot from the C drive of the hard disk that is on the VM side now.

    • Upgrade VMware tools
    • Updated PVS Target software
    • Removed Trend from Servers
    • Upgraded 2012R2 to 2016 OS

    Remove PVS target software and install the same version you have on the PVS server.

    At this point, we need to perform the imaging wizard task and convert it back to vDisk for PVS and perform normal PVS operations as you would.

    Hopefully, someone finds this helpful. As always, thank you.

    See more posts from Ray Davis.




















































    User Feedback

    Recommended Comments

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Create New...