qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-devel][bug] qemu crash when migrate vm and vm's disks
@ 2021-04-09  7:06 Yuchen
  0 siblings, 0 replies; 3+ messages in thread
From: Yuchen @ 2021-04-09  7:06 UTC (permalink / raw)
  To: Dr. David Alan Gilbert, pbonzini, mst; +Cc: qemu-devel



> -----邮件原件-----
> 发件人: Dr. David Alan Gilbert [mailto:dgilbert@redhat.com]
> 发送时间: 2021年4月8日 19:27
> 收件人: yuchen (Cloud) <yu.chen@h3c.com>; pbonzini@redhat.com;
> mst@redhat.com
> 抄送: qemu-devel@nongnu.org
> 主题: Re: [Qemu-devel][bug] qemu crash when migrate vm and vm's disks
>
> * Yuchen (yu.chen@h3c.com) wrote:
> > When migrate vm and vm’s disks target host qemu crash due to an invalid
> free.
> >
> > #0  object_unref (obj=0x1000) at
> > /qemu-2.12/rpmbuild/BUILD/qemu-2.12/qom/object.c:920
> > #1  0x0000560434d79e79 in memory_region_unref (mr=<optimized out>)
> >     at /qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:1730
> > #2  flatview_destroy (view=0x560439653880) at
> > /qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:292
> > #3  0x000056043514dfbe in call_rcu_thread (opaque=<optimized out>)
> >     at /qemu-2.12/rpmbuild/BUILD/qemu-2.12/util/rcu.c:284
> > #4  0x00007fbc2b36fe25 in start_thread () from /lib64/libpthread.so.0
> > #5  0x00007fbc2b099bad in clone () from /lib64/libc.so.6
> >
> > test base qemu-2.12.0,but use lastest qemu(v6.0.0-rc2) also reproduce.
>
> Interesting.
>
> > As follow patch can resolve this problem:
> > https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg02272.html
>
> That's a pci/rcu change; ccing Paolo and Micahel.
>
> > Steps to reproduce:
> > (1) Create VM (virsh define)
> > (2) Add 64 virtio scsi disks
>
> Is that hot adding the disks later, or are they included in the VM at creation?
> Can you provide a libvirt XML example?
>
Include disks in the VM at creation

vm disks xml (only virtio scsi disks):
  <devices>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native'/>
      <source file='/vms/tempp/vm-os'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data1'/>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='2' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data2'/>
      <target dev='sdb' bus='scsi'/>
      <address type='drive' controller='3' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data3'/>
      <target dev='sdc' bus='scsi'/>
      <address type='drive' controller='4' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data4'/>
      <target dev='sdd' bus='scsi'/>
      <address type='drive' controller='5' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data5'/>
      <target dev='sde' bus='scsi'/>
      <address type='drive' controller='6' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data6'/>
      <target dev='sdf' bus='scsi'/>
      <address type='drive' controller='7' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data7'/>
      <target dev='sdg' bus='scsi'/>
      <address type='drive' controller='8' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data8'/>
      <target dev='sdh' bus='scsi'/>
      <address type='drive' controller='9' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data9'/>
      <target dev='sdi' bus='scsi'/>
      <address type='drive' controller='10' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data10'/>
      <target dev='sdj' bus='scsi'/>
      <address type='drive' controller='11' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data11'/>
      <target dev='sdk' bus='scsi'/>
      <address type='drive' controller='12' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data12'/>
      <target dev='sdl' bus='scsi'/>
      <address type='drive' controller='13' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data13'/>
      <target dev='sdm' bus='scsi'/>
      <address type='drive' controller='14' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data14'/>
      <target dev='sdn' bus='scsi'/>
      <address type='drive' controller='15' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data15'/>
      <target dev='sdo' bus='scsi'/>
      <address type='drive' controller='16' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data16'/>
      <target dev='sdp' bus='scsi'/>
      <address type='drive' controller='17' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data17'/>
      <target dev='sdq' bus='scsi'/>
      <address type='drive' controller='18' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data18'/>
      <target dev='sdr' bus='scsi'/>
      <address type='drive' controller='19' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data19'/>
      <target dev='sds' bus='scsi'/>
      <address type='drive' controller='20' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data20'/>
      <target dev='sdt' bus='scsi'/>
      <address type='drive' controller='21' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data21'/>
      <target dev='sdu' bus='scsi'/>
      <address type='drive' controller='22' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data22'/>
      <target dev='sdv' bus='scsi'/>
      <address type='drive' controller='23' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data23'/>
      <target dev='sdw' bus='scsi'/>
      <address type='drive' controller='24' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data24'/>
      <target dev='sdx' bus='scsi'/>
      <address type='drive' controller='25' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data25'/>
      <target dev='sdy' bus='scsi'/>
      <address type='drive' controller='26' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data26'/>
      <target dev='sdz' bus='scsi'/>
      <address type='drive' controller='27' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data27'/>
      <target dev='sdaa' bus='scsi'/>
      <address type='drive' controller='28' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data28'/>
      <target dev='sdab' bus='scsi'/>
      <address type='drive' controller='29' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data29'/>
      <target dev='sdac' bus='scsi'/>
      <address type='drive' controller='30' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data30'/>
      <target dev='sdad' bus='scsi'/>
      <address type='drive' controller='31' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data31'/>
      <target dev='sdae' bus='scsi'/>
      <address type='drive' controller='32' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data32'/>
      <target dev='sdaf' bus='scsi'/>
      <address type='drive' controller='33' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data33'/>
      <target dev='sdag' bus='scsi'/>
      <address type='drive' controller='34' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data34'/>
      <target dev='sdah' bus='scsi'/>
      <address type='drive' controller='35' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data35'/>
      <target dev='sdai' bus='scsi'/>
      <address type='drive' controller='36' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data36'/>
      <target dev='sdaj' bus='scsi'/>
      <address type='drive' controller='37' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data37'/>
      <target dev='sdak' bus='scsi'/>
      <address type='drive' controller='38' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data38'/>
      <target dev='sdal' bus='scsi'/>
      <address type='drive' controller='39' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data39'/>
      <target dev='sdam' bus='scsi'/>
      <address type='drive' controller='40' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data40'/>
      <target dev='sdan' bus='scsi'/>
      <address type='drive' controller='41' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data41'/>
      <target dev='sdao' bus='scsi'/>
      <address type='drive' controller='42' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data42'/>
      <target dev='sdap' bus='scsi'/>
      <address type='drive' controller='43' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data43'/>
      <target dev='sdaq' bus='scsi'/>
      <address type='drive' controller='44' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data44'/>
      <target dev='sdar' bus='scsi'/>
      <address type='drive' controller='45' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data45'/>
      <target dev='sdas' bus='scsi'/>
      <address type='drive' controller='46' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data46'/>
      <target dev='sdat' bus='scsi'/>
      <address type='drive' controller='47' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data47'/>
      <target dev='sdau' bus='scsi'/>
      <address type='drive' controller='48' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data48'/>
      <target dev='sdav' bus='scsi'/>
      <address type='drive' controller='49' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data49'/>
      <target dev='sdaw' bus='scsi'/>
      <address type='drive' controller='50' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data50'/>
      <target dev='sdax' bus='scsi'/>
      <address type='drive' controller='51' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data51'/>
      <target dev='sday' bus='scsi'/>
      <address type='drive' controller='52' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data52'/>
      <target dev='sdaz' bus='scsi'/>
      <address type='drive' controller='53' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data53'/>
      <target dev='sdba' bus='scsi'/>
      <address type='drive' controller='54' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data54'/>
      <target dev='sdbb' bus='scsi'/>
      <address type='drive' controller='55' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data55'/>
      <target dev='sdbc' bus='scsi'/>
      <address type='drive' controller='56' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data56'/>
      <target dev='sdbd' bus='scsi'/>
      <address type='drive' controller='57' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data57'/>
      <target dev='sdbe' bus='scsi'/>
      <address type='drive' controller='58' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data58'/>
      <target dev='sdbf' bus='scsi'/>
      <address type='drive' controller='59' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data59'/>
      <target dev='sdbg' bus='scsi'/>
      <address type='drive' controller='60' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data60'/>
      <target dev='sdbh' bus='scsi'/>
      <address type='drive' controller='61' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data61'/>
      <target dev='sdbi' bus='scsi'/>
      <address type='drive' controller='62' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data62'/>
      <target dev='sdbj' bus='scsi'/>
      <address type='drive' controller='63' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data63'/>
      <target dev='sdbk' bus='scsi'/>
      <address type='drive' controller='64' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='scsi' index='0'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x02' function='0x0'/>
    </controller>
    <controller type='scsi' index='1' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </controller>
    <controller type='scsi' index='2' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='scsi' index='3' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x03' function='0x0'/>
    </controller>
    <controller type='scsi' index='4' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x04' function='0x0'/>
    </controller>
    <controller type='scsi' index='5' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x05' function='0x0'/>
    </controller>
    <controller type='scsi' index='6' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x06' function='0x0'/>
    </controller>
    <controller type='scsi' index='7' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x07' function='0x0'/>
    </controller>
    <controller type='scsi' index='8' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x08' function='0x0'/>
    </controller>
    <controller type='scsi' index='9' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x09' function='0x0'/>
    </controller>
    <controller type='scsi' index='10' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0a' function='0x0'/>
    </controller>
    <controller type='scsi' index='11' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0b' function='0x0'/>
    </controller>
    <controller type='scsi' index='12' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0c' function='0x0'/>
    </controller>
    <controller type='scsi' index='13' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0d' function='0x0'/>
    </controller>
    <controller type='scsi' index='14' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0e' function='0x0'/>
    </controller>
    <controller type='scsi' index='15' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0f' function='0x0'/>
    </controller>
    <controller type='scsi' index='16' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x10' function='0x0'/>
    </controller>
    <controller type='scsi' index='17' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x11' function='0x0'/>
    </controller>
    <controller type='scsi' index='18' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x12' function='0x0'/>
    </controller>
    <controller type='scsi' index='19' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x13' function='0x0'/>
    </controller>
    <controller type='scsi' index='20' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x14' function='0x0'/>
    </controller>
    <controller type='scsi' index='21' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x15' function='0x0'/>
    </controller>
    <controller type='scsi' index='22' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x16' function='0x0'/>
    </controller>
    <controller type='scsi' index='23' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x17' function='0x0'/>
    </controller>
    <controller type='scsi' index='24' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x18' function='0x0'/>
    </controller>
    <controller type='scsi' index='25' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x19' function='0x0'/>
    </controller>
    <controller type='scsi' index='26' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1a' function='0x0'/>
    </controller>
    <controller type='scsi' index='27' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1b' function='0x0'/>
    </controller>
    <controller type='scsi' index='28' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1c' function='0x0'/>
    </controller>
    <controller type='scsi' index='29' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1d' function='0x0'/>
    </controller>
    <controller type='scsi' index='30' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='scsi' index='31' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </controller>
    <controller type='scsi' index='32' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </controller>
    <controller type='scsi' index='33' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </controller>
    <controller type='scsi' index='34' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </controller>
    <controller type='scsi' index='35' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </controller>
    <controller type='scsi' index='36' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>
    </controller>
    <controller type='scsi' index='37' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/>
    </controller>
    <controller type='scsi' index='38' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x08' function='0x0'/>
    </controller>
    <controller type='scsi' index='39' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x09' function='0x0'/>
    </controller>
    <controller type='scsi' index='40' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x0a' function='0x0'/>
    </controller>
    <controller type='scsi' index='41' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x0b' function='0x0'/>
    </controller>
    <controller type='scsi' index='42' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x0c' function='0x0'/>
    </controller>
    <controller type='scsi' index='43' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x0d' function='0x0'/>
    </controller>
    <controller type='scsi' index='44' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <controller type='scsi' index='45' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </controller>
    <controller type='scsi' index='46' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </controller>
    <controller type='scsi' index='47' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
    </controller>
    <controller type='scsi' index='48' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
    </controller>
    <controller type='scsi' index='49' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/>
    </controller>
    <controller type='scsi' index='50' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0f' function='0x0'/>
    </controller>
    <controller type='scsi' index='51' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/>
    </controller>
    <controller type='scsi' index='52' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x11' function='0x0'/>
    </controller>
    <controller type='scsi' index='53' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x12' function='0x0'/>
    </controller>
    <controller type='scsi' index='54' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x13' function='0x0'/>
    </controller>
    <controller type='scsi' index='55' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x14' function='0x0'/>
    </controller>
    <controller type='scsi' index='56' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x15' function='0x0'/>
    </controller>
    <controller type='scsi' index='57' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x16' function='0x0'/>
    </controller>
    <controller type='scsi' index='58' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x17' function='0x0'/>
    </controller>
    <controller type='scsi' index='59' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x18' function='0x0'/>
    </controller>
    <controller type='scsi' index='60' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x19' function='0x0'/>
    </controller>
    <controller type='scsi' index='61' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1a' function='0x0'/>
    </controller>
    <controller type='scsi' index='62' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
    </controller>
    <controller type='scsi' index='63' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1c' function='0x0'/>
    </controller>
    <controller type='scsi' index='64' model='virtio-scsi'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='pci' index='1' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1f' function='0x0'/>
    </controller>
  </devices>

vm disks xml (only virtio disks):
  <devices>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native'/>
      <source file='/vms/tempp/vm-os'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data2'/>
      <target dev='vdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data3'/>
      <target dev='vdc' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data4'/>
      <target dev='vdd' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data5'/>
      <target dev='vde' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data6'/>
      <target dev='vdf' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data7'/>
      <target dev='vdg' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data8'/>
      <target dev='vdh' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0f' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data9'/>
      <target dev='vdi' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data10'/>
      <target dev='vdj' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x11' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data11'/>
      <target dev='vdk' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x12' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data12'/>
      <target dev='vdl' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x13' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data13'/>
      <target dev='vdm' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x14' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data14'/>
      <target dev='vdn' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x15' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data15'/>
      <target dev='vdo' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x16' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data16'/>
      <target dev='vdp' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x17' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data17'/>
      <target dev='vdq' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x18' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data18'/>
      <target dev='vdr' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x19' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data19'/>
      <target dev='vds' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1a' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data20'/>
      <target dev='vdt' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data21'/>
      <target dev='vdu' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1c' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data22'/>
      <target dev='vdv' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data23'/>
      <target dev='vdw' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data24'/>
      <target dev='vdx' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data25'/>
      <target dev='vdy' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x03' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data26'/>
      <target dev='vdz' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data27'/>
      <target dev='vdaa' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x05' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data28'/>
      <target dev='vdab' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x06' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data29'/>
      <target dev='vdac' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x07' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data30'/>
      <target dev='vdad' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x08' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data31'/>
      <target dev='vdae' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x09' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data32'/>
      <target dev='vdaf' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0a' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data33'/>
      <target dev='vdag' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0b' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data34'/>
      <target dev='vdah' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0c' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data35'/>
      <target dev='vdai' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0d' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data36'/>
      <target dev='vdaj' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0e' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data37'/>
      <target dev='vdak' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x0f' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data38'/>
      <target dev='vdal' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x10' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data39'/>
      <target dev='vdam' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x11' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data40'/>
      <target dev='vdan' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x12' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data41'/>
      <target dev='vdao' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x13' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data42'/>
      <target dev='vdap' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x14' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data43'/>
      <target dev='vdaq' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x15' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data44'/>
      <target dev='vdar' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x16' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data45'/>
      <target dev='vdas' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x17' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data46'/>
      <target dev='vdat' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x18' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data47'/>
      <target dev='vdau' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x19' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data48'/>
      <target dev='vdav' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1a' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data49'/>
      <target dev='vdaw' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1b' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data50'/>
      <target dev='vdax' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1c' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data51'/>
      <target dev='vday' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1d' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data52'/>
      <target dev='vdaz' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1e' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data53'/>
      <target dev='vdba' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data54'/>
      <target dev='vdbb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data55'/>
      <target dev='vdbc' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data56'/>
      <target dev='vdbd' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data57'/>
      <target dev='vdbe' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data58'/>
      <target dev='vdbf' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data59'/>
      <target dev='vdbg' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data60'/>
      <target dev='vdbh' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x08' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data61'/>
      <target dev='vdbi' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x09' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data62'/>
      <target dev='vdbj' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x0a' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data63'/>
      <target dev='vdbk' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x0b' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='directsync' io='native' discard='unmap'/>
      <source file='/vms/tempp/vm-data1'/>
      <target dev='vdbl' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </disk>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='pci' index='1' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x1f' function='0x0'/>
    </controller>
  </devices>

> > (3) migrate vm and vm’disks
>
> What do you mean by 'and vm disks' - are you doing a block migration?
>
Yes, block migration.
In fact, only migration domain also reproduced.

> Dave
>
> > ----------------------------------------------------------------------
> > ---------------------------------------------------------------
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from New H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel][bug] qemu crash when migrate vm and vm's disks
  2021-04-08  9:04 Yuchen
@ 2021-04-08 11:27 ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2021-04-08 11:27 UTC (permalink / raw)
  To: Yuchen, pbonzini, mst; +Cc: qemu-devel

* Yuchen (yu.chen@h3c.com) wrote:
> When migrate vm and vm’s disks target host qemu crash due to an invalid free.
> 
> #0  object_unref (obj=0x1000) at /qemu-2.12/rpmbuild/BUILD/qemu-2.12/qom/object.c:920
> #1  0x0000560434d79e79 in memory_region_unref (mr=<optimized out>)
>     at /qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:1730
> #2  flatview_destroy (view=0x560439653880) at /qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:292
> #3  0x000056043514dfbe in call_rcu_thread (opaque=<optimized out>)
>     at /qemu-2.12/rpmbuild/BUILD/qemu-2.12/util/rcu.c:284
> #4  0x00007fbc2b36fe25 in start_thread () from /lib64/libpthread.so.0
> #5  0x00007fbc2b099bad in clone () from /lib64/libc.so.6
> 
> test base qemu-2.12.0,but use lastest qemu(v6.0.0-rc2) also reproduce.

Interesting.

> As follow patch can resolve this problem:
> https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg02272.html

That's a pci/rcu change; ccing Paolo and Micahel.

> Steps to reproduce:
> (1) Create VM (virsh define)
> (2) Add 64 virtio scsi disks

Is that hot adding the disks later, or are they included in the VM at
creation?
Can you provide a libvirt XML example?

> (3) migrate vm and vm’disks

What do you mean by 'and vm disks' - are you doing a block migration?

Dave

> -------------------------------------------------------------------------------------------------------------------------------------
> 本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
> 的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
> 或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
> 邮件!
> This e-mail and its attachments contain confidential information from New H3C, which is
> intended only for the person or entity whose address is listed above. Any use of the
> information contained herein in any way (including, but not limited to, total or partial
> disclosure, reproduction, or dissemination) by persons other than the intended
> recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
> by phone or email immediately and delete it!
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel][bug] qemu crash when migrate vm and vm's disks
@ 2021-04-08  9:04 Yuchen
  2021-04-08 11:27 ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 3+ messages in thread
From: Yuchen @ 2021-04-08  9:04 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1804 bytes --]

When migrate vm and vm’s disks target host qemu crash due to an invalid free.

#0  object_unref (obj=0x1000) at /qemu-2.12/rpmbuild/BUILD/qemu-2.12/qom/object.c:920
#1  0x0000560434d79e79 in memory_region_unref (mr=<optimized out>)
    at /qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:1730
#2  flatview_destroy (view=0x560439653880) at /qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:292
#3  0x000056043514dfbe in call_rcu_thread (opaque=<optimized out>)
    at /qemu-2.12/rpmbuild/BUILD/qemu-2.12/util/rcu.c:284
#4  0x00007fbc2b36fe25 in start_thread () from /lib64/libpthread.so.0
#5  0x00007fbc2b099bad in clone () from /lib64/libc.so.6

test base qemu-2.12.0,but use lastest qemu(v6.0.0-rc2) also reproduce.
As follow patch can resolve this problem:
https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg02272.html

Steps to reproduce:
(1) Create VM (virsh define)
(2) Add 64 virtio scsi disks
(3) migrate vm and vm’disks
-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from New H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!

[-- Attachment #2: Type: text/html, Size: 6795 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-09  7:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09  7:06 [Qemu-devel][bug] qemu crash when migrate vm and vm's disks Yuchen
  -- strict thread matches above, loose matches on Subject: below --
2021-04-08  9:04 Yuchen
2021-04-08 11:27 ` Dr. David Alan Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).