mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
fix instance create error handling
This commit is contained in:
parent
6d52587e60
commit
83ba6da572
2 changed files with 163 additions and 164 deletions
|
@ -283,6 +283,10 @@ class wvmCreate(wvmConnect):
|
|||
else:
|
||||
xml += """<target dev='sd%s'/>""" % sd_disk_letters.pop(0)
|
||||
xml += """</disk>"""
|
||||
|
||||
if volume.get('bus') == 'scsi':
|
||||
xml += f"""<controller type='scsi' model='{volume.get('scsi_model')}'/>"""
|
||||
|
||||
if add_cd:
|
||||
xml += """<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
|
@ -298,9 +302,6 @@ class wvmCreate(wvmConnect):
|
|||
xml += """<target dev='vd%s' bus='%s'/>""" % (vd_disk_letters.pop(0), 'virtio')
|
||||
xml += """</disk>"""
|
||||
|
||||
if volume.get('bus') == 'scsi':
|
||||
xml += f"""<controller type='scsi' model='{volume.get('scsi_model')}'/>"""
|
||||
|
||||
for net in networks.split(','):
|
||||
xml += """<interface type='network'>"""
|
||||
if mac:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue