[Libvir] [RFC] Life-cycle Management of the domain

Saori Fukuta fukuta.saori at jp.fujitsu.com
Thu Apr 19 10:07:08 UTC 2007


Hi Daniel,

Thank you for your comments and sorry about my unclear explanation.

Let me say what are the original data. The original data are 
"/var/lib/xend/domains/<domain UUID>/config.sxp" that made by Xen when defining 
a domain.

I expect the following Life-cycle:
  1. "Define a domain"
     -> a config.sxp file is made at "/var/lib/xend/domains/<domainUUID>".
  2. "Start a domain"
     -> libvirt copies a file from "/var/lib/xend/domains/.../config.sxp"
        to "/var/lib/libvirt/<domainUUID>/virt.sxp"(tentative place).
  3. "Change a allocation"
  4. "Shutdown a domain"
  5. "Start a domain"
     -> using the data which is "/var/lib/libvirt/.../virt.sxp".
  6. Cycle of "Shutdown a domain, Start a domain, and Change a allocation"
  7. "Undefine a domain"
     -> the libvirt deletes a "virt.sxp" file.

>   We can't know what are the original data which were used to create the domain
> was that /etc/xen/... ? was that an XML file coming from a client application ?
> was that another source by calling the Xen API ? 

So, we have the original data if the domain was defined by whether using 
"/etc/xen..." or XML file.

>   That I not too fond of adding ome more place where data for domain
> definition can be stored.

I think that we need to store the domain definition to change a allocation
dynamically or statically.

I know the SXP file is Xen-specific, so I have thinking about another way, as 
an example, the format is XML. In that case, we can use virDomainGetXMLDesc to
get the original data instead of copying a config.sxp file.

> but what we must make sure is that the API allow to make the required
> change dynamically.

I'm not sure what you mean by "the API". Do you mean make sure that Xen API
allow to change dynamically, or libvirt API ?

Thanks,
Saori.





More information about the libvir-list mailing list