Hi all, I have a situation where I need to take a VM disk image created by Packer (probably using qemu) and create a Clonezilla backup of it to give to someone else to restore on a physical machine using Clonezilla.
My thought was that I would use Packer to convert the VM disk image into a raw disk (.img) file and mount it to a loop device and manually run any commands necessary to create an image that can be restored later with Clonezilla. The image will be of a single HDD (probably single partition or multiple if it uses lvm) unencrypted ext4 for Linux. Ideally I would like the Clonezilla image I manually create to not include the free space.
Obviously, Clonzilla includes the log of what it ran for the commands, but my issue is that I dont understand how many of the files Clonezilla creates are actually required for restoring an image so that I only have to create the minimal amount of files in my automation script that I attach to Packer.
Can anyone provide any insight here or other suggestions?
[Edit] I just noticed this was kind of brought up in another post about using a loopback device. However in that post it was recommened you boot into a VM to do it, but my question is can we do it manually without Clonezilla if we mount the disk and manually run partclone or whatever other commands Clonzilla would have run if it had created the image itself? In such a case what are the minimum files Clonzilla needs to restore the image?
Thanks,
Last edit: Julio Lajara 2018-04-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all, I have a situation where I need to take a VM disk image created by Packer (probably using qemu) and create a Clonezilla backup of it to give to someone else to restore on a physical machine using Clonezilla.
My thought was that I would use Packer to convert the VM disk image into a raw disk (.img) file and mount it to a loop device and manually run any commands necessary to create an image that can be restored later with Clonezilla. The image will be of a single HDD (probably single partition or multiple if it uses lvm) unencrypted ext4 for Linux. Ideally I would like the Clonezilla image I manually create to not include the free space.
Obviously, Clonzilla includes the log of what it ran for the commands, but my issue is that I dont understand how many of the files Clonezilla creates are actually required for restoring an image so that I only have to create the minimal amount of files in my automation script that I attach to Packer.
Can anyone provide any insight here or other suggestions?
[Edit] I just noticed this was kind of brought up in another post about using a loopback device. However in that post it was recommened you boot into a VM to do it, but my question is can we do it manually without Clonezilla if we mount the disk and manually run partclone or whatever other commands Clonzilla would have run if it had created the image itself? In such a case what are the minimum files Clonzilla needs to restore the image?
Thanks,
Last edit: Julio Lajara 2018-04-19