Tomáš Golembiovský
2019-Nov-21 11:11 UTC
[Libguestfs] [PATCH 0/2] Fixes and tweak to the installation of qemu-ga MSI
This, together with the changes to common repo are fixes to the installation qemu-ga MSI. There is still an issue that I did not figure yet how to fix. On Windows 10 it fails to register the QEMU-GA service. Tomáš Golembiovský (2): windows: fix detection of qemu-ga installer on RHV windows: small tweaks of qemu-ga firstboot script v2v/convert_windows.ml | 8 +++++++- v2v/windows_virtio.ml | 5 ++--- 2 files changed, 9 insertions(+), 4 deletions(-) -- 2.24.0
Tomáš Golembiovský
2019-Nov-21 11:11 UTC
[Libguestfs] [PATCH 1/2] windows: fix detection of qemu-ga installer on RHV
The detection was incorrectly matching only 32-bit installer on all architectures. Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> --- v2v/windows_virtio.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml index 5ec7664b..f47d28e0 100644 --- a/v2v/windows_virtio.ml +++ b/v2v/windows_virtio.ml @@ -450,14 +450,13 @@ and virtio_iso_path_matches_qemu_ga path inspect * elements. *) let lc_name = String.lowercase_ascii (Filename.basename path) in - lc_name = "rhev-qga.msi" || match arch, lc_name with | ("i386", "qemu-ga-x86.msi") | ("i386", "qemu-ga-i386.msi") - | ("i386", "RHEV-QGA.msi") + | ("i386", "rhev-qga.msi") | ("x86_64", "qemu-ga-x64.msi") | ("x86_64", "qemu-ga-x86_64.msi") - | ("x86_64", "RHEV-QGA64.msi") -> true + | ("x86_64", "rhev-qga64.msi") | _ -> false (* The following function is only exported for unit tests. *) -- 2.24.0
Tomáš Golembiovský
2019-Nov-21 11:11 UTC
[Libguestfs] [PATCH 2/2] windows: small tweaks of qemu-ga firstboot script
- match log file with script name - restart manually only after successfull install, this also helps debugging because we can log the installer return code Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> --- v2v/convert_windows.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml index 5b7a5bfe..0fda1d4e 100644 --- a/v2v/convert_windows.ml +++ b/v2v/convert_windows.ml @@ -430,7 +430,13 @@ popd fun msi_path -> let fb_script = "\ echo Installing qemu-ga from " ^ msi_path ^ " -\"\\" ^ msi_path ^ "\" /qn /forcerestart /l+*vx \"%cd%\\qemu-ga.log\" +\"\\" ^ msi_path ^ "\" /norestart /qn /l+*vx \"%~dpn0.log\" +set elvl=!errorlevel! +echo Done installing qemu-ga error_level=!elvl! +if !elvl! == 0 ( + echo Restarting Windows... + shutdown /r /f /c \"rebooted by firstboot script\" +) " in Firstboot.add_firstboot_script g inspect.i_root ("install " ^ msi_path) fb_script; -- 2.24.0
Richard W.M. Jones
2019-Dec-04 13:58 UTC
Re: [Libguestfs] [PATCH 0/2] Fixes and tweak to the installation of qemu-ga MSI
Sorry I missed these patches before, thanks for reminding me. Yes both series are fine. I don't particularly care about needing Powershell since I believe all *supported* versions of Windows now have it, or (in the XP case) are upgradable to having it as long as you make the very reasonable assumption that they are using a service pack. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Pino Toscano
2020-Jan-27 15:12 UTC
Re: [Libguestfs] [PATCH 1/2] windows: fix detection of qemu-ga installer on RHV
On Thursday, 21 November 2019 12:11:01 CET Tomáš Golembiovský wrote:> The detection was incorrectly matching only 32-bit installer on all > architectures. > > Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> > --- > v2v/windows_virtio.ml | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml > index 5ec7664b..f47d28e0 100644 > --- a/v2v/windows_virtio.ml > +++ b/v2v/windows_virtio.ml > @@ -450,14 +450,13 @@ and virtio_iso_path_matches_qemu_ga path inspect > * elements. > *) > let lc_name = String.lowercase_ascii (Filename.basename path) in > - lc_name = "rhev-qga.msi" || > match arch, lc_name with > | ("i386", "qemu-ga-x86.msi") > | ("i386", "qemu-ga-i386.msi") > - | ("i386", "RHEV-QGA.msi") > + | ("i386", "rhev-qga.msi") > | ("x86_64", "qemu-ga-x64.msi") > | ("x86_64", "qemu-ga-x86_64.msi") > - | ("x86_64", "RHEV-QGA64.msi") -> true > + | ("x86_64", "rhev-qga64.msi") > | _ -> falseLGTM. Thanks, -- Pino Toscano
Pino Toscano
2020-Jan-27 15:59 UTC
Re: [Libguestfs] [PATCH 0/2] Fixes and tweak to the installation of qemu-ga MSI
On Thursday, 21 November 2019 12:11:00 CET Tomáš Golembiovský wrote:> This, together with the changes to common repo are fixes to the installation > qemu-ga MSI.I pushed patch #1 because it is OK for me. I did not push patch #2 because I do not have experience with powershell, so I cannot review it ATM.> There is still an issue that I did not figure yet how to fix. On Windows 10 it > fails to register the QEMU-GA service.Can you please explain which kind of issues did you notice? Thanks, -- Pino Toscano
Pino Toscano
2020-Jan-27 16:01 UTC
Re: [Libguestfs] [PATCH 1/2] windows: fix detection of qemu-ga installer on RHV
On Thursday, 21 November 2019 12:11:01 CET Tomáš Golembiovský wrote:> The detection was incorrectly matching only 32-bit installer on all > architectures. > > Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> > --- > v2v/windows_virtio.ml | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml > index 5ec7664b..f47d28e0 100644 > --- a/v2v/windows_virtio.ml > +++ b/v2v/windows_virtio.ml > @@ -450,14 +450,13 @@ and virtio_iso_path_matches_qemu_ga path inspect > * elements. > *) > let lc_name = String.lowercase_ascii (Filename.basename path) in > - lc_name = "rhev-qga.msi" || > match arch, lc_name with > | ("i386", "qemu-ga-x86.msi") > | ("i386", "qemu-ga-i386.msi") > - | ("i386", "RHEV-QGA.msi") > + | ("i386", "rhev-qga.msi") > | ("x86_64", "qemu-ga-x64.msi") > | ("x86_64", "qemu-ga-x86_64.msi") > - | ("x86_64", "RHEV-QGA64.msi") -> true > + | ("x86_64", "rhev-qga64.msi") > | _ -> falseActually, after another pre-push re-read, this function (virtio_iso_path_matches_qemu_ga) will always return false now! -- Pino Toscano
Tomáš Golembiovský
2020-Feb-05 13:09 UTC
Re: [Libguestfs] [PATCH 0/2] Fixes and tweak to the installation of qemu-ga MSI
On Mon, Jan 27, 2020 at 04:59:55PM +0100, Pino Toscano wrote:> On Thursday, 21 November 2019 12:11:00 CET Tomáš Golembiovský wrote: > > This, together with the changes to common repo are fixes to the installation > > qemu-ga MSI. > > I pushed patch #1 because it is OK for me. > > I did not push patch #2 because I do not have experience with > powershell, so I cannot review it ATM. > > > There is still an issue that I did not figure yet how to fix. On Windows 10 it > > fails to register the QEMU-GA service. > > Can you please explain which kind of issues did you notice?The main problem is this error that I get quite often is that qemu-ga fails to register the VSS service. On the same guest it sometimes works and sometimes it fails. And it happens only when installing in first boot, installing manually always works.>From installer log:MSI (s) (C4:00) [13:59:58:205]: Executing op: ServiceInstall(Name=QEMU-GA,DisplayName=QEMU Guest Agent,ImagePath="C:\Program Files\Qemu-ga\qemu-ga.exe" -d --retry-path,ServiceType=16,StartType=2,ErrorControl=0,,Dependencies=[~],,StartName=LocalSystem,Password=**********,Description=QEMU Guest Agent,,) MSI (s) (C4:00) [13:59:58:205]: Executing op: ActionStart(Name=RegisterCom,,) MSI (s) (C4:00) [13:59:58:221]: Executing op: CustomActionSchedule(Action=RegisterCom,ActionType=3122,Source=cmd.exe,Target=/c "C:\Program Files\Qemu-ga\qemu-ga.exe" -s vss-install,) MSI (s) (C4:00) [14:00:00:299]: Note: 1: 1722 2: RegisterCom 3: cmd.exe 4: /c "C:\Program Files\Qemu-ga\qemu-ga.exe" -s vss-install MSI (s) (C4:00) [14:00:00:299]: Note: 1: 2262 2: Error 3: -2147287038 CustomAction RegisterCom returned actual error code 1 (note this may not be 100% accurate if translation happened inside sandbox) MSI (s) (C4:00) [14:00:00:299]: Note: 1: 2262 2: Error 3: -2147287038 MSI (s) (C4:00) [14:00:00:299]: Product: QEMU guest agent -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action RegisterCom, location: cmd.exe, command: /c "C:\Program Files\Qemu-ga\qemu-ga.exe" -s vss-install Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action RegisterCom, location: cmd.exe, command: /c "C:\Program Files\Qemu-ga\qemu-ga.exe" -s vss-install The cryptic error[1] code -2147287038 seems to be: STG_E_INVALIDFUNCTION 0x80030001 Unable to perform requested operation. I haven't figured out yet why is it happening. Tomas [1] https://docs.microsoft.com/en-us/windows/win32/com/com-error-codes-3> > Thanks, > -- > Pino Toscano-- Tomáš Golembiovský <tgolembi@redhat.com>
Apparently Analagous Threads
- Re: [PATCH 1/2] windows: fix detection of qemu-ga installer on RHV
- [PATCH 0/2] Fixes and tweak to the installation of qemu-ga MSI
- [PATCH] v2v: windows: install QEMU Guest Agent MSI
- [v2v PATCH 3/3] v2v: try to get windows driver files from libosinfo
- [v2v PATCH v2 3/3] v2v: try to get windows driver files from libosinfo