@@ -0,0 +1,22 @@
1+diff --git a/qga/commands-posix.c b/qga/commands-posix.c
2+index 0dc219d..9d020d3 100644
3+--- a/qga/commands-posix.c
4++++ b/qga/commands-posix.c
5+@@ -102,6 +102,8 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
6+ reopen_fd_to_null(1);
7+ reopen_fd_to_null(2);
8+
9++ execle("/run/current-system/sw/bin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
10++ "hypervisor initiated shutdown", (char*)NULL, environ);
11+ execle("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
12+ "hypervisor initiated shutdown", (char*)NULL, environ);
13+ _exit(EXIT_FAILURE);
14+@@ -189,6 +191,8 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
15+
16+ /* Use '/sbin/hwclock -w' to set RTC from the system time,
17+ * or '/sbin/hwclock -s' to set the system time from RTC. */
18++ execle("/run/current-system/sw/bin/hwclock", "hwclock", has_time ? "-w" : "-s",
19++ NULL, environ);
20+ execle("/sbin/hwclock", "hwclock", has_time ? "-w" : "-s",
21+ NULL, environ);
22+ _exit(EXIT_FAILURE);