I want to store an image of actual hardware HDDs containing a standards Ubuntu installation (no VM, an actual physical drive bootable in a physical pc).
So I do convert the drive to vdi:
Code: Select all
sudo qemu-img convert -O vdi /dev/sdh xxx.vdi -p
Code: Select all
vboximg-mount -i xxx.vdi /media/me/backup/
zerofree -v /media/me/backup/vol0
But then!
Code: Select all
vboxmanage modifymedium --compact xxx.vdi
VBoxManage: error: Failed to lock media when compacting 'xxx.vdi'
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "Compact(pProgress.asOutParam())" at line 791 of file VBoxManageDisk.cpp
VBoxManage: error: Failed to compact medium!
Why? What does this error even mean? Of course, the VM is turned off + shutdown and no snapshots exist.
I am on Ubuntu 20.04 with latest vbox 6.1.36.