restrictions for virtiofs (related to commit: 88957116c9 for libvirt 6.9.0)

Masayoshi Mizuma msys.mizuma at
Mon Oct 5 17:54:49 UTC 2020

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'>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>4</vcpu>
    <type arch='x86_64' machine='pc-q35-5.2'>hvm</type>
    <vmport state='off'/>
    <smm state='on'/>
    <vmcoreinfo state='on'/>
  <cpu mode='host-model' check='partial'>
      <cell id='0' cpus='0-3' memory='8388608' unit='KiB'/>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <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'/>
    <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 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 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 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 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 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 type='usb' index='0' model='qemu-xhci'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    <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'/>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
    <console type='pty'>
      <target type='serial' port='0'/>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    <rng model='virtio'>
      <backend model='random'>/dev/urandom</backend>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>


More information about the libvir-list mailing list