How to Migrate PVS Target Devices

How to Migrate PVS Target Devices

While working on a Citrix project we decided to build a new Citrix Provisioning Services environment instead of upgrading. The current PVS Servers were running Windows 2008R2 on physical hardware and their PVS Farm had been upgraded several times over the past couple years. The customer wanted to use Windows Server 2012R2 virtual servers so it was determined that it would be easier to just build new and migrate.

One of the initial challenges with building this new PVS environment was how to get the all the existing PVS Target Devices created on the new PVS Site. In small environments you could just manually create the target devices and collections, but when you’re dealing with a large enterprise that has thousands of XenApp and XenDesktop vms streaming you would not want to manually create them. Citrix makes the process easy.

If you ever need to move PVS target devices and Collections in bulk you can follow these instructions.

Connect to the SQL Server hosting the Provisioning Server database.

Microsoft SQL Server Management Studio Username and PW

Right-click on the Provisioning Server database and select Tasks > Export Data.

SQL Server Mgm Task Export

Click Next at the Welcome to SQL Server Import and Export Wizard.

2016-03-07_9-44-53

Ensure that the value in the Database field is correct, and select Next.

PVS SQL Choose a DataSource

Set Destination as Flat File Destination and specify a path and file name (with .csv extension) to export. Ensure Column names in the first data row check box is not selected.

 

Choose a Destination PVS Devices

Select Write a query to specify the data to transfer option and click Next.

PVS SQL Specify a Copy or Query

Specify the following SQL query to export all Devices in a farm, alphabetically by Site, Collection, and Device name:

SELECT D.deviceName, D.deviceMac, S.siteName, C.collectionName

FROM dbo.Device D, dbo.Collection C, dbo.Site S

WHERE D.collectionID = C.collectionID AND C.siteID = S.siteID

ORDER BY S.siteName, C.collectionName, D.deviceName

PVS SQL Provide a Source Query

Use the default options and click Next.

PVS SQL Configure Flat File Destination

Use the default options and click Next > Finish>>|

PVS SQL Save and Run Package

 Click Finish.
SQL Export Complete
Click Close.

Complete the Wizard SQL Export

Exported File Target Devices from SQL DB

Login to your Citrix Provisioning Server and launch Provisioning Services Console.

Right Click on your Site and Select Import Devices.

PVS Console Device Collections Import Devices

Click Next to continue the Import Device Wizard.

Import Target Device Wizard Start

Browse for the Exported CSV File. Click Next to continue.

Import Target Device Wiz Import File2016-03-07_10-12-27If you haven’t already created the Device Collection in the new PVS environment you can leave the check box marked. Click Next.

Import Target Device Wiz Import T Device Options

Verify all the information and devices that you want to import. Click Next to Start the import.

Import Target Device Wizard New Target Device Wizard

When the import process is completed, click Done.

Go to your device collections and verify the devices were imported.

PVS Device Collection After Import

Importing Target Devices into Collections

How to Export Target Devices

Share or Save this:
Share

One thought on “How to Migrate PVS Target Devices

  1. Pingback: Provisioning Services – Console Config – Carl Stalhood

Leave a Reply

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