PVS and XenServer Device Creation Script Version 2

Download

This is an updated version of this script:http://virtexperience.com/2012/07/30/citrix-provisioning-device-creation-script/

This script is designed to simplify installation of new XenApp machines in Citrix Provisioning environment. The script will:

  • (NEW) Create any number of VM’s in Xenserver based on a template vm (optionally)
  • Import the VM list from XenServer to PVS with correct MAC address
  • Create the machine in active directory under the correct OU (as long as OU is at root level)
  • Create DHCP reservation for the device in a single or redundant DHCP config.
  • Add TFTP bootserver name and bootserver file to the reservation
  • (NEW) Assign PVS boot ISO file to the VM

Just download the script, configure the variables and run.

Variables:

  • Strfilename=used for vm list export from xenserver, no need to modify
  • sitename=PVS site name where to create VM’s
  • collectionname= PVS collection name where to create VM’s
  • OU=Active directory OU name (works only if it’s located directly under root)
  • dhcp1=if you want to reserve IP for the VM in DHCP, enter DHCP server name. Blank will skip.
  • DHCP2=’For redundant DHCP, enter next DHCP server. Leave blank to skip DHCP2. For redundant scope, reserve outside of scope range to enable the same IP on both DHCP servers.
  • scope=ip net address of scope
  • tftpserv=name or ip of tftp server or tftp loadbalancer
  • pvsiso= If you want vm’s to get pvs iso mounted enter name of iso file, if not leave blank.
  • XENHOST=xenserver master host ip
  • XENUSER=xenserver user, usually “root”
  • VMPREFIX=Prefix for VM name if you want to create VM’s in Xen first. A number will be added to the prefix
  • XENTEMPL=name of XenServer template to create VM’s from

Script dialogs:

If you want to create the VM’s in xenserver first, select yes. Skip to proceed to PVS import.

Enter Xenserver password

Number of VM’s to create in Xenserver

Verify that VM’s has been created in XenServer

Select Yes to import VM-list from xen. If you select no, the last imported file will be used.

Select yes to edit the list before import, could be necessary to remove existing VM’s and templates before import. Select no to import all.

Remove template and existing VM’s from list.

Save file, and close notepad.

Yes to start deployment, no to quit.

Enter ip address for each VM to reserve in DHCP

A completion notice shows when import is complete.

Verify that VM’s has got the boot image mounted

IP reserved in both DHCP’s

Verify that TFTP bootserver name and file name is registred on each reservation.

Verify that machine accounts are created in AD

Verify that VM’s are created in PVS console. Assign a disk to the collection.

Download

One thought on “PVS and XenServer Device Creation Script Version 2

  1. Pingback: Citrix Provisioning device creation script | Virtual eXperience

Leave a Reply

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

*