Citrix PVS Boot Device Manager

Using Citrix NetScaler you can load balance TFTP requests to deliver the bootstrap file to PVS Target VMs. You can provide PVS boot information from an ISO generated by Boot Device Manager. You can also use PXE built right in to PVS or use DHCP via options 66/67.

To deploy NetScaler TFTP Load Balancing see here.

I have already gone over the PXE boot option with PVS which you can find here. The problem with PXE is that only one PXE server can reside on the same subnet. This provides a single point of failure.

The same goes for DHCP. If you use DHCP options 66/67 to hand out the TFTP server and boot file name, DHCP can only send clients to one IP address. You could point option 66 towards a DNS record which resolves to all your PVS servers in a round robin fashion. I have tested this but if a PVS server is offline the results really are unpredictable. Using this method is not 100% fail proof.

1-min

NetScaler is more helpful because it comes with monitors. It can detect when a PVS server is down and won’t send clients to that PVS server until it is back online. This provides High Availability.

BDM is the same as NetScaler in a way. If one PVS server fails clients using the Boot Device Manager ISO may attempt to retrieve the file tsbbdm.bin from a failed PVS server during boot but will quickly move on to the next PVS server in the list. Whilst BDM does not depend on PXE/DHCP to deliver the information, you do have to attach the generated ISO to every Target VM by way of DVD drives. You do also need a PXE booting capable NIC of course to boot to a streaming vDisk.

To configure and deploy Boot Device Manager in your environment, open your PVS console and connect to the PVS farm.2-minRight-click Provisioning Services Console -> Create a Boot Device. 3-min

Here you must specify your PVS hosts via IP address or host name. I created a DNS A record of pvs.citrixpro.co.uk which resolves to PVS01 and PVS02 which are my two PVS servers. Click Next.4-min

Within DNS manager, the two PVS A records pointing to PVS01 and PVS02 are shown.5-min

Back on the Boot Device Management wizard I like to enable Verbose Mode just to grab more information during boot. Click Next.6-min

Select Use DHCP to retrieve Device IP and complete other fields such as Primary DNS Server Address and Domain Name. Select Citrix ISO Image Recorder from the drop-down menu and click Burn. This will create an ISO file.7-min

Specify a location to save the BDM ISO file and click Save.8-min

Click OK once the Successful message appears.9-min

Now depending on your environment you need to store the ISO in a highly available location that all your PVS Target VMs can access to get at the ISO file. For simplicity in this instance I have used a CIFS file share running on a Windows Server VM.10-min

The CIFS share details shown below within the XenCenter console.

11-min

After importing the ISO file to the CIFS share it appears in XenCenter.12-min

At this stage we can attach the ISO to a virtual DVD drive.13-min

14-min

Once we boot the VM it has contacted PVS01 to download the bin file and PVS02 to launch the vDisk.15-min

After a restart the VM boots from PVS01.16-min

Now as a test I have turned PVS01 off. Lets see how the Target VM acts.

17-min

The VM boots and notice how it tries to download the bin file from PVS01 first but fails and moves on to PVS02 and boots from PVS02. This proves the boot process is highly available.18-min

PVS01 is started back up and PVS02 turned off.19-min

The VM boots, tries to grab the bin file from PVS02, realises it cannot, moves to PVS01 and boots from PVS01.20-min

The Boot Partition method

Instead of creating a BDM ISO you can create a Boot Device Partition to include the bootstrap file in a small virtual disk attached to each PVS Target Device VM. You can manually create the BDM media or have the XenDesktop Setup Wizard automatically create the partition for you. For now we will concentrate on the manual method. You need to add a virtual disk to the PVS server or a server that has access to BDM.exe. Within Hyper-V run through the New Virtual Hard Disk Wizard. Choose to create a VHDX. Click Next.

21-minSpecify Dynamically expanding. Click Next. 22-minSpecify a name and location. 23-minChoose a file size. The size Citrix actually set is 100MB as the BDM media is very small. Some customers have been known to add the 100MB partition on to existing drives such as the Write Cache drive. 24-minClick Finish. 25-minRun diskmgmt.msc within the server that has the BDM disk attached. Right-click the new disk and click Online. 26-minRight-click again and choose Initialize Disk. 27-minClick OK. 28-minNow right-click the unallocated space -> New Simple Volume… 29-minClick Next. 30-minClick Next. 31-minChoose Do not assign a drive letter or drive path followed by Next. 32-minSpecify a volume name. Click Next.33-minClick Finish. 34-minNow right-click the BDM partition and select Mark Partition as Active. This will tell any device that this is a bootable partition. 35-minOpen the Boot Device Management tool on your PVS server. 36-minYou can also copy the BDM.exe application from a PVS server allowing you to run the tool anywhere. Since the PVS server is likely to be 64bit you will need to run BDM.exe also from a 64bit computer or you can install the PVS Console from PVS install media to obtain BDM.exe regardless of processor architecture. 37-minChoose Use static IP address for the Server. Click Add. 38-minEnter your PVS server IP address. 39-minYou can add a maximum of 4 servers. Click Next. 40-minEnable Verbose Mode (optional). 41-minUnder Boot Device choose the small partition we have provisioned to be the BDM partition. Click Burn. 42-minClick OK.43-minEnter Yes and click OK. 44-minClick OK. 45-minNow we need to detach the virtual disk. Edit the properties of the appropriate server and click Remove on the BDM drive. At this stage you can make use of scripts to copy and mount the VHD file to multiple Target VMs. You will also attach the disk to any Virtual Machine Templates so that new VMs receive the BDM partition. 46-minWith a device now using the BDM partition the boot information will look similar to below. 47-minTo skip the manual creation of a BDM partition and instead have PVS create one automatically during machine creation you can make use of the XenDesktop Setup wizard as previously mentioned. Starting PVS 7.9+ this partition can also be updated on the fly if a PVS IP address changes or PVS servers are removed/added to the bootstrap. Previously such a change meant the BDM partition needing recreated. 48-minAfter using the XenDesktop setup wizard the Target Device VM has a 8MB VHD file containing the bootstrap. 49-minIf you need to make a change to the bootstrap right-click a PVS server and click Configure Bootstrap. 50-minYou can add or remove servers from the list and change IPs. Click OK. 51-minMake sure the desktops are turned off before they receive a BDM update. 52-minRight-click the Target Device and select Update BDM Partitions. You can select multiple Target Devices or select entire collections. 53-minClick Update Devices. 54-minA Success message should appear and the updated VMs will start using the new bootstrap file. 55-min


3 Comments

  • Per-Ole

    September 20, 2016

    How can you apply the BDM iso to all VMS with out using xencenter? I have 600 vdi i want to use BDM. Been trying with powershell but having problems getting to mount iso with it.

    Reply
    • George Spiers

      September 21, 2016

      Create a TXT file with a list of your VDI VMs (one per line).

      Use PowerCLI, connect to a VMware Host (Connect-VIServer).
      $vmlist = “c:\temp\vms.txt”
      $vms = Get-Content $vmlist
      New-CDDrive -VM $vms -ISOPath “[datastore] ISO\bdmiso.iso”
      Where datastore = your datastore that holds the BDM ISO and where bdmiso.iso = your BDM ISO name.

      Reply
  • V@12345

    July 17, 2017

    Very Helpful…

    Reply

Leave a Reply