Linhaifeng
2014-Sep-24 08:05 UTC
[libvirt-users] what is the xml fomat about memory-backend-file
Hi, I want to use virsh to create a VM with the qemu parameter '-object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem'. How to write the XML file?
Eric Blake
2014-Sep-24 18:05 UTC
Re: [libvirt-users] what is the xml fomat about memory-backend-file
On 09/24/2014 02:05 AM, Linhaifeng wrote:> Hi, > > I want to use virsh to create a VM with the qemu parameter '-object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem'.Looking at tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages.args, I see several instances of "-object memory-backend-file...", so look at the counterpart .xml file for some examples: <memoryBacking> <hugepages> <page size='2048' unit='KiB' nodeset='1'/> <page size='1048576' unit='KiB' nodeset='0,2-3'/> </hugepages> </memoryBacking> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Linhaifeng
2014-Sep-28 05:38 UTC
Re: [libvirt-users] what is the xml fomat about memory-backend-file
On 2014/9/25 2:05, Eric Blake wrote:> On 09/24/2014 02:05 AM, Linhaifeng wrote: >> Hi, >> >> I want to use virsh to create a VM with the qemu parameter '-object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem'. > > Looking at tests/qemuxml2argvdata/qemuxml2argv-hugepages-pages.args, I > see several instances of "-object memory-backend-file...", so look at > the counterpart .xml file for some examples: > > <memoryBacking> > <hugepages> > <page size='2048' unit='KiB' nodeset='1'/> > <page size='1048576' unit='KiB' nodeset='0,2-3'/> > </hugepages> > </memoryBacking> > >Thank you. I use this xml: <cpu> <numa> <cell id='0' cpus='0' memory='1073741824' memAccess='shared'/> <cell id='1' cpus='1' memory='1073741824' memAccess='shared'/> </numa> </cpu> <memoryBacking> <hugepages> <page size="2" unit="M" nodeset="0,1"/> </hugepages> </memoryBacking> but there is also some error: [2014-09-28T05:28:32.373335Z] migration_configure:652 Parameter 'cache size' expects exceeds guest ram size [2014-09-28T05:28:32.373422Z] main:3517 start memory options parse 2014-09-28T05:28:32.373802Z qemu-kvm: -object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,size=1048576M,id=ram-node0: unable to map backing store for hugepages: Cannot allocate memory 2014-09-28T05:28:32.373895Z qemu-kvm: -object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,size=1048576M,id=ram-node1: unable to map backing store for hugepages: Cannot allocate memory
Apparently Analagous Threads
- Re: what is the xml fomat about memory-backend-file
- Re: what is the xml fomat about memory-backend-file
- is memoryBacking support 'share' and 'mem-path' parameter
- Re: what is the xml fomat about memory-backend-file
- Re: is memoryBacking support 'share' and 'mem-path' parameter