[Libvir] [PATCH] Linux-VServer support
Daniel Hokka Zakrisson
daniel at hozac.com
Tue Jan 15 16:22:38 UTC 2008
Daniel P. Berrange wrote:
> On Tue, Jan 15, 2008 at 03:43:37PM +0000, Daniel P. Berrange wrote:
>> On Wed, Jan 09, 2008 at 10:51:20PM +0100, Daniel Hokka Zakrisson wrote:
>> > This patch implements support for Linux-VServer guests. It is
>> > missing vcpu and console support, and the necessary virsh code to
>> > it, but is otherwise pretty feature complete.
>> > This is an XML dump from one of my guests:
>> > <domain type='vserver' id='40010'>
>> > <name>lenny</name>
>> > <uuid>19e12957-261a-5a06-d6d0-89917d6d439f</uuid>
>> > <memory>2048000</memory>
>> > <os>
>> > <hostname>lenny.test</hostname>
>> > <type arch='i686'>vserver</type>
>> > </os>
>> > <devices>
>> > <interface type='ethernet'>
>> > <ip prefix='24' interface='dummy0' address='192.168.20.4' />
>> > </interface>
>> Minor nitpick - if dummy0 is the device associated with the
>> container in the host's context, then it should be
>> <interface type='ethernet'>
>> <ip prefix='24' address='192.168.20.4' />
>> <target dev="dummy0"/>
> One other question - when inside the container what does 'ifconfig'
> show - do you actually see a dummy0 interface present - or is this
> all hidden from admin view inside the container? If there is a device
> visible, then it makes sense to have the <interface> tag within the
> <devices> section as you illustrate. If there is no device visible
> inside the container then we should use the <network> tag within
> <container> as per OpenVZ XML format.
dummy0 is visible inside.
>> > <disk type='directory' device='directory'>
>> > <source directory='/vservers/lenny' type='auto'
>> > <target directory='/'/>
>> > </disk>
>> I think I'd prefer to call these '<filesystem>' elements instead
>> of '<disk>' because they don't really have the same functional
>> properties as disks.
>> Are the sources actual directories too ? Or are the sources block
>> devs / files which are mounted inside ? The example paths suggest
>> the former, but the presence of filesystem type info suggests the
> Oh, and for consistency with existing OpenBZ driver, I think the
> tag should be within a <container> element instead of <devices> since its
> not really a device per-se.
Which would make virDomainAttachDevice rather awkward... But see my other
email, I think it belongs in <devices>.
Personally, I think that <container> should only be used for things which
have no mapping whatsoever in the other backends, e.g. how to start it.
For storage and networking on the other hand, consistency is good.
Daniel Hokka Zakrisson
More information about the libvir-list