12028 Commits

Author SHA1 Message Date
Richard W.M. Jones
d8ba7f7e25 Version 2.3.7. v2.3.7 2023-12-09 11:47:26 +00:00
Richard W.M. Jones
01a6f36862 tests: Test new --key all:SELECTOR option 2023-12-07 16:48:17 +00:00
Richard W.M. Jones
ef769cb91b common: Update submodule
Pick up this commit required by libxml2 2.12.1:

    mlxml: Include <libxml/parser.h> for xmlReadMemory
2023-11-27 14:12:22 +00:00
rwmjones
aa85533c85
Merge pull request #39 from weblate/weblate-libguestfs-virt-v2v-master
Translations update from Fedora Weblate
2023-11-27 10:13:32 +00:00
Temuri Doghonadze
7663581cd1 Translated using Weblate (Georgian)
Currently translated at 9.1% (44 of 481 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/ka/
2023-11-26 22:01:24 +01:00
Weblate Translation Memory
8a61316ff4 Translated using Weblate (Georgian)
Currently translated at 9.1% (44 of 481 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/ka/
2023-11-26 22:01:23 +01:00
Piotr Drąg
b4a0b6536f Translated using Weblate (Polish)
Currently translated at 7.0% (34 of 481 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/pl/
2023-11-26 22:01:23 +01:00
rwmjones
1ab654acca
Merge pull request #38 from weblate/weblate-libguestfs-virt-v2v-master
Translations update from Fedora Weblate
2023-11-25 15:21:49 +00:00
Weblate Translation Memory
318a8c5961 Translated using Weblate (Polish)
Currently translated at 7.0% (34 of 481 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/pl/
2023-11-25 15:53:11 +01:00
rwmjones
3acbfdc177
Merge pull request #37 from weblate/weblate-libguestfs-virt-v2v-master
Translations update from Fedora Weblate
2023-11-24 19:15:28 +00:00
Weblate
883f72d6e4 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: libguestfs/virt-v2v-docs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-docs-master/

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/
2023-11-24 20:02:38 +01:00
Richard W.M. Jones
a54c2a3ee8 New mailing list archives 2023-11-16 10:52:42 +00:00
Richard W.M. Jones
37e424323d New mailing list email address 2023-11-16 10:39:27 +00:00
Richard W.M. Jones
23b6f94bbc Version 2.3.6. v2.3.6 2023-11-02 11:08:43 +00:00
Richard W.M. Jones
41c4fed5c7 tests: Fix network tests for newer libvirt
The old tests' network bridge had a bogus <mac address="00:00:00:00:00:00">.

Older libvirt appeared to drop this completely.  Newer libvirt appears
to rewrite it as a valid MAC, eg. <mac address="52:54:00:xx:xx:xx">
(for some randomly chosen "xx"'s).  To make the tests stable, replace
the old bogus value with a valid value, and update the tests to check
for it.
2023-11-02 11:02:47 +00:00
Richard W.M. Jones
405198cbf4 Update common submodule
Picking up these commits:

  commit e711121607869363200aa80218719dcb25fcd98f
  Author: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
  Date:   Tue Oct 31 15:17:50 2023 +0200

    mldrivers: look for bootloader config in /boot/grub/grub.cfg in case of UEFI

  commit 9a8ba593511f94d59049bd920a6aee9210a2611f
  Author: Richard W.M. Jones <rjones@redhat.com>
  Date:   Thu Oct 26 21:13:07 2023 +0100

    mlcustomize: Update virt-customize generated files

  commit e70d89a58dae068be2e19c7c21558707261af96a
  Author: Richard W.M. Jones <rjones@redhat.com>
  Date:   Sat Jul 15 16:42:06 2023 +0100

    customize: Update generated files for --chown with StringTriplet

  commit bbb54714ce24c76e5761d96a0227a753896dc4c4
  Author: Richard W.M. Jones <rjones@redhat.com>
  Date:   Thu Jun 29 13:34:12 2023 +0100

    mlcustomize: Update generated files adding --chown option
2023-11-02 10:45:56 +00:00
Richard W.M. Jones
22c5b98ab7 -it ssh: Double quote ssh command which tests remote file exists
Double quoting was removed in
commit e2af12ba69c4463bb73d30db63290a887cdd41eb ("input: -i vmx:
Remove support for openssh scp < 8.8", Nov 2021).  However it should
only have been removed from scp commands, not for this ssh command
where it is still required.

See: https://github.com/libguestfs/virt-v2v/issues/35
Thanks: Laszlo Ersek for diagnosis and suggesting the fix
Reported-by: Bill Sanders
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2023-10-02 15:17:43 +01:00
Richard W.M. Jones
5f58def90a convert: Find out if Windows guest is expecting RTC set to UTC
Read HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation key
"RealTimeIsUniversal" to see if the Windows guest is expecting RTC
set to localtime (not present) or UTC (present and set to 1).

See: https://wiki.archlinux.org/title/System_time#UTC_in_Microsoft_Windows
See: https://listman.redhat.com/archives/libguestfs/2023-September/thread.html#32556
Reported-by: Lee Garrett
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2023-09-25 17:21:00 +01:00
Richard W.M. Jones
482d75bbe5 -o qemu: Set -rtc base=localtime when guest expects RTC set to localtime
I didn't set the -rtc flag in the normal (UTC) case as that is the
default.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2023-09-25 17:21:00 +01:00
Richard W.M. Jones
93b86b8634 -o libvirt: Add <clock offset="utc|localtime"/> to libvirt XML
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2023-09-25 17:21:00 +01:00
Richard W.M. Jones
baaeead927 output/create_libvirt_xml.ml: Refactor os_section
Minor refactoring of how <os> section is generated in XML output.
There is no change in the output.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2023-09-25 17:21:00 +01:00
Richard W.M. Jones
dfb44983a8 -o kubevirt: Add comment about future support for clock = localtime
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2023-09-25 17:21:00 +01:00
Richard W.M. Jones
69d73c251a types: Add gcaps_rtc_utc to record if the RTC is set to UTC or localtime
Almost every Linux guest expects the motherboard Real Time Clock (RTC)
to be set to UTC and they adjust the time displayed based on their
timezone (which may be different for each user).

Most Windows guests expect the RTC to be set to the local time.
Windows can be configured to use a UTC clock.  We can detect this by
looking at the Windows registry.

To cope with this difference we need to add a guestcaps flag based on
what we think the guest is expecting.  (We might also use the source
hypervisor RTC setting, but it is not thought to be as reliable as
inspecting the guest.)

This change simply adds the flag to guestcaps, and sets it to always
true, so there is no change to the output.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2023-09-25 17:21:00 +01:00
rwmjones
c5c9aa2f77
Merge pull request #32 from weblate/weblate-libguestfs-virt-v2v-master
Translations update from Fedora Weblate
2023-08-07 13:06:02 +01:00
Weblate
29222e1cea Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/
2023-08-05 13:21:05 +02:00
Emilio Herrera
41c53060c3 Translated using Weblate (Spanish)
Currently translated at 1.3% (18 of 1305 strings)

Translation: libguestfs/virt-v2v-docs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-docs-master/es/
2023-08-05 13:21:05 +02:00
Richard W.M. Jones
451153f038 Version 2.3.5. v2.3.5 2023-07-14 14:51:33 +01:00
Laszlo Ersek
dcfea1b9b5 docs/virt-v2v: document libvirt system instance startup
It has frequently tripped us up that on RHEL / Fedora, installing the
right set of libvirt RPMs (such as the one pulled in by
"libvirt-daemon-kvm") does not result in an immediately running libvirt
system instance.  Document the need, and the simplest method, for starting
libvirt up manually.

Thanks: Daniel Berrangé
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2182024
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20230629123443.188350-4-lersek@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
2023-06-30 10:49:57 +02:00
Laszlo Ersek
8bcf383510 lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard
Currently "chown_for_libvirt_rhbz_1045069" is best effort; if it fails, we
suppress the exception (we log it in verbose mode only, even).

That's not proved helpful: it almost certainly leads to later errors, but
those errors are less clear than the original (suppressed) exception.
Namely, the user sees something like

> Failed to connect to '/tmp/v2v.sKlulY/in0': Permission denied

rather than

> Failed to connect socket to '/var/run/libvirt/virtqemud-sock-ro':
> Connection refused

So just allow the exception to propagate outwards.

And then, now that "chown_for_libvirt_rhbz_1045069" will be able to fail,
hoist the call to "On_exit.rm_rf" before the call to
"chown_for_libvirt_rhbz_1045069", after creating the v2v temporary
directory. In the current order, if "chown_for_libvirt_rhbz_1045069" threw
an exception, then we'd leak the temp dir in the filesystem.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2182024
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20230629123443.188350-3-lersek@redhat.com>
[lersek@redhat.com: reinstate parens under "then" [Rich]]
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
2023-06-30 10:49:52 +02:00
Laszlo Ersek
dab9629c01 lib/utils: fix typo
Fix a small comment typo from commit 4e7f20684373 ("lib: Improve security
of in/out sockets when running virt-v2v as root", 2022-03-23).

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2182024
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20230629123443.188350-2-lersek@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
2023-06-30 10:49:44 +02:00
Richard W.M. Jones
97d8c28b7e builder: Use new Curl.create API that requires url parameter
Update common submodule, picking up this fix:

  commit 06721c00e2582daf1b3bedc4fbfb699b9b788a41
  Author: Richard W.M. Jones <rjones@redhat.com>
  Date:   Thu Jun 29 13:10:24 2023 +0100

    mltools: curl: Split out the url parameter

This requires a small change to input/vCenter.ml
2023-06-29 13:23:05 +01:00
Richard W.M. Jones
4f47d6431c valgrind: Add another libvirt suppression
glibc-2.37.9000-14.fc39.x86_64
gettext-0.21.1-2.fc38.x86_64
libvirt-daemon-9.0.0-3.fc38.x86_64

==704248== 24 bytes in 1 blocks are possibly lost in loss record 1,225 of 3,754
==704248==    at 0x484182F: malloc (vg_replace_malloc.c:431)
==704248==    by 0x54FE349: tsearch (tsearch.c:337)
==704248==    by 0x5423C18: __dcigettext (dcigettext.c:797)
==704248==    by 0x4A0D2C9: virDomainDefParse (domain_conf.c:19238)
==704248==    by 0x4A251F1: virDomainDefCopy (domain_conf.c:28160)
==704248==    by 0x49EB228: virDomainObjSetDefTransient (domain_conf.c:4160)
==704248==    by 0x4B6D8B8: testDomainStartState.lto_priv.0 (test_driver.c:741)
==704248==    by 0x4B6DFC4: testOpenParse (test_driver.c:1039)
==704248==    by 0x4B6F143: testConnectOpen.lto_priv.0 (test_driver.c:1340)
==704248==    by 0x4B88283: virConnectOpenInternal (libvirt.c:1128)
==704248==    by 0x4B88A21: virConnectOpenAuth (libvirt.c:1271)
==704248==    by 0x554ECE: _ocaml_libvirt_connect_open_auth_common (in /home/rjones/d/virt-v2v/v2v/virt-v2v)
==704248==    by 0x557476: ocaml_libvirt_connect_open_auth (in /home/rjones/d/virt-v2v/v2v/virt-v2v)
==704248==    by 0x5A0E46: caml_c_call (in /home/rjones/d/virt-v2v/v2v/virt-v2v)
==704248==    by 0x6F5F6CF: ???
==704248==    by 0x6F67507: ???
==704248==
==704248== 96 bytes in 1 blocks are possibly lost in loss record 2,500 of 3,754
==704248==    at 0x484182F: malloc (vg_replace_malloc.c:431)
==704248==    by 0x5423B4F: __dcigettext (dcigettext.c:764)
==704248==    by 0x4A0D2C9: virDomainDefParse (domain_conf.c:19238)
==704248==    by 0x4A251F1: virDomainDefCopy (domain_conf.c:28160)
==704248==    by 0x49EB228: virDomainObjSetDefTransient (domain_conf.c:4160)
==704248==    by 0x4B6D8B8: testDomainStartState.lto_priv.0 (test_driver.c:741)
==704248==    by 0x4B6DFC4: testOpenParse (test_driver.c:1039)
==704248==    by 0x4B6F143: testConnectOpen.lto_priv.0 (test_driver.c:1340)
==704248==    by 0x4B88283: virConnectOpenInternal (libvirt.c:1128)
==704248==    by 0x4B88A21: virConnectOpenAuth (libvirt.c:1271)
==704248==    by 0x554ECE: _ocaml_libvirt_connect_open_auth_common (in /home/rjones/d/virt-v2v/v2v/virt-v2v)
==704248==    by 0x557476: ocaml_libvirt_connect_open_auth (in /home/rjones/d/virt-v2v/v2v/virt-v2v)
==704248==    by 0x5A0E46: caml_c_call (in /home/rjones/d/virt-v2v/v2v/virt-v2v)
==704248==    by 0x6F5F6CF: ???
==704248==    by 0x6F67507: ???
2023-06-27 13:51:42 +01:00
Laszlo Ersek
13a6f4b968 test-data/phony-guests: fix prerequisite list of "fedora-luks-on-lvm.img"
In the virt-v2v repo, commit 1e75569aa074 ("test-data/phony-guests: Allow
virt-v2v to work against phony Fedora") is an ancestor of commit
e4efe4b7d240 ("tests: add LUKS-on-LVM test"). The latter created a state
where "fedora-static-bin" and LUKS on LVM testing would coexist (i.e.,
where "fedora-static-bin" would be uploaded to the LUKS-on-LVM disk image
as well), but the commit didn't spell out the dependency in
"test-data/phony-guests/Makefile.am".

Do that now.

The problem can be triggered with:

> autoreconf -i
> ./configure
> make
> make -C test-data/phony-guests fedora-luks-on-lvm.img

where the last command fails with

> make: Entering directory '.../test-data/phony-guests'
> SRCDIR=. LAYOUT=luks-on-lvm ../../run --test ./make-fedora-img.pl
> open: fedora-static-bin: No such file or directory at
> .../test-data/phony-guests/make-fedora-img.pl line 373.

(In the guestfs-tools repo, the relative order (the descendancy) between
both commits is the opposite. There, commit 27da4b0c4991 ("inspector: add
LUKS-on-LVM test") came first, and commit eb0ff1859eb6
("test-data/phony-guests: Allow virt-v2v to work against phony Fedora"),
came second. The latter commit, in fact being a port of virt-v2v commit
1e75569aa074, brought together "fedora-static-bin" with "LUKS on LVM"
testing,  and it correctly added "fedora-static-bin" as a pre-requisite
for building "fedora-luks-on-lvm.img".)

Fixes: e4efe4b7d240b66b1d53fbe5a127f4f5966f6903
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2168506
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20230619162729.153334-1-lersek@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
2023-06-20 16:21:57 +02:00
rwmjones
7b26e5277a
Merge pull request #23 from weblate/weblate-libguestfs-virt-v2v-master
Translations update from Fedora Weblate
2023-06-05 09:42:02 +01:00
Yuri Chornoivan
25fdb92626 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (475 of 475 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/uk/
2023-06-05 09:20:41 +02:00
Weblate
461fe77d64 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/
2023-06-05 09:20:41 +02:00
Temuri Doghonadze
4cbf6e1b74 Translated using Weblate (Georgian)
Currently translated at 8.4% (40 of 473 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/ka/
2023-06-05 09:20:41 +02:00
Pavel Borecki
0bea9c76f0 Translated using Weblate (Czech)
Currently translated at 9.5% (45 of 473 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/cs/

Translated using Weblate (Czech)

Currently translated at 2.9% (14 of 473 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/cs/
2023-06-05 09:20:41 +02:00
grimst
2c84f6e5fc Translated using Weblate (French)
Currently translated at 0.8% (11 of 1305 strings)

Translation: libguestfs/virt-v2v-docs-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-docs-master/fr/

Translated using Weblate (French)

Currently translated at 2.7% (13 of 473 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/fr/
2023-06-05 09:20:40 +02:00
Richard W.M. Jones
f046bb91b2 Replace Pervasives.* with Stdlib.*
Since OCaml 4.07 (released 2018-07-10) the always-loaded standard
library module has been called Stdlib.  The old Pervasives module was
finally removed in OCaml 5.

$ perl -pi.bak -e 's/Pervasives\./Stdlib./g' -- `git ls-files`

OCaml >= 4.07 is now required.

Also update the common submodule with:

  commit d61cd820b49e403848d15c5deaccbf8dd7045370
  Author: Jürgen Hötzel
  Date:   Sat May 20 18:16:40 2023 +0200

    Add support for OCaml 5.0
2023-05-22 17:25:40 +01:00
Laszlo Ersek
3060af01e8 LUKS-on-LVM conversion test: test /dev/mapper/VG-LV translation
In the LUKS-on-LVM conversion test, repeat the null conversion with such
"--key" options that exercise the recent "/dev/mapper/VG-LV" ->
"/dev/VG/LV" translation (unescaping) from libguestfs-common.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2168506
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20230515175529.290724-3-lersek@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
2023-05-19 11:37:17 +02:00
Laszlo Ersek
0ecbe09c09 LUKS-on-LVM conversion test: rename VGs and LVs
In preparation for a subsequent patch, rename "VG" to "Volume-Group", and
"LV<n>" to "Logical-Volume-<n>", in the LUKS-on-LVM conversion test.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2168506
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20230515175529.290724-2-lersek@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
2023-05-19 11:36:07 +02:00
Laszlo Ersek
b0dbe7c772 update common submodule
Laszlo Ersek (2):
      options/keys: key_store_import_key(): un-constify "key" parameter
      options/keys: introduce unescape_device_mapper_lvm()

https://bugzilla.redhat.com/show_bug.cgi?id=2168506
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2023-05-19 11:34:18 +02:00
Richard W.M. Jones
e83de8abe6 Update common submodule
Richard W.M. Jones (1):
      mlcustomize/SELinux_relabel.ml: Use Array.mem

Roman Kagan (1):
      mlcustomize: skip SELinux relabeling if it's disabled
2023-04-22 09:06:46 +01:00
Richard W.M. Jones
6db3b26d2f Version 2.3.4. v2.3.4 2023-04-19 12:16:07 +01:00
Richard W.M. Jones
7c72865a2f valgrind: Add another valgrind suppression for libvirt
It's a small variation on "libvirt_leak_9".  Apparently introduced /
changed in libvirt 9.0.
2023-04-19 11:58:27 +01:00
Richard W.M. Jones
17c6d52447 input: -i ova: Less strict parsing of lines from the manifest file
eBlocker (https://eblocker.org) provides an OVA which contains this
manifest (*.mf) file:

SHA256 (eBlockerVM-2.9.1-amd64.ovf) = 7b25ea03c3b9eb143c7f6d1e8f76c3717e5b928f007e571cd96132bf6a15a30d
SHA256 (eBlocker VM-disk001.vmdk) = 646d1ec6ddf5a6d6604dbec421624ca2cea6ee5b57bf80ae635bf8f4f0bfea45

Note that the manifest is not conforming with the OVFS specification
which says the line format should be:

file_digest = algorithm "(" file_name ")" "=" sp digest nl

Space (sp) is not permitted after the algorithm or before the = sign.

However let's be tolerant of the extra whitespace.
2023-04-03 11:39:01 +01:00
Laszlo Ersek
f701337ae4 update common submodule
HATAYAMA Daisuke (1):
      progress: fix segmentation fault when TERM variable is "dumb"

Laszlo Ersek (2):
      detect_kernels: tighten "try" scope
      detect_kernels: deal with RHEL's kernel-core / kernel-modules-core split

rwmjones (1):
      Merge pull request #5 from d-hatayama/fix_segfault_progress_bar

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2175703
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2023-03-21 17:07:54 +01:00
Andrey Drobyshev
b42e44da83 convert_windows: configure_wait_pnp: do not create a separate log file
Right now wait-pnp is the only firstboot script which does its logging
into a separate log file.  Let's align its behaviour with that of the the
other scripts so that logs go to the common log file, i.e.
"C:\Program Files\Guestfs\Firstboot\log.txt".

Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Message-Id: <20230316173438.100162-3-andrey.drobyshev@virtuozzo.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
2023-03-20 06:08:24 +01:00
Andrey Drobyshev
f1fb82964e convert_windows: add firstboot script to install drivers with pnputil
During conversion we copy the necessary drivers to the directory
"%systemroot%\Drivers\Virtio", adding it to the DevicePath registry
value.  As documented in [1], this should be enough for Windows to find
device drivers and successfully install them.

However, it doesn't always happen.  Commit 73e009c04 ("v2v: windows:
Document use of pnputil to install drivers.") describes such issues with
Win2k12R2.  I'm seeing the same problem with Win2k16 and netkvm.sys
driver not being installed.

That same commit 73e009c04 suggests adding a firstboot script invoking
pnputil at an early stage to install all the drivers we put into the
drivers store.  So let's add such a script to make sure all the
necessary drivers are installed.

[1] https://learn.microsoft.com/en-us/windows-hardware/drivers/install/how-windows-selects-a-driver-for-a-device

Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20230316173438.100162-2-andrey.drobyshev@virtuozzo.com>
2023-03-20 06:05:28 +01:00