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

Linhaifeng haifeng.lin at huawei.com
Wed Oct 8 02:03:47 UTC 2014


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:
      <cell id='0' cpus='0' memory='1048576' memAccess='shared'/>
      <cell id='1' cpus='1' memory='1048576' memAccess='shared'/>
      <page size="2" unit="M" nodeset="0,1"/>

    <interface type='vhostuser'>
      <mac address='52:54:00:3b:83:1a'/>
      <source type='unix' path='/path/port1' mode='client'/>
      <model type='virtio'/>
    <interface type='vhostuser'>
      <mac address='52:54:00:3b:83:1b'/>
      <source type='unix' path='/path/port2' mode='client'/>
      <model type='virtio'/>

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

More information about the libvirt-users mailing list