[libvirt] [PATCH 5/7] kvmtool: Add new domain type

Osier Yang jyang at redhat.com
Fri Dec 9 07:22:32 UTC 2011


On 2011年12月06日 22:46, Daniel P. Berrange wrote:
> On Fri, Nov 11, 2011 at 07:57:04PM +0800, Osier Yang wrote:
>> It's named as "kvmtool".
>> ---
>>   src/conf/domain_conf.c |    4 +++-
>>   src/conf/domain_conf.h |    1 +
>>   2 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>> index 58f4d0f..55121d8 100644
>> --- a/src/conf/domain_conf.c
>> +++ b/src/conf/domain_conf.c
>> @@ -91,7 +91,8 @@ VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
>>                 "hyperv",
>>                 "vbox",
>>                 "one",
>> -              "phyp")
>> +              "phyp",
>> +              "kvmtool")
>>
>>   VIR_ENUM_IMPL(virDomainBoot, VIR_DOMAIN_BOOT_LAST,
>>                 "fd",
>> @@ -4018,6 +4019,7 @@ virDomainChrDefParseXML(virCapsPtr caps,
>>       if (type == NULL) {
>>           def->source.type = VIR_DOMAIN_CHR_TYPE_PTY;
>>       } else if ((def->source.type = virDomainChrTypeFromString(type))<  0) {
>> +        VIR_WARN("type = %s", type);
>>           virDomainReportError(VIR_ERR_XML_ERROR,
>>                                _("unknown type presented to host for character device: %s"),
>>                                type);
>> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
>> index a3cb834..001bc46 100644
>> --- a/src/conf/domain_conf.h
>> +++ b/src/conf/domain_conf.h
>> @@ -59,6 +59,7 @@ enum virDomainVirtType {
>>       VIR_DOMAIN_VIRT_VBOX,
>>       VIR_DOMAIN_VIRT_ONE,
>>       VIR_DOMAIN_VIRT_PHYP,
>> +    VIR_DOMAIN_VIRT_KVMTOOL,
>>
>>       VIR_DOMAIN_VIRT_LAST,
>>   };
>
> IMHO this patch is not required. The domain type is refering to the
> hypervisor used for the domain, which is still 'kvm'. What is different
> here is just the userspace device model.  If you look at the 3 different
> Xen user spaces we support, all of them use<domain type='xen'>  still.
> So just use<domain type='kvm'>  here for kvmtool.
>

Make sense, agreed.

Osier




More information about the libvir-list mailing list