Clonezilla export and import to Proxmox

To migrate a physical or virtual machine into Proxmox VE (P2V/V2V) using Clonezilla, you cannot simply convert the exported Clonezilla image file directory with qemu-img. Instead, the standard and most reliable method is to create a blank VM in Proxmox, boot it using the Clonezilla ISO, and restore the source machine’s disk image across the network or from an external storage device. [1, 2]


Phase 1: Exporting the Source Machine (Backup)

You need to capture a block-level image of your source operating system. [1]

  1. Download & Prepare: Grab the latest stable ISO from the Clonezilla Official Website. Burn it to a USB drive or attach it to your current hypervisor.
  2. Boot: Boot the source system into Clonezilla Live.
  3. Select Mode: Choose device-image (to back up to a file repository). [1]
  4. Choose Repository (/home/partimag): Select where you want to save the export folder.
    • Local Storage: An external USB hard drive.
    • Network Storage (Recommended): An Samba/SMB share, NFS share, or an SSH/SFTP server. [1, 2, 3]
  5. Execute: Choose savedisk, select your target system storage drive, and let Clonezilla export the compressed partition directory. [1, 2]

Phase 2: Preparing the Target Proxmox VM

Before importing, you must build a virtual «shell» that matches or exceeds the properties of your original machine. [1, 2]

  1. Upload ISO: Upload the Clonezilla Live ISO directly to your Proxmox local ISO storage backend. [1]
  2. Create a Blank VM: Click Create VM in Proxmox and configure the hardware properties:
    • OS: Select the Clonezilla ISO as your bootable media.
    • System: Match the BIOS mode of your source machine (SeaBIOS/Legacy vs. OVMF/UEFI).
    • Disks: Create a new virtual disk (SCSI/VirtIO or SATA). Crucial: The virtual disk size must be equal to or larger than the source drive size. [1, 2, 3]
  3. Optional (If using a USB Drive): If your Clonezilla export is saved on an external USB hard drive, go to the VM’s Hardware tab -> Add -> USB Device and pass through the physical USB drive to the VM. [1]

Phase 3: Importing to Proxmox (Restore)

Now, populate the empty virtual disk with your exported image. [1]

┌────────────────────────┐         ┌────────────────────────┐
│  Clonezilla Repository │         │       Proxmox VE       │
│  (USB / Network / SMB) │────────>│  (Blank VM Booted from │
└────────────────────────┘         │    Clonezilla ISO)     │
                                   └────────────────────────┘
  1. Boot the VM: Start the Proxmox VM and log into the Clonezilla environment via the Proxmox Console. [1, 2]
  2. Select Mode: Choose device-image -> assign home/partimag. [1]
  3. Mount Storage: Mount the location where you stored the export folder in Phase 1 (e.g., re-connect to your Samba/NFS share or point it to the passed-through USB device).
    • Note: Target the parent directory where your Clonezilla backup folder lives, not the folder itself. [1, 2]
  4. Choose Restore Action: Select restoredisk. [1]
  5. Run Restore: Select the backed-up image folder, pick your Proxmox virtual disk (vda or sda) as the target, and confirm. Clonezilla will expand the images directly onto the virtual block storage. [1, 2, 3]

Phase 4: Post-Migration Adjustments

Once the restore finishes, shut down the VM and tweak the settings to make sure it boots correctly. [1]

  1. Remove ISO: Under the VM’s Hardware options, detach or remove the Clonezilla ISO from the virtual optical drive. [1]
  2. Check Boot Order: Go to VM Options -> Boot Order and verify that your main virtual hard drive is enabled and prioritized. [1, 2]
  3. Driver Adjustments (If OS fails to boot):
    • Linux: Linux kernels usually load modern VirtIO storage drivers automatically. If the OS boots but network connections fail, you may need to update your network interfaces file (e.g., netplan/udev) because the interface naming alias will likely have changed inside Proxmox.
    • Windows: Windows installations might throw a Blue Screen (BSOD) if they cannot find the boot controllers. If this happens, change the Proxmox disk bus type from VirtIO/SCSI to SATA or IDE temporarily until you can install the Proxmox Windows VirtIO Drivers. [1, 2]

Legg igjen en kommentar