mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
lib/qemu.c: Use machine type none when inspecting QMP properties
Dan mentioned that there is a special machine type ("none") we can use
when querying for KVM. It has no CPU, memory, etc and does not run,
but you can still enable KVM for it.
Note we have to remove the -cpu parameter, otherwise qemu prints this
error:
qemu-kvm: apic-id property was not initialized properly
Updates: commit 5da8102f5f
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -81,13 +81,7 @@ generic_qmp_test (guestfs_h *g, const char *qmp_command, char **outp)
|
|||||||
guestfs_int_cmd_add_string_unquoted (cmd, "QEMU_AUDIO_DRV=none ");
|
guestfs_int_cmd_add_string_unquoted (cmd, "QEMU_AUDIO_DRV=none ");
|
||||||
guestfs_int_cmd_add_string_quoted (cmd, g->hv);
|
guestfs_int_cmd_add_string_quoted (cmd, g->hv);
|
||||||
guestfs_int_cmd_add_string_unquoted (cmd, " -display none");
|
guestfs_int_cmd_add_string_unquoted (cmd, " -display none");
|
||||||
guestfs_int_cmd_add_string_unquoted (cmd, " -cpu max");
|
guestfs_int_cmd_add_string_unquoted (cmd, " -machine none,accel=kvm:hvf:tcg");
|
||||||
guestfs_int_cmd_add_string_unquoted (cmd, " -machine ");
|
|
||||||
guestfs_int_cmd_add_string_quoted (cmd,
|
|
||||||
#ifdef MACHINE_TYPE
|
|
||||||
MACHINE_TYPE ","
|
|
||||||
#endif
|
|
||||||
"accel=kvm:hvf:tcg");
|
|
||||||
guestfs_int_cmd_add_string_unquoted (cmd, " -qmp stdio");
|
guestfs_int_cmd_add_string_unquoted (cmd, " -qmp stdio");
|
||||||
guestfs_int_cmd_add_string_unquoted (cmd, " -S");
|
guestfs_int_cmd_add_string_unquoted (cmd, " -S");
|
||||||
guestfs_int_cmd_clear_capture_errors (cmd);
|
guestfs_int_cmd_clear_capture_errors (cmd);
|
||||||
|
|||||||
Reference in New Issue
Block a user