Ming Xie
2023-Sep-27 12:46 UTC
[Libguestfs] Fwd: virt-v2v creating image that does not install guest agent on first boot
Hi Richard, Sorry, I missed the email, I found out that the ova OS used by the customer is win11 uefi, so I tried to reproduce the error today using win11-uefi guest Steps: 1. Convert win10-efi with UTC-8 timezone, win11-non-efi with UTC-8 timezone, win11-efi with UTC-8 timezone, win11-efi with UTC+8 timezone, win2022-efi with UTC-8 timezone from VMware by v2v, then check the installation status after finishing conversion Summary the test result as below: qemu-ga Win10-efi-UTC-8 PASS Win11-non-efi UTC-8 PASS Win11-efi-UTC-8 FAIL(can't find qemu-ga log in c:\) Win11-efi-UTC+8 FAIL(can't find qemu-ga log in c:\) Win2022-efi-UTC-8 PASS Based on the above results, I think this problem is only caused by win11-efi and has nothing to do with the time zone "UTC-8" The following are existing bugs about qemu-ga: *Bug 1820144* <https://bugzilla.redhat.com/show_bug.cgi?id=1820144> - cannot install qemu-ga to some guests even if scheduled qemu-ga installation task exist *Bug 2114809* <https://bugzilla.redhat.com/show_bug.cgi?id=2114809> - Can't install qemu-ga because of network address error after converting MD-RAID1 win11 host by virt-p2v *Bug 1820152* <https://bugzilla.redhat.com/show_bug.cgi?id=1820152> - Fail to execute installation-qemu-ga.msi for win2012r2 and win8.1-i386 guests Thanks & Regards Ming Xie On Fri, Sep 22, 2023 at 6:40?PM Richard W.M. Jones <rjones at redhat.com> wrote:> On Thu, Sep 21, 2023 at 07:47:52PM +0200, Lee Garrett wrote: > > On 21.09.23 19:43, Richard W.M. Jones wrote: > > >So this is probably another instance or variation of the timezone > > >formatting problem (of schtasks). Which version of virt-v2v is this? > > >I want to check that you have a version with all the latest patches in > > >this area. > > > > It's 2.2.0-1 from Debian (12) bookworm. I've verified that it > > doesn't have any distro-specific patches. > > > > ( > https://salsa.debian.org/libvirt-team/virt-v2v/-/tree/debian/master/debian > > would have a patches/series file in this case) > > The timezone fixes are: > > commit 597d177567234c3a539098c423649781424eeb6f > Author: Laszlo Ersek <lersek at redhat.com> > Date: Tue Mar 8 15:30:51 2022 +0100 > > convert_windows: rewrite "configure_qemu_ga" script purely in > PowerShell > > commit d9dc6c42ae64ba92993dbd9477f003ba73fcfa2f > Author: Richard W.M. Jones <rjones at redhat.com> > Date: Fri Nov 12 08:47:55 2021 +0000 > > convert/convert_windows.ml: Handle date formats with dots instead of / > > They are all included in >= 2.0 > > I wonder if 597d177567 has a subtle flaw, or if we introduced a bug > somewhere when refactoring this code later. > > Lee: Do you have a theory about exactly what is wrong with the > schtasks date? Like what was it supposed to be, assuming it was 120 > seconds in the future from boot time, versus what it was set to: > > > Firstboot-qemu-ga 9/21/2023 4:04:00 PM Ready > > Could a date or time field have not been swapped or been corrupted > in some predictable way? > > The code we run is here: > > > https://github.com/libguestfs/libguestfs-common/blob/e70d89a58dae068be2e19c7c21558707261af96a/mlcustomize/inject_virtio_win.ml#L571 > > Ming: this could be a bug affecting PST (UTC-8) guests, perhaps > somehow related to having a single digit month field? > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat > http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > libguestfs lets you edit virtual machines. Supports shell scripting, > bindings from many languages. http://libguestfs.org > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20230927/2b812fc1/attachment-0001.htm> -------------- next part -------------- A non-text attachment was scrubbed... Name: win11-efi-UTC-8-not-install-qemu-ga.png Type: image/png Size: 156053 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20230927/2b812fc1/attachment-0005.png> -------------- next part -------------- A non-text attachment was scrubbed... Name: win11-UTC-8-install-qemu-ga.png Type: image/png Size: 250205 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20230927/2b812fc1/attachment-0006.png> -------------- next part -------------- A non-text attachment was scrubbed... Name: win11-efi-UTC+8-not-install-qemu-ga.png Type: image/png Size: 264318 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20230927/2b812fc1/attachment-0007.png> -------------- next part -------------- A non-text attachment was scrubbed... Name: win10-efi-UTC-8-install-qemu-ga.png Type: image/png Size: 159644 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20230927/2b812fc1/attachment-0008.png> -------------- next part -------------- A non-text attachment was scrubbed... Name: win2022-efi-UTC-8-install-qemu-ga.png Type: image/png Size: 150085 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20230927/2b812fc1/attachment-0009.png>
Richard W.M. Jones
2023-Sep-27 17:02 UTC
[Libguestfs] Fwd: virt-v2v creating image that does not install guest agent on first boot
On Wed, Sep 27, 2023 at 08:46:58PM +0800, Ming Xie wrote:> Hi Richard, > > ?????? Sorry, I missed the email, I found out that the ova OS used by the > customer is win11 uefi, so I tried to reproduce the error today using > win11-uefi guest > > Steps: > 1. Convert win10-efi with UTC-8 timezone, win11-non-efi with UTC-8 timezone, > win11-efi with UTC-8 timezone, win11-efi with UTC+8 timezone, win2022-efi with > UTC-8 timezone from VMware by v2v, then check the installation status after > finishing conversion > > > Summary the test result as below: > > ???????????????????????????????????????? ?? qemu-ga > > ? Win10-efi-UTC-8????????????? PASS > ? Win11-non-efi UTC-8?????? PASS > ? Win11-efi-UTC-8????????????? FAIL(can't find qemu-ga log in c:\) > ? Win11-efi-UTC+8???????????? FAIL(can't find qemu-ga log in c:\) > ? Win2022-efi-UTC-8????????? PASSThanks for testing. The symptoms look the same as Lee reported. You're running virt-v2v from RHEL 9? If so I will prepare a scratch RHEL 9 package with the patches which we think might fix this, for testing. Rich.> ? Based on the above results, I think this problem is only caused by win11-efi > and has nothing to do with the time zone "UTC-8" > > The following are existing bugs about qemu-ga: > > Bug?1820144 - cannot install qemu-ga to some guests even if scheduled qemu-ga > installation task exist > Bug?2114809 - Can't install qemu-ga because of network address error after > converting MD-RAID1 win11 host by virt-p2v > Bug?1820152 - Fail to execute installation-qemu-ga.msi for win2012r2 and > win8.1-i386 guests > > > Thanks & Regards > Ming Xie > > On Fri, Sep 22, 2023 at 6:40?PM Richard W.M. Jones <rjones at redhat.com> wrote: > > On Thu, Sep 21, 2023 at 07:47:52PM +0200, Lee Garrett wrote: > > On 21.09.23 19:43, Richard W.M. Jones wrote: > > >So this is probably another instance or variation of the timezone > > >formatting problem (of schtasks).? Which version of virt-v2v is this? > > >I want to check that you have a version with all the latest patches in > > >this area. > > > > It's 2.2.0-1 from Debian (12) bookworm. I've verified that it > > doesn't have any distro-specific patches. > > > > (https://salsa.debian.org/libvirt-team/virt-v2v/-/tree/debian/master/ > debian > > would have a patches/series file in this case) > > The timezone fixes are: > > commit 597d177567234c3a539098c423649781424eeb6f > Author: Laszlo Ersek <lersek at redhat.com> > Date:? ?Tue Mar 8 15:30:51 2022 +0100 > > ? ? convert_windows: rewrite "configure_qemu_ga" script purely in > PowerShell > > commit d9dc6c42ae64ba92993dbd9477f003ba73fcfa2f > Author: Richard W.M. Jones <rjones at redhat.com> > Date:? ?Fri Nov 12 08:47:55 2021 +0000 > > ? ? convert/convert_windows.ml: Handle date formats with dots instead of / > > They are all included in >= 2.0 > > I wonder if 597d177567 has a subtle flaw, or if we introduced a bug > somewhere when refactoring this code later. > > Lee: Do you have a theory about exactly what is wrong with the > schtasks date?? Like what was it supposed to be, assuming it was 120 > seconds in the future from boot time, versus what it was set to: > > > Firstboot-qemu-ga? ? ? ? ? ? ? ? ? ? ? ? 9/21/2023 4:04:00 PM? ?Ready > > Could a date or time field have not been swapped or been corrupted > in some predictable way? > > The code we run is here: > > https://github.com/libguestfs/libguestfs-common/blob/ > e70d89a58dae068be2e19c7c21558707261af96a/mlcustomize/inject_virtio_win.ml# > L571 > > Ming: this could be a bug affecting PST (UTC-8) guests, perhaps > somehow related to having a single digit month field? > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/ > ~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > libguestfs lets you edit virtual machines.? Supports shell scripting, > bindings from many languages.? http://libguestfs.org > >-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdkit
Lee Garrett
2023-Sep-28 14:45 UTC
[Libguestfs] Fwd: virt-v2v creating image that does not install guest agent on first boot
Hi Ming, On 27.09.23 14:46, Ming Xie wrote:> Hi Richard, > > Sorry, I missed the email, I found out that the ova OS used by the customer is > win11 uefi, so I tried to reproduce the error today using win11-uefi guest > > Steps: > 1. Convert win10-efi with UTC-8 timezone, win11-non-efi with UTC-8 timezone, > win11-efi with UTC-8 timezone, win11-efi with UTC+8 timezone, win2022-efi with > UTC-8 timezone from VMware by v2v, then check the installation status after > finishing conversion > > > Summary the test result as below: > > ???????????????????????????????????????? ?? qemu-ga > > ? Win10-efi-UTC-8????????????? PASS > ? Win11-non-efi UTC-8?????? PASS > ? Win11-efi-UTC-8????????????? FAIL(can't find qemu-ga log in c:\) > ? Win11-efi-UTC+8???????????? FAIL(can't find qemu-ga log in c:\) > ? Win2022-efi-UTC-8????????? PASS > > ? Based on the above results, I think this problem is only caused by win11-efi > and has nothing to do with the time zone "UTC-8"hmm, where are you exactly setting the timezone? Within the guest, the scheduled task, or in the libvirt XML description? The Windows 11 trial VM in question (downloaded from https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/ -> https://aka.ms/windev_VM_vmware) comes with the timezone within the VM set to US/Pacific. If I also set the RTC clock for the VM in the libvirt XML description after conversion like this: <clock offset="timezone" timezone="US/Pacific"> <timer name="rtc" tickpolicy="catchup"/> <timer name="pit" tickpolicy="delay"/> <timer name="hpet" present="no"/> <timer name="hypervclock" present="yes"/> </clock> Then qemu-ga successfully gets installed after a 2 minute delay. If I leave the default libvirt XML description at: <clock offset="utc"/> then the issue of qemu-ga not installing remains (the task is scheduled to run 7 hours in the future). So it is clearly an issue of the timezone of the guest and what is passed from libvirt to be out of sync. Would be nice to compare how you test it so we're on the same page. (Also, to clarify, I'm running virt-v2v 2.2.0 without the proposed patches)> > The following are existing bugs about qemu-ga: > > *Bug?1820144* <https://bugzilla.redhat.com/show_bug.cgi?id=1820144> - cannot > install qemu-ga to some guests even if scheduled qemu-ga installation task exist > *Bug?2114809* <https://bugzilla.redhat.com/show_bug.cgi?id=2114809> - Can't > install qemu-ga because of network address error after converting MD-RAID1 win11 > host by virt-p2v > *Bug?1820152* <https://bugzilla.redhat.com/show_bug.cgi?id=1820152> - Fail to > execute installation-qemu-ga.msi for win2012r2 and win8.1-i386 guests > > > Thanks & Regards > Ming XieGreetings, Lee
Lee Garrett
2023-Sep-28 14:55 UTC
[Libguestfs] Fwd: virt-v2v creating image that does not install guest agent on first boot
(resend, as it bounced on tyan-all at redhat.com) Hi Ming, On 27.09.23 14:46, Ming Xie wrote:> Hi Richard, > > Sorry, I missed the email, I found out that the ova OS used by the customer is > win11 uefi, so I tried to reproduce the error today using win11-uefi guest > > Steps: > 1. Convert win10-efi with UTC-8 timezone, win11-non-efi with UTC-8 timezone, > win11-efi with UTC-8 timezone, win11-efi with UTC+8 timezone, win2022-efi with > UTC-8 timezone from VMware by v2v, then check the installation status after > finishing conversion > > > Summary the test result as below: > > ???????????????????????????????????????? ?? qemu-ga > > ? Win10-efi-UTC-8????????????? PASS > ? Win11-non-efi UTC-8?????? PASS > ? Win11-efi-UTC-8????????????? FAIL(can't find qemu-ga log in c:\) > ? Win11-efi-UTC+8???????????? FAIL(can't find qemu-ga log in c:\) > ? Win2022-efi-UTC-8????????? PASS > > ? Based on the above results, I think this problem is only caused by win11-efi > and has nothing to do with the time zone "UTC-8"hmm, where are you exactly setting the timezone? Within the guest, the scheduled task, or in the libvirt XML description? The Windows 11 trial VM in question (downloaded from https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/ -> https://aka.ms/windev_VM_vmware) comes with the timezone within the VM set to US/Pacific. If I also set the RTC clock for the VM in the libvirt XML description after conversion like this: <clock offset="timezone" timezone="US/Pacific"> <timer name="rtc" tickpolicy="catchup"/> <timer name="pit" tickpolicy="delay"/> <timer name="hpet" present="no"/> <timer name="hypervclock" present="yes"/> </clock> Then qemu-ga successfully gets installed after a 2 minute delay. If I leave the default libvirt XML description at: <clock offset="utc"/> then the issue of qemu-ga not installing remains (the task is scheduled to run 7 hours in the future). So it is clearly an issue of the timezone of the guest and what is passed from libvirt to be out of sync. Would be nice to compare how you test it so we're on the same page. (Also, to clarify, I'm running virt-v2v 2.2.0 without the proposed patches)> > The following are existing bugs about qemu-ga: > > *Bug?1820144* <https://bugzilla.redhat.com/show_bug.cgi?id=1820144> - cannot > install qemu-ga to some guests even if scheduled qemu-ga installation task exist > *Bug?2114809* <https://bugzilla.redhat.com/show_bug.cgi?id=2114809> - Can't > install qemu-ga because of network address error after converting MD-RAID1 win11 > host by virt-p2v > *Bug?1820152* <https://bugzilla.redhat.com/show_bug.cgi?id=1820152> - Fail to > execute installation-qemu-ga.msi for win2012r2 and win8.1-i386 guests > > > Thanks & Regards > Ming XieGreetings, Lee