On Mon, Oct 05, 2020 at 10:50:08AM +0200, Michal Privoznik wrote:
On 10/3/20 1:15 AM, Masayoshi Mizuma wrote:
> On Fri, Oct 02, 2020 at 11:31:32AM -0400, Masayoshi Mizuma wrote:
> > Hello Jan, and Michal,
> >
> > commit: 88957116c9 ("qemu: Use memory-backend-* for regular guest
memory") gets
> > the system memory sharable without numa config.
> > The qemu options with the patch will be like as:
> >
> > -machine
pc-q35-5.2,accel=kvm,usb=off,vmport=off,smm=on,dump-guest-core=off,memory-backend=pc.ram
\
> > -object
memory-backend-file,id=pc.ram,mem-path=/var/lib/libvirt/qemu/ram/2-Test/pc.ram,share=yes,size=17179869184
\
> >
> > So, we can remove the numa restriction of virtiofs, right?
> > The patch to remove that is the bottom of this email.
> >
> > And, 88957116c9 seems to introduce another restriction which we
> > cannot create numa nodes on the machine. I got the following
> > message when I set the numa config and started the VM:
> >
> > 2020-10-02T00:31:46.780374Z qemu-system-x86_64: '-machine
memory-backend' and '-numa memdev' properties are mutually exclusive
>
> It seems that this isn't a restriction for virtiofs. It's a bug introduced
> by commit: 88957116c9. <numa> element doesn't work regardless of virtiofs
config...
Do you have domain XML that is failing?
Yes, I got the issue while virsh start:
# virsh start Test
error: Failed to start domain Test
error: internal error: qemu unexpectedly closed the monitor: 2020-10-05T17:31:21.078134Z
qemu-system-x86_64: '-machine memory-backend' and '-numa memdev'
properties are mutually exclusive
#
Here is the domain XML. I'm using libvirt with the head commit: 7d77fdb90f,
and qemu with the head commit: 36d9c2883e.
=========
<domain type='kvm'>
<name>Test</name>
<uuid>12785e5c-542e-4896-87f3-2e068fb7107f</uuid>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>8388608</currentMemory>
<vcpu placement='static'>4</vcpu>
<os>
<type arch='x86_64' machine='pc-q35-5.2'>hvm</type>
</os>
<features>
<acpi/>
<apic/>
<vmport state='off'/>
<smm state='on'/>
<vmcoreinfo state='on'/>
</features>
<cpu mode='host-model' check='partial'>
<numa>
<cell id='0' cpus='0-3' memory='8388608'
unit='KiB'/>
</numa>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/local/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/Test.qcow2'/>
<target dev='vda' bus='virtio'/>
<boot order='1'/>
<address type='pci' domain='0x0000' bus='0x04'
slot='0x00' function='0x0'/>
</disk>
<controller type='pci' index='0' model='pcie-root'/>
<controller type='pci' index='1'
model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='1' port='0x10'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0' multifunction='on'/>
</controller>
<controller type='pci' index='2'
model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='2' port='0x9'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
</controller>
<controller type='pci' index='3'
model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='3' port='0xa'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='4'
model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='4' port='0xb'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x3'/>
</controller>
<controller type='pci' index='5'
model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='5' port='0xc'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x4'/>
</controller>
<controller type='pci' index='6'
model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='6' port='0xd'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x5'/>
</controller>
<controller type='usb' index='0' model='qemu-xhci'>
<address type='pci' domain='0x0000' bus='0x02'
slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x1f' function='0x2'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x03'
slot='0x00' function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:c1:a2:80'/>
<source network='default'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x01'
slot='0x00' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<channel type='unix'>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0'
port='1'/>
</channel>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x05'
slot='0x00' function='0x0'/>
</memballoon>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
<address type='pci' domain='0x0000' bus='0x06'
slot='0x00' function='0x0'/>
</rng>
</devices>
</domain>
=========
Thanks,
Masa