[Libvir] [RFC] Linux-VServer support

Daniel Hokka Zakrisson daniel at hozac.com
Wed Oct 31 16:14:10 UTC 2007


Daniel Veillard wrote:
> On Wed, Oct 31, 2007 at 02:39:05PM +0100, Daniel Hokka Zakrisson wrote:
>> Daniel Veillard wrote:
>>>  I looked at the code, that seems clean but I have a concern about the
>>> overall XML format. Could you paste a couple of examples. Also I think
>>> Linux-VServer and OpenVZ kind of configuration may end up with the same
>>> kind of limitations or differences, so I would like to try to harmonize
>>> both format when possible.
>> Currently, the XML format is really limited. Are there any docs on what 
>> should be there, or should I just look at the other drivers? As far as 
>> harmonizing with the OpenVZ driver, I'm fine with that, but it seems to 
>> be pretty limited and, to some degree at least, ugly.
> 
>   Harmonizing the XML formats shouldn't be that hard ...
> We discussed the OpenVZ format there
>   http://www.redhat.com/archives/libvir-list/2007-July/msg00347.html
> and around there earlier:
>   http://www.redhat.com/archives/libvir-list/2007-March/msg00193.html
> For network settings
>   http://www.redhat.com/archives/libvir-list/2007-July/msg00366.html

Okay, I'll add the relevant pieces.

>> Here's an example:
>> virsh # dumpxml etch
>> <domain type='vserver' id='40001'>
>>   <name>etch</name>
>>   <uuid>c81f40f2-7e72-606d-7d07-097c1d56a5b5</uuid>
>>   <memory>500000</memory>
>>   <scheduler>
>>     <param name='fill_rate1'>100</param>
>>     <param name='interval1'>1000</param>
>>     <param name='fill_rate2'>25</param>
>>     <param name='interval2'>1000</param>
>>     <param name='idle_time'>1</param>
>>   </scheduler>
>> </domain>
> 
>   I'm surprized there is no path or storage informations at all.

Right, that's all handled internally right now. There's a default path 
created when domainDefineXML is called.

> Are the parameters for the scheduler all integers ? If you really
> never end up with an information set more structured than that then
> 
>   <scheduler fill_rate1='100' interval1='1000' fill_rate2='25' interval2='1000'
>              idle_time='1'/>
> 
> would probably be simpler. The question is would other kind of scheduler
> use more structured parameters ? Seems to me it's not the case and that
> ad-hoc parsing to convert {name, value} pairs would just work.

Actually, the same settings can be applied to the CPUs separately, e.g.
<scheduler>
   <param name='fill_rate1'>100</param>
   <param name='interval1'>1000</param>
   <cpu id='0'>
     <param name='idle_time'>1</param>
     <param name='fill_rate2'>25</param>
     <param name='interval2'>1000</param>
   </cpu>
</scheduler>
should at some point be possible (it's not in the current patch).

> Daniel

-- 
Daniel Hokka Zakrisson




More information about the libvir-list mailing list