mirror of
https://github.com/retspen/webvirtcloud
synced 2024-10-31 19:44:16 +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)
|
||||
conn.attach_disk(path, target, subdriver=format, cache=cache, targetbus=bus)
|
||||
<<<<<<< HEAD
|
||||
msg = _('Attach new disk: ' + target)
|
||||
=======
|
||||
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)
|
||||
return HttpResponseRedirect(request.get_full_path() + '#disks')
|
||||
|
||||
|
|
|
@ -871,18 +871,19 @@ class wvmInstance(wvmConnect):
|
|||
<allocation>0</allocation>
|
||||
<target>
|
||||
<format type='%s'/>
|
||||
<permissions>
|
||||
<owner>%s</owner>
|
||||
<group>%s</group>
|
||||
<mode>0644</mode>
|
||||
<label>virt_image_t</label>
|
||||
</permissions>
|
||||
<compat>1.1</compat>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</target>
|
||||
<permissions>
|
||||
<owner>%s</owner>
|
||||
<group>%s</group>
|
||||
<mode>0644</mode>
|
||||
<label>virt_image_t</label>
|
||||
</permissions>
|
||||
<compat>1.1</compat>
|
||||
<features>
|
||||
<lazy_refcounts/>
|
||||
</features>
|
||||
</volume>""" % (target_file, vol_format, owner['uid'], owner['guid'])
|
||||
|
||||
stg = vol.storagePoolLookupByVolume()
|
||||
stg.createXMLFrom(vol_clone_xml, vol, meta_prealloc)
|
||||
|
||||
|
|
Loading…
Reference in a new issue