You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating snapshots of my win10base image, I encountered an error that read "Backing file specified without backing format Detected format."
Output on Error:
(venv) user@user-virtual-machine:/opt/cuckoo3$ vmcloak snapshot --count 1 win10base win10vm_
2022-10-30 18:36:03,591 vmcloak INFO: Creating snapshot: 'win10vm_' with IP '192.168.30.15'
2022-10-30 18:36:03,591 vmcloak INFO: Creating snapshot win10vm_ (192.168.30.15)
2022-10-30 18:36:03,591 vmcloak.platforms.qemu INFO: Create VM instance for win10vm_
2022-10-30 18:36:03,591 vmcloak.platforms.qemu INFO: Creating snapshot /home/user/.vmcloak/vms/qemu/win10vm_/disk.qcow2 with master /home/user/.vmcloak/image/win10base.qcow2
qemu-img: /home/user/.vmcloak/vms/qemu/win10vm_/disk.qcow2: Backing file specified without backing format
Detected format of qcow2.Traceback (most recent call last):
File "/opt/cuckoo3/venv/bin/vmcloak", line 8, in <module>
sys.exit(main())
File "/opt/cuckoo3/venv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/opt/cuckoo3/venv/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/opt/cuckoo3/venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/cuckoo3/venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/cuckoo3/venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/opt/cuckoo3/venv/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/cuckoo3/venv/lib/python3.10/site-packages/vmcloak/main.py", line 797, in snapshot
new_snapshot = _snapshot(image, vmname, attr, interactive)
File "/opt/cuckoo3/venv/lib/python3.10/site-packages/vmcloak/main.py", line 546, in _snapshot
p.create_snapshot_vm(image, vmname, attr)
File "/opt/cuckoo3/venv/lib/python3.10/site-packages/vmcloak/platforms/qemu.py", line 198, in create_snapshot_vm
_create_vm(name, attr, is_snapshot=True)
File "/opt/cuckoo3/venv/lib/python3.10/site-packages/vmcloak/platforms/qemu.py", line 126, in _create_vm
_create_snapshot_disk(attr["imgpath"], attr["path"])
File "/opt/cuckoo3/venv/lib/python3.10/site-packages/vmcloak/platforms/qemu.py", line 39, in _create_snapshot_disk
subprocess.check_call(["qemu-img", "create", "-f", "qcow2", "-o",
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['qemu-img', 'create', '-f', 'qcow2', '-o', 'lazy_refcounts=on,cluster_size=2M', '-b', '/home/user/.vmcloak/image/win10base.qcow2', '/home/user/.vmcloak/vms/qemu/win10vm_/disk.qcow2']' returned non-zero exit status 1.
My Fix (edit in vmcloak/platforms/qemu.py):
Add "-f", "qcow2", after the backing file parameter in the the _create_snapshot_disk function. In vmcloak/platforms/qemu.py, making the following edit will look like:
When creating snapshots of my win10base image, I encountered an error that read "Backing file specified without backing format Detected format."
Output on Error:
My Fix (edit in vmcloak/platforms/qemu.py):
Add
"-f", "qcow2",
after the backing file parameter in the the _create_snapshot_disk function. In vmcloak/platforms/qemu.py, making the following edit will look like:And then the snapshot function just works :)
The text was updated successfully, but these errors were encountered: