This may come up following my two ubuntu on XenServer guides. I figured I would explain what is happening and how to fix the error “Found 2 for VM, but only 1 is allowed” error from xe-edit-bootloader.
You do not see them when running vdi-disk-list against a VM, but cdroms also have a vbd associated with them. They are also marked bootable and for some reason xe-edit-bootloader does not have written into it the ability to filter out a cdrom drive. If you need to run xe-edit-bootloader and are getting this error, do the following:
xe vm-cd-list uuid=<UUID of the VM> xe vbd-param-set uuid<UUID of the cdrom> bootable=false
Now you should be able to run xe-edit-bootloader.