Hi, we've been trying to get Clonezilla working to image some VMs we are running in XCP-NG 8.2 LTS.
In XCP-NG, you choose a template when creating VMs. We use Clonezilla to image both Linux and Windows 10 VMs, (previously in VirtualBox, now in XCP-NG.)
When running Clonezilla in a XCP VM, after choosing the initial mode of Clonezilla (VGA, KMS, etc) the display will become scrambled in certain scenarios, making it impossible to see.
Here's some screenshots:
https://xcp-ng.org/forum/topic/3408/scrambled-display-booting-clonezilla-and-linux-isos-under-win10-template
I've recently done some more thorough testing, and the results apply for every Clonezilla version I have tested: Focal, Groovy, Hirsute, and 2.7.1-22.
Ubuntu Template with UEFI boot: Scrambled with VGA mode, works properly with KMS mode.
Ubuntu Template with BIOS boot: Works with both VGA and KMS mode.
W10 Template with UEFI boot: Scrambled with both VGA and KMS mode.
W10 Template with BIOS boot: Display is not scrambled, but the boot process freezes partway. The last thing onscreen is "xenbus_probe_frontend: waiting for devices to initialise"
If the display is scrambled in VGA mode, other modes like fallback mode are also scrambled.
Ubuntu 20.04.2 boots correctly into LiveCD mode without any problems.
I include BIOS boot as a point of comparison, but we are needing to use UEFI mostly. The big problem for us is that there is no way to use Clonezilla to image W10 VMs, as there is no mode that will work under a W10 template (and templates cannot be changed after the VM is created.)
Mostly this kind of issue is related to the Linux kernel/hardware support issue. Since Clonezilla live is based on Debian or Ubuntu... Have you tried Ubuntu 20.04.2 live CD to enter console mode only? Not X-window?
BTW, a workaround is you try to preset the network (e.g., using ocs_prerun="dhclient -v eth0"), keymap (keymap=us), locales (locales=en_US.UTF-8), and start the sshd service (ocs_daemonon=ssh). Then you can ssh login to that machine with account "user" and password "live". Then you can start Clonezilla by running: "sudo clonezilla".
Please refer to:
https://clonezilla.org/fine-print-live-doc.php?path=./clonezilla-live/doc/99_Misc/00_live-boot-parameters.doc#00_live-boot-parameters.doc
https://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/05_Preseed_options_to_do_job_after_booting
Steven
Then
Hi, I've received some further info from the XCP developers:
Hi, I had some time to try and dig into this by setting up a VM with a "virtual" serial console as well as the regular console, so I could still console into the VM (albeit now over a text serial console) and run some commands after the vga console froze up. The culprit seems to be the nomodeset kernel parameter that clonezilla uses by default. It seems to set a weird vga mode and the xen virtual EFI vga adapter does not like it. I've attached dumps of both boots (default broken, and working after removing nomodeset) that include dmesg output as well as output from the big info dump command ubuntu recommends running in the case of display issues. The main difference I could find between them are this:
BROKEN default grub cmdline (nomodeset is present):
mode "1024x768-76"
# D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
geometry 1024 768 1024 768 32
timings 12714 128 32 16 4 128 4
rgba 8/16,8/8,8/0,8/24
endmode
WORKING (nomodeset removed):
mode "1024x768"
geometry 1024 768 1024 768 32
timings 0 0 0 0 0 0 0
accel true
rgba 8/16,8/8,8/0,0/0
endmode
Also, for windows templates, there was 1 other thing breaking it, however this one is expected. WIndows templates have the device-id (a virtual pci device xen presents to the OS) set to 0002 - however linux looks for 0001 (because that's what proper linux templates present). So to boot clonezilla on your windows 10 VMs/templates, you just need to remove nomodeset from the boot options (press e on the default option in the clonezilla boot menu), and before even booting the live iso, change the device-id property of the VM to something linux expects:
xe vm-param-set uuid=bc63e326-25dd-1536-8c7e-703d554b83f5 platform:device_id=0001
Then clonezilla will boot and you can clone your drives. When done, shut down the VM and change the device-id back to the correct windows setting:
xe vm-param-set uuid=bc63e326-25dd-1536-8c7e-703d554b83f5 platform:device_id=0002
Long story short, removing nomodeset from clonezilla boot options remedies this. If the template is a windows VM, you need to also temporarily change the VM device-id. Also, the reason Ubuntu (and other) vanilla linux distros didn't have this problem is because none of them use nomodeset by default, it's supposed to only be used when encountering graphics issues. In fact on the ubuntu live iso, the "safe graphics" boot option appends nomodeset, and ironically it will break the console just like it does in clonezilla. This is probably an issue upstream with QEMU which handles the virtual EFI vga adapter, we will see who we can contact :)
default-broken.log
nomodeset-removed-working.log
OK, great. It's nice to know you found the solution. Thanks for sharing that.
Steven
To do this I had to press E on the initial boot screen. Then I have to remove nomodeset AND vga=788. Also have to set xe vm-param-set uuid=bc63e326-25dd-1536-8c7e-703d554b83f5 platform:device_id=0001. Then press xtrl-x and it boots fine.
@Ren,
This issue should be related to Linux kernel. Which version of Clonezilla live did you use? Newer Linux kernel does not solve this issue?
Steven
Hi Steven,
I downloaded the latest versions, neither solved it. Worked fine on the source (esxi7, win10) but on the target I got the garbled screens (fresh xcp-ng latest w xen orchestra home compiled. Inside xen orchestra as well as xcp center I get the garbled screens.
After trying several builds of the amd64 version without success I tried the 686 version and had no issues with the screen or the nic and hard drive. I previously tried the kms option with the amd64 version which doesn't include the vga and nomodetest flags which worked for the video but got messages that it couldn't find the nic or hard drive.
Looks like the Linux kernel comes with Clonezilla live does not support your hardware well.
Maybe you can try older one, or newer testing Clonezilla live:
https://clonezilla.org/downloads.php
Steven
In other news, another XCP-NG user has shared that the 686 Debian version of Clonezilla works fine out of the box without any messing around needed. I have verified this with the latest 686 Debian available as of writing.