-
Hi Everybody
I have some virtual machine on debian Xen server. The DomU machine disks defined on lvm volume. Are there any way to migrate these VM to xcp-ng ?
I have find a script, but it didnt work for me.Thank
Zoltan -
Hi!
Have you read our official documentation first? https://docs.xcp-ng.org/installation/migrate-to-xcp-ng/#-from-xen-on-linux
-
@olivierlambert
Hi
Yes, I have read, and tried. The import was successfully, but the new VM stop during the boot, and I got initram prompt. -
That's pretty much scarce information. Is your VM PV or HVM?
-
Hi
I use PVM guest, that run on LVM volume.
Here is my xen.cfg file
kernel = '/boot/vmlinuz-5.10.0-28-amd64'
extra = 'elevator=noop'
ramdisk = '/boot/initrd.img-5.10.0-28-amd64'vcpus = '1'
memory = '4096'Disk device(s).
Physical volumes
root = '/dev/xvda2 ro'
disk = [
'phy:/dev/xenvol/sl2601,xvda2,w',
'phy:/dev/xenvol/sl2601_swap,xvda1,w',
] -
Hi
In the original configuration the root disk is xvda2 and a swap xvda1.
After the migration under xcp-ng has created two disks.
xvda for the root and xvdb for the swap.
Booting stop at this moment.Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/xvda2 does not exist. Dropping to a shell!
(initramfs) [ 249.512144] random: crng init done
Do you have any id , how can solve this problem ?
Thanks. - Boot args (cat /proc/cmdline)
-
Rebuild your initrd correctly and fstab to use the right drive numbering. Also, PV is deprecated, you should transform your VM in HVM mode (install grub in the bootloader)
-
I add extra parameter on advanced tab.
PV args root=/dev/xvda roThe VM has started . Nice.
Modified the fstab, and grub menu.lst with correct drive.
After that I have tried install grub in to the bootloader. It was not success.
I have got this.
Searching for GRUB installation directory ... found: /boot/grub
WARNING: tempfile is deprecated; consider using mktemp instead.
WARNING: tempfile is deprecated; consider using mktemp instead.
The file /boot/grub/stage1 not read correctly.Fdisk said that is not correct partition table.
root@sl1802:~# fdisk /dev/xvdaWelcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.The device contains 'ext4' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x5df197a4.
-
Ok so just to check: now you have a working PV guest, right?
-
Yes. It works, but I can not convert to HVM until I can not install grub, righ ?
-
Yes, that's correct. At least, you can boot the VM, which is already better
To install Grub on the main drive:
grub-install /dev/xvda
. If that doesn't work, check https://bugs.archlinux.org/task/30241 -
I have tried this, but not work.
root@sl1802:~# grub-install /dev/xvda
Searching for GRUB installation directory ... found: /boot/grub
WARNING: tempfile is deprecated; consider using mktemp instead.
WARNING: tempfile is deprecated; consider using mktemp instead.
The file /boot/grub/stage1 not read correctly.