qemu/qga
Igor Mammedov b4bf912a6c qga: ignore non present cpus when handling qmp_guest_get_vcpus()
If VM has VCPUs plugged sparselly (for example a VM started with
3 VCPUs (cpu0, cpu1 and cpu2) and then cpu1 was hotunplugged so
only cpu0 and cpu2 are present), QGA will rise a error
  error: internal error: unable to execute QEMU agent command 'guest-get-vcpus':
  open("/sys/devices/system/cpu/cpu1/"): No such file or directory
when
  virsh vcpucount FOO --guest
is executed.
Fix it by ignoring non present CPUs when fetching CPUs status from sysfs.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2018-10-30 16:48:49 -05:00
..
installer
vss-win32 qga-win: add support for qmp_guest_fsfreeze_freeze_list 2018-10-30 16:48:49 -05:00
channel-posix.c
channel-win32.c
channel.h
commands-posix.c qga: ignore non present cpus when handling qmp_guest_get_vcpus() 2018-10-30 16:48:49 -05:00
commands-win32.c qga-win: add support for qmp_guest_fsfreeze_freeze_list 2018-10-30 16:48:49 -05:00
commands.c
guest-agent-command-state.c
guest-agent-core.h
main.c qga-win: add support for qmp_guest_fsfreeze_freeze_list 2018-10-30 16:48:49 -05:00
Makefile.objs
qapi-schema.json
service-win32.c
service-win32.h
vss-win32.c qga-win: add support for qmp_guest_fsfreeze_freeze_list 2018-10-30 16:48:49 -05:00
vss-win32.h qga-win: add support for qmp_guest_fsfreeze_freeze_list 2018-10-30 16:48:49 -05:00