To add more than one CD/DVD drive to a VM, complete the following procedure:
- Run the following command to find the UUID of the VM for which you need to add a new virtual CD-ROM drive.
xe vm-list name-label=<name of the virtual machine>
- Check the availability of user device numbers for your VM.
Note: VMs running on XenServer support upto seven virtual disk devices. The device number ranges from 0 to 7. Run the following command and check the “userdevice” values:
xe vm-disk-list uuid=<uuid of VM>
- Note the highest value. If highest value for “userdevice” is 2, then use 3 for next step.
- Run the following command and find a free VBD number:
xe vm-param-list uuid=<VM UUID> | grep allowed-VBD-devices
- Run the following command to add a new CD-ROM drive:
xe vm-cd-add uuid=<VM UUID> device=<unused/free user device number from point 3>
- Open XenCenter and check if the new CD drive is available.Note: Remember that the general limit of virtual devices still exists. For virtual disks, including virtual CD-ROM, it is seven virtual devices.
- Insert ISO into DVD drive of VM.
- To remove the device if necessary, run the following command:
xe vm-cd-remove uuid=… cd-name=<ISO Name mounted in device to remove>
For example, xe vm-cd-remove uuid=… cd-name=xs-tools.iso.
Note: You might be prompted to insert the cd-name parameter. cd-name is the exact name of an ISO in one of the ISO repositories.