1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-10-31 19:44:16 +00:00

take over precedense sata to scsi

This commit is contained in:
catborise 2022-09-05 15:37:23 +03:00
parent 97acbd9843
commit 4abf62702a

View file

@ -296,10 +296,10 @@ class wvmCreate(wvmConnect):
<readonly/>""" <readonly/>"""
if "ide" in dom_caps["disk_bus"]: if "ide" in dom_caps["disk_bus"]:
xml += """<target dev='hd%s' bus='%s'/>""" % (hd_disk_letters.pop(0), "ide") xml += """<target dev='hd%s' bus='%s'/>""" % (hd_disk_letters.pop(0), "ide")
elif "sata" in dom_caps["disk_bus"]:
xml += """<target dev='sd%s' bus='%s'/>""" % (sd_disk_letters.pop(0), "sata")
elif "scsi" in dom_caps["disk_bus"]: elif "scsi" in dom_caps["disk_bus"]:
xml += """<target dev='sd%s' bus='%s'/>""" % (sd_disk_letters.pop(0), "scsi") xml += """<target dev='sd%s' bus='%s'/>""" % (sd_disk_letters.pop(0), "scsi")
elif "sata" in dom_caps["disk_bus"]:
xml += """<target dev='sd%s' bus='%s'/>""" % (sd_disk_letters.pop(0), "sata")
else: else:
xml += """<target dev='vd%s' bus='%s'/>""" % (vd_disk_letters.pop(0), "virtio") xml += """<target dev='vd%s' bus='%s'/>""" % (vd_disk_letters.pop(0), "virtio")
xml += """</disk>""" xml += """</disk>"""