* [PATCH] qga/installer: Remove QGA VSS if QGA installation failed
@ 2025-08-25 14:31 Kostiantyn Kostiuk
2025-08-26 7:59 ` Yan Vugenfirer
2025-09-03 7:09 ` Michael Tokarev
0 siblings, 2 replies; 5+ messages in thread
From: Kostiantyn Kostiuk @ 2025-08-25 14:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Kostiantyn Kostiuk, Michael Roth, Yan Vugenfirer
When QGA Installer failed to install QGA service but install
QGA VSS provider, provider should be removed before installer
exits. Otherwise QGA VSS will has broken infomation and
prevent QGA installation in next run.
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
---
qga/installer/qemu-ga.wxs | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs
index df572adb4a..32b8308728 100644
--- a/qga/installer/qemu-ga.wxs
+++ b/qga/installer/qemu-ga.wxs
@@ -151,6 +151,14 @@
Return="check"
>
</CustomAction>
+ <CustomAction Id="UnRegisterCom_Rollback"
+ ExeCommand='"[qemu_ga_directory]qga-vss.dll",DLLCOMUnregister'
+ Execute="rollback"
+ Property="rundll"
+ Impersonate="no"
+ Return="check"
+ >
+ </CustomAction>
<?endif?>
<Feature Id="QEMUFeature" Title="QEMU Guest Agent" Level="1">
@@ -174,8 +182,19 @@
<InstallExecuteSequence>
<?ifdef var.InstallVss?>
- <Custom Action="UnRegisterCom" After="StopServices">Installed</Custom>
- <Custom Action="RegisterCom" After="InstallServices">NOT REMOVE</Custom>
+ <!-- Use explicit Sequence number to provide an absolute position in the sequence-->
+ <!-- This is needed to set "UnRegisterCom_Rollback" before "RegisterCom" and after "InstallFiles"-->
+ <!-- but, Wix detect this double condition incorrectly -->
+
+ <!-- UnRegisterCom_Rollback (for install rollback): at 5849, right before RegisterCom (5850)-->
+ <!-- Runs only if the installation fails and rolls back-->
+ <Custom Action="UnRegisterCom_Rollback" Sequence="5849">NOT REMOVE</Custom>
+
+ <!-- RegisterCom (for install): at 5850, right after InstallFiles (5849) (old: After="InstallServices")-->
+ <Custom Action="RegisterCom" Sequence="5850">NOT REMOVE</Custom>
+
+ <!-- UnRegisterCom (for uninstall): at 1901, right after StopServices (1900) (old: After="StopServices")-->
+ <Custom Action="UnRegisterCom" Sequence="1901">Installed</Custom>
<?endif?>
</InstallExecuteSequence>
</Product>
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] qga/installer: Remove QGA VSS if QGA installation failed
2025-08-25 14:31 [PATCH] qga/installer: Remove QGA VSS if QGA installation failed Kostiantyn Kostiuk
@ 2025-08-26 7:59 ` Yan Vugenfirer
2025-09-03 7:09 ` Michael Tokarev
1 sibling, 0 replies; 5+ messages in thread
From: Yan Vugenfirer @ 2025-08-26 7:59 UTC (permalink / raw)
To: Kostiantyn Kostiuk; +Cc: qemu-devel, Michael Roth
On Mon, Aug 25, 2025 at 5:32 PM Kostiantyn Kostiuk <kkostiuk@redhat.com> wrote:
>
> When QGA Installer failed to install QGA service but install
> QGA VSS provider, provider should be removed before installer
> exits. Otherwise QGA VSS will has broken infomation and
typos, should be: "QGA VSS will have broken information""
> prevent QGA installation in next run.
>
> Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
> ---
> qga/installer/qemu-ga.wxs | 23 +++++++++++++++++++++--
> 1 file changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs
> index df572adb4a..32b8308728 100644
> --- a/qga/installer/qemu-ga.wxs
> +++ b/qga/installer/qemu-ga.wxs
> @@ -151,6 +151,14 @@
> Return="check"
> >
> </CustomAction>
> + <CustomAction Id="UnRegisterCom_Rollback"
> + ExeCommand='"[qemu_ga_directory]qga-vss.dll",DLLCOMUnregister'
> + Execute="rollback"
> + Property="rundll"
> + Impersonate="no"
> + Return="check"
> + >
> + </CustomAction>
> <?endif?>
>
> <Feature Id="QEMUFeature" Title="QEMU Guest Agent" Level="1">
> @@ -174,8 +182,19 @@
>
> <InstallExecuteSequence>
> <?ifdef var.InstallVss?>
> - <Custom Action="UnRegisterCom" After="StopServices">Installed</Custom>
> - <Custom Action="RegisterCom" After="InstallServices">NOT REMOVE</Custom>
> + <!-- Use explicit Sequence number to provide an absolute position in the sequence-->
> + <!-- This is needed to set "UnRegisterCom_Rollback" before "RegisterCom" and after "InstallFiles"-->
> + <!-- but, Wix detect this double condition incorrectly -->
> +
> + <!-- UnRegisterCom_Rollback (for install rollback): at 5849, right before RegisterCom (5850)-->
> + <!-- Runs only if the installation fails and rolls back-->
> + <Custom Action="UnRegisterCom_Rollback" Sequence="5849">NOT REMOVE</Custom>
> +
> + <!-- RegisterCom (for install): at 5850, right after InstallFiles (5849) (old: After="InstallServices")-->
> + <Custom Action="RegisterCom" Sequence="5850">NOT REMOVE</Custom>
> +
> + <!-- UnRegisterCom (for uninstall): at 1901, right after StopServices (1900) (old: After="StopServices")-->
> + <Custom Action="UnRegisterCom" Sequence="1901">Installed</Custom>
> <?endif?>
> </InstallExecuteSequence>
> </Product>
> --
> 2.50.1
>
Reviewed-by: Yan Vugenfirer <yvugenfi@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] qga/installer: Remove QGA VSS if QGA installation failed
2025-08-25 14:31 [PATCH] qga/installer: Remove QGA VSS if QGA installation failed Kostiantyn Kostiuk
2025-08-26 7:59 ` Yan Vugenfirer
@ 2025-09-03 7:09 ` Michael Tokarev
2025-09-03 8:01 ` Kostiantyn Kostiuk
1 sibling, 1 reply; 5+ messages in thread
From: Michael Tokarev @ 2025-09-03 7:09 UTC (permalink / raw)
To: Kostiantyn Kostiuk, qemu-devel; +Cc: Michael Roth, Yan Vugenfirer, qemu-stable
On 25.08.2025 17:31, Kostiantyn Kostiuk wrote:
> When QGA Installer failed to install QGA service but install
> QGA VSS provider, provider should be removed before installer
> exits. Otherwise QGA VSS will has broken infomation and
> prevent QGA installation in next run.
I'm picking this up for qemu-stable (10.0 & 10.1).
Please let me know if I shouldn't.
Thanks,
/mjt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] qga/installer: Remove QGA VSS if QGA installation failed
2025-09-03 7:09 ` Michael Tokarev
@ 2025-09-03 8:01 ` Kostiantyn Kostiuk
2025-09-03 8:14 ` Michael Tokarev
0 siblings, 1 reply; 5+ messages in thread
From: Kostiantyn Kostiuk @ 2025-09-03 8:01 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-devel, Michael Roth, Yan Vugenfirer, qemu-stable
[-- Attachment #1: Type: text/plain, Size: 699 bytes --]
Hi Michael,
Please also pick
https://lore.kernel.org/qemu-devel/20250825135311.138330-1-kkostiuk@redhat.com/
for stable as it provides more detailed error logs.
Best Regards,
Kostiantyn Kostiuk.
On Wed, Sep 3, 2025 at 10:09 AM Michael Tokarev <mjt@tls.msk.ru> wrote:
> On 25.08.2025 17:31, Kostiantyn Kostiuk wrote:
> > When QGA Installer failed to install QGA service but install
> > QGA VSS provider, provider should be removed before installer
> > exits. Otherwise QGA VSS will has broken infomation and
> > prevent QGA installation in next run.
>
> I'm picking this up for qemu-stable (10.0 & 10.1).
> Please let me know if I shouldn't.
>
> Thanks,
>
> /mjt
>
>
[-- Attachment #2: Type: text/html, Size: 1313 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] qga/installer: Remove QGA VSS if QGA installation failed
2025-09-03 8:01 ` Kostiantyn Kostiuk
@ 2025-09-03 8:14 ` Michael Tokarev
0 siblings, 0 replies; 5+ messages in thread
From: Michael Tokarev @ 2025-09-03 8:14 UTC (permalink / raw)
To: Kostiantyn Kostiuk; +Cc: qemu-devel, Michael Roth, Yan Vugenfirer, qemu-stable
On 03.09.2025 11:01, Kostiantyn Kostiuk wrote:
> Hi Michael,
>
> Please also pick https://lore.kernel.org/qemu-
> devel/20250825135311.138330-1-kkostiuk@redhat.com/ <https://
> lore.kernel.org/qemu-devel/20250825135311.138330-1-kkostiuk@redhat.com/>
> for stable as it provides more detailed error logs.
Picked up edf3780a7dad4 "qga-vss: Write hex value of error in log"
too (for 10.0 & 10.1).
Thanks,
/mjt
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-09-03 8:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25 14:31 [PATCH] qga/installer: Remove QGA VSS if QGA installation failed Kostiantyn Kostiuk
2025-08-26 7:59 ` Yan Vugenfirer
2025-09-03 7:09 ` Michael Tokarev
2025-09-03 8:01 ` Kostiantyn Kostiuk
2025-09-03 8:14 ` Michael Tokarev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).