[libvirt-users] is memoryBacking support 'share' and 'mem-path' parameter

Martin Kletzander mkletzan at redhat.com
Wed Oct 8 08:57:39 UTC 2014

On Wed, Oct 08, 2014 at 10:03:47AM +0800, Linhaifeng wrote:
>I want to use this qemu command '-object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on' with libvirt but i can't find the 'mem-path' and 'share' in the documentation.
>because the vhost-user backend based on 'share=on' parameter and libvirt support vhostuser i guess there maybe another way to support this parameter?
>this is my xml:
>  <cpu>
>    <numa>
>      <cell id='0' cpus='0' memory='1048576' memAccess='shared'/>
>      <cell id='1' cpus='1' memory='1048576' memAccess='shared'/>

this memAccess='shared' is exactly what you need in order for the
share='on' to be appended.  I wonder why it's not there.  What libvirt
version are you using?

>    </numa>
>  </cpu>
> <memoryBacking>
>    <hugepages>
>      <page size="2" unit="M" nodeset="0,1"/>
>    </hugepages>
>    <!--nosharepages/-->
>    <!--locked/-->
> </memoryBacking>
>    <interface type='vhostuser'>
>      <mac address='52:54:00:3b:83:1a'/>
>      <source type='unix' path='/path/port1' mode='client'/>
>      <model type='virtio'/>
>    </interface>
>    <interface type='vhostuser'>
>      <mac address='52:54:00:3b:83:1b'/>
>      <source type='unix' path='/path/port2' mode='client'/>
>      <model type='virtio'/>
>    </interface>
>when i create the VM the qemu command is like this without 'share=on' parameter:
>-object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,size=1024M,id=ram-node0 -numa node,nodeid=0,cpus=0,memdev=ram-node0
>-object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,size=1024M,id=ram-node1 -numa node,nodeid=1,cpus=1,memdev=ram-node1
>libvirt-users mailing list
>libvirt-users at redhat.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20141008/a716fdef/attachment.sig>

More information about the libvirt-users mailing list