Re: [libvirt] [PATCH] Openvz: how to use a nondefault config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 02, 2009 at 06:36:15PM +0400, Evgeniy Sokolov wrote:
> 
> Config /etc/vz/conf/ve-XXX.conf-sample define there are many parameters 
> like  memory, CPU etc. This parameters are not properties of <filesystem>.
> 
> Daniel, usage of pre-defined configs in really usefull. Can we create 
> additional tag inside <domain></domain>?

The trouble with this is that given the XML config of a guest, you can
no longer determine what its configuration is, because a large amount
of configuration is hidden in this opaque 'template'.

If we're to support templates, I think we need to make them first class
objects, so you can query what templates exist, and see their associated
config settings. 

eg, expose a simple API

   virDomainTemplatePtr;

   int virConnectListDomainTemplates(virConnectPtr conn, const char **names);
   virDomainTemplatePtr virDomainTemplateLookupbyName(virConnectPtr con, const char *name)
   char *virDomainTemplateGetXMLDesc(virDomainTemplatePtr tmpl);
   virDomainTemplatePtr virDomainTemplateDefineXML(virConnectPtr conn, const char *xml)
   int virDomainTemplateUndefine(virDomainTemplatePtr tmpl);
   int virDomainTemplateFree(virDomainTemplatePtr tmpl);


Then, we could either include a <template>$NAME</template> parameter in 
the XML for a guest. Or have an alternate API for creating guests

   virDomainCreateXMLWithTemplate(virConnectPtr conn,
                                  const char *xmlDesc,
                                  const char *template)

It depends whether we'd want to track the template <-> guest association
forever, or just use it once to fill-in the guest XML and then forget
about the template after that.


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]