From 759c6fe608a068864b5f755f84a7754f920057dd59fe77e0f372565285985b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Wed, 20 Jul 2016 09:00:26 +0000 Subject: [PATCH] Accepting request 412295 from home:cbosdonnat:branches:Virtualization - v2v: add support for win2k16. Backport commit e93d4ea3, fate#316274 OBS-URL: https://build.opensuse.org/request/show/412295 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=367 --- 0000-hotfix.patch | 17 +++++++++++++---- libguestfs.changes | 6 ++++++ libguestfs.spec | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/0000-hotfix.patch b/0000-hotfix.patch index 85bf229..c6c07b3 100644 --- a/0000-hotfix.patch +++ b/0000-hotfix.patch @@ -228,7 +228,9 @@ Index: libguestfs-1.32.4/v2v/windows_virtio.ml - add_viostor_to_driver_database g root arch current_cs - else (* Windows <= 7 *) - add_viostor_to_critical_device_database g root current_cs -- ++and add_guestor_to_registry g root current_cs drv_name drv_pciid = ++ let ddb_node = g#hivex_node_get_child root "DriverDatabase" in + -and add_viostor_to_critical_device_database g root current_cs = - (* See http://rwmj.wordpress.com/2010/04/30/tip-install-a-device-driver-in-a-windows-vm/ - * NB: All these edits are in the HKLM\SYSTEM hive. No other @@ -250,9 +252,7 @@ Index: libguestfs-1.32.4/v2v/windows_virtio.ml - [ current_cs; "Control"; "CriticalDeviceDatabase"; "pci#ven_1af4&dev_1001&subsys_00021af4&rev_00" ], - [ "Service", REG_SZ "viostor"; - "ClassGUID", REG_SZ "{4D36E97B-E325-11CE-BFC1-08002BE10318}" ]; -+and add_guestor_to_registry g root current_cs drv_name drv_pciid = -+ let ddb_node = g#hivex_node_get_child root "DriverDatabase" in - +- - [ current_cs; "Services"; "viostor" ], + let regedits = + if ddb_node = 0L then @@ -545,6 +545,15 @@ Index: libguestfs-1.32.4/v2v/windows_virtio.ml let paths = external_command cmd in List.iter ( fun path -> +@@ -467,6 +284,8 @@ and virtio_iso_path_matches_guest_os pat + (6, 3, not_client) + else if pathelem "w10" || pathelem "win10" then + (10, 0, is_client) ++ else if pathelem "2k16" || pathelem "win2016" then ++ (10, 0, not_client) + else + raise Not_found in + Index: libguestfs-1.32.4/appliance/init =================================================================== --- libguestfs-1.32.4.orig/appliance/init diff --git a/libguestfs.changes b/libguestfs.changes index 8dcfe8a..bd9a67e 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jul 20 08:32:21 UTC 2016 - cbosdonnat@suse.com + +- v2v: add support for win2k16. + Backport commit e93d4ea3, fate#316274 + ------------------------------------------------------------------- Wed Jul 13 15:21:57 UTC 2016 - ke@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index ac2fc9b..7dd9806 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,7 +1,7 @@ # # spec file for package libguestfs # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2011 Michal Hrusecky # # All modifications and additions to the file contributed by third parties