qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] qga: Start qemu-ga service after NetworkManager start


From: Konstantin Kostiuk
Subject: Re: [PATCH] qga: Start qemu-ga service after NetworkManager start
Date: Thu, 17 Aug 2023 09:15:08 +0300

Hi, Efim

Thanks for your contribution.

I think your patch is a partial solution because other network managers can be used
for example systemd-networkd or dhcpcd. Maybe a better solution is After=network.target.

Do you have any other suggestions?

Best Regards,
Konstantin Kostiuk.


On Wed, Aug 16, 2023 at 11:20 PM Efim Shevrin <efim.shevrin@virtuozzo.com> wrote:
From: Fima Shevrin <efim.shevrin@virtuozzo.com>

When the guest OS starts, qemu-ga sends an event to the host.
This event allows services on the host to start configuring
the already running guest OS. When configuring network settings,
it is possible that an external service will receive a signal
from qemu-ga about the start of guest OS, while NetworkManager
may not be running yet. Therefore, network setting may not
be available. With the current patch, we eliminate the described
race condition between qemu-ga and NetworkManager for guest OS
network setting cases.

Signed-off-by: Fima Shevrin <efim.shevrin@virtuozzo.com>
---
 contrib/systemd/qemu-guest-agent.service | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/systemd/qemu-guest-agent.service b/contrib/systemd/qemu-guest-agent.service
index 51cd7b37ff..6e2d059356 100644
--- a/contrib/systemd/qemu-guest-agent.service
+++ b/contrib/systemd/qemu-guest-agent.service
@@ -2,6 +2,7 @@
 Description=QEMU Guest Agent
 BindTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
 After=dev-virtio\x2dports-org.qemu.guest_agent.0.device
+After=NetworkManager.service

 [Service]
 ExecStart=-/usr/bin/qemu-ga
--
2.34.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]