I wrote an article about Adding Machines to a Personal vDisk Citrix XenDesktop 7.x Machine Catalog and received an email asking what is the process to completely undo everything done by the PVS XenDesktop Setup Wizard. In this article, I will show the process.
In the original articles Adding Machines to a Personal vDisk Citrix XenDesktop 7.x Machine Catalog and Citrix XenDesktop 7.6, Provisioning Services 7.6 and the XenDesktop Setup Wizard with Write Cache and Personal vDisk Drives, the PvD lab consisted of:
- Delivery Group (Figure 1),
- Machine Catalog (Figure 2),
- Virtual Machines (Figure 3),
- Target Devices (Figure 4),
- Device Collection (Figure 4),
- vDisk (Figure 5), and
- Active Directory Machine Accounts (Figure 6).
If an attempt is made to delete the Delivery Group at this point, a warning is given as shown in Figure 7. You should answer No to the warning popup.
If an attempt is made to delete the Machine Catalog, an error message is given as shown in Figure 8.
I am positive that others have their own process to completely undo the process of the XenDesktop Setup Wizard, this is the process I use and have had no issues. The process I use is designed to make sure both the XenDesktop Site Configuration database and the PVS farm database have no issues when everything is done. I am sure others use fewer steps, but hey this is CarlWebster.com, not SomeoneElse.com.
Step 1 Place the Delivery Group Into Maintenance Mode
In Studio, click the Delivery Group in the middle pane and then click Turn On Maintenance Mode in the right Actions pane as shown in Figure 9.
Click Yes as shown in Figure 10.
The Delivery Group is placed into maintenance mode as shown in Figure 11.
Step 2 Power Off the Desktops
Using either the hypervisor or Windows, shutdown the desktops that are in the Delivery Group. The Windows Shutdown GUI utility (shutdown -i) is shown in Figure 12.
When all desktops are powered off, as shown in Figure 13, continue on with Step 3.
Step 3 Remove Machines from Delivery Group
Click View Machines in the right Actions pane as shown in Figure 14.
Select all the machines and click Remove from Delivery Groupfrom the right Actions pane as shown in Figure 15.
Note: What is the difference between Delete and Remove from Delivery Group? Deleting not only removes the machines from the delivery group but deletes the machines from XenDesktop. That makes the deleted machines no longer available to use. Removing the machines, removes them from the Delivery Group but leaves the machines in XenDesktop so they can be reused in the future if needed. In other words, that allows you to undo your removal.
Click Yes as shown in Figure 16.
Click on the Delivery Group as shown in Figure 17. The machines have been removed from the Delivery Group.
Step 4 Delete the Delivery Group
Click Delete Delivery Group in the right Actions pane as shown in Figure 18.
Click Yes as shown in Figure 19.
The Delivery Group is removed as shown in Figure 20.
Step 5 Delete Machines
In Studio, click the Machine Catalog and then click View Machines in the right Actions pane as shown in Figure 21.
Select all machines and click Delete in the right Actions pane as shown in Figure 22.
Click Finish as shown in Figure 23.
Click the Machine Catalog, the Machines tab and all machines have been removed from the catalog as shown in Figure 24.
Step 6 Delete Machine Catalog
Click the Machine Catalog and then click Delete Machine Catalog in the right Actions pane as shown in Figure 25.
Click Finish as shown in Figure 26.
The Machine Catalog is deleted as shown in Figure 23.
Step 7 Delete Active Directory Machine Accounts
In the PVS console, click the Device Collection, select all Target Devices, right-click, select Active Directory and click Delete Machine Account… as shown in Figure 28.
Click Delete Account as shown in Figure 29.
The Active Directory Machine Accounts are deleted as shown in Figures 30 and 31.
Step 8 Delete Target Devices
Select all the Target Devices, right-click and click Delete as shown in Figure 32.
Click Yes as shown in Figure 33.
As shown in Figure 34, the Target Devices have been deleted.
Step 9 Delete Virtual Machines
Use the hypervisor to delete the virtual machines created.
For XenServer, you can use XenCenter to delete the virtual machines. Select the virtual machines to delete, right-click and select Delete…as shown in Figure 35.
All the virtual machine, write cache and PvD disks are selected. Click Delete as shown in Figure 36.
As shown in Figure 37, all the selected virtual machines are deleted.
Optional Step 10 Delete the Device Collection
If you will no longer use the Device Collection, it can be deleted.
In the PVS console, right-click the Device Collection node to be deleted and select Delete as shown in Figure 38.
Click Yes as shown in Figure 39.
As shown in Figure 40, the Device Collection node has been deleted.
Now you have undone all the work completed by the XenDesktop Setup Wizard. Your PVS and XenDesktop environment should be back to the state it was in before running the wizard. The only items left are the original vDisk, Device Collection and Target Device created when the PVS Imaging Wizard was run.
If you have any questions, please feel free to email me [email protected]