[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/33] vl: Improve error message for conflicting -incoming and -lo
From: |
Kevin Wolf |
Subject: |
[PULL 09/33] vl: Improve error message for conflicting -incoming and -loadvm |
Date: |
Thu, 21 Dec 2023 22:23:14 +0100 |
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>
---
system/vl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/system/vl.c b/system/vl.c
index 2bcd9efb9a..6b87bfa32c 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -2426,6 +2426,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.43.0
- [PULL 00/33] Block layer patches, Kevin Wolf, 2023/12/21
- [PULL 01/33] nbd/server: avoid per-NBDRequest nbd_client_get/put(), Kevin Wolf, 2023/12/21
- [PULL 02/33] nbd/server: only traverse NBDExport->clients from main loop thread, Kevin Wolf, 2023/12/21
- [PULL 03/33] nbd/server: introduce NBDClient->lock to protect fields, Kevin Wolf, 2023/12/21
- [PULL 04/33] block/file-posix: set up Linux AIO and io_uring in the current thread, Kevin Wolf, 2023/12/21
- [PULL 05/33] virtio-blk: add lock to protect s->rq, Kevin Wolf, 2023/12/21
- [PULL 08/33] block: Fix crash when loading snapshot on inactive node, Kevin Wolf, 2023/12/21
- [PULL 06/33] virtio-blk: don't lock AioContext in the completion code path, Kevin Wolf, 2023/12/21
- [PULL 07/33] virtio-blk: don't lock AioContext in the submission code path, Kevin Wolf, 2023/12/21
- [PULL 09/33] vl: Improve error message for conflicting -incoming and -loadvm,
Kevin Wolf <=
- [PULL 10/33] iotests: Basic tests for internal snapshots, Kevin Wolf, 2023/12/21
- [PULL 12/33] virtio-scsi: don't lock AioContext around virtio_queue_aio_attach_host_notifier(), Kevin Wolf, 2023/12/21
- [PULL 11/33] scsi: only access SCSIDevice->requests from one thread, Kevin Wolf, 2023/12/21
- [PULL 14/33] dma-helpers: don't lock AioContext in dma_blk_cb(), Kevin Wolf, 2023/12/21
- [PULL 13/33] scsi: don't lock AioContext in I/O code path, Kevin Wolf, 2023/12/21
- [PULL 15/33] virtio-scsi: replace AioContext lock with tmf_bh_lock, Kevin Wolf, 2023/12/21
- [PULL 16/33] scsi: assert that callbacks run in the correct AioContext, Kevin Wolf, 2023/12/21
- [PULL 17/33] tests: remove aio_context_acquire() tests, Kevin Wolf, 2023/12/21
- [PULL 18/33] aio: make aio_context_acquire()/aio_context_release() a no-op, Kevin Wolf, 2023/12/21
- [PULL 19/33] graph-lock: remove AioContext locking, Kevin Wolf, 2023/12/21