mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
F #5516: Fixes for backup_qcow2 (poweroff)
This commit is contained in:
parent
1daf6226fd
commit
1299fc07a4
@ -154,9 +154,10 @@ class QemuImg
|
||||
#---------------------------------------------------------------------------
|
||||
def pull_changes(uri, map)
|
||||
exts = if !map || map.empty?
|
||||
data_extents(uri, '')
|
||||
#TODO change for pattern include zero
|
||||
extents(uri, '', 'data')
|
||||
else
|
||||
dirty_extents(uri, map)
|
||||
extents(uri, map, 'dirty')
|
||||
end
|
||||
|
||||
rc, msg = create(:f => 'qcow2', :F => 'raw', :b => uri)
|
||||
@ -176,15 +177,6 @@ class QemuImg
|
||||
#---------------------------------------------------------------------------
|
||||
# Gets the dirty extent information from the given map using an NBD server
|
||||
#---------------------------------------------------------------------------
|
||||
def dirty_extents(uri, map)
|
||||
extents(uri, map, 'dirty')
|
||||
end
|
||||
|
||||
def data_extents(uri, map)
|
||||
# TODO: change for pattern include zero
|
||||
extents(uri, map, 'data')
|
||||
end
|
||||
|
||||
def extents(uri, map, description)
|
||||
opts = { :json => '' }
|
||||
|
||||
@ -553,7 +545,7 @@ class KVMDomain
|
||||
sdisk = QemuImg.new("#{@vm_dir}/disk.#{d}")
|
||||
ddisk = "#{@bck_dir}/disk.#{did}.0"
|
||||
|
||||
sdisk.convert(ddisk, :m => 4, :O => 'qcow2')
|
||||
sdisk.convert(ddisk, :m => '4', :O => 'qcow2')
|
||||
sdisk.bitmap("one-#{@vid}-0", :add => '') if @checkpoint
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user