Nikos Skalkotos
2014-Jun-13 08:34 UTC
[Libguestfs] Offline virtio installation on Windows 2012R2
Hello all, I'm trying to automate the installation of the VirtIO drivers on a Windows image in the same way it is done in [1] and [2]. Registering the viostor service and adding the driver under the HKEY_LOCALE_MACHINE\SYSTEM\CurrentControlSet\CriticalDeviceDatabase registry key, makes an Windows 2008R2 image boot if the hd is under the virtio interface, but I cannot make this work for Windows 2012R2. As far as I've seen, the CDDB registry keys are deprecated in newer Windows and creating them back does not seem to make this work. Has anybody had any luck with this? Is there any other way to do it for newer Windows? If this does not work out, I'll probably try to add the driver installations process in a RunOnce registry entry, boot the image using the ide interface and reboot it using VirtIO after the drivers have been installed, but I wanted to know if there is an easier way to do this. Thank you in advanced, Nikos [1] https://github.com/libguestfs/hivex/blob/master/sh/example6 [2] https://git.fedorahosted.org/cgit/virt-v2v.git/tree/lib/Sys/VirtConvert/Converter/Windows.pm
Richard W.M. Jones
2014-Jun-13 11:51 UTC
Re: [Libguestfs] Offline virtio installation on Windows 2012R2
[Matt (CC'd) can probably answer this one better than anyone ...] On Fri, Jun 13, 2014 at 11:34:08AM +0300, Nikos Skalkotos wrote:> Hello all, > > I'm trying to automate the installation of the VirtIO drivers on a > Windows image in the same way it is done in [1] and [2]. > > Registering the viostor service and adding the driver under the > HKEY_LOCALE_MACHINE\SYSTEM\CurrentControlSet\CriticalDeviceDatabase > registry key, makes an Windows 2008R2 image boot if the hd is under the > virtio interface, but I cannot make this work for Windows 2012R2. As far > as I've seen, the CDDB registry keys are deprecated in newer Windows and > creating them back does not seem to make this work. > > Has anybody had any luck with this? Is there any other way to do it for > newer Windows? > > If this does not work out, I'll probably try to add the driver > installations process in a RunOnce registry entry, boot the image using > the ide interface and reboot it using VirtIO after the drivers have been > installed, but I wanted to know if there is an easier way to do this. > > Thank you in advanced, > Nikos > > [1] https://github.com/libguestfs/hivex/blob/master/sh/example6 > [2] > https://git.fedorahosted.org/cgit/virt-v2v.git/tree/lib/Sys/VirtConvert/Converter/Windows.pmRich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Matthew Booth
2014-Jun-13 11:57 UTC
Re: [Libguestfs] Offline virtio installation on Windows 2012R2
On 13/06/14 12:51, Richard W.M. Jones wrote:> [Matt (CC'd) can probably answer this one better than anyone ...]I haven't implemented this for W2k12. Sounds like a job for Google and a couple of weeks of experimentation :( Be prepared to find many blog posts which are wrong. Matt> > On Fri, Jun 13, 2014 at 11:34:08AM +0300, Nikos Skalkotos wrote: >> Hello all, >> >> I'm trying to automate the installation of the VirtIO drivers on a >> Windows image in the same way it is done in [1] and [2]. >> >> Registering the viostor service and adding the driver under the >> HKEY_LOCALE_MACHINE\SYSTEM\CurrentControlSet\CriticalDeviceDatabase >> registry key, makes an Windows 2008R2 image boot if the hd is under the >> virtio interface, but I cannot make this work for Windows 2012R2. As far >> as I've seen, the CDDB registry keys are deprecated in newer Windows and >> creating them back does not seem to make this work. >> >> Has anybody had any luck with this? Is there any other way to do it for >> newer Windows? >> >> If this does not work out, I'll probably try to add the driver >> installations process in a RunOnce registry entry, boot the image using >> the ide interface and reboot it using VirtIO after the drivers have been >> installed, but I wanted to know if there is an easier way to do this. >> >> Thank you in advanced, >> Nikos >> >> [1] https://github.com/libguestfs/hivex/blob/master/sh/example6 >> [2] >> https://git.fedorahosted.org/cgit/virt-v2v.git/tree/lib/Sys/VirtConvert/Converter/Windows.pm > > Rich. >-- Matthew Booth Red Hat Engineering, Virtualisation Team Phone: +442070094448 (UK) GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
Richard W.M. Jones
2014-Jun-13 12:03 UTC
Re: [Libguestfs] Offline virtio installation on Windows 2012R2
I think the way we did this originally was to examine how other installers worked and what changes they made to the Registry. You can grab the registry content before and after running a particular installer, eg: $ virt-win-reg windows.img 'HKLM\SYSTEM' > old-system.reg # run the installer $ virt-win-reg windows.img 'HKLM\SYSTEM' > new-system.reg $ diff -ur old-system.reg new-system.reg You can also use virt-diff to show the differences between the entire disk image before and after. http://libguestfs.org/virt-win-reg.1.html#synopsis http://libguestfs.org/virt-diff.1.html Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Nikos Skalkotos
2014-Jun-13 12:33 UTC
Re: [Libguestfs] Offline virtio installation on Windows 2012R2
Hello Richard, Thank you for the quick reply! I used this: diff <(hivexregedit --export HIVE_1 \\) <(hivexregedit --export HIVE_2 \\) to debug my python registry update code. I'll also check virt-diff and I'll let you know if I have any news. Nikos On Fri 13 Jun 2014 15:03:03 EEST, Richard W.M. Jones wrote:> I think the way we did this originally was to examine how other > installers worked and what changes they made to the Registry. > > You can grab the registry content before and after running a > particular installer, eg: > > $ virt-win-reg windows.img 'HKLM\SYSTEM' > old-system.reg > # run the installer > $ virt-win-reg windows.img 'HKLM\SYSTEM' > new-system.reg > $ diff -ur old-system.reg new-system.reg > > You can also use virt-diff to show the differences between the entire > disk image before and after. > > http://libguestfs.org/virt-win-reg.1.html#synopsis > http://libguestfs.org/virt-diff.1.html > > Rich. >
Apparently Analagous Threads
- Re: [PATCH 2/3] inspection: Add support for CoreOS
- [PATCH 1/5] Remove extra space in inspect-fs-unix.c
- [PATCH stable-1.24] Fix fstab block device resolution for FreeBSD
- Re: [PATCH 2/3] inspection: Add support for CoreOS
- Re: [PATCH] list-applications: Add support for pacman