[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.1.5 02/11] vl: Improve error message for conflicting -incoming
From: |
Michael Tokarev |
Subject: |
[Stable-8.1.5 02/11] vl: Improve error message for conflicting -incoming and -loadvm |
Date: |
Thu, 18 Jan 2024 15:50:40 +0300 |
From: Kevin Wolf <kwolf@redhat.com>
Currently, the conflict between -incoming and -loadvm is only detected
when loading the snapshot fails because the image is still inactive for
the incoming migration. This results in a suboptimal error message:
$ ./qemu-system-x86_64 -hda /tmp/test.qcow2 -loadvm foo -incoming defer
qemu-system-x86_64: Device 'ide0-hd0' is writable but does not support snapshots
Catch the situation already in qemu_validate_options() to improve the
message:
$ ./qemu-system-x86_64 -hda /tmp/test.qcow2 -loadvm foo -incoming defer
qemu-system-x86_64: 'incoming' and 'loadvm' options are mutually exclusive
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20231201142520.32255-3-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 5a7f21efaf99c60614fe1967be1c0f9aa46c526e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/softmmu/vl.c b/softmmu/vl.c
index b0b96f67fa..c9e9ede237 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -2357,6 +2357,10 @@ static void qemu_validate_options(const QDict
*machine_opts)
}
}
+ if (loadvm && incoming) {
+ error_report("'incoming' and 'loadvm' options are mutually exclusive");
+ exit(EXIT_FAILURE);
+ }
if (loadvm && preconfig_requested) {
error_report("'preconfig' and 'loadvm' options are "
"mutually exclusive");
--
2.39.2
- [Stable-8.1.5 00/11] Patch Round-up for stable 8.1.5, freeze on 2024-01-27, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 01/11] block: Fix crash when loading snapshot on inactive node, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 02/11] vl: Improve error message for conflicting -incoming and -loadvm,
Michael Tokarev <=
- [Stable-8.1.5 03/11] iotests: Basic tests for internal snapshots, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 04/11] hw/net/can/sja1000: fix bug for single acceptance filter and standard frame, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 05/11] target/riscv: Fix mcycle/minstret increment behavior, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 06/11] chardev/char.c: fix "abstract device type" error message, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 07/11] hw/intc/arm_gicv3_cpuif: handle LPIs in in the list registers, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 08/11] util: fix build with musl libc on ppc64le, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 09/11] tests/qtest/virtio-ccw: Fix device presence checking, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 10/11] target/s390x: Fix LAE setting a wrong access register, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 11/11] .gitlab-ci.d/buildtest.yml: Work around htags bug when environment is large, Michael Tokarev, 2024/01/18