document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. sr=session.xenapi.SR.get_by_name_label("DVD drives")
  2. record_dvd=session.xenapi.SR.get_record(sr[0])
  3. VDI_dvd=record_dvd["VDIs"]
  4. vbdconnectcd={'VDI':VDI_dvd[0],
  5. 'VM':VM_ref,
  6. 'userdevice':"1",
  7. 'mode':"RO",
  8. 'type':"cd",
  9. 'bootable':True,
  10. 'unpluggable':True,
  11. 'empty':False,
  12. 'other_config':{},
  13. 'qos_algorithm_type':'',
  14. 'qos_algorithm_params':{}}
  15. vbdref1=session.xenapi.VBD.create(vbdconnectcd)
');