Create a new VM from the "Other install media" template.
Returns the new uuid of the VM
shell> xe vm-install new-name-label=LDAP-01 sr-uuid=279d2fee-06a3-69d7-6229-1479d50065e9 template-name-label="Other install media"
12aef3fb-5b69-f340-a773-5c9deab3fd43
Display the new VM available
shell> xe vm-list
uuid ( RO) : 12aef3fb-5b69-f340-a773-5c9deab3fd43
name-label ( RW): LDAP-01
power-state ( RO): halted
Graphical overview of storage repositories and related objects

Add and attack a new root disk to the virtual machine in the storage record
shell> xe vm-disk-add disk-size=5GiB device=0 sr-uuid=279d2fee-06a3-69d7-6229-1479d50065e9 uuid=12aef3fb-5b69-f340-a773-5c9deab3fd43
Get the UUID of the root disk of the new VM
shell> xe vbd-list vm-uuid=12aef3fb-5b69-f340-a773-5c9deab3fd43 userdevice=0 params=uuid –minimal
234a7fa9-5c5c-9ea3-3372-4d95c260e262
Using the UUID returned, set the root disk to not be bootable
shell> xe vbd-param-set uuid=234a7fa9-5c5c-9ea3-3372-4d95c260e262 bootable=false
Get the name of the physical CD drive on the XenServer host
shell> xe cd-list
uuid ( RO) : 33fddaa8-7832-4068-bf00-3fd3d3aa3bd1
name-label ( RW): debian-cd1-x32.iso
Add a virtual CD-ROM to the new VM using the XenServer host CD drive name-label parameter as the cd-name parameter
shell> xe vm-cd-add cd-name="debian-cd1-x32.iso" device=3 uuid=12aef3fb-5b69-f340-a773-5c9deab3fd43
Get the UUID of the VBD corresponding to the new virtual CD drive
shell> xe vbd-list vm-uuid=12aef3fb-5b69-f340-a773-5c9deab3fd43 type=CD params=uuid –minimal
ca1d045b-3660-e51a-d39d-e078d60681e4
Make the VBD of the virtual CD bootable
shell> xe vbd-param-set uuid=ca1d045b-3660-e51a-d39d-e078d60681e4 bootable=true
Set the install repository of the VM to be the CD drive
shell> xe vm-param-set uuid=12aef3fb-5b69-f340-a773-5c9deab3fd43 other-config:install-repository=cdrom
Get network bridge information
shell> xe network-list bridge=xenbr0 params=uuid –minimal
f0ab0558-7b62-e606-8c68-19e138946baa
shell> xe network-list bridge=xenbr1 params=uuid –minimal
e03fdbb9-8f4f-eb6e-67a6-e727e9218523
shell> xe network-list bridge=xenbr2 params=uuid –minimal
32b044a8-be9b-1725-1c0a-45f4079adbe1
Add a new network interface into the new virtual machine
shell> xe vif-create vm-uuid=12aef3fb-5b69-f340-a773-5c9deab3fd43 network-uuid=f0ab0558-7b62-e606-8c68-19e138946baa device=0
6ff94379-6e81-7fc4-04fb-f60a31338603
shell> xe vif-create vm-uuid=12aef3fb-5b69-f340-a773-5c9deab3fd43 network-uuid=e03fdbb9-8f4f-eb6e-67a6-e727e9218523 device=1
398540cb-983f-a534-2c09-4421b78d5835
shell> xe vif-create vm-uuid=12aef3fb-5b69-f340-a773-5c9deab3fd43 network-uuid=32b044a8-be9b-1725-1c0a-45f4079adbe1 device=2
35949dc2-eead-cde7-9c86-1b94e93bbfc5
Start the VM; it boots straight into the Debian installer
shell> xe vm-start uuid=12aef3fb-5b69-f340-a773-5c9deab3fd43
Now you can open a console to the new VM and deploy the installation

Nice one