Hello community, here is the log from the commit of package virt-v2v for openSUSE:Factory checked in at 2013-10-24 14:14:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/virt-v2v (Old) and /work/SRC/openSUSE:Factory/.virt-v2v.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "virt-v2v" Changes: -------- --- /work/SRC/openSUSE:Factory/virt-v2v/virt-v2v.changes 2013-09-16 10:18:48.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.virt-v2v.new/virt-v2v.changes 2013-10-24 14:14:58.000000000 +0200 @@ -1,0 +2,35 @@ +Tue Oct 15 19:13:10 UTC 2013 - [email protected] + +- Update to upstream (version 0.9.1, commit 9193a294). + * Remove obsolete fix_redhat_dup_grub_entries.patch (upstream) +- Replace RedHat and SUSE converter with general Linux converter. + * Remove add_suse_converter.patch + * redhat_to_linux.patch +- Add openSUSE 13.1 support to capabilities database. + * Updated add_suse_capabilities.patch +- Remove missing files from MANIFEST + * fix_manifest.patch + +------------------------------------------------------------------- +Wed Sep 25 20:43:43 UTC 2013 - [email protected] + +- Cleaned up SUSE converter as per upstream comments. +- Added modifications to Windows.pm to support SUSE environment with + VMDP. + * win_convert_on_suse.patch +- Masked the reporting of missing hypervisor features which are + supported, but not reported under SUSE. + * mask_unused_hv_features.patch + +------------------------------------------------------------------- +Mon Sep 23 23:13:11 UTC 2013 - [email protected] + +- Improved logic for -base kernel support. +- Added xen unconfigure code to fixup INITRD_MODULES. +- Reverted to static IP address support, instead of dhcp during guestfs + converstion. +- Added documentation for SUSE support in virt-v2v(1). + * add_suse_to_man.patch +- Fixed rpm warning messages getting lost. + +------------------------------------------------------------------- Old: ---- add_suse_converter.patch fix_redhat_dup_grub_entries.patch virt-v2v-v0.9.1.tar.gz New: ---- add_suse_to_man.patch fix_manifest.patch mask_unused_hv_features.patch redhat_to_linux.patch virt-v2v-0.9.1-9193a294.tar.gz win_convert_on_suse.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ virt-v2v.spec ++++++ --- /var/tmp/diff_new_pack.HpR2WS/_old 2013-10-24 14:15:02.000000000 +0200 +++ /var/tmp/diff_new_pack.HpR2WS/_new 2013-10-24 14:15:02.000000000 +0200 @@ -24,13 +24,16 @@ Group: System/Management Url: http://git.fedorahosted.org/git/virt-v2v.git -Source0: %{name}-v%{version}.tar.gz +Source0: %{name}-%{version}-9193a294.tar.gz Source1: %{name}-rpmlintrc -Patch0: add_suse_capabilities.patch -Patch1: add_suse_converter.patch -Patch2: remove_ide_iface.patch -Patch3: fix_redhat_dup_grub_entries.patch +Patch0: add_suse_to_man.patch +Patch1: add_suse_capabilities.patch +Patch2: redhat_to_linux.patch +Patch3: remove_ide_iface.patch Patch4: add_verbose_messaging.patch +Patch5: mask_unused_hv_features.patch +Patch6: win_convert_on_suse.patch +Patch7: fix_manifest.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # Backported upstream patches @@ -111,13 +114,16 @@ %prep -%setup -q -n %{name}-v%{version} +%setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 %build %{__perl} Build.PL @@ -142,7 +148,8 @@ windir=$statedir/software/windows mkdir -p $windir -cp windows/rhsrvany.exe windows/firstboot.bat $windir/ +# Not yet required for SUSE +#cp windows/rhsrvany.exe windows/firstboot.bat $windir/ mkdir -p %{buildroot}%{_sysconfdir} cp v2v/virt-v2v.conf %{buildroot}%{_sysconfdir}/ @@ -165,7 +172,7 @@ %doc TODO.txt %doc META.yml -%doc ChangeLog +#%doc ChangeLog %doc COPYING COPYING.LIB # For noarch packages: vendorlib ++++++ add_suse_capabilities.patch ++++++ --- /var/tmp/diff_new_pack.HpR2WS/_old 2013-10-24 14:15:02.000000000 +0200 +++ /var/tmp/diff_new_pack.HpR2WS/_new 2013-10-24 14:15:02.000000000 +0200 @@ -1,8 +1,9 @@ The following modifications are required to adds conversion capabilities to the virt-v2v.db for SLES and openSUSE through: - - Adding virtio capabilities for SLES10/11 and openSUSE 10/11/12. + - Adding virtio capabilities for SLES10/11 and openSUSE 10/11/12/13. - Designating the rpm containing the cirrus video driver in SLES/openSUSE + - Adding app definitions for SLES10/11 kernels. This patch also adds the following SUSE examples to /etc/virt-v2v.conf: @@ -10,13 +11,13 @@ - Sample network conversion using SUSE naming defaults (br0 -> default). --- - virt-v2v.conf | 8 ++++++++ - virt-v2v.db | 33 +++++++++++++++++++++------------ - 2 files changed, 29 insertions(+), 12 deletions(-) + virt-v2v.conf | 8 ++++++ + virt-v2v.db | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 81 insertions(+) diff -Nurp a/v2v/virt-v2v.conf b/v2v/virt-v2v.conf ---- a/v2v/virt-v2v.conf 2013-09-14 13:00:17.148819499 -0600 -+++ b/v2v/virt-v2v.conf 2013-09-14 13:00:41.118810452 -0600 +--- a/v2v/virt-v2v.conf 2013-10-14 13:11:33.941362437 -0600 ++++ b/v2v/virt-v2v.conf 2013-10-14 13:15:11.264289183 -0600 @@ -40,12 +40,20 @@ configuration data in /var/lib/virt-v2v/ <capability os='linux' distro='rhel' major='6' name='user-install'> <dep name='mypackage'/> @@ -39,47 +40,16 @@ <network type='network' name='default'/> </network> diff -Nurp a/v2v/virt-v2v.db b/v2v/virt-v2v.db ---- a/v2v/virt-v2v.db 2013-09-14 13:00:25.755817235 -0600 -+++ b/v2v/virt-v2v.db 2013-09-14 13:00:32.478814644 -0600 -@@ -11,39 +11,54 @@ the modifications or additions to /etc/v - <!-- Capabilities --> - <!-- RHEL 6 has always supported virtio --> - <capability os='linux' distro='rhel' major='6' name='virtio'/> -- - <capability os='linux' distro='rhel' major='5' name='virtio'> - <dep name='kernel' minversion='2.6.18-128.el5'/> - <dep name='lvm2' minversion='2.02.40-6.el5'/> - <dep name='selinux-policy-targeted' minversion='2.4.6-203.el5' - ifinstalled='yes'/> +--- a/v2v/virt-v2v.db 2013-10-14 13:11:40.517360517 -0600 ++++ b/v2v/virt-v2v.db 2013-10-14 13:36:09.018512276 -0600 +@@ -44,6 +44,36 @@ the modifications or additions to /etc/v + <dep name='xorg-x11-drv-qxl'/> </capability> -- - <capability os='linux' distro='rhel' major='4' name='virtio'> - <dep name='kernel' minversion='2.6.9-89.EL'/> - </capability> -- - <!-- RHEL 5+ packages the cirrus driver in xorg-x11-drv-cirrus --> - <capability os='linux' distro='rhel' major='6' name='cirrus'> - <dep name='xorg-x11-drv-cirrus'/> - </capability> -- - <capability os='linux' distro='rhel' major='5' name='cirrus'> - <dep name='xorg-x11-drv-cirrus'/> - </capability> -- - <!-- RHEL 4 bundles the cirrus driver with the main X package --> - <capability os='linux' distro='rhel' major='4' name='cirrus'/> - <!-- All current versions of Fedora support VirtIO --> - <capability os='linux' distro='fedora' name='virtio'/> -- - <!-- All current versions of fedora package the cirrus driver in - xorg-x11-drv-cirrus --> - <capability os='linux' distro='fedora' name='cirrus'> - <dep name='xorg-x11-drv-cirrus'/> - </capability> - -+ <!-- SLES 11 has always supported virtio --> -+ <capability os='linux' distro='sles' major='11' name='virtio'/> ++ <!-- SLES 11 supports virtio in the default kernel--> ++ <capability os='linux' distro='sles' major='11' name='virtio'> ++ <dep name='kernel'/> ++ </capability> + <capability os='linux' distro='sles' major='10' name='virtio'> + <dep name='kernel' minversion='2.6.16.60-0.85.1'/> + </capability> @@ -88,9 +58,16 @@ + <dep name='xorg-x11-driver-video'/> + </capability> + -+ <!-- openSUSE 11/12 has always supported virtio --> -+ <capability os='linux' distro='opensuse' major='12' name='virtio'/> -+ <capability os='linux' distro='opensuse' major='11' name='virtio'/> ++ <!-- openSUSE 11/12/13 supports virtio in the default kernel --> ++ <capability os='linux' distro='opensuse' major='13' name='virtio'> ++ <dep name='kernel'/> ++ </capability> ++ <capability os='linux' distro='opensuse' major='12' name='virtio'> ++ <dep name='kernel'/> ++ </capability> ++ <capability os='linux' distro='opensuse' major='11' name='virtio'> ++ <dep name='kernel'/> ++ </capability> + <capability os='linux' distro='opensuse' major='10' name='virtio'> + <dep name='kernel' minversion='2.6.25.5-1.1'/> + </capability> @@ -102,16 +79,53 @@ <!-- RHEL clones: copied from above with distro altered --> <!-- CentOS --> <capability os='linux' distro='centos' major='6' name='virtio'/> -@@ -83,12 +98,6 @@ the modifications or additions to /etc/v - </capability> - <capability os='linux' distro='scientificlinux' major='4' name='cirrus'/> +@@ -178,6 +208,49 @@ the modifications or additions to /etc/v + <path>rhel/4/kernel-largesmp-2.6.9-89.EL.x86_64.rpm</path> + </app> + ++ <!-- SLES 11 ++ All of these RPMs are from SLES11 SP3. ++ SLES 11 requires both a kernel-[flavor] and a kernel-[flavor]-base --> ++ <app os='linux' distro='sles' major='11' arch='x86_64' name='kernel-default'> ++ <path>sles/11/kernel-default-3.0.76-0.11.1.x86_64.rpm</path> ++ <dep>kernel-default-base</dep> ++ </app> ++ <app os='linux' distro='sles' major='11' arch='x86_64' name='kernel-default-base'> ++ <path>sles/11/kernel-default-base-3.0.76-0.11.1.x86_64.rpm</path> ++ </app> ++ <app os='linux' distro='sles' major='11' arch='i586' name='kernel-default'> ++ <path>sles/11/kernel-default-3.0.76-0.11.1.i586.rpm</path> ++ <dep>kernel-default-base</dep> ++ </app> ++ <app os='linux' distro='sles' major='11' arch='i586' name='kernel-default-base'> ++ <path>sles/11/kernel-default-base-3.0.76-0.11.1.i586.rpm</path> ++ </app> ++ <app os='linux' distro='sles' major='11' arch='i586' name='kernel-pae'> ++ <path>sles/11/kernel-pae-3.0.76-0.11.1.i586.rpm</path> ++ <dep>kernel-pae-base</dep> ++ </app> ++ <app os='linux' distro='sles' major='11' arch='i586' name='kernel-pae-base'> ++ <path>sles/11/kernel-pae-base-3.0.76-0.11.1.i586.rpm</path> ++ </app> ++ ++ <!-- SLES 10 ++ All of these RPMs are from SLES10 SP4. --> ++ <app os='linux' distro='sles' major='10' arch='x86_64' name='kernel-default'> ++ <path>sles/10/kernel-default-2.6.16.60-0.85.1.x86_64.rpm</path> ++ </app> ++ <app os='linux' distro='sles' major='10' arch='x86_64' name='kernel-smp'> ++ <path>sles/10/kernel-smp-2.6.16.60-0.85.1.x86_64.rpm</path> ++ </app> ++ <app os='linux' distro='sles' major='10' arch='i586' name='kernel-default'> ++ <path>sles/10/kernel-default-2.6.16.60-0.85.1.i586.rpm</path> ++ </app> ++ <app os='linux' distro='sles' major='10' arch='i586' name='kernel-bigsmp'> ++ <path>sles/10/kernel-bigsmp-2.6.16.60-0.85.1.i586.rpm</path> ++ </app> ++ <app os='linux' distro='sles' major='10' arch='i586' name='kernel-smp'> ++ <path>sles/10/kernel-smp-2.6.16.60-0.85.1.i586.rpm</path> ++ </app> ++ + <!-- Windows --> -- <!-- All current versions of fedora package the cirrus driver in -- xorg-x11-drv-cirrus --> -- <capability os='linux' distro='fedora' name='cirrus'> -- <dep name='xorg-x11-drv-cirrus'/> -- </capability> -- - <!-- This is a place-holder for the 'user-custom' capability, which allows - the user to install custom packages during linux conversions. Don't edit - this entry; instead add a more specific match rule containing custom + <!-- Each of these should point to the directory containing the appropriate ++++++ add_suse_to_man.patch ++++++ Documents support for SUSE in virt-v2v(1). --- virt-v2v.pl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff -Nurp a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl --- a/v2v/virt-v2v.pl 2013-09-23 16:47:42.428886570 -0600 +++ b/v2v/virt-v2v.pl 2013-09-23 16:53:32.023027921 -0600 @@ -57,9 +57,9 @@ virt-v2v - Convert a guest to use KVM virt-v2v converts guests from a foreign hypervisor to run on KVM, managed by libvirt or Red Hat Enterprise Virtualisation (RHEV) version 2.2 or later. It -can currently convert Red Hat Enterprise Linux and Windows guests running on -Xen, VirtualBox, and VMware ESX. It will enable VirtIO drivers in the -converted guest if possible. +can currently convert Red Hat Enterprise Linux, SUSE Linux Enterprise Server, +and Windows guests running on Xen, VirtualBox, and VMware ESX. It will enable +VirtIO drivers in the converted guest if possible. =head1 OPTIONS @@ -229,10 +229,18 @@ Fedora =item * +openSUSE + +=item * + RHEL Client/Workstation/Desktop =item * +SUSE Linux Enterprise Desktop + +=item * + Windows XP/Vista/7 =back @@ -247,6 +255,10 @@ RHEL Server/AS/ES =item * +SUSE Linux Enterprise Server + +=item * + Windows 2003/2003r2/2008/2008r2 =back ++++++ add_verbose_messaging.patch ++++++ --- /var/tmp/diff_new_pack.HpR2WS/_old 2013-10-24 14:15:02.000000000 +0200 +++ /var/tmp/diff_new_pack.HpR2WS/_new 2013-10-24 14:15:02.000000000 +0200 @@ -1,22 +1,16 @@ -From d80387d896f946498067eef5c0250ea73e667abe Mon Sep 17 00:00:00 2001 -From: Mike Latimer <[email protected]> -Date: Fri, 6 Sep 2013 09:18:24 -0600 -Subject: [PATCH V2] virt-v2v: Add verbose message logging - This patch adds basic verbose messages in the main virt-v2v code. The usefulness of these messages is limited as the time spent outside of data copying is trivial. However, when converting smaller guests, these messages can act as progress markers and show where time is being spent. --- - v2v/virt-v2v.pl | 43 +++++++++++++++++++++++++++++++++++++++++++ + virt-v2v.pl | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) -diff --git a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl -index 3832f67..5756296 100755 ---- a/v2v/virt-v2v.pl -+++ b/v2v/virt-v2v.pl -@@ -354,6 +354,17 @@ my $list_profiles = 0; +diff -Nurp a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl +--- a/v2v/virt-v2v.pl 2013-09-24 08:36:09.676937320 -0600 ++++ b/v2v/virt-v2v.pl 2013-09-24 08:35:59.548933189 -0600 +@@ -366,6 +366,17 @@ my $list_profiles = 0; Display a list of target profile names specified in the configuration file. @@ -34,7 +28,7 @@ =item B<--help> Display brief help. -@@ -388,6 +399,13 @@ GetOptions ("help|?" => sub { +@@ -400,6 +411,13 @@ GetOptions ("help|?" => sub { print "$Sys::VirtConvert::VERSION\n"; exit(0); }, @@ -48,7 +42,7 @@ "c|connect" => sub { # -c|--connect is the default for other virt tools. Be nice to # the user and point out that virt-v2v is different. -@@ -437,6 +455,14 @@ GetOptions ("help|?" => sub { +@@ -449,6 +467,14 @@ GetOptions ("help|?" => sub { "list-profiles" => \$list_profiles ) or pod2usage(2); @@ -63,7 +57,7 @@ # Set the default configuration files if none are specified if (@config_files == 0) { push(@config_files, '/etc/virt-v2v.conf') if -r '/etc/virt-v2v.conf'; -@@ -521,6 +547,10 @@ else { +@@ -533,6 +559,10 @@ else { # Get an appropriate Source my $source; @@ -74,7 +68,7 @@ if ($input_method eq "libvirtxml") { my $path = shift(@ARGV) or pod2usage({ -message => __"You must specify a filename", -@@ -574,6 +604,10 @@ else { +@@ -586,6 +616,10 @@ else { # Decide the name of the guest target. $output_name = $source->get_name() unless defined $output_name; @@ -85,7 +79,7 @@ # Check that the guest doesn't already exist on the target v2vdie __x('Domain {name} already exists on the target.', -@@ -593,9 +627,14 @@ v2vdie __('Guest doesn\'t define any storage devices') +@@ -605,9 +639,14 @@ v2vdie __('Guest doesn\'t define any sto unless @{$meta->{disks}} > 0; # Copy source storage to target @@ -100,7 +94,7 @@ my @disks = map { [ $_->{device}, $_->{dst}->get_path(), $_->{dst}->get_format() ] } @{$meta->{disks}}; -@@ -623,13 +662,17 @@ my $guestcaps; +@@ -635,13 +674,17 @@ my $guestcaps; my $root; eval { # Inspect the guest @@ -118,6 +112,3 @@ $target->create_guest($g, $root, $meta, $config, $guestcaps, $output_name); }; --- -1.8.1.4 - ++++++ fix_manifest.patch ++++++ Index: virt-v2v-0.9.1/MANIFEST =================================================================== --- virt-v2v-0.9.1.orig/MANIFEST +++ virt-v2v-0.9.1/MANIFEST @@ -2,7 +2,6 @@ augeas/README.txt autobuild.sh Build.PL -ChangeLog COPYING COPYING.LIB lib/Sys/VirtConvert.pm @@ -16,7 +15,7 @@ lib/Sys/VirtConvert/Connection/Source.pm lib/Sys/VirtConvert/Connection/VMwareOVASource.pm lib/Sys/VirtConvert/Connection/Volume.pm lib/Sys/VirtConvert/Converter.pm -lib/Sys/VirtConvert/Converter/RedHat.pm +lib/Sys/VirtConvert/Converter/Linux.pm lib/Sys/VirtConvert/Converter/Windows.pm lib/Sys/VirtConvert/ExecHelper.pm lib/Sys/VirtConvert/GuestfsHandle.pm @@ -26,8 +25,6 @@ lib/Sys/VirtConvert/Transfer/SSH.pm lib/Sys/VirtConvert/Util.pm MANIFEST This list of files MANIFEST.SKIP -META.json -META.yml metadata-format.txt p2v/client/bin/virt-p2v p2v/client/bin/virt-p2v-launcher @@ -60,7 +57,6 @@ p2v/image-builder/common-post.ks p2v/image-builder/Makefile p2v/image-builder/p2v-systemd.ks p2v/image-builder/p2v-sysv.ks -p2v/image-builder/version.ks p2v/image-builder/virt-p2v-image-builder p2v/image-builder/virt-p2v-image.ks p2v/server/virt-p2v-server.pl @@ -88,29 +84,6 @@ po/virt-v2v.pot po/zh_CN.po po/zh_TW.po README-NLS -rhsrvany/aclocal.m4 -rhsrvany/config.guess -rhsrvany/config.h.in -rhsrvany/config.sub -rhsrvany/configure -rhsrvany/configure.ac -rhsrvany/depcomp -rhsrvany/install-sh -rhsrvany/Makefile.am -rhsrvany/Makefile.in -rhsrvany/missing -rhsrvany/README -rhsrvany/RHSrvAny.sln -rhsrvany/RHSrvAny/Makefile.am -rhsrvany/RHSrvAny/Makefile.in -rhsrvany/RHSrvAny/mc.bat -rhsrvany/RHSrvAny/resource.h -rhsrvany/RHSrvAny/RHSrvAny.c -rhsrvany/RHSrvAny/RHSrvAny.h -rhsrvany/RHSrvAny/RHSrvAny.mc -rhsrvany/RHSrvAny/RHSrvAny.vcproj -rhsrvany/RHSrvAny/RHSrvAnyInfo.rc -rubygem-virt-p2v.spec rubygem-virt-p2v.spec.PL run t/001-pod.t @@ -122,6 +95,5 @@ v2v/virt-v2v.conf v2v/virt-v2v.conf.pod v2v/virt-v2v.db v2v/virt-v2v.pl -virt-v2v.spec virt-v2v.spec.PL windows/README.txt ++++++ mask_unused_hv_features.patch ++++++ Remove warnings on capabilites not listed off in `virsh capabilities` for the hypervisor. Without this change, guest conversion can report errors such as: virt-v2v: WARNING: The connected hypervisor does not support feature pae. virt-v2v: WARNING: The connected hypervisor does not support feature hap. virt-v2v: WARNING: The connected hypervisor does not support feature viridian. Index: virt-v2v-v0.9.1/lib/Sys/VirtConvert/Connection/LibVirtTarget.pm =================================================================== --- virt-v2v-v0.9.1.orig/lib/Sys/VirtConvert/Connection/LibVirtTarget.pm +++ virt-v2v-v0.9.1/lib/Sys/VirtConvert/Connection/LibVirtTarget.pm @@ -545,9 +545,13 @@ sub _configure_capabilities my @new_features = (); foreach my $feature (@{$meta->{features}}) { if (!exists($features{$feature})) { - logmsg WARN, __x('The connected hypervisor does not '. - 'support feature {feature}.', - feature => $feature); + # Don't report warnings on features provided, but not listed + # in virsh capabilities for the hypervisor + if ($feature !~ /^(hap|pae|viridian)$/) { + logmsg WARN, __x('The connected hypervisor does not '. + 'support feature {feature}.', + feature => $feature); + } } elsif ($feature eq 'acpi' && !$guestcaps->{acpi}) { ++++++ redhat_to_linux.patch ++++++ ++++ 1129 lines (skipped) ++++++ win_convert_on_suse.patch ++++++ In order to convert Windows guests on a SUSE host, several modifications are required to support the VMDP. --- lib/Sys/VirtConvert/Converter/Windows.pm | 160 ++++++++++--------------------- v2v/virt-v2v.db | 14 +- 2 files changed, 61 insertions(+), 113 deletions(-) diff -Nurp a/lib/Sys/VirtConvert/Converter/Windows.pm b/lib/Sys/VirtConvert/Converter/Windows.pm --- a/lib/Sys/VirtConvert/Converter/Windows.pm 2013-10-14 15:12:37.149063027 -0600 +++ b/lib/Sys/VirtConvert/Converter/Windows.pm 2013-10-14 16:11:48.701651903 -0600 @@ -53,7 +53,7 @@ Sys::VirtConvert::Converter::Windows - P Sys::VirtConvert::Converter::Windows does the "pre-conversion" steps required to get a Windows guest to boot on KVM. Unlike the associated L<Sys::VirtConvert::Converter::Linux(3)> module, this doesn't do a full -conversion of Windows. Instead it just installs the viostor (Windows +conversion of Windows. Instead it just installs the virtio_blk (Windows virtio block) driver, so that the Windows guest will be able to boot on the target. A "RunOnce" script is also added to the VM which does all the rest of the conversion the first time the Windows VM is booted @@ -143,7 +143,7 @@ sub convert _configure_firstboot($g, $root, $config, $tmpdir, $h_sys, $current_cs); _configure_rhev_apt($g, $root, $config, $firstboot, $firstboot_dir); - _unconfigure_xenpv($g, $h_soft, $firstboot); + _unconfigure_xenpv($g, $h_sys, $firstboot); _close_firstboot($g, $firstboot, $firstboot_tmp, $firstboot_dir); @@ -202,55 +202,66 @@ sub _download_hive } # See http://rwmj.wordpress.com/2010/04/30/tip-install-a-device-driver-in-a-windows-vm/ -sub _add_viostor_to_registry +sub _add_virtio_blk_to_registry { my ($g, $root, $h, $current_cs) = @_; # Make the changes. my $regedits = <<REGEDITS; ; Edits to be made to a Windows guest to have -; it boot from viostor. +; it boot from virtio_blk. [HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Control\\CriticalDeviceDatabase\\pci#ven_1af4&dev_1001&subsys_00000000] -"Service"="viostor" +"Service"="virtio_blk" "ClassGUID"="{4D36E97B-E325-11CE-BFC1-08002BE10318}" [HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Control\\CriticalDeviceDatabase\\pci#ven_1af4&dev_1001&subsys_00020000] -"Service"="viostor" +"Service"="virtio_blk" "ClassGUID"="{4D36E97B-E325-11CE-BFC1-08002BE10318}" [HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Control\\CriticalDeviceDatabase\\pci#ven_1af4&dev_1001&subsys_00021af4] -"Service"="viostor" +"Service"="virtio_blk" "ClassGUID"="{4D36E97B-E325-11CE-BFC1-08002BE10318}" -[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\viostor] +[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\virtio_blk] "Type"=dword:00000001 "Start"=dword:00000000 "Group"="SCSI miniport" "ErrorControl"=dword:00000001 -"ImagePath"="system32\\\\drivers\\\\viostor.sys" +"ImagePath"="system32\\\\drivers\\\\virtio_blk.sys" "Tag"=dword:00000021 -[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\viostor\\Parameters] +[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\virtio_blk\\Parameters] "BusType"=dword:00000001 -[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\viostor\\Parameters\\MaxTransferSize] +[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\virtio_blk\\Parameters\\MaxTransferSize] "ParamDesc"="Maximum Transfer Size" "type"="enum" "default"="0" -[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\viostor\\Parameters\\MaxTransferSize\\enum] +[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\virtio_blk\\Parameters\\MaxTransferSize\\enum] "0"="64 KB" "1"="128 KB" "2"="256 KB" -[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\viostor\\Parameters\\PnpInterface] +[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\virtio_blk\\Parameters\\PnpInterface] "5"=dword:00000001 -[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\viostor\\Enum] +[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\virtio_blk\\Enum] "0"="PCI\\\\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00\\\\3&13c0b0c5&0&20" "Count"=dword:00000001 "NextInstance"=dword:00000001 + +;Remove the following legacy Xen keys: +[-HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Enum\\Root\\LEGACY_XENBLK] + +[-HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Enum\\Root\\LEGACY_XENSCSI] + +[-HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\XenBlk\\Enum] + +[-HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\XenScsi\\Enum] + +[HKEY_LOCAL_MACHINE\\SYSTEM\\$current_cs\\Services\\MIKE-NEWREG] REGEDITS my $io; @@ -321,7 +332,7 @@ sub _prepare_virtio_drivers unless (defined($virtio_host) && $g->exists($virtio_guest)); my ($block, $net); - my $viostor_guest = File::Spec->catfile($virtio_guest, 'viostor.sys'); + my $viostor_guest = File::Spec->catfile($virtio_guest, 'virtio_blk.sys'); if ($g->exists($viostor_guest)) { $block = 'virtio'; @@ -342,7 +353,7 @@ sub _prepare_virtio_drivers block => $block); } - if ($g->exists(File::Spec->catfile($virtio_guest, 'netkvm.inf'))) { + if ($g->exists(File::Spec->catfile($virtio_guest, 'virtio_net.inf'))) { $net = 'virtio'; } else { $net = 'rtl8139'; @@ -400,20 +411,20 @@ sub _configure_firstboot { my ($g, $root, $config, $tmpdir, $h_sys, $current_cs) = @_; - # Ensure we have rhsrvany - my ($rhsrvany_host) = $config->match_app($g, $root, 'rhsrvany', + # Ensure we have vmdp-win + my ($vmdp_host) = $config->match_app($g, $root, 'vmdp-win', $g->inspect_get_arch($root)); - if (!defined($rhsrvany_host)) { + if (!defined($vmdp_host)) { logmsg WARN, __x('Unable to configure firstboot service because '. - 'rhsrvany is not defined in the configuration file'); + 'vmdp-win is not defined in the configuration file'); return undef; } - my $rhsrvany_guest = $config->get_transfer_path($rhsrvany_host); - unless (defined($rhsrvany_guest) && $g->exists($rhsrvany_guest)) { + my $vmdp_guest = $config->get_transfer_path($vmdp_host); + unless (defined($vmdp_guest) && $g->exists($vmdp_guest)) { logmsg WARN, __x('Unable to configure firstboot service because '. '{path} is required, but missing', - path => $rhsrvany_host); + path => $vmdp_host); return undef; } @@ -433,6 +444,7 @@ sub _configure_firstboot rem firstboot.bat rem Copyright (C) 2013 Red Hat Inc. +rem Copyright (C) 2013 SUSE Inc. rem rem This program is free software; you can redistribute it and/or rem modify it under the terms of the GNU Lesser General Public @@ -454,7 +466,7 @@ FIRSTBOOT # Create a directory for firstboot files in the guest my $firstboot_dir = ''; # global my $firstboot_dir_win = 'C:'; - foreach my $d ('Program Files', 'RedHat', 'V2V Firstboot') { + foreach my $d ('Program Files', 'SUSE', 'V2V Firstboot') { $firstboot_dir .= '/'.$d; $firstboot_dir_win .= '\\\\'.$d; @@ -462,11 +474,11 @@ FIRSTBOOT $g->mkdir_p($firstboot_dir); } - # Copy rhsrvany to guest - $g->cp($rhsrvany_guest, $firstboot_dir); + # Copy vmdp-win to guest + $g->cp($vmdp_guest, $firstboot_dir); - # Add a new rhsrvany service to the system registry to execute firstboot - my $rhsrvany_win = $firstboot_dir_win.'\\\\rhsrvany.exe'; + # Add a new vmdp service to the system registry to execute firstboot + my $vmdp_win = $firstboot_dir_win.'\\\\VMDP-WIN-2.1.exe'; my $firstboot_win = $firstboot_dir_win.'\\\\firstboot.bat'; my $regedits = <<REGEDITS; @@ -474,7 +486,7 @@ FIRSTBOOT "Type"=dword:00000010 "Start"=dword:00000002 "ErrorControl"=dword:00000001 -"ImagePath"="$rhsrvany_win -s v2v-firstboot" +"ImagePath"="$vmdp_win -s v2v-firstboot" "DisplayName"="V2V first boot actions" "ObjectName"="LocalSystem" @@ -505,7 +517,7 @@ sub _close_firstboot print $firstboot <<'FIRSTBOOT'; echo uninstalling v2v-firstboot service >>log.txt -rhsrvany.exe -s v2v-firstboot uninstall >>log.txt +vmdp-win.exe -s v2v-firstboot uninstall >>log.txt FIRSTBOOT # Write the completed firstboot script into the guest @@ -515,90 +527,28 @@ FIRSTBOOT } } -sub _configure_rhev_apt -{ - my ($g, $root, $config, $firstboot, $firstboot_dir) = @_; - - # Ensure we have rhev-apt - my ($rhevapt_host) = $config->match_app($g, $root, 'rhev-apt', - $g->inspect_get_arch($root)); - if (!defined($rhevapt_host)) { - logmsg WARN, __x('Unable to configure rhev-apt service because '. - 'rhev-apt is not defined in the configuration file'); - return; - } - - my $rhevapt_guest = $config->get_transfer_path($rhevapt_host); - unless (defined($rhevapt_guest) && $g->exists($rhevapt_guest)) { - logmsg WARN, __x('Unable to configure rhev-apt service because '. - '{path} is required, but missing', - path => $rhevapt_host); - return; - } - - # We can't install rhev-apt without firstboot - # N.B. It may seem more efficient to check this first, but by checking it - # here the user gets error messages for all missing files in a single - # conversion - if (!defined($firstboot)) { - logmsg WARN, __x('Unable to configure rhev-apt service without '. - 'firstboot'); - return; - } - - $g->cp($rhevapt_guest, $firstboot_dir); - - print $firstboot <<'RHEVAPT'; - -echo installing rhev-apt >>log.txt -"rhev-apt.exe" /S /v /qn >>log.txt - -echo starting rhev-apt >>log.txt -net start rhev-apt >>log.txt -RHEVAPT -} - sub _unconfigure_xenpv { - my ($g, $h_soft, $firstboot) = @_; + my ($g, $h_sys, $firstboot) = @_; - my @regkey = ('Microsoft', 'Windows', 'CurrentVersion', 'Uninstall', - 'Red Hat Paravirtualized Xen Drivers for Windows(R)'); + my @regkey = ('Enum', 'Root'); - # Find the node \Microsoft\Windows\CurrentVersion\Uninstall - # \Red Hat Paravirtualized Xen Drivers for Windows(R) - my $node = $h_soft->root(); + my $rootnode = $h_sys->root(); foreach (@regkey) { - $node = $h_soft->node_get_child($node, $_); - return unless defined($node); + $rootnode = $h_sys->node_get_child($rootnode, $_); + return unless defined($rootnode); } - my $uninst; - foreach my $v ($h_soft->node_values($node)) { - my $key = $h_soft->value_key($v); - - if ($key eq 'UninstallString') { - $uninst = $h_soft->value_value($v); - $uninst = decode('UTF-16LE', $uninst); - last; + foreach ('LEGACY_XENBLK', 'LEGACY_XENSCSI') { + my $node = $h_sys->node_get_child($rootnode, $_); + if (defined($node)) { + logmsg WARN, __x("FOUND the $_ node - $node"); + logmsg WARN, __x("DELETING the $_ node - $node"); + $h_sys->node_delete_child($node); + } else { + logmsg WARN, __x("DID not find $_ node"); } } - - logmsg WARN, __x("Can't uninstall Xen PV: {regkey} doesn't contain {value}", - regkey => '\HKLM\SOFTWARE\\'.join(@regkey, '\\'), - value => 'UninstallString'); - - # The uninstall program will be uninst.exe. This is a wrapper around - # _uninst.exe which prompts the user. As we don't want the user to be - # prompted, we run _uninst.ex explicitly. - my ($vol, $dir, $file) = File::Spec::Win32->splitpath($uninst); - $uninst = File::Spec::Win32->catfile($vol, $dir, '_uninst.exe'); - - print $firstboot <<XENPV; - -echo Uninstalling Xen PV driver >>log.txt -"$uninst" >>log.txt -XENPV } sub _disable_services diff -Nurp a/v2v/virt-v2v.db b/v2v/virt-v2v.db --- a/v2v/virt-v2v.db 2013-10-14 15:46:02.138145213 -0600 +++ b/v2v/virt-v2v.db 2013-10-14 15:49:52.999227069 -0600 @@ -254,8 +254,9 @@ the modifications or additions to /etc/v <!-- Windows --> <!-- Each of these should point to the directory containing the appropriate - VirtIO drivers. On some platforms (RHEL 6), the directories below will - correspond to directories installed by the 'virtio-win' package. --> + VirtIO drivers. On some platforms (SLES 11), the directories below will + correspond to directories installed by the 'virtio-win-SUSE' + package. --> <app os='windows' major='5' minor='1' arch='i386' name='virtio'> <path>/usr/share/virtio-win/drivers/i386/WinXP</path> </app> @@ -272,12 +273,9 @@ the modifications or additions to /etc/v <path>/usr/share/virtio-win/drivers/amd64/Win2008</path> </app> - <!-- RHSrvAny is compiled as a 32 bit app even on 64 bit Windows --> - <app os='windows' name='rhsrvany'> - <path>windows/rhsrvany.exe</path> - </app> - <app os='windows' name='rhev-apt'> - <path>windows/rhev-apt.exe</path> + <!-- Virtual Machine Driver Pack (VMDP) setup program --> + <app os='windows' name='vmdp-win'> + <path>windows/VMDP-WIN-2.1.exe</path> </app> <!-- Default file locations --> -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
