mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
Fix disk clone xml for proper disk properties
This commit is contained in:
parent
3ad520209f
commit
3cffa6e505
2 changed files with 11 additions and 14 deletions
|
@ -476,11 +476,7 @@ def instance(request, compute_id, vname):
|
||||||
|
|
||||||
path = connCreate.create_volume(storage, name, size, format, meta_prealloc, default_owner)
|
path = connCreate.create_volume(storage, name, size, format, meta_prealloc, default_owner)
|
||||||
conn.attach_disk(path, target, subdriver=format, cache=cache, targetbus=bus)
|
conn.attach_disk(path, target, subdriver=format, cache=cache, targetbus=bus)
|
||||||
<<<<<<< HEAD
|
|
||||||
msg = _('Attach new disk: ' + target)
|
|
||||||
=======
|
|
||||||
msg = _('Attach new disk {} ({})'.format(name, format))
|
msg = _('Attach new disk {} ({})'.format(name, format))
|
||||||
>>>>>>> 13ce824... wvmStorage.create_volume, wvmCreate.create_volume image naming respects image/volume format (qcow,qcow2)
|
|
||||||
addlogmsg(request.user.username, instance.name, msg)
|
addlogmsg(request.user.username, instance.name, msg)
|
||||||
return HttpResponseRedirect(request.get_full_path() + '#disks')
|
return HttpResponseRedirect(request.get_full_path() + '#disks')
|
||||||
|
|
||||||
|
|
|
@ -871,7 +871,6 @@ class wvmInstance(wvmConnect):
|
||||||
<allocation>0</allocation>
|
<allocation>0</allocation>
|
||||||
<target>
|
<target>
|
||||||
<format type='%s'/>
|
<format type='%s'/>
|
||||||
</target>
|
|
||||||
<permissions>
|
<permissions>
|
||||||
<owner>%s</owner>
|
<owner>%s</owner>
|
||||||
<group>%s</group>
|
<group>%s</group>
|
||||||
|
@ -882,7 +881,9 @@ class wvmInstance(wvmConnect):
|
||||||
<features>
|
<features>
|
||||||
<lazy_refcounts/>
|
<lazy_refcounts/>
|
||||||
</features>
|
</features>
|
||||||
|
</target>
|
||||||
</volume>""" % (target_file, vol_format, owner['uid'], owner['guid'])
|
</volume>""" % (target_file, vol_format, owner['uid'], owner['guid'])
|
||||||
|
|
||||||
stg = vol.storagePoolLookupByVolume()
|
stg = vol.storagePoolLookupByVolume()
|
||||||
stg.createXMLFrom(vol_clone_xml, vol, meta_prealloc)
|
stg.createXMLFrom(vol_clone_xml, vol, meta_prealloc)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue