[Libvirt-cim] [PATCH V2] Improve support of nested KVM
Viktor Mihajlovski
mihajlov at linux.vnet.ibm.com
Wed Jun 26 12:46:17 UTC 2013
On 06/18/2013 11:03 AM, Xu Wang wrote:
> From: Xu Wang <cngesaint at outlook.com>
>
> Under nested KVM environment libvirt-cim could recognize kvm support
> correctly now.
>
> Signed-off-by: Xu Wang <cngesaint at outlook.com>
> ---
> libxkutil/device_parsing.c | 27 ++++++++++++++++++++
> libxkutil/device_parsing.h | 2 +
> src/Virt_VirtualSystemManagementService.c | 38 +++++++++++++++++++++++++----
> 3 files changed, 62 insertions(+), 5 deletions(-)
>
With this commit you cannot start KVM guests (at least on s390) anymore.
...
> diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c
> index 7b7261a..8e1e6b1 100644
> --- a/src/Virt_VirtualSystemManagementService.c
> +++ b/src/Virt_VirtualSystemManagementService.c
...
> @@ -393,25 +393,53 @@ static bool system_has_kvm(const char *pfx)
> +
> + node = xmlDocGetRootElement(doc);
> + if (node == NULL) {
> + CU_DEBUG("xmlDocGetRootElement() call failed!");
> + goto out;
> + }
> +
> + if (parse_domain_type(node, &val) &&
> + STREQC(val, "kvm")) {
> + CU_DEBUG("The system support kvm!");
> + kvm = true;
> + } else {
> + CU_DEBUG("Domain type is %s.", val);
> + }
> + }
>
the issue here is that the capabilities call will return two
domain elements, the first one of type 'qemu' so that system_has_kvm
will always return false
--
Mit freundlichen Grüßen/Kind Regards
Viktor Mihajlovski
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
More information about the Libvirt-cim
mailing list