Jorge Constán
2010-Nov-29 12:46 UTC
[Xen-users] ISSUE EXPORTING VM FROM XEN 3.2.1 to XCP 0.5 WITH XVA.PY
Hello everyone. I have the following problem that could help would appreciate. 1) Environment: HOST 1: xen-hypervisor-3.2-1-amd64 with all VM in LVM disk. HOST 2: XCP 0.5 2) The VM that I wish migrate is a domU in XEN and is debian lenny over LVM: ................................................................................................... # Configuration file for the Xen instance asterisk.domainxen.local, created # by xen-tools 3.9 on Wed Nov 11 11:11:34 2009. # # # Kernel + memory size # kernel = ''/boot/vmlinuz-2.6.26-1-xen-amd64'' ramdisk = ''/boot/initrd.img-2.6.26-1-xen-amd64'' memory = ''512'' # # Disk device(s). # root = ''/dev/xvda2 ro'' disk = [ ''phy:/dev/server/asterisk.domainxen.local-swap,xvda1,w'', ''phy:/dev/server/asterisk.domainxen.local-disk,xvda2,w'', ] ........................................................................................................ As the disk was "xvda" I not modified anything (as says README xva.py script). 3) From dom0 in XEN host: server:# lvscan ACTIVE ''/dev/server/asterisk.domainxen.local-swap'' [512,00 MB] inherit ACTIVE ''/dev/server/asterisk.domainxen.local-disk'' [5,00 GB] inherit 4) The steps I did: A) Shutdown VM asterisk.domain.local in XEN: B) Convert VM LVM (asterisk.domainxen.local-disk) to a IMG so that: server:t# dd if=/dev/server/asterisk.domainxenlocal-disk bs=64K | gzip -c > /mnt/unidad_usb/sat/disco_imagen_asterisk.img.gz 81920+0 records in 81920+0 records out 5368709120 bytes (5,4 GB) copied, 180,349 s, 29,8 MB/s C) I Copied img file to my ubuntu karmic desktop with python 2.6.4 and run ""xva.py" script: jorge@ubus1:~/vm_xen_img$ ./xva.py --is-pv --disk disco_imagen_asterisk.img --file=asterik.xva VM Details: Name: Unnamed Type: Paravirtualised VCPUS: 1 Memory(bytes): 268435456 ACPI: true APIC: true PAE: true NX: false Viridian: true Disk xvda(Bootable): disco_imagen_asterisk.img Generating XVA file asterik.xva Processing disk disco_imagen_asterisk.img(5368709120 bytes) [ ########################################################################### ] 100% It seemed that all was corect 5) When I imported from XCP 0.5 CLI appeared the following error: Error: [''WARNING: /dev/xvda is not a disk image'', ''Traceback (most recent call last):'', '' File "/usr/bin/pygrub", line 746, in ?'', '' rai What am I doing wrong? Any suggestions? Thanks a lot. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
George Shuklin
2010-Nov-30 19:42 UTC
Re: [Xen-users] ISSUE EXPORTING VM FROM XEN 3.2.1 to XCP 0.5 WITH XVA.PY
What FS is in domU? pygrub in XCP0.5 seems having troubles with ext4. In anyway, you can use external kernels (xe vm-param-set bootloader=EMTRYHERE; xe vm-param-set kernel=..., xe vm-param-set ramdisk=...; be sure place kernels to anywhere in /boot on every XCP host). В Пнд, 29/11/2010 в 12:46 +0000, Jorge Constán пишет:> Hello everyone. > > I have the following problem that could help would appreciate. > > > 1) Environment: > > HOST 1: xen-hypervisor-3.2-1-amd64 with all VM in LVM disk. > > HOST 2: XCP 0.5 > > > 2) The VM that I wish migrate is a domU in XEN and is debian lenny > over LVM: > > ................................................................................................... > # Configuration file for the Xen instance asterisk.domainxen.local, > created > # by xen-tools 3.9 on Wed Nov 11 11:11:34 2009. > # > > # > # Kernel + memory size > # > kernel = ''/boot/vmlinuz-2.6.26-1-xen-amd64'' > ramdisk = ''/boot/initrd.img-2.6.26-1-xen-amd64'' > memory = ''512'' > > # > # Disk device(s). > # > root = ''/dev/xvda2 ro'' > disk = [ > > ''phy:/dev/server/asterisk.domainxen.local-swap,xvda1,w'', > > ''phy:/dev/server/asterisk.domainxen.local-disk,xvda2,w'', > ] > > ........................................................................................................ > > As the disk was "xvda" I not modified anything (as says README xva.py > script). > > > 3) From dom0 in XEN host: > > server:# lvscan > > ACTIVE > ''/dev/server/asterisk.domainxen.local-swap'' [512,00 MB] inherit > ACTIVE ''/dev/server/asterisk.domainxen.local-disk'' [5,00 > GB] inherit > > > 4) The steps I did: > > > A) Shutdown VM asterisk.domain.local in XEN: > B) Convert VM LVM (asterisk.domainxen.local-disk) to a IMG so that: > > server:t# dd if=/dev/server/asterisk.domainxenlocal-disk bs=64K | gzip > -c > /mnt/unidad_usb/sat/disco_imagen_asterisk.img.gz > 81920+0 records in > 81920+0 records out > 5368709120 bytes (5,4 GB) copied, 180,349 s, 29,8 MB/s > > C) I Copied img file to my ubuntu karmic desktop with python 2.6.4 > and run ""xva.py" script: > > jorge@ubus1:~/vm_xen_img$ ./xva.py --is-pv --disk > disco_imagen_asterisk.img --file=asterik.xva > VM Details: > Name: Unnamed > Type: Paravirtualised > VCPUS: 1 > Memory(bytes): 268435456 > ACPI: true > APIC: true > PAE: true > NX: false > Viridian: true > Disk xvda(Bootable): disco_imagen_asterisk.img > Generating XVA file asterik.xva > > Processing disk disco_imagen_asterisk.img(5368709120 bytes) > [ ########################################################################### ] 100% > > It seemed that all was corect > > > 5) When I imported from XCP 0.5 CLI appeared the following error: > > Error: [''WARNING: /dev/xvda is not a disk image'', ''Traceback (most > recent call last):'', '' File "/usr/bin/pygrub", line 746, in ?'', '' > rai > > > > What am I doing wrong? Any suggestions? > > Thanks a lot. > > _______________________________________________ > 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
Jorge Constán
2010-Dec-01 08:52 UTC
Re: [Xen-users] ISSUE EXPORTING VM FROM XEN 3.2.1 to XCP 0.5 WITH XVA.PY
Hi George and thanks for your reply. The FileSystem of domU asterisk.domainxen.local in XEN is ext3: --------------------------------------------------------------------------------------------------------------------- asterisk:~# df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/xvda2 ext3 5.0G 1.2G 3.6G 25% / tmpfs tmpfs 257M 0 257M 0% /lib/init/rw udev tmpfs 10M 456K 9.6M 5% /dev tmpfs tmpfs 257M 4.0K 257M 1% /dev/shm --------------------------------------------------------------------------------------------------------------------- Reading README file of xva.py again it says: ...................................................................................................................... Things to take into consideration when migrating PV Linux guests to XenServer. 1. The most important thing to realise is that XenServer only supports xvda/b/c/d block device names in the guest. That means you cannot have a block device called sda or hda. *It also means that block devices cannot be the names of partitions i.e. sda1 or xvda1 will not work*. ...................................................................................................................... Perhaps my error is that my domU in XEN is xvda2 and I should changing it to xvda only in "fstab" and "menu,lst" inside domU before migrate. FSTAB in domU is: ---------------------------------------------------------------------------------------------------------------- asterisk:~# less /etc/fstab # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 /dev/xvda1 none swap sw 0 0 /dev/xvda2 / ext3 noatime,nodiratime,errors=remount-ro 0 1 --------------------------------------------------------------------------------------------------------------- But there is not any menu.lst inside domU (it is lenny debian). Any suggestions? Thanks again! 2010/11/30 George Shuklin <george.shuklin@gmail.com>> What FS is in domU? pygrub in XCP0.5 seems having troubles with ext4. > > In anyway, you can use external kernels (xe vm-param-set > bootloader=EMTRYHERE; xe vm-param-set kernel=..., xe vm-param-set > ramdisk=...; be sure place kernels to anywhere in /boot on every XCP > host). > > В Пнд, 29/11/2010 в 12:46 +0000, Jorge Constán пишет: > > Hello everyone. > > > > I have the following problem that could help would appreciate. > > > > > > 1) Environment: > > > > HOST 1: xen-hypervisor-3.2-1-amd64 with all VM in LVM disk. > > > > HOST 2: XCP 0.5 > > > > > > 2) The VM that I wish migrate is a domU in XEN and is debian lenny > > over LVM: > > > > > ................................................................................................... > > # Configuration file for the Xen instance asterisk.domainxen.local, > > created > > # by xen-tools 3.9 on Wed Nov 11 11:11:34 2009. > > # > > > > # > > # Kernel + memory size > > # > > kernel = ''/boot/vmlinuz-2.6.26-1-xen-amd64'' > > ramdisk = ''/boot/initrd.img-2.6.26-1-xen-amd64'' > > memory = ''512'' > > > > # > > # Disk device(s). > > # > > root = ''/dev/xvda2 ro'' > > disk = [ > > > > ''phy:/dev/server/asterisk.domainxen.local-swap,xvda1,w'', > > > > ''phy:/dev/server/asterisk.domainxen.local-disk,xvda2,w'', > > ] > > > > > ........................................................................................................ > > > > As the disk was "xvda" I not modified anything (as says README xva.py > > script). > > > > > > 3) From dom0 in XEN host: > > > > server:# lvscan > > > > ACTIVE > > ''/dev/server/asterisk.domainxen.local-swap'' [512,00 MB] inherit > > ACTIVE ''/dev/server/asterisk.domainxen.local-disk'' [5,00 > > GB] inherit > > > > > > 4) The steps I did: > > > > > > A) Shutdown VM asterisk.domain.local in XEN: > > B) Convert VM LVM (asterisk.domainxen.local-disk) to a IMG so that: > > > > server:t# dd if=/dev/server/asterisk.domainxenlocal-disk bs=64K | gzip > > -c > /mnt/unidad_usb/sat/disco_imagen_asterisk.img.gz > > 81920+0 records in > > 81920+0 records out > > 5368709120 bytes (5,4 GB) copied, 180,349 s, 29,8 MB/s > > > > C) I Copied img file to my ubuntu karmic desktop with python 2.6.4 > > and run ""xva.py" script: > > > > jorge@ubus1:~/vm_xen_img$ ./xva.py --is-pv --disk > > disco_imagen_asterisk.img --file=asterik.xva > > VM Details: > > Name: Unnamed > > Type: Paravirtualised > > VCPUS: 1 > > Memory(bytes): 268435456 > > ACPI: true > > APIC: true > > PAE: true > > NX: false > > Viridian: true > > Disk xvda(Bootable): disco_imagen_asterisk.img > > Generating XVA file asterik.xva > > > > Processing disk disco_imagen_asterisk.img(5368709120 bytes) > > [ > ########################################################################### > ] 100% > > > > It seemed that all was corect > > > > > > 5) When I imported from XCP 0.5 CLI appeared the following error: > > > > Error: [''WARNING: /dev/xvda is not a disk image'', ''Traceback (most > > recent call last):'', '' File "/usr/bin/pygrub", line 746, in ?'', '' > > rai > > > > > > > > What am I doing wrong? Any suggestions? > > > > Thanks a lot. > > > > _______________________________________________ > > 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 >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users