Hello, I have several RHEL VMs running in the MS HyperV2, but now I need move them to Xen hypervisor. In the MS HyperV I have a vhd for each VM. In Xen hypervisor I want use a logical volume for each machine. So I need to convert images? There are any procedure that I can follow? because I''m not really familiarized with Xen. I appreciate any help, Thanks, Edward _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Edward, Am Donnerstag, den 10.12.2009, 21:33 +0100 schrieb Edward Smith:> Hello, > I have several RHEL VMs running in the MS HyperV2, but now I need move > them to Xen hypervisor. > In the MS HyperV I have a vhd for each VM. > In Xen hypervisor I want use a logical volume for each machine. > > So I need to convert images? > There are any procedure that I can follow? because I''m not really > familiarized with Xen.This will work for you.... Shutdown ALL Services in the VMs on the HyperV-Box, like mysql and whatever because of "opened Files" which could cause a FS-Error.... All Steps below are done on the dom0.... Create a LVol on the XEN-Box lvcreate -L 15G -n VM1-Disk $VG Create a FS eg. # mkfs.ext3 /dev/$VG/VM1-Disk Mount the LVol in Dom0 # mount /dev/$VG/VM1-Disk /mnt Copy the entire /-FS from your Hyper-V-VM to the dom0 On the Dom0: # rsync -avzH --numeric-ids -e ssh root@OLD-IP:/* /mnt/ Create a xen-config for your new Host and boot it up....> > I appreciate any help, > Thanks,hth, Thomas> Edward > > _______________________________________________ > 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
Hi Thomas, first of all I appreciate your suggestion. But I can''t do this with the VMs running on Hyper-V. I need shutdown all VMs on the Hyper-V and them move them to the Xen Hypervisor. The idea is copy the vhd or convert it with something... mount this disk?? to a lvm in dom0 and boot the VMs... Any ideas??? Or other procedures, ideas, suggestions are welcome. Thanks, Edward On Thu, Dec 10, 2009 at 9:40 PM, Thomas Halinka <lists@thohal.de> wrote:> Hi Edward, > > Am Donnerstag, den 10.12.2009, 21:33 +0100 schrieb Edward Smith: > > Hello, > > I have several RHEL VMs running in the MS HyperV2, but now I need move > > them to Xen hypervisor. > > In the MS HyperV I have a vhd for each VM. > > In Xen hypervisor I want use a logical volume for each machine. > > > > So I need to convert images? > > There are any procedure that I can follow? because I''m not really > > familiarized with Xen. > > This will work for you.... > > Shutdown ALL Services in the VMs on the HyperV-Box, like mysql and > whatever because of "opened Files" which could cause a FS-Error.... > > All Steps below are done on the dom0.... > > Create a LVol on the XEN-Box > > lvcreate -L 15G -n VM1-Disk $VG > > Create a FS > > eg. > # mkfs.ext3 /dev/$VG/VM1-Disk > > Mount the LVol in Dom0 > > # mount /dev/$VG/VM1-Disk /mnt > > Copy the entire /-FS from your Hyper-V-VM to the dom0 > > On the Dom0: > > # rsync -avzH --numeric-ids -e ssh root@OLD-IP:/* /mnt/ > > Create a xen-config for your new Host and boot it up.... > > > > > I appreciate any help, > > Thanks, > > hth, > > Thomas > > > Edward > > > > _______________________________________________ > > 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
You can try booting the VM from an .iso live disc and using the above trick to copy the entire FS at the block level to a premade partition/logical volume. Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco Sobrino On Fri, Dec 11, 2009 at 05:18, Edward Smith <bm.unpersonal@gmail.com> wrote:> Hi Thomas, > first of all I appreciate your suggestion. But I can''t do this with the VMs > running on Hyper-V. > I need shutdown all VMs on the Hyper-V and them move them to the Xen > Hypervisor. > The idea is copy the vhd or convert it with something... mount this disk?? > to a lvm in dom0 and boot the VMs... > Any ideas??? > > Or other procedures, ideas, suggestions are welcome. > > Thanks, > Edward > > > On Thu, Dec 10, 2009 at 9:40 PM, Thomas Halinka <lists@thohal.de> wrote: >> >> Hi Edward, >> >> Am Donnerstag, den 10.12.2009, 21:33 +0100 schrieb Edward Smith: >> > Hello, >> > I have several RHEL VMs running in the MS HyperV2, but now I need move >> > them to Xen hypervisor. >> > In the MS HyperV I have a vhd for each VM. >> > In Xen hypervisor I want use a logical volume for each machine. >> > >> > So I need to convert images? >> > There are any procedure that I can follow? because I''m not really >> > familiarized with Xen. >> >> This will work for you.... >> >> Shutdown ALL Services in the VMs on the HyperV-Box, like mysql and >> whatever because of "opened Files" which could cause a FS-Error.... >> >> All Steps below are done on the dom0.... >> >> Create a LVol on the XEN-Box >> >> lvcreate -L 15G -n VM1-Disk $VG >> >> Create a FS >> >> eg. >> # mkfs.ext3 /dev/$VG/VM1-Disk >> >> Mount the LVol in Dom0 >> >> # mount /dev/$VG/VM1-Disk /mnt >> >> Copy the entire /-FS from your Hyper-V-VM to the dom0 >> >> On the Dom0: >> >> # rsync -avzH --numeric-ids -e ssh root@OLD-IP:/* /mnt/ >> >> Create a xen-config for your new Host and boot it up.... >> >> > >> > I appreciate any help, >> > Thanks, >> >> hth, >> >> Thomas >> >> > Edward >> > >> > _______________________________________________ >> > 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
Hi, thanks for the suggestions. To resolve part of my problem I copy the entire vhd file from the MS HyperV to the Dom0 machine. Then I create a LV and copied the file to the LV with the dd command. I can mount this. My problem now is boot the machine. I changed all the entries "/dev/hdaX" to "/dev/xvdaX" on the fstab file. Also I changed the "root=XXX" entries on the grub, "menu.lst", and in the config file of the VM. But I get always the same error message: Error: (2, ''Invalid kernel'', ''xc_dom_parse_elf_kernel: ELF image has no shstrtab\n'') I suspect this is because the kernel type. To run RHEL guest on xen I need other kernel (a special one with xen paravirtualization)? or I can maintain the actual. Sorry, I''m a newbie in Xen. I already read the: http://markmail.org/message/ocqw3r34ms7lsffi but I need more help. Thanks, Edward Miguel wrote:> You can try booting the VM from an .iso live disc and using the above > trick to copy the entire FS at the block level to a premade > partition/logical volume. > > > Si quieres ser más positivo, pierde un electrón > Miguel Ruiz Velasco Sobrino > > > > On Fri, Dec 11, 2009 at 05:18, Edward Smith <bm.unpersonal@gmail.com> wrote: >> Hi Thomas, >> first of all I appreciate your suggestion. But I can''t do this with the VMs >> running on Hyper-V. >> I need shutdown all VMs on the Hyper-V and them move them to the Xen >> Hypervisor. >> The idea is copy the vhd or convert it with something... mount this disk?? >> to a lvm in dom0 and boot the VMs... >> Any ideas??? >> >> Or other procedures, ideas, suggestions are welcome. >> >> Thanks, >> Edward >> >> >> On Thu, Dec 10, 2009 at 9:40 PM, Thomas Halinka <lists@thohal.de> wrote: >>> Hi Edward, >>> >>> Am Donnerstag, den 10.12.2009, 21:33 +0100 schrieb Edward Smith: >>>> Hello, >>>> I have several RHEL VMs running in the MS HyperV2, but now I need move >>>> them to Xen hypervisor. >>>> In the MS HyperV I have a vhd for each VM. >>>> In Xen hypervisor I want use a logical volume for each machine. >>>> >>>> So I need to convert images? >>>> There are any procedure that I can follow? because I''m not really >>>> familiarized with Xen. >>> This will work for you.... >>> >>> Shutdown ALL Services in the VMs on the HyperV-Box, like mysql and >>> whatever because of "opened Files" which could cause a FS-Error.... >>> >>> All Steps below are done on the dom0.... >>> >>> Create a LVol on the XEN-Box >>> >>> lvcreate -L 15G -n VM1-Disk $VG >>> >>> Create a FS >>> >>> eg. >>> # mkfs.ext3 /dev/$VG/VM1-Disk >>> >>> Mount the LVol in Dom0 >>> >>> # mount /dev/$VG/VM1-Disk /mnt >>> >>> Copy the entire /-FS from your Hyper-V-VM to the dom0 >>> >>> On the Dom0: >>> >>> # rsync -avzH --numeric-ids -e ssh root@OLD-IP:/* /mnt/ >>> >>> Create a xen-config for your new Host and boot it up.... >>> >>>> I appreciate any help, >>>> Thanks, >>> hth, >>> >>> Thomas >>> >>>> Edward >>>> >>>> _______________________________________________ >>>> 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
On Sun, Dec 13, 2009 at 3:15 AM, Edward Smith <bm.unpersonal@gmail.com> wrote:> Hi, > thanks for the suggestions. > To resolve part of my problem I copy the entire vhd file from the MS HyperV > to the Dom0 machine. Then I create a LV and copied the file to the LV with > the dd command. I can mount this.err ... that shouldn''t work. vhd format is different from raw image that you can dd directly. How were you able to mount it?> > My problem now is boot the machine. > I changed all the entries "/dev/hdaX" to "/dev/xvdaX" on the fstab file. > Also I changed the "root=XXX" entries on the grub, "menu.lst", and in the > config file of the VM. > > But I get always the same error message: > Error: (2, ''Invalid kernel'', ''xc_dom_parse_elf_kernel: ELF image has no > shstrtab\n'')You should first try to run it as HVM guest. That''d (at least) make sure the data convertion was successfull. After that you can convert it to PV using something like this: http://pastebin.com/f6a5022bf> > I suspect this is because the kernel type. > To run RHEL guest on xen I need other kernel (a special one with xen > paravirtualization)?For PV guests, yes. The rpm is called kernel-xen. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hey, thanks for your response. Actually it worked. First I convert the vhd to a fixed size with the MS tool. I then with dd I copied to the LV. I can''t mount the LV directly, because there are some partitions. So I used the kpartx and I be able to mount the different partitions. Could you give me more information how to convert the guest to a PV guest. Thanks, Edward Fajar A. Nugraha wrote:> On Sun, Dec 13, 2009 at 3:15 AM, Edward Smith <bm.unpersonal@gmail.com> wrote: >> Hi, >> thanks for the suggestions. >> To resolve part of my problem I copy the entire vhd file from the MS HyperV >> to the Dom0 machine. Then I create a LV and copied the file to the LV with >> the dd command. I can mount this. > > err ... that shouldn''t work. vhd format is different from raw image > that you can dd directly. How were you able to mount it? > >> My problem now is boot the machine. >> I changed all the entries "/dev/hdaX" to "/dev/xvdaX" on the fstab file. >> Also I changed the "root=XXX" entries on the grub, "menu.lst", and in the >> config file of the VM. >> >> But I get always the same error message: >> Error: (2, ''Invalid kernel'', ''xc_dom_parse_elf_kernel: ELF image has no >> shstrtab\n'') > > You should first try to run it as HVM guest. That''d (at least) make > sure the data convertion was successfull. After that you can convert > it to PV using something like this: http://pastebin.com/f6a5022bf > >> I suspect this is because the kernel type. >> To run RHEL guest on xen I need other kernel (a special one with xen >> paravirtualization)? > > For PV guests, yes. The rpm is called kernel-xen. >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sun, Dec 13, 2009 at 5:14 AM, Edward Smith <bm.unpersonal@gmail.com> wrote:> Hey, > thanks for your response. > > Actually it worked. > First I convert the vhd to a fixed size with the MS tool. I then with dd I > copied to the LV. I can''t mount the LV directly, because there are some > partitions. So I used the kpartx and I be able to mount the different > partitions.Hmm ... I''d have thought that you need to convert it first with something like qemu-img. vhd should be similar to vpc format.> > Could you give me more information how to convert the guest to a PV guest.I did. See my previous email. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users