[libvirt] [PATCH v2 4/4] virt-aa-helper: add DomainGuest to mockup caps

Ján Tomko jtomko at redhat.com
Wed Jul 8 15:08:44 UTC 2015


On Tue, Jul 07, 2015 at 11:38:53AM +0200, Cédric Bosdonnat wrote:
> With commit 3f9868a virt-aa-helper stopped working due to missing
> DomainGuest in the caps.
> 
> The test with -c without arch also needs to be
> removed since the new capabilities code uses the host arch when none is
> provided.
> ---
>  src/security/virt-aa-helper.c | 25 ++++++++++++++++++++++++-
>  tests/virt-aa-helper-test     |  3 ---
>  2 files changed, 24 insertions(+), 4 deletions(-)
> 
> diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
> index f94f337..cf729e9 100644
> --- a/src/security/virt-aa-helper.c
> +++ b/src/security/virt-aa-helper.c
> @@ -73,6 +73,7 @@ typedef struct {
>      virDomainDefPtr def;        /* VM definition */
>      virCapsPtr caps;            /* VM capabilities */
>      virDomainXMLOptionPtr xmlopt; /* XML parser data */
> +    char *hvm;                  /* type of hypervisor (eg qemu, xen, lxc) */

HVM should stand for Hardware Virtual Machine, but not all the
hypervisors provide full virtualization.

I think hypervisor would be a better name. Or virtType, which is what
domain_conf.c uses.

>      char *os;                   /* type of os (eg hvm, xen, exe) */
>      virArch arch;               /* machine architecture */
>      char *newfile;              /* newly added file */
  

> @@ -730,6 +738,21 @@ get_definition(vahControl * ctl, const char *xmlStr)
>          goto exit;
>      }
>  
> +    if ((hvmtype = virDomainVirtTypeFromString(ctl->hvm)) < 0) {
> +        vah_error(ctl, 0, _("unknown HVM type"));

unknown domain/virt type

ACK with the name changed.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150708/7e2a7c43/attachment-0001.sig>


More information about the libvir-list mailing list