[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] [PATCH] Openvz: how to use a nondefault config
- From: "Daniel P. Berrange" <berrange redhat com>
- To: Evgeniy Sokolov <evg openvz org>
- Cc: "libvir-list redhat com" <libvir-list redhat com>
- Subject: Re: [libvirt] [PATCH] Openvz: how to use a nondefault config
- Date: Thu, 2 Apr 2009 20:08:43 +0100
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 :|
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]