]> git.ipfire.org Git - thirdparty/qemu.git/commit
vl: Improve error message for conflicting -incoming and -loadvm
authorKevin Wolf <kwolf@redhat.com>
Fri, 1 Dec 2023 14:25:19 +0000 (15:25 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 22 Dec 2023 19:25:28 +0000 (22:25 +0300)
commit4c8315ad50e5a91a0666a8a14887deffb5d7d981
treef1b4b770e45c55c7043689cc63bd9aea8cb42c3a
parentb769a8e472be68215ba6431f6e91d4bf8f537ff4
vl: Improve error message for conflicting -incoming and -loadvm

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>
softmmu/vl.c