Menu

Problem cloning xen virtual harddisk (loop device) to target partition

Help
DeeKaa
2021-02-10
2021-03-10
  • DeeKaa

    DeeKaa - 2021-02-10

    We are trying to migrate some Xen-based virtual machines to a Proxmox-based server. Xen integrates it's volumes using loop devices. These devices already represent a partition that is using within the virtual machine.

    When copying the loop device to the destination server clonezilla either supports cloning a whole device (device to device) or a partition (partion to partition). In our case it would be necessary to clone from the loop device (which actually contains a partition) to a target partion (device to partion).

    Is there any way to achieve this? Are we missing maybe some expert option in clonezilla that would allow such "tranformation"?

    Thanks in advance for your help!

     
  • Steven Shiau

    Steven Shiau - 2021-02-12

    Which version of Clonezilla live did you use? The latest stable Clonezilla live, i.e., 2.7.1-22 now supports cloning or imaging "/dev/loop*" device. Maybe it's what you want?

    Steven

     
  • DeeKaa

    DeeKaa - 2021-02-12

    Thanks, Steven.

    We tried 2.7.1-22, also 20210127-groovy and 20210127-hirsute.

    Just to clarify things further, the Xen device loop0 is not a real device containing a gpt, it's rather an actual partition (which should usually be named loop0p1).
    We want to clone said loop device to an actual partition (sda1) on the target machine. When choosing "part_to_remote_part" clonezilla fails with an error message (see attached screenshot).

    Daniel

     
  • Steven Shiau

    Steven Shiau - 2021-02-12

    Maybe you can try to do something like this on the source machine side, i.e., skip the TUI, just run it manually in the command line prompt:
    /usr/sbin/ocs-onthefly -e1 auto -e2 -r -j2 -sfsck -k -p choose -a -f loop0
    and on the destination machine, run:
    ocs-onthefly -s 192.168.120.4 -d loop0

    Steven

     
  • DeeKaa

    DeeKaa - 2021-03-09

    Hi Steven,

    again, many thanks for the hint and your support. We tried the command line interface, unfortunately without success. I attached a couple of screenshots to show each step and the final (unwanted) result.

    Screen1 shows the partition table on our Xen source machine. You can see it's /dev/xvda (Xen virtual block device).

    Screen2 shows the partition table on our destination machine. We want to clone the source hard disk to destination /dev/sda2.

    Screen3 shows the output after starting clonezilla on the source machine. Not sure why it's printing "-s /dev/xvdb"

    Screen4 and 5 show the clonezilla command on the destination machine.

    In screen6 clonezilla outputs the warning, that all data on /dev/sda2 will be lost.

    Screen7 shows the output of after copying the data.

    Finally, on screen8 you can see the partition table on the destination machine. Our initial partition table (with sda1 and sda2) is gone and the device sda is there instead.

    Does this make any sense to you? What are we missing?

    Many thanks
    Daniel

     
  • Steven Shiau

    Steven Shiau - 2021-03-10

    Since I have no Xen environment, so the following description might not work.
    Maybe you can try to save the source device as an image then restore it?
    You can refer to somewhat-related topic:
    https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/304465b85a/?limit=25#f8b6
    In the testing Clonezilla live (>=2.7.2-9), we added an option "-sspt " which you can used to save a whole disk without partition. In your case, it's /dev/loop0, just it's in saveparts mode.
    Then use restoreparts mode to restore the image.

    Steven

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.