1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B OpenNebula/one#5643 Fix LXD qcow2 map command (#1613)

(cherry picked from commit 8c17de63ffb1b678ddaf60d945b66047b2a543dd)
This commit is contained in:
Daniel Clavijo Coca 2021-11-24 12:16:41 -06:00 committed by Ruben S. Montero
parent 17cb5bc92b
commit 6a9abff5b3
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -35,13 +35,10 @@ class Qcow2Mapper < Mapper
dsrc = one_vm.disk_source(disk)
File.chmod(0o664, dsrc) if File.symlink?(one_vm.sysds_path)
map = (COMMANDS[:nbd]).to_s
map = "#{COMMANDS[:nbd]} -c #{device} #{dsrc}"
map << " --cache=#{disk['CACHE']}" if
CACHE_MODES.include?(disk['CACHE'])
map << ' --fork' if fork_supported
map << " -c #{device} #{dsrc}"
rc, _out, err = Command.execute(map, true)