[libvirt] XML support for arbitrary command line arguments

Daniel P. Berrange berrange at redhat.com
Tue Sep 21 17:02:02 UTC 2010


On Mon, Sep 20, 2010 at 04:07:32PM -0700, Venkateswararao Jujjuri (JV) wrote:
> On 9/14/2010 9:34 AM, Venkateswararao Jujjuri (JV) wrote:
> >On 9/14/2010 2:43 AM, Daniel P. Berrange wrote:
> >>On Tue, Sep 14, 2010 at 11:03:04AM +0530, Harsh Bora wrote:
> >>>As QEMU provides support for accessing such shared directory with the
> >>>help of 9p server, and therefore need to be passed additional
> >>>commandline argument while starting, I wanted to test it using XML and
> >>>libvirt.
> >>
> >>>So, if the idea looks good to everyone, we can have something like:
> >>>
> >>><shareddir fstype=local path='/folder/to/share' mount_tag='unique_tag'
> >>>security_model='as_applicable'>
> >
> >fstype may not be 'local' all the time. So in the XML description, I would
> >propose something like
> >fstype='filesystem type' or something like that. For now only QEMU 
> >supports local.
> >This keyword represents all local filesystems like ext3/ext4 etc.
> >>
> >>We already have an XML syntax defined for filesystems using
> >>the<filesystem> element. I've proposed an impl for QEMU using
> >>p9fs before, but we didn't apply it yet.
> >>
> >>http://www.redhat.com/archives/libvir-list/2010-July/msg00458.html
> 
> 
> Taking a closer look at the Danial's patch above, it covers almost all our 
> needs.
> Except that the fstype and security models are hard coded.

fstype is hardcoded to local only in so much as there aren't
any other options in QEMU for fstype. If QEMU adds other
fstype options, we'll extend <filesystem type='XXXX'> to
cover them. Currently type='bind' in the XML maps to fstype=local
in QEMU. 

> 
> +    virBufferAddLit(&opt, "local,security_model=mapped");
> 
> Any reason why it was not taken yet?

I wanted to decide on best setting for security model. I think it
might be better to make it use passthrough by default, since that
gives better interoperability for users with matching host/guest
IDs.

Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list