On Thu, Oct 09, 2014 at 09:54:44AM +0800, Linhaifeng wrote:
On 2014/10/8 16:57, Martin Kletzander wrote:
> On Wed, Oct 08, 2014 at 10:03:47AM +0800, Linhaifeng wrote:
>> Hi,
>>
>> 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?
-bash-4.2# virsh --version
1.2.7
Well, the code was added by commits starting from
def6b35989362cc7ce8474256e19d877ff07a711, described as
v1.2.8-168-gdef6b35, i.e. 128 commits *after* 1.2.8 release, so the
code is in 1.2.9. Unless you are using some custom build with those
patches back-ported, it's not going to work. You can try dumping XML
of the machine after it has been defined/created and if that
attributes are not kept in the XML then there's no support for it.
Martin
>
>> </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(a)redhat.com
>>
https://www.redhat.com/mailman/listinfo/libvirt-users