I have an idea what could cause this, which if it’s right would mean your backup file is fine and it’s just a bug in the restore code.
Are you trying to restore to an lvm_thin storage pool (the default installation layout), but the backup was created from a different type of storage pool (probably file-reflink, in other words a Btrfs or XFS installation)?
Let me know and we can probably figure out a quick workaround.
The bug only affects VM volumes with a size that’s not divisible by 4 MiB. file(-reflink) volumes can have arbitrary sizes, while LVM Thin rounds up to the next multiple of 4 MiB, which currently confuses the restore code.
No need. I’m working on a proper fix, but if you want a quick and dirty workaround you can edit this line in the dom0 file /etc/qubes-rpc/admin.vm.volume.Import, changing
error="not enough data (copied $bytes_copied bytes, expected $size bytes)"
to
: error="not enough data (copied $bytes_copied bytes, expected $size bytes)"
That is, prefix it with a colon and a space character. This will ignore the spurious error and allow the VM to be restored. (Then change the line back after restoring, by removing the colon and space.)
It would be overkill in this case, but just for the record:
thank you and people involved so much, i didnt get the chance to test the workaround yet but will let you know one i get the next release of core admin client