Angel L. Mateo
2010-Mar-10 10:42 UTC
[Xen-users] XCP: Migrating VM from Xen (legacy) to XCP
Hello, I am trying to migrate paravirtualized VM from xen legacy (running debian with xen 3.2) to XCP VM. VMs are debian lenny x64. Their disks are LVM volumes, with each volume used as a partition, like this: disk = [ ''phy:/dev/vm_volumes/nyctalus10-swap,sda1,w'', ''phy:/dev/vm_volumes/nyctalus10-disk,sda2,w'', ] The process I''m trying is (from http://forums.citrix.com/thread.jspa?threadID=242336&tstart=0): * Generate a raw image of the volume with qemu-img * Create the new VM in XCP: I create the new VM from "CentOs 5.4 x64" template (I don''t use the debian template because is for 32 bits) * Import the raw image to the VDI with xe vdi-import The problem I have is that when I try to run the VM I get: [root@felis315 ~]# xe vm-start uuid=3dc0b4df-b0e8-c665-1a28-d2654281faf3 The bootloader returned an error vm: 3dc0b4df-b0e8-c665-1a28-d2654281faf3 (nyctalus10) msg: Error from bootloader: Failed to parse the output of bootloader: () Any idea? Is there any other way to migrate VMs? -- Angel L. Mateo Martínez Sección de Telemática Área de Tecnologías de la Información _o) y las Comunicaciones Aplicadas (ATICA) / \\ http://www.um.es/atica _(___V Tfo: 868887590 Fax: 868888337 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
David Markey
2010-Mar-10 10:50 UTC
Re: [Xen-users] XCP: Migrating VM from Xen (legacy) to XCP
Please post the complete guest config file from your debian machine. On 10 March 2010 10:42, Angel L. Mateo <amateo@um.es> wrote:> Hello, > > I am trying to migrate paravirtualized VM from xen legacy (running > debian with xen 3.2) to XCP VM. > > VMs are debian lenny x64. Their disks are LVM volumes, with each > volume used as a partition, like this: > > disk = [ > ''phy:/dev/vm_volumes/nyctalus10-swap,sda1,w'', > ''phy:/dev/vm_volumes/nyctalus10-disk,sda2,w'', > ] > > > The process I''m trying is (from > http://forums.citrix.com/thread.jspa?threadID=242336&tstart=0): > > * Generate a raw image of the volume with qemu-img > * Create the new VM in XCP: I create the new VM from "CentOs 5.4 x64" > template (I don''t use the debian template because is for 32 bits) > * Import the raw image to the VDI with xe vdi-import > > The problem I have is that when I try to run the VM I get: > > [root@felis315 ~]# xe vm-start uuid=3dc0b4df-b0e8-c665-1a28-d2654281faf3 > The bootloader returned an error > vm: 3dc0b4df-b0e8-c665-1a28-d2654281faf3 (nyctalus10) > msg: Error from bootloader: Failed to parse the output of bootloader: () > > Any idea? Is there any other way to migrate VMs? > > -- > Angel L. Mateo Martínez > Sección de Telemática > Área de Tecnologías de la Información _o) > y las Comunicaciones Aplicadas (ATICA) / \\ > http://www.um.es/atica _(___V > Tfo: 868887590 > Fax: 868888337 > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Angel L. Mateo
2010-Mar-10 13:32 UTC
Re: [Xen-users] XCP: Migrating VM from Xen (legacy) to XCP
On 10/03/10 11:50, David Markey wrote:> Please post the complete guest config file from your debian machine. ># # Kernel + memory size # kernel = ''/boot/vmlinuz-2.6.26-1-xen-amd64'' ramdisk = ''/boot/initrd.img-2.6.26-1-xen-amd64'' memory = ''1024'' # # Disk device(s). # root = ''/dev/sda2 ro'' disk = [ ''phy:/dev/vm_volumes/nyctalus10-swap,sda1,w'', ''phy:/dev/vm_volumes/nyctalus10-disk,sda2,w'', ] # # Hostname # name = ''nyctalus10'' # # Networking # vif = [ ''ip=<ip>, bridge=xen-br212, mac=<mac>'' ] extra="clocksource=jiffies" # # Behaviour # on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' -- Angel L. Mateo Martínez Sección de Telemática Área de Tecnologías de la Información _o) y las Comunicaciones Aplicadas (ATICA) / \\ http://www.um.es/atica _(___V Tfo: 868887590 Fax: 868888337 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
David Markey
2010-Mar-10 13:56 UTC
Re: [Xen-users] XCP: Migrating VM from Xen (legacy) to XCP
You''re not using pygrub so migrating this to XCP wont be easy. OK, so copy /boot/vmlinuz-2.6.26-1-xen-amd64 /boot/initrd.img-2.6.26-1-xen-amd64 to lets say /opt/kernels on the server(use sftp) Then do the following. xe vm-param-set uuid=<vm uuid> PV-kernel=/opt/kernels/vmlinuz-2.6.26-1-xen-amd64 PV-ramdisk=/opt/kernels/initrd.img-2.6.26-1-xen-amd64 PV-bootloader On 10 March 2010 13:32, Angel L. Mateo <amateo@um.es> wrote:> On 10/03/10 11:50, David Markey wrote: > >> Please post the complete guest config file from your debian machine. >> >> > # > # Kernel + memory size > # > kernel = ''/boot/vmlinuz-2.6.26-1-xen-amd64'' > ramdisk = ''/boot/initrd.img-2.6.26-1-xen-amd64'' > memory = ''1024'' > > # > # Disk device(s). > # > root = ''/dev/sda2 ro'' > > disk = [ > ''phy:/dev/vm_volumes/nyctalus10-swap,sda1,w'', > ''phy:/dev/vm_volumes/nyctalus10-disk,sda2,w'', > ] > > > # > # Hostname > # > name = ''nyctalus10'' > > # > # Networking > # > vif = [ ''ip=<ip>, bridge=xen-br212, mac=<mac>'' ] > > extra="clocksource=jiffies" > > # > # Behaviour > # > on_poweroff = ''destroy'' > on_reboot = ''restart'' > on_crash = ''restart'' > > > > > -- > Angel L. Mateo Martínez > Sección de Telemática > Área de Tecnologías de la Información _o) > y las Comunicaciones Aplicadas (ATICA) / \\ > http://www.um.es/atica _(___V > Tfo: 868887590 > Fax: 868888337 > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
David Markey
2010-Mar-10 14:03 UTC
Re: [Xen-users] XCP: Migrating VM from Xen (legacy) to XCP
Also set PV-args="clocksource=jiffies root=/dev/xvda" One important thing to remember is XenServer/XCP uses xvd/a/b/c/d device names in the guest. In this case you will have to change sda2 to xvda in /etc/fstab and if using pygrub, /boot/grub/menu.lst. Its important to change this in menu.lst *before* migrating to XCP. On 10 March 2010 13:56, David Markey <admin@dmarkey.com> wrote:> You''re not using pygrub so migrating this to XCP wont be easy. > > OK, so copy > > /boot/vmlinuz-2.6.26-1-xen-amd64 > /boot/initrd.img-2.6.26-1-xen-amd64 > > to lets say /opt/kernels on the server(use sftp) > > Then do the following. > > xe vm-param-set uuid=<vm uuid> > PV-kernel=/opt/kernels/vmlinuz-2.6.26-1-xen-amd64 > PV-ramdisk=/opt/kernels/initrd.img-2.6.26-1-xen-amd64 PV-bootloader> > > > > > > On 10 March 2010 13:32, Angel L. Mateo <amateo@um.es> wrote: > >> On 10/03/10 11:50, David Markey wrote: >> >>> Please post the complete guest config file from your debian machine. >>> >>> >> # >> # Kernel + memory size >> # >> kernel = ''/boot/vmlinuz-2.6.26-1-xen-amd64'' >> ramdisk = ''/boot/initrd.img-2.6.26-1-xen-amd64'' >> memory = ''1024'' >> >> # >> # Disk device(s). >> # >> root = ''/dev/sda2 ro'' >> >> disk = [ >> ''phy:/dev/vm_volumes/nyctalus10-swap,sda1,w'', >> ''phy:/dev/vm_volumes/nyctalus10-disk,sda2,w'', >> ] >> >> >> # >> # Hostname >> # >> name = ''nyctalus10'' >> >> # >> # Networking >> # >> vif = [ ''ip=<ip>, bridge=xen-br212, mac=<mac>'' ] >> >> extra="clocksource=jiffies" >> >> # >> # Behaviour >> # >> on_poweroff = ''destroy'' >> on_reboot = ''restart'' >> on_crash = ''restart'' >> >> >> >> >> -- >> Angel L. Mateo Martínez >> Sección de Telemática >> Área de Tecnologías de la Información _o) >> y las Comunicaciones Aplicadas (ATICA) / \\ >> http://www.um.es/atica _(___V >> Tfo: 868887590 >> Fax: 868888337 >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users >> > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Angel L. Mateo
2010-Mar-11 10:36 UTC
Re: [Xen-users] XCP: Migrating VM from Xen (legacy) to XCP
On 10/03/10 15:03, David Markey wrote:> Also set PV-args="clocksource=jiffies root=/dev/xvda" > > One important thing to remember is XenServer/XCP uses xvd/a/b/c/d device > names in the guest. > > In this case you will have to change sda2 to xvda in /etc/fstab and if > using pygrub, /boot/grub/menu.lst. Its important to change this in > menu.lst *before* migrating to XCP. >OK, I''ll try it. Thank you -- Angel L. Mateo Martínez Sección de Telemática Área de Tecnologías de la Información _o) y las Comunicaciones Aplicadas (ATICA) / \\ http://www.um.es/atica _(___V Tfo: 868887590 Fax: 868888337 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users