Skip to content

Instantly share code, notes, and snippets.

@MatiasVara
Created July 20, 2022 14:07
Show Gist options
  • Select an option

  • Save MatiasVara/16ddca3fea8f0a4387087a6128d1fa96 to your computer and use it in GitHub Desktop.

Select an option

Save MatiasVara/16ddca3fea8f0a4387087a6128d1fa96 to your computer and use it in GitHub Desktop.
This gist adds a cd iso to a VM to boot from.
#!/bin/bash
# See http://blog.coultard.com/2014/12/xenserver-setup-iso-share.html
xe vbd-list vm-uuid=[VM uuid] userdevice=0
xe vbd-param-set uuid=[Device UUID (not VDI UUID)] bootable=false
xe cd-list
xe vbd-list vm-name-label="<VM name>"
xe vm-cd-add vm="<VM name>" cd-name="<ISO name-lable>" device=1
xe vbd-list vm-name-label="newVM" userdevice=1
xe vbd-param-set uuid=[VBD device uuid, NOT vdi-uuid] bootable=true
xe vm-param-set uuid=[VM uuid] other-config:install-repository=cdrom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment