On Thursday 31 March 2011 10:04:36 Osier Yang wrote:
于 2011年03月30日 23:56, Jean-Baptiste Rouault 写道:
> On Wednesday 30 March 2011 17:23:51 Osier Yang wrote:
>> Yes, actually I also prefer to add new flag to API, but not in
>> virsh instead, however, adding new flag argument is not workable,
>> how about introduce a new API, something like
"virDomainUndefineFlag"?
>
> I wanted to suggest something similar because I'm annoyed that
> calling undefine on an OpenVZ domain destroys the container private
> area...
Hi, Jean
Could you explain more? Wanna known if can do it incidentally, though
I'm guessing it's caused by openvz driver destroying the private
area internally, something like "vzctl --destroy". If it's right
for your meaning, then IMHO we can't introduce new flag for this,
as it's only openvz driver specificly.
Regards
Osier
Hi,
Yes the problem is OpenVZ specific because "vzctl destroy" internally destroys
the private area.
If there is a new "virDomainUndefineFlag" API, I was thinking that maybe the
openvz driver could check the value of that flag in "openvzDomainUndefine()",
then only remove the container config file in one case, or use "vzctl destroy"
in the other case.
To make it cleaner, a patch could be send upstream so that vzctl destroy
accepts a new argument like "--keep-private".
Regards
Jean-Baptiste
--
Jean-Baptiste ROUAULT
Ingénieur R&D - Diateam : Architectes de l'information
Phone : +33 (0)9 53 16 02 70 Fax : +33 (0)2 98 050 051