Upgrading 2008R2 PVS Image to Windows 2016

Disclaimer: Unless you have a really good reason (laziness works), then I wouldn't go down this road.

Use the P2PVS or XenConvert Wizard to copy the disk to a hard drive.

So now that you have a method of being able to boot directly to the PVS image without networking, let's talk about getting the image upgraded to 2016. If only it were as simple as just sticking the CD in and letting it run. Well it is, SORT OF. So the first thing you want to do is uninstall any anti virus software, VDA, PVS Target Device. You want to make sure your tools are up to date as well. After you've made sure everything is uninstalled. MAKE A SNAPSHOT. If the upgrade goes left, then you do not want to have to redo the image copy again.

Insert the Windows 2012R2 CD. Why not 2016? See my previous blog regarding upgrading to 2016. Click Install. You can skip the updates unless you just like wasting time. 😀 Click to Upgrade. Do all the unnecessary EULA stuff and allow the OS to upgrade. This may take up to an hour depending on how much software is on the image. The only thing worth noting during this process is that my Windows 2012 R2 installation kept reset after the "Setup is starting" screen. It would go back to the original click "Install" window. This ended up being an issue with Windows not knowing where to put the temp files. So I ran the following from the command line:

C:\$WINDOWS.~BT\Sources\setup.exe /runlocal /BTFolderPath:C:\$WINDOWS.~BT    /OSImagePath:"D:\Sources"  /uilanguage:en-US /targetlanguage:en-US /tempdrive:c

When you run a Windows Installation CD, it copies contents of the ISO to your local drive. That's the first part of the statement. The OSImagePath needs to be set to the drive that's connected to the ISO. The last part just requires you to let the installation know where to store the temporary information. Hope that helps someone because it can make you scratch your head a little while.
After the installation is complete, I would recommend running all the software that was on the original image. Verify that everything works. If Office was previously installed, then the first run will likely rerun the config wizard just to put back all the pointers and classes within the registry. I wouldn't worry about that part too much unless you are stopping at Windows 2012R2. Once you have verified that Windows 2012R2 is solid, then proceed with running a disk clean up to remove the previous Windows Installation from the OS. Once disk clean up is complete, reboot and you guessed it MAKE ANOTHER SNAPSHOT.

Now insert the Windows 2016 installation CD. Again, you can skip the updates. Skip through the EULA stuff, select to Keep Settings and Files. After this, Windows will "make sure you're ready". They are so nice, right!!! Once this part is complete, then you may receive a screen which lets you know if there's anything that might not convert over. You will have to confirm each item. The last thing will be a warning that this method is not supported. Remember my disclaimer??? You can confirm this as well. You will then get the green light to install. After the upgrade is complete, you will follow the same process as with the 2012R2 Upgrade. Verify all of the software still works. Run disk clean up. MAKE A SNAPSHOT. 

For our environment, some of our VMs have GPUs attached. Typically, you can jump from 2008R2 to 2012R2 with no driver issues. However, moving from 2012R2 to 2016, you will likely need to update the graphics drivers. You will want to make sure to do this before installing the VDA agent.
After the snapshot and updating graphics drivers, proceed with cleaning up the OS of any hidden devices in device manager. I would also run any windows updates. After this is complete, then you can install the PVS Target Device. After the installation, proceed with running the Imaging Wizard. If you used the BCDEDIT method, then you could just copy the disk back to PVS and boot it. However, I like to perform a fresh copy back to PVS.  So allow the machine to reboot and copy the HD back to a vDisk.


Once the vDisk has been copied, shutdown your VM and switch the PVS Device to Boot to vDisk instead of Hard Disk. Power up the the VM again. It should boot to your new 2016 PVS vDisk. If this is successful, then power the machine back off. Remove the snapshots. Remove the HD with 2016. Power the machine back on and ensure there are no ghost devices.
You want to remove any devices which are hidden/inactive devices prior to installing the VDA. For the ghost nics in Xenserver, I would suggest removing them through the registry using something like PSEXEC. It is a lot easier and cleaner. I've seen where removing them using device manager causes you to have to rerun XenTools to get the NIC to not keep assigning APIPA.  If you run regedit as system using PSEXEC (psexec -i -s regedit), then you can remove the extra NICs. I've never seen any issues with using this method and I've used it for years now.  If you take a look at the example, then the first two NICs represent the valid NICs in device manager. But 2 - 9 Keys are not valid as the properties are empty so those keys can be removed. If you remove them and refresh device manager, then you will notice that the ghost NICs disappear.

After all hidden devices are uninstalled, you can proceed to install the VDA. If this is a VDI, then ensure to run the WorkstationSetup with the servervdi switch. In certain instances, you may need to rebuild the WMI Repository since we've upgraded the OS twice. This will give you the infamous 1603 error when you try to install the VDA.  You can follow this Citrix article. Make sure to look at the error log to see which msi failed. Then you can go to %temp% and MSI Log files to figure out what's happening. 

Another GOTCHA is during an in place upgrade, the netlogon service is set to manual. This will cause an issue when you get ready to test the login to the VDA. Make sure to set the NETLOGON service back to Automatic and reboot. Here is the article which explains the behavior. You will likely get the error "an attempt was made to logon but the network logon service was not started". 

After the installation is complete, attach the VM to a Machine Catalog and Delivery Group if not already done. Test logins and verify everything is still working. Seal your image and begin testing with users. 

Hopefully, you guys found this informative. Shoot me a comment about your experiences.


No comments:

Post a Comment

ADC PCoIP Gateway + Cisco DUO

So for this configuration, I used Carl's article ( https://www.carlstalhood.com/netscaler-gateway-12-pcoip-proxy/ ) and Duo Radius Confi...