Resizing a Personal vDisk of a catalog using the resize-personal-vdiskpool.ps1 script on XenServer

Resizing a Personal vDisk of a catalog using the resize-personal-vdiskpool.ps1 script on XenServer

book

Article ID: CTX219476

calendar_today

Updated On:

Description

Resizing a Personal vDisk of a catalog using the resize-personal-vdiskpool.ps1 script.


Instructions

Resized the PVD by following the below steps:

1. Verify the version of PowerShell installed on your Delivery Controller by running the following command: $PSVersionTable.PSVersion

2. The minimum version supported to execute the script is v4. The output will look similar to:

User-added image

3. If it is on a version below v4, download and install it from https://www.microsoft.com/en-us/download/details.aspx?id=40855 after determining the appropriate file from the download link.

4. After installing, repeat step 1 and 2 to check the version of powershell. If the output is similar to the above screenshot, proceed with the next steps.

5. Download the XenServer 7.0 (regardless of your current XS version) PowerShell Snap-in from: http://downloadns.citrix.com.edgesuite.net/11625/XenServer-7.0.0-SDK.zip and copy it over to your Delivery Controller.

6. If your XenServer is on version 6.x, download XenServer 6.2.0 SDK from https://downloads.citrix.com/7306/XenServer-6.2.0-SDK.zip?__gda__=1481328714_490b574de7f945e0de5cbd8f243d958e and install the XenServerPSSnapIn-6.2.0-1.msi from the location “%Download_Directory%\XenServer-6.2.0-SDK\XenServer-SDK\XenServerPSSnapIn_old”.

7. Now open a PowerShell (x86) session on your Delivery Controller as an administrator and change the Execution Policy to Remote Signed (if not set already) by running the command: Set-ExecutionPolicy RemoteSigned

8. Now we need to import the XenServer PowerShell modules. To do this browse to the following directory from PowerShell: “%Download_Directory%\XenServer-7.0.0-SDK\XenServer-SDK\XenServerPowerShell\XenServerPSModule”.

9. Run the command: Import-Module .\XenServerPSModule.psd1

10. Now browse to the location of the resize-personal-vdiskpool.ps1 script and execute the file. The script is located in Support\Tools\Scripts folder of the full or upgrade image.

11. On executing the file, select the appropriate catalog and specify the new size of the PVD.

User-added image

12. After specifying the size, the script will display the settings. Confirm the same and authenticate to XenServer by keying the credentials of your root (default) account.

User-added image

13. After the authentication, the script will automatically resize the PVDs. You can verify it by checking the size of PVD drive either on hypervisor or by logging in to the VM.

Note:
  • The Studio will still display the old size of the PVD and it will not change even after resizing it.
  • A PowerShell script is included in this release that allows you to resize all the existing personal vDisks in a catalog. The script iterates through the machines in the catalog, changing the size where possible. Resizing takes effect the next time the machines are switched on.

  • You cannot resize PvDs on Windows XP machines hosted on XenServer using the script.

  • Do not use the script to manage existing environments in other ways. Use Desktop Studio or Provisioning Services for other management operations.

Environment

The above mentioned sample code is provided to you as is with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the sample code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the sample code.

Additional Information

https://support.citrix.com/article/CTX133400