Windows P2V migration temporary recipe
These are the current steps we followed to set up and run Windows P2V migrations. Note that development is proceeding rapidly and the versions of all pieces below will likely be obsolete soon. ************************************************************* Windows RHEV P2V Cookbook 2011-1122 1. Install 32 bit Fedora 14 as a virtual machine or physical host. You will use this system to build a .ISO file to burn to CD. Later in the process, you'll boot a source physical machine from this CD. 2. Install 64 bit Fedora 16 as another virtual machine or physical host. This will become your migration server. 3 - Download and install virt-v2v on both the 32 and 64 bit systems. (yum install virt-v2v). Virt-v2v is a package to migrate virtual machines from one virtual environment to either libvirt or RHEV. It also includes the P2V extensions. 4 - Download, install, and run virt-p2v-image-builder (yum install virt-p2v-image-builder) on the 32 bit system. virt-p2v-image-builder is a tool that builds a .ISO file for source physical machines to boot from. Do this on the 32 bit system so it builds a 32 bit kernel so you can use it to boot 32 bit hardware. Burn the .ISO file to a CD. You won't need the 32 bit system any more. All subsequent Fedora operations will happen on the 64 bit system. 5. On the 64 bit Fedora system, edit /etc/yum.repos.d/fedora-updates-testing.repo; change "enabled=0" to "enabled=1" 6. yum install and/or update libguestfs. This downloads and installs libguestfs-1.14.2-1.fc16.x86_64 and all its dependencies. (Much easier than downloading all the RPMs by hand.) 7. Go to the link Matt provided: http://koji.fedoraproject.org/koji/taskinfo?taskID=3531688 and install Matt's temporary bleeding edge version of virt-v2v. Edit /usr/bin/virt-p2v-server and uncomment the line setting $ENV{'LIBGUESTFS_TRACE'} = 1; 7 - Edit the target profile on the Fedora system (/etc/virt-v2v.conf). This describes the environment to migrate into. The .conf file is separated into sections. Copy the appropriate section, paste it in the bottom, remove the comment markers, and customize with correct names of objects for this site. 8. From RHEL 6 supplementary RHN channel or other suitable source, download and install a copy of virtio-win- 1.3.3-0.el6.noarch.rpm on the Fedora migration server. 9. Install libguestfs-winsupport on a RHEL 6.1 or newer system. On that RHEL 6 system do: cd /var/lib/virt-v2v/software tar -cvf firstboot.tar windows 10. Copy firstboot.tar to /var/lib/virt-v2v/software on the Fedora migration server. 11. On the Fedora migration server: cd /var/lib/virt-v2v/software tar -xvf firstboot.tar This should set up the following: [root@Fedora16-64P2V software]# pwd /var/lib/virt-v2v/software [root@Fedora16-64P2V software]# ls -al -R .: total 4312 drwxr-xr-x. 3 root root 4096 Nov 22 10:49 . drwxr-xr-x. 3 root root 4096 Nov 22 10:25 .. -rw-r--r--. 1 root root 4403200 Nov 22 10:48 firstboot.tar drwxr-xr-x. 2 root root 4096 Jun 23 05:53 windows ./windows: total 4304 drwxr-xr-x. 2 root root 4096 Jun 23 05:53 . drwxr-xr-x. 3 root root 4096 Nov 22 10:49 .. -rw-r--r--. 1 root root 994 Feb 14 2011 firstboot.bat -rw-r--r--. 1 root root 4324584 Feb 14 2011 rhev-apt.exe -rw-r--r--. 1 root root 68928 Feb 14 2011 rhsrvany.exe [root@Fedora16-64P2V software]# 12. Now try a P2V. Boot the source Windows system from the CD created earlier, connect to the Fedora migration server IP Address, select the profile you made and start the migration. This should create a virtual machine and virtual disk images in the RHEV Exports staging area. 13. When the migration finishes, use RHEV Manager to import the newly migrated virtual machine into the RHEV environment.
Thanks for this, Greg! I've put a couple of notes inline below. Matt On 23/11/11 01:15, Greg Scott wrote:
These are the current steps we followed to set up and run Windows P2V migrations. Note that development is proceeding rapidly and the versions of all pieces below will likely be obsolete soon.
*************************************************************
Windows RHEV P2V Cookbook 2011-1122
1. Install 32 bit Fedora 14 as a virtual machine or physical host. You will use this system to build a .ISO file to burn to CD. Later in the process, you'll boot a source physical machine from this CD.
2. Install 64 bit Fedora 16 as another virtual machine or physical host. This will become your migration server.
3 - Download and install virt-v2v on both the 32 and 64 bit systems. (yum install virt-v2v). Virt-v2v is a package to migrate virtual machines from one virtual environment to either libvirt or RHEV. It also includes the P2V extensions.
4 - Download, install, and run virt-p2v-image-builder (yum install virt-p2v-image-builder) on the 32 bit system. virt-p2v-image-builder is a tool that builds a .ISO file for source physical machines to boot from. Do this on the 32 bit system so it builds a 32 bit kernel so you can use it to boot 32 bit hardware. Burn the .ISO file to a CD. You won't need the 32 bit system any more.
When I get a new release of virt-p2v out, this should all work fine run from a single F16 x86_64 server.
All subsequent Fedora operations will happen on the 64 bit system.
5. On the 64 bit Fedora system, edit /etc/yum.repos.d/fedora-updates-testing.repo; change "enabled=0" to "enabled=1"
6. yum install and/or update libguestfs. This downloads and installs libguestfs-1.14.2-1.fc16.x86_64 and all its dependencies. (Much easier than downloading all the RPMs by hand.)
I think this update just got pushed to stable, so hopefully this step won't be required after a day or 2.
7. Go to the link Matt provided: http://koji.fedoraproject.org/koji/taskinfo?taskID=3531688
and install Matt's temporary bleeding edge version of virt-v2v.
I'll get a new release out soon and this won't be required. 0.8.5+ will be fine. Edit /usr/bin/virt-p2v-server and uncomment
the line setting $ENV{'LIBGUESTFS_TRACE'} = 1;
This is only required for debugging, so there's no need to do this as a matter of course.
7 - Edit the target profile on the Fedora system (/etc/virt-v2v.conf). This describes the environment to migrate into. The .conf file is separated into sections. Copy the appropriate section, paste it in the bottom, remove the comment markers, and customize with correct names of objects for this site.
8. From RHEL 6 supplementary RHN channel or other suitable source, download and install a copy of virtio-win- 1.3.3-0.el6.noarch.rpm on the Fedora migration server.
9. Install libguestfs-winsupport on a RHEL 6.1 or newer system. On that RHEL 6 system do:
That should be virt-v2v, not libguestfs-winsupport. Nothing in libguestfs-winsupport is required on Fedora.
cd /var/lib/virt-v2v/software tar -cvf firstboot.tar windows
10. Copy firstboot.tar to /var/lib/virt-v2v/software on the Fedora migration server.
11. On the Fedora migration server:
cd /var/lib/virt-v2v/software tar -xvf firstboot.tar
This should set up the following:
[root@Fedora16-64P2V software]# pwd /var/lib/virt-v2v/software [root@Fedora16-64P2V software]# ls -al -R .: total 4312 drwxr-xr-x. 3 root root 4096 Nov 22 10:49 . drwxr-xr-x. 3 root root 4096 Nov 22 10:25 .. -rw-r--r--. 1 root root 4403200 Nov 22 10:48 firstboot.tar drwxr-xr-x. 2 root root 4096 Jun 23 05:53 windows
./windows: total 4304 drwxr-xr-x. 2 root root 4096 Jun 23 05:53 . drwxr-xr-x. 3 root root 4096 Nov 22 10:49 .. -rw-r--r--. 1 root root 994 Feb 14 2011 firstboot.bat -rw-r--r--. 1 root root 4324584 Feb 14 2011 rhev-apt.exe -rw-r--r--. 1 root root 68928 Feb 14 2011 rhsrvany.exe [root@Fedora16-64P2V software]#
12. Now try a P2V. Boot the source Windows system from the CD created earlier, connect to the Fedora migration server IP Address, select the profile you made and start the migration. This should create a virtual machine and virtual disk images in the RHEV Exports staging area.
13. When the migration finishes, use RHEV Manager to import the newly migrated virtual machine into the RHEV environment.
-- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
9. Install libguestfs-winsupport on a RHEL 6.1 or newer system. On that RHEL 6 system do:
That should be virt-v2v, not libguestfs-winsupport. Nothing in libguestfs-winsupport is required on Fedora.
No. For right now, you have to install libguestfs-winsupport **somewhere** so you can grab the necessary files. That's why it says to install on RHEL 6.1. The idea is, install libguestfs_winsupport on **RHEL**, get the necessary files and copy them to the Fedora migration server. If the files aren't in Fedora, how else does anyone get them? - Greg
On 23/11/11 15:38, Greg Scott wrote:
9. Install libguestfs-winsupport on a RHEL 6.1 or newer system. On that RHEL 6 system do:
That should be virt-v2v, not libguestfs-winsupport. Nothing in libguestfs-winsupport is required on Fedora.
No. For right now, you have to install libguestfs-winsupport **somewhere** so you can grab the necessary files.
You need to grab the files from *virt-v2v* on RHEL, not libguestfs-winsupport. libguestfs-winsupport really has nothing to do with anything on Fedora :) Matt -- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
You need to grab the files from *virt-v2v* on RHEL, not libguestfs-winsupport. libguestfs-winsupport really has nothing to do with anything on Fedora :)
Except that's where the files are. I had a RHEL 6.1 system without libguestfs-winsupport and the files were missing. After installing it, the files were there. - Greg
You need to grab the files from *virt-v2v* on RHEL, not libguestfs-winsupport. libguestfs-winsupport really has nothing to do with anything on Fedora :)
Except that's where the files are. I had a RHEL 6.1 system without
On 23/11/11 16:55, Greg Scott wrote: libguestfs-winsupport and the files were missing. After installing it, the files were there. On your RHEL 6 system, try: rpm -qf /var/lib/virt-v2v/software/windows/* Matt -- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
On your RHEL 6 system, try:
rpm -qf /var/lib/virt-v2v/software/windows/*
Well this is interesting. All I have to go on is memory, but I could have sworn those files were not there before installing libguestfs-winsupport. But my memory disagrees with the evidence below. Sure enough - removing libguestfs-winsupport makes no difference with that windows directory. Removing virt-v2v deletes it. And then adding virt-v2v back in recreates it. I'll update that howto recipe. [root@mgrhost ~]# cd /var/lib/virt-v2v [root@mgrhost virt-v2v]# cd software [root@mgrhost software]# ls windows [root@mgrhost software]# ls -R -al .: total 12 drwxr-xr-x. 3 root root 4096 Nov 22 10:39 . drwxr-xr-x. 3 root root 4096 Jun 23 05:53 .. drwxr-xr-x. 2 root root 4096 Jun 23 05:53 windows ./windows: total 4304 drwxr-xr-x. 2 root root 4096 Jun 23 05:53 . drwxr-xr-x. 3 root root 4096 Nov 22 10:39 .. -rw-r--r--. 1 root root 994 Feb 14 2011 firstboot.bat -rw-r--r--. 1 root root 4324584 Feb 14 2011 rhev-apt.exe -rw-r--r--. 1 root root 68928 Feb 14 2011 rhsrvany.exe [root@mgrhost software]# rpm -qf /var/lib/virt-v2v/software/windows/* virt-v2v-0.7.1-3.el6.x86_64 virt-v2v-0.7.1-3.el6.x86_64 virt-v2v-0.7.1-3.el6.x86_64 [root@mgrhost software]# [root@mgrhost software]# [root@mgrhost software]# rpm -qa | grep libguestfs-winsupport libguestfs-winsupport-1.0-7.el6.x86_64 [root@mgrhost software]# ls windows -al total 4304 drwxr-xr-x. 2 root root 4096 Jun 23 05:53 . drwxr-xr-x. 3 root root 4096 Nov 22 10:39 .. -rw-r--r--. 1 root root 994 Feb 14 2011 firstboot.bat -rw-r--r--. 1 root root 4324584 Feb 14 2011 rhev-apt.exe -rw-r--r--. 1 root root 68928 Feb 14 2011 rhsrvany.exe [root@mgrhost software]# rpm -e libguestfs-winsupport [root@mgrhost software]# ls windows -al total 4304 drwxr-xr-x. 2 root root 4096 Jun 23 05:53 . drwxr-xr-x. 3 root root 4096 Nov 22 10:39 .. -rw-r--r--. 1 root root 994 Feb 14 2011 firstboot.bat -rw-r--r--. 1 root root 4324584 Feb 14 2011 rhev-apt.exe -rw-r--r--. 1 root root 68928 Feb 14 2011 rhsrvany.exe [root@mgrhost software]# - Greg
Windows RHEV P2V Cookbook draft 2011-1209 1. Install 32 bit Fedora 16 as a virtual machine or physical host. You will use this system to build a .ISO file to burn to CD. Later in the process, you'll boot a source physical machine from this CD. 2. Install 64 bit Fedora 16 as another virtual machine or physical host. This will become your migration server. 3. On both the 32 and 64 bit F16 systems, cd /etc/yum.repos.d and edit the file named fedora-updates-testing.repo. Change all lines that say "enabled=0" to "enabled=1". 4 - Download and install virt-v2v on both the 32 and 64 bit systems. (yum install virt-v2v). Virt-v2v is a package to migrate virtual machines from one virtual environment to either libvirt or RHEV. It also includes the P2V extensions. Note that as of 12/9/2011, the latest version is in the fedora-updates-testing repository. That is why you need the above step to enable the necessary repositories. 5 - Download, install, and run virt-p2v-image-builder (yum install virt-p2v-image-builder) on the 32 bit system. virt-p2v-image-builder is a tool that builds a .ISO file for source physical machines to boot from. Do this on the 32 bit system so it builds a 32 bit kernel so you can use it to boot 32 bit hardware. Note that yum list available | grep v2v only shows virt-p2v-image-builder on the 32 bit system and not on the 64 bit system. For now, run it like this: virt-p2v-image-builder -a http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/16/i386 Burn the resulting .ISO file to a CD. You won't need the 32 bit system any more. All subsequent Fedora operations will happen on the 64 bit system. 6. yum install and/or update libguestfs. This downloads and installs libguestfs-1.14.2-1.fc16.x86_64 and all its dependencies. (Much easier than downloading all the RPMs by hand.) 7. Edit /usr/bin/virt-p2v-server and uncomment this line #$ENV{'LIBGUESTFS_TRACE'} = 1; This is not strictly necessary for running P2V migrations, but the migration is a complex process and you will want the diagnostic info in case something goes wrong. 7 - Edit the target profile on the Fedora system (/etc/virt-v2v.conf). This describes the environment to migrate into. The .conf file is separated into sections. Copy the appropriate section, paste it in the bottom, remove the comment markers, and customize with correct names of objects for this site. 8 - Take a look at the directory /var/lib/virt-v2v. It should look like this: [root@Fedora16P2V virt-v2v]# pwd /var/lib/virt-v2v [root@Fedora16P2V virt-v2v]# ls -al -R .: total 20 drwxr-xr-x. 3 root root 4096 Dec 9 21:30 . drwxr-xr-x. 49 root root 4096 Nov 19 14:40 .. drwxr-xr-x. 3 root root 4096 Dec 9 21:30 software -rw-r--r--. 1 root root 7050 Dec 5 08:46 virt-v2v.db ./software: total 12 drwxr-xr-x. 3 root root 4096 Dec 9 21:30 . drwxr-xr-x. 3 root root 4096 Dec 9 21:30 .. drwxr-xr-x. 2 root root 4096 Dec 9 21:30 windows ./software/windows: total 80 drwxr-xr-x. 2 root root 4096 Dec 9 21:30 . drwxr-xr-x. 3 root root 4096 Dec 9 21:30 .. -rw-r--r--. 1 root root 994 Dec 5 08:46 firstboot.bat -rw-r--r--. 1 root root 68928 Dec 5 08:46 rhsrvany.exe [root@Fedora16P2V virt-v2v]# The firstboot phase of Windows P2V migrations needs these files. If they're missing, your P2V will run for several hours and then die. Earlier virt-v2v versions also needed a file named rhev-apt.exe. As of version 0.8.5.1, this is apparently no longer necessary with P2V migrations using Fedora as a migration server, although firstboot.bat still tries to run it. I still have a copy of rhev-apt.exe on my conversion server; you can grab a copy from the latest RHEL 6.n *virt-v2v* RPM if you need it. 9. Now try a P2V. Boot the source Windows system from the CD created earlier, connect to the Fedora migration server IP Address, select the profile you made and start the migration. This should create a virtual machine and virtual disk images in the RHEV Exports staging area. 10. When the migration finishes, use RHEV Manager to import the newly migrated virtual machine into the RHEV environment.
On 12/10/2011 04:12 AM, Greg Scott wrote:
Windows RHEV P2V Cookbook draft 2011-1209
1. Install 32 bit Fedora 16 as a virtual machine or physical host. You will use this system to build a .ISO file to burn to CD. Later in the process, you'll boot a source physical machine from this CD.
You don't need this step any more. You can do this all on a single 64-bit system.
2. Install 64 bit Fedora 16 as another virtual machine or physical host. This will become your migration server.
3. On both the 32 and 64 bit F16 systems, cd /etc/yum.repos.d and edit the file named fedora-updates-testing.repo. Change all lines that say "enabled=0" to "enabled=1".
This is a temporary step, which will expire 2 weeks from now when the new virt-v2v and virt-p2v are pushed to stable.
4 - Download and install virt-v2v on both the 32 and 64 bit systems. (yum install virt-v2v). Virt-v2v is a package to migrate virtual machines from one virtual environment to either libvirt or RHEV. It also includes the P2V extensions. Note that as of 12/9/2011, the latest version is in the fedora-updates-testing repository. That is why you need the above step to enable the necessary repositories.
5 - Download, install, and run virt-p2v-image-builder (yum install virt-p2v-image-builder) on the 32 bit system. virt-p2v-image-builder is a tool that builds a .ISO file for source physical machines to boot from. Do this on the 32 bit system so it builds a 32 bit kernel so you can use it to boot 32 bit hardware. Note that yum list available | grep v2v only shows virt-p2v-image-builder on the 32 bit system and not on the 64 bit system. For now, run it like this:
virt-p2v-image-builder -a http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/16/i386
As I mentioned above, you can now run this on your 64 bit system. The result will still be an i386 boot iso. Also, explicitly adding the testing repo won't be required in a couple of weeks when we've pushed the release to stable. You mentioned in a follow up email that this command will output a bunch of error messages. This is completely normal when building live CD images, and can be ignored.
Burn the resulting .ISO file to a CD. You won't need the 32 bit system any more.
All subsequent Fedora operations will happen on the 64 bit system.
6. yum install and/or update libguestfs. This downloads and installs libguestfs-1.14.2-1.fc16.x86_64 and all its dependencies. (Much easier than downloading all the RPMs by hand.)
7. Edit /usr/bin/virt-p2v-server and uncomment this line
#$ENV{'LIBGUESTFS_TRACE'} = 1;
This is not strictly necessary for running P2V migrations, but the migration is a complex process and you will want the diagnostic info in case something goes wrong.
7 - Edit the target profile on the Fedora system (/etc/virt-v2v.conf). This describes the environment to migrate into. The .conf file is separated into sections. Copy the appropriate section, paste it in the bottom, remove the comment markers, and customize with correct names of objects for this site.
8 - Take a look at the directory /var/lib/virt-v2v. It should look like this:
[root@Fedora16P2V virt-v2v]# pwd /var/lib/virt-v2v [root@Fedora16P2V virt-v2v]# ls -al -R .: total 20 drwxr-xr-x. 3 root root 4096 Dec 9 21:30 . drwxr-xr-x. 49 root root 4096 Nov 19 14:40 .. drwxr-xr-x. 3 root root 4096 Dec 9 21:30 software -rw-r--r--. 1 root root 7050 Dec 5 08:46 virt-v2v.db
./software: total 12 drwxr-xr-x. 3 root root 4096 Dec 9 21:30 . drwxr-xr-x. 3 root root 4096 Dec 9 21:30 .. drwxr-xr-x. 2 root root 4096 Dec 9 21:30 windows
./software/windows: total 80 drwxr-xr-x. 2 root root 4096 Dec 9 21:30 . drwxr-xr-x. 3 root root 4096 Dec 9 21:30 .. -rw-r--r--. 1 root root 994 Dec 5 08:46 firstboot.bat -rw-r--r--. 1 root root 68928 Dec 5 08:46 rhsrvany.exe [root@Fedora16P2V virt-v2v]#
The firstboot phase of Windows P2V migrations needs these files. If they're missing, your P2V will run for several hours and then die. Earlier virt-v2v versions also needed a file named rhev-apt.exe. As of version 0.8.5.1, this is apparently no longer necessary with P2V migrations using Fedora as a migration server, although firstboot.bat still tries to run it. I still have a copy of rhev-apt.exe on my conversion server; you can grab a copy from the latest RHEL 6.n *virt-v2v* RPM if you need it.
I fixed this for you in the latest release :) If any of the firstboot files aren't available it'll display a warning and firstboot won't be installed at all. However, the conversion will be successful. If you want to install rhev-apt, though (a good idea if RHEV is your target), you're quite right that a good place to get it is the RHEL 6 rpm. IIRC, you can also get it from the RHEV guest tools ISO. You just have to rename it to rhev-apt.exe and put it in the right place.
9. Now try a P2V. Boot the source Windows system from the CD created earlier, connect to the Fedora migration server IP Address, select the profile you made and start the migration. This should create a virtual machine and virtual disk images in the RHEV Exports staging area.
10. When the migration finishes, use RHEV Manager to import the newly migrated virtual machine into the RHEV environment.
Thanks again for this, Matt -- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
On 12/10/2011 04:12 AM, Greg Scott wrote:
Windows RHEV P2V Cookbook draft 2011-1209
1. Install 32 bit Fedora 16 as a virtual machine or physical host. You will use this system to build a .ISO file to burn to CD. Later in the process, you'll boot a source physical machine from this CD.
You don't need this step any more. You can do this all on a single 64-bit system.
I think you still need that 32 bit system to make the ISO file. I just now tested this on some of my own stuff. I don't know of any easy way to install virt-p2v-image-builder on a 64 bit F16 system - it doesn't show up with yum. [root@fedora1664-p2v /]# yum list available | grep p2v [root@fedora1664-p2v /]# rpm -qa | grep p2v [root@fedora1664-p2v ~]# virt-p2v-image-builder bash: virt-p2v-image-builder: command not found... [root@fedora1664-p2v ~]# find / -name virt-p2v-image-builder find: `/home/gregs/.gvfs': Permission denied [root@fedora1664-p2v ~]# [root@fedora1664-p2v /]# cd / [root@fedora1664-p2v /]# ls -R | grep image-builder I don't have a 32 bit F16 system handy here, but I've seen and installed virt-v2v-image-builder on the 32 bit systems at other sites. It shows up as expected and installs on 32 bit systems, but doesn't show up on 64 bit systems. That's why you still need that 32 bit system - to make that ISO file so you can boot the source physical machine. - Greg
participants (2)
-
Greg Scott -
Matthew Booth