* [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks
@ 2016-06-22 11:51 Kevin Zhao
2016-06-22 12:04 ` Peter Maydell
2016-06-22 12:08 ` Dr. David Alan Gilbert
0 siblings, 2 replies; 11+ messages in thread
From: Kevin Zhao @ 2016-06-22 11:51 UTC (permalink / raw)
To: qemu-arm, qemu-devel
Hi All,
Greetings from Linaro. This is Kevin from Linaro, and recently I
have met a problem of qemu-system-aarch64 when I am working on virt-manager.
I have reported a bug here:
https://bugs.launchpad.net/qemu/+bug/1594239
It's mainly bout adding several SCSI disks to Aarch64 guests.
If you have a moment, pls kindly give some advice about this.Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks
2016-06-22 11:51 [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks Kevin Zhao
@ 2016-06-22 12:04 ` Peter Maydell
2016-06-22 12:34 ` Kevin Zhao
2016-06-22 12:08 ` Dr. David Alan Gilbert
1 sibling, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2016-06-22 12:04 UTC (permalink / raw)
To: Kevin Zhao; +Cc: qemu-arm, QEMU Developers
On 22 June 2016 at 12:51, Kevin Zhao <kevin.zhao@linaro.org> wrote:
> Hi All,
> Greetings from Linaro. This is Kevin from Linaro, and recently I
> have met a problem of qemu-system-aarch64 when I am working on virt-manager.
> I have reported a bug here:
> https://bugs.launchpad.net/qemu/+bug/1594239
>
> It's mainly bout adding several SCSI disks to Aarch64 guests.
> If you have a moment, pls kindly give some advice about this.Thanks
Can you reproduce the bug with a newer version of QEMU?
thanks
-- PMM
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks
2016-06-22 11:51 [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks Kevin Zhao
2016-06-22 12:04 ` Peter Maydell
@ 2016-06-22 12:08 ` Dr. David Alan Gilbert
2016-06-22 12:53 ` Kevin Zhao
1 sibling, 1 reply; 11+ messages in thread
From: Dr. David Alan Gilbert @ 2016-06-22 12:08 UTC (permalink / raw)
To: Kevin Zhao; +Cc: qemu-arm, qemu-devel
* Kevin Zhao (kevin.zhao@linaro.org) wrote:
> Hi All,
> Greetings from Linaro. This is Kevin from Linaro, and recently I
> have met a problem of qemu-system-aarch64 when I am working on virt-manager.
> I have reported a bug here:
> https://bugs.launchpad.net/qemu/+bug/1594239
>
> It's mainly bout adding several SCSI disks to Aarch64 guests.
> If you have a moment, pls kindly give some advice about this.Thanks.
Hi Kevin,
The assert you've got there really should not happen:
starting domain: internal error: process exited while connecting to monitor: qemu-system-aarch64: /build/qemu-zxCwKP/qemu-2.5+dfsg/migration/savevm.c:620: vmstate_register_with_alias_id: Assertion `!se->compat || se->instance_id == 0' failed.
I've only seen that error once before, and that was when the
device had a really long device path (lots and lots of PCI bridges)
but you've not got that.
Can you get a full backtrace from that?
If you can rebuild it and debug then adding some
prints into vmstate_register_with_alias_id should help, in particular
if you can print the name that qdev_get-dev_path returns it would
be good and also the vmsd->name value.
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks
2016-06-22 12:04 ` Peter Maydell
@ 2016-06-22 12:34 ` Kevin Zhao
2016-06-24 4:58 ` Kevin Zhao
0 siblings, 1 reply; 11+ messages in thread
From: Kevin Zhao @ 2016-06-22 12:34 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-arm, QEMU Developers
Hi Peter,
Should I use the newest version v 2.6.0 ?
On 22 June 2016 at 20:04, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 22 June 2016 at 12:51, Kevin Zhao <kevin.zhao@linaro.org> wrote:
> > Hi All,
> > Greetings from Linaro. This is Kevin from Linaro, and recently I
> > have met a problem of qemu-system-aarch64 when I am working on
> virt-manager.
> > I have reported a bug here:
> > https://bugs.launchpad.net/qemu/+bug/1594239
> >
> > It's mainly bout adding several SCSI disks to Aarch64 guests.
> > If you have a moment, pls kindly give some advice about
> this.Thanks
>
> Can you reproduce the bug with a newer version of QEMU?
>
> thanks
> -- PMM
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks
2016-06-22 12:08 ` Dr. David Alan Gilbert
@ 2016-06-22 12:53 ` Kevin Zhao
0 siblings, 0 replies; 11+ messages in thread
From: Kevin Zhao @ 2016-06-22 12:53 UTC (permalink / raw)
To: Dr. David Alan Gilbert; +Cc: qemu-arm, QEMU Developers
Hi David,
Thanks for your advice. In this condition, there are more than 1
virtio-scsi controllers for the guests will induce this error.
I'm not familiar with Qemu development. I will try to rebuild it and
get more debug info.
Thanks~
On 22 June 2016 at 20:08, Dr. David Alan Gilbert <dgilbert@redhat.com>
wrote:
> * Kevin Zhao (kevin.zhao@linaro.org) wrote:
> > Hi All,
> > Greetings from Linaro. This is Kevin from Linaro, and recently I
> > have met a problem of qemu-system-aarch64 when I am working on
> virt-manager.
> > I have reported a bug here:
> > https://bugs.launchpad.net/qemu/+bug/1594239
> >
> > It's mainly bout adding several SCSI disks to Aarch64 guests.
> > If you have a moment, pls kindly give some advice about
> this.Thanks.
>
> Hi Kevin,
> The assert you've got there really should not happen:
>
> starting domain: internal error: process exited while connecting to
> monitor: qemu-system-aarch64:
> /build/qemu-zxCwKP/qemu-2.5+dfsg/migration/savevm.c:620:
> vmstate_register_with_alias_id: Assertion `!se->compat || se->instance_id
> == 0' failed.
>
> I've only seen that error once before, and that was when the
> device had a really long device path (lots and lots of PCI bridges)
> but you've not got that.
>
> Can you get a full backtrace from that?
> If you can rebuild it and debug then adding some
> prints into vmstate_register_with_alias_id should help, in particular
> if you can print the name that qdev_get-dev_path returns it would
> be good and also the vmsd->name value.
>
> Dave
>
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks
2016-06-22 12:34 ` Kevin Zhao
@ 2016-06-24 4:58 ` Kevin Zhao
2016-06-24 7:51 ` Peter Maydell
2016-06-24 11:35 ` Cole Robinson
0 siblings, 2 replies; 11+ messages in thread
From: Kevin Zhao @ 2016-06-24 4:58 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-arm, QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 2377 bytes --]
Hi Peter,
Follow your advice, I have complied the Qemu v2.6.
stack@u202158:~$ kvm --version
QEMU emulator version 2.6.50 (v2.6.0-1280-g6f1d2d1-dirty), Copyright (c)
2003-2008 Fabrice Bellard
With this newest version, I use virt-manager to create the guest , the
xml file is in the attachment. But the Qemu return error when creating:
*error: internal error: process exited while connecting to monitor:
qemu-system-aarch64: -device
pci-bridge,chassis_nr=2,id=pci,bus=pci,addr=0x1: Duplicate ID 'pci' for
device*
The guest xml file in in attachment. But the XML worked when Qemu is
v2.4.0.
Also I delete the items in the xml :
- <controller type='pci' index='0' model='pcie-root'/>
- <controller type='pci' index='1' model='dmi-to-pci-bridge'>
- <model name='i82801b11-bridge'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
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='0x01'
function='0x0'/>
- </controller>
Using virsh create guest.xml, got the error too :
*error: internal error: process exited while connecting to monitor:
qemu-system-aarch64: -device
pci-bridge,chassis_nr=2,id=pci,bus=pci,addr=0x1: Duplicate ID 'pci' for
device.*
My test machine is Softiron, with AMD* ARM64 *server CPU. The libvirt
version is 1.3.1
Kindly need your help. You will be really appreciated :-)
Big Thanks~
Best Regards,
Kevin Zhao
On 22 June 2016 at 20:34, Kevin Zhao <kevin.zhao@linaro.org> wrote:
> Hi Peter,
> Should I use the newest version v 2.6.0 ?
>
> On 22 June 2016 at 20:04, Peter Maydell <peter.maydell@linaro.org> wrote:
>
>> On 22 June 2016 at 12:51, Kevin Zhao <kevin.zhao@linaro.org> wrote:
>> > Hi All,
>> > Greetings from Linaro. This is Kevin from Linaro, and recently I
>> > have met a problem of qemu-system-aarch64 when I am working on
>> virt-manager.
>> > I have reported a bug here:
>> > https://bugs.launchpad.net/qemu/+bug/1594239
>> >
>> > It's mainly bout adding several SCSI disks to Aarch64 guests.
>> > If you have a moment, pls kindly give some advice about
>> this.Thanks
>>
>> Can you reproduce the bug with a newer version of QEMU?
>>
>> thanks
>> -- PMM
>>
>
>
[-- Attachment #2: guest.xml --]
[-- Type: text/xml, Size: 3822 bytes --]
<domain type='kvm'>
<name>generic</name>
<uuid>3e541395-28c1-41f6-ba7a-14b648f82d84</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='aarch64' machine='virt-2.7'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/generic_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<cpu mode='host-passthrough'/>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/f23.qcow2'/>
<target dev='sda' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='scsi' index='0' model='virtio-scsi'>
<address type='virtio-mmio'/>
</controller>
<controller type='pci' index='0' model='pcie-root'/>
<controller type='pci' index='1' model='dmi-to-pci-bridge'>
<model name='i82801b11-bridge'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' 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='0x01' function='0x0'/>
</controller>
<interface type="network">
<source network="default"/>
<mac address="52:54:00:27:aa:e5"/>
<model type="virtio"/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
</devices>
</domain>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks
2016-06-24 4:58 ` Kevin Zhao
@ 2016-06-24 7:51 ` Peter Maydell
2016-06-24 11:35 ` Cole Robinson
1 sibling, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2016-06-24 7:51 UTC (permalink / raw)
To: Kevin Zhao; +Cc: qemu-arm, QEMU Developers
On 24 June 2016 at 05:58, Kevin Zhao <kevin.zhao@linaro.org> wrote:
> Hi Peter,
> Follow your advice, I have complied the Qemu v2.6.
> stack@u202158:~$ kvm --version
> QEMU emulator version 2.6.50 (v2.6.0-1280-g6f1d2d1-dirty), Copyright (c)
> 2003-2008 Fabrice Bellard
> With this newest version, I use virt-manager to create the guest , the
> xml file is in the attachment. But the Qemu return error when creating:
> error: internal error: process exited while connecting to monitor:
> qemu-system-aarch64: -device
> pci-bridge,chassis_nr=2,id=pci,bus=pci,addr=0x1: Duplicate ID 'pci' for
> device
>
> The guest xml file in in attachment. But the XML worked when Qemu is
> v2.4.0.
> Also I delete the items in the xml :
> - <controller type='pci' index='0' model='pcie-root'/>
> - <controller type='pci' index='1' model='dmi-to-pci-bridge'>
> - <model name='i82801b11-bridge'/>
> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> 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='0x01'
> function='0x0'/>
> - </controller>
> Using virsh create guest.xml, got the error too :
> error: internal error: process exited while connecting to monitor:
> qemu-system-aarch64: -device
> pci-bridge,chassis_nr=2,id=pci,bus=pci,addr=0x1: Duplicate ID 'pci' for
> device.
Sounds like maybe we just increased the error checking on
our command lines -- you can't have more than one device
with the same ID. I can't tell what the other device with the
same ID is, because this doesn't give all the command line.
If libvirt is generating invalid command lines, that would
be a libvirt bug.
thanks
-- PMM
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks
2016-06-24 4:58 ` Kevin Zhao
2016-06-24 7:51 ` Peter Maydell
@ 2016-06-24 11:35 ` Cole Robinson
2016-06-27 13:05 ` Kevin Zhao
1 sibling, 1 reply; 11+ messages in thread
From: Cole Robinson @ 2016-06-24 11:35 UTC (permalink / raw)
To: Kevin Zhao, Peter Maydell; +Cc: qemu-arm, QEMU Developers
On 06/24/2016 12:58 AM, Kevin Zhao wrote:
> Hi Peter,
> Follow your advice, I have complied the Qemu v2.6.
> stack@u202158:~$ kvm --version
> QEMU emulator version 2.6.50 (v2.6.0-1280-g6f1d2d1-dirty), Copyright (c)
> 2003-2008 Fabrice Bellard
> With this newest version, I use virt-manager to create the guest , the
> xml file is in the attachment. But the Qemu return error when creating:
> *error: internal error: process exited while connecting to monitor:
> qemu-system-aarch64: -device
> pci-bridge,chassis_nr=2,id=pci,bus=pci,addr=0x1: Duplicate ID 'pci' for
> device*
>
That's probably this libvirt issue fixed in 1.3.4 and later:
https://www.redhat.com/archives/libvirt-users/2016-April/msg00030.html
I suggest testing with libvirt.git as well, there's been aarch64 related
patches trickling in regularly
- Cole
> The guest xml file in in attachment. But the XML worked when Qemu is
> v2.4.0.
> Also I delete the items in the xml :
> - <controller type='pci' index='0' model='pcie-root'/>
> - <controller type='pci' index='1' model='dmi-to-pci-bridge'>
> - <model name='i82801b11-bridge'/>
> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> 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='0x01'
> function='0x0'/>
> - </controller>
> Using virsh create guest.xml, got the error too :
> *error: internal error: process exited while connecting to monitor:
> qemu-system-aarch64: -device
> pci-bridge,chassis_nr=2,id=pci,bus=pci,addr=0x1: Duplicate ID 'pci' for
> device.*
> My test machine is Softiron, with AMD* ARM64 *server CPU. The libvirt
> version is 1.3.1
>
> Kindly need your help. You will be really appreciated :-)
> Big Thanks~
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks
2016-06-24 11:35 ` Cole Robinson
@ 2016-06-27 13:05 ` Kevin Zhao
2016-06-27 18:23 ` Cole Robinson
0 siblings, 1 reply; 11+ messages in thread
From: Kevin Zhao @ 2016-06-27 13:05 UTC (permalink / raw)
To: Cole Robinson; +Cc: Peter Maydell, qemu-arm, QEMU Developers, Gema Gomez-Solano
[-- Attachment #1: Type: text/plain, Size: 3732 bytes --]
Hi Cole,
On 24 June 2016 at 19:35, Cole Robinson <crobinso@redhat.com> wrote:
> On 06/24/2016 12:58 AM, Kevin Zhao wrote:
> > Hi Peter,
> > Follow your advice, I have complied the Qemu v2.6.
> > stack@u202158:~$ kvm --version
> > QEMU emulator version 2.6.50 (v2.6.0-1280-g6f1d2d1-dirty), Copyright (c)
> > 2003-2008 Fabrice Bellard
> > With this newest version, I use virt-manager to create the guest ,
> the
> > xml file is in the attachment. But the Qemu return error when creating:
> > *error: internal error: process exited while connecting to monitor:
> > qemu-system-aarch64: -device
> > pci-bridge,chassis_nr=2,id=pci,bus=pci,addr=0x1: Duplicate ID 'pci' for
> > device*
> >
>
> That's probably this libvirt issue fixed in 1.3.4 and later:
>
> https://www.redhat.com/archives/libvirt-users/2016-April/msg00030.html
>
> I suggest testing with libvirt.git as well, there's been aarch64 related
> patches trickling in regularly
>
> - Cole
>
> Thanks for your valuable advice. Follow your advice, I have build the
upstream vesion
of libvirt. The libvirt version is :
root@u202158:/opt/stack/kevin/libvirt/daemon# ./libvirtd
2016-06-27 12:11:03.501+0000: 28044: info : libvirt version: 2.0.0
I stopped the system libvirtd-bin and libvirt-guests , then using libvirtd
above.
Also I have replace the system Qemu with the Qemu 2.6.50 which I have built
from upstream :
root@u202158:/opt/stack/kevin/libvirt# qemu-system-aarch64 --version
QEMU emulator version 2.6.50 (v2.6.0-1280-g6f1d2d1-dirty),
Copyright (c) 2003-2008 Fabrice Bellard
Using this XML in the attachment:
Then Run virsh command to create guest:
root@u202158:/opt/stack/kevin/libvirt/tools# ./virsh create
/opt/stack/f23.xml --console
error: Failed to create domain from /opt/stack/f23.xml
error: internal error: process exited while connecting to monitor:
2016-06-27T12:45:23.807405Z qemu-system-aarch64: -drive
file=/var/lib/libvirt/qemu/nvram/f23_VARS.fd,if=pflash,format=raw,unit=1:
Could not open '/var/lib/libvirt/qemu/nvram/f23_VARS.fd':
Permission denied
Here I met the permission problem and I'm not sure where is wrong. If I use
origin qemu-system-aarch64(installed by apt-get),I will not meet the
problem of permission..Kindly need your help, you will be really
appreciated,,, :D
$ls -l /usr/bin/qemu-system-aarch64
-rwxr-xr-x 1 root root 26935520 Jun 27 10:56 /usr/bin/qemu-system-aarch64
$ls -l /var/lib/libvirt/qemu/nvram/f23_VARS.fd
-rw------- 1 root root 67108864 Jun 20 07:27
/var/lib/libvirt/qemu/nvram/f23_VARS.fd
> > The guest xml file in in attachment. But the XML worked when Qemu is
> > v2.4.0.
> > Also I delete the items in the xml :
> > - <controller type='pci' index='0' model='pcie-root'/>
> > - <controller type='pci' index='1' model='dmi-to-pci-bridge'>
> > - <model name='i82801b11-bridge'/>
> > - <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> > 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='0x01'
> > function='0x0'/>
> > - </controller>
> > Using virsh create guest.xml, got the error too :
> > *error: internal error: process exited while connecting to monitor:
> > qemu-system-aarch64: -device
> > pci-bridge,chassis_nr=2,id=pci,bus=pci,addr=0x1: Duplicate ID 'pci' for
> > device.*
> > My test machine is Softiron, with AMD* ARM64 *server CPU. The libvirt
> > version is 1.3.1
> >
> > Kindly need your help. You will be really appreciated :-)
> > Big Thanks~
> >
>
>
[-- Attachment #2: f23.xml --]
[-- Type: text/xml, Size: 2346 bytes --]
<domain type='kvm' id='6'>
<name>f23</name>
<uuid>87460ac2-9903-4418-9e54-e713bf28e12e</uuid>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>2</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='aarch64' machine='virt-2.6'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/f23_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<cpu mode='host-passthrough'/>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/f23.qcow2'/>
<backingStore/>
<target dev='sda' bus='scsi'/>
<alias name='scsi0-0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<backingStore/>
<target dev='sdb' bus='scsi'/>
<readonly/>
<alias name='scsi0-0-0-1'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<controller type='scsi' index='0' model='virtio-scsi'>
<alias name='scsi0'/>
<address type='virtio-mmio'/>
</controller>
<controller type='pci' index='0' model='pcie-root'>
<alias name='pcie.0'/>
</controller>
<controller type='pci' index='1' model='dmi-to-pci-bridge'>
<model name='i82801b11-bridge'/>
<alias name='pci.1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<controller type='pci' index='2' model='pci-bridge'>
<model name='pci-bridge'/>
<target chassisNr='2'/>
<alias name='pci.2'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
</controller>
<serial type='pty'>
<source path='/dev/pts/7'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/7'>
<source path='/dev/pts/7'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
</devices>
</domain>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks
2016-06-27 13:05 ` Kevin Zhao
@ 2016-06-27 18:23 ` Cole Robinson
2016-06-28 13:34 ` Kevin Zhao
0 siblings, 1 reply; 11+ messages in thread
From: Cole Robinson @ 2016-06-27 18:23 UTC (permalink / raw)
To: Kevin Zhao; +Cc: Peter Maydell, qemu-arm, Gema Gomez-Solano, QEMU Developers
On 06/27/2016 09:05 AM, Kevin Zhao wrote:
> Hi Cole,
>
> On 24 June 2016 at 19:35, Cole Robinson <crobinso@redhat.com> wrote:
>
>> On 06/24/2016 12:58 AM, Kevin Zhao wrote:
>>> Hi Peter,
>>> Follow your advice, I have complied the Qemu v2.6.
>>> stack@u202158:~$ kvm --version
>>> QEMU emulator version 2.6.50 (v2.6.0-1280-g6f1d2d1-dirty), Copyright (c)
>>> 2003-2008 Fabrice Bellard
>>> With this newest version, I use virt-manager to create the guest ,
>> the
>>> xml file is in the attachment. But the Qemu return error when creating:
>>> *error: internal error: process exited while connecting to monitor:
>>> qemu-system-aarch64: -device
>>> pci-bridge,chassis_nr=2,id=pci,bus=pci,addr=0x1: Duplicate ID 'pci' for
>>> device*
>>>
>>
>> That's probably this libvirt issue fixed in 1.3.4 and later:
>>
>> https://www.redhat.com/archives/libvirt-users/2016-April/msg00030.html
>>
>> I suggest testing with libvirt.git as well, there's been aarch64 related
>> patches trickling in regularly
>>
>> - Cole
>>
>> Thanks for your valuable advice. Follow your advice, I have build the
> upstream vesion
> of libvirt. The libvirt version is :
> root@u202158:/opt/stack/kevin/libvirt/daemon# ./libvirtd
> 2016-06-27 12:11:03.501+0000: 28044: info : libvirt version: 2.0.0
> I stopped the system libvirtd-bin and libvirt-guests , then using libvirtd
> above.
>
> Also I have replace the system Qemu with the Qemu 2.6.50 which I have built
> from upstream :
> root@u202158:/opt/stack/kevin/libvirt# qemu-system-aarch64 --version
> QEMU emulator version 2.6.50 (v2.6.0-1280-g6f1d2d1-dirty),
> Copyright (c) 2003-2008 Fabrice Bellard
> Using this XML in the attachment:
> Then Run virsh command to create guest:
> root@u202158:/opt/stack/kevin/libvirt/tools# ./virsh create
> /opt/stack/f23.xml --console
> error: Failed to create domain from /opt/stack/f23.xml
> error: internal error: process exited while connecting to monitor:
> 2016-06-27T12:45:23.807405Z qemu-system-aarch64: -drive
> file=/var/lib/libvirt/qemu/nvram/f23_VARS.fd,if=pflash,format=raw,unit=1:
> Could not open '/var/lib/libvirt/qemu/nvram/f23_VARS.fd':
> Permission denied
>
> Here I met the permission problem and I'm not sure where is wrong. If I use
> origin qemu-system-aarch64(installed by apt-get),I will not meet the
> problem of permission..Kindly need your help, you will be really
> appreciated,,, :D
> $ls -l /usr/bin/qemu-system-aarch64
> -rwxr-xr-x 1 root root 26935520 Jun 27 10:56 /usr/bin/qemu-system-aarch64
> $ls -l /var/lib/libvirt/qemu/nvram/f23_VARS.fd
> -rw------- 1 root root 67108864 Jun 20 07:27
> /var/lib/libvirt/qemu/nvram/f23_VARS.fd
>
>
>
Depending on how you compiled libvirt, it may run qemu as the unprivileged
qemu:qemu user. Perhaps that VM was created with the default compilation
options to run qemu as root:root, and whatever you are trying to run it with
now is using qemu:qemu
- Cole
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks
2016-06-27 18:23 ` Cole Robinson
@ 2016-06-28 13:34 ` Kevin Zhao
0 siblings, 0 replies; 11+ messages in thread
From: Kevin Zhao @ 2016-06-28 13:34 UTC (permalink / raw)
To: Cole Robinson; +Cc: Peter Maydell, qemu-arm, Gema Gomez-Solano, QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 5354 bytes --]
On 28 June 2016 at 02:23, Cole Robinson <crobinso@redhat.com> wrote:
> On 06/27/2016 09:05 AM, Kevin Zhao wrote:
> > Hi Cole,
> >
> > On 24 June 2016 at 19:35, Cole Robinson <crobinso@redhat.com> wrote:
> >
> >> On 06/24/2016 12:58 AM, Kevin Zhao wrote:
> >>> Hi Peter,
> >>> Follow your advice, I have complied the Qemu v2.6.
> >>> stack@u202158:~$ kvm --version
> >>> QEMU emulator version 2.6.50 (v2.6.0-1280-g6f1d2d1-dirty), Copyright
> (c)
> >>> 2003-2008 Fabrice Bellard
> >>> With this newest version, I use virt-manager to create the guest ,
> >> the
> >>> xml file is in the attachment. But the Qemu return error when creating:
> >>> *error: internal error: process exited while connecting to
> monitor:
> >>> qemu-system-aarch64: -device
> >>> pci-bridge,chassis_nr=2,id=pci,bus=pci,addr=0x1: Duplicate ID 'pci' for
> >>> device*
> >>>
> >>
> >> That's probably this libvirt issue fixed in 1.3.4 and later:
> >>
> >> https://www.redhat.com/archives/libvirt-users/2016-April/msg00030.html
> >>
> >> I suggest testing with libvirt.git as well, there's been aarch64 related
> >> patches trickling in regularly
> >>
> >> - Cole
> >>
> >> Thanks for your valuable advice. Follow your advice, I have build
> the
> > upstream vesion
> > of libvirt. The libvirt version is :
> > root@u202158:/opt/stack/kevin/libvirt/daemon# ./libvirtd
> > 2016-06-27 12:11:03.501+0000: 28044: info : libvirt version:
> 2.0.0
> > I stopped the system libvirtd-bin and libvirt-guests , then using
> libvirtd
> > above.
> >
> > Also I have replace the system Qemu with the Qemu 2.6.50 which I have
> built
> > from upstream :
> > root@u202158:/opt/stack/kevin/libvirt# qemu-system-aarch64
> --version
> > QEMU emulator version 2.6.50 (v2.6.0-1280-g6f1d2d1-dirty),
> > Copyright (c) 2003-2008 Fabrice Bellard
> > Using this XML in the attachment:
> > Then Run virsh command to create guest:
> > root@u202158:/opt/stack/kevin/libvirt/tools# ./virsh create
> > /opt/stack/f23.xml --console
> > error: Failed to create domain from /opt/stack/f23.xml
> > error: internal error: process exited while connecting to
> monitor:
> > 2016-06-27T12:45:23.807405Z qemu-system-aarch64: -drive
> > file=/var/lib/libvirt/qemu/nvram/f23_VARS.fd,if=pflash,format=raw,unit=1:
> > Could not open '/var/lib/libvirt/qemu/nvram/f23_VARS.fd':
> > Permission denied
> >
> > Here I met the permission problem and I'm not sure where is wrong. If I
> use
> > origin qemu-system-aarch64(installed by apt-get),I will not meet the
> > problem of permission..Kindly need your help, you will be really
> > appreciated,,, :D
> > $ls -l /usr/bin/qemu-system-aarch64
> > -rwxr-xr-x 1 root root 26935520 Jun 27 10:56 /usr/bin/qemu-system-aarch64
> > $ls -l /var/lib/libvirt/qemu/nvram/f23_VARS.fd
> > -rw------- 1 root root 67108864 Jun 20 07:27
> > /var/lib/libvirt/qemu/nvram/f23_VARS.fd
> >
> >
> >
>
> Depending on how you compiled libvirt, it may run qemu as the unprivileged
> qemu:qemu user. Perhaps that VM was created with the default compilation
> options to run qemu as root:root, and whatever you are trying to run it
> with
> now is using qemu:qemu
>
Yeah it really the problem with privilege. I change the
/var/lib/libvirt/qemu/nvram/f23_VARS.fd
to another directory so that qemu can access it,and no permission denied
error
again.
Thank Cole.
All:
With the Qemu 2.6.50 and
libvirt(commit 03ce1328086d6937d2647d616efff29941a3e80a):
*I find that the problem that I have met before occurs again. I can
reproduce it.*
1. After launching a VM with fedora23(for example), the xml is
f23.xml in attachment.
2. Then use qemu-img command to generate a qemu disk f23-2.qcow2 and
f23-3.qcow2
3. Add f23-2.qcow2 as sdc.
$ ./virsh attach-device f23 /root/sdc.xml
sdc.xml :
<disk type="file" device="disk">
<driver name="qemu" type="qcow2"/>
<source file="/var/lib/libvirt/images/f23-2.qcow2"/>
<target dev="sdc" bus="scsi"/>
</disk>
Then in the Guest f23, we can see it takes effect immediately.
4. Add f23-3.qcow2 as sdh , also add virtio-scsi controller for sdh.
$ ./virsh edit f23
add this below
<controller type="scsi" index="1" model="virtio-scsi"/>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2"/>
<source file="/var/lib/libvirt/images/f23-4.qcow2"/>
<target dev="sdh" bus="scsi"/>
</disk>
$ ./virsh destory f23 && ./.virsh start f23
Got the error:
2016-06-28 11:37:17.017+0000: 6329: warning : qemuDomainObjTaint:3227 :
Domain id=15 name='f23' uuid=e2de65f4-5d9a-4b90-a56a-ae40f4763aec is
tainted: high-privileges
2016-06-28 11:37:17.017+0000: 6329: warning : qemuDomainObjTaint:3227 :
Domain id=15 name='f23' uuid=e2de65f4-5d9a-4b90-a56a-ae40f4763aec is
tainted: host-cpu
2016-06-28 11:37:28.546+0000: 6313: error : qemuMonitorIORead:583 : Unable
to read from monitor: Connection reset by peer
2016-06-28 11:37:28.546+0000: 6313: error : qemuProcessReportLogError:1815
: internal error: qemu unexpectedly closed the monitor:
qemu-system-aarch64: /opt/stack/kevin/qemu/migration/savevm.c:615:
vmstate_register_with_alias_id: Assertion `!se->compat || se->instance_id
== 0' failed.
*So this bug seems exist with new qemu and new libvirt. *
>
> - Cole
>
>
[-- Attachment #2: f23.xml --]
[-- Type: text/xml, Size: 1298 bytes --]
<domain type="kvm">
<name>f23</name>
<uuid>bf74479b-76da-4a84-962a-576394901f3a</uuid>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch="aarch64" machine="virt">hvm</type>
<loader readonly="yes" type="pflash">/usr/share/AAVMF/AAVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/images/f23_VARS.fd</nvram>
<boot dev="cdrom"/>
<boot dev="hd"/>
</os>
<cpu mode="host-passthrough"/>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2"/>
<source file="/var/lib/libvirt/images/f23.qcow2"/>
<target dev="sda" bus="scsi"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="/var/lib/libvirt/images/Fedora-Server-DVD-aarch64-23.iso"/>
<target dev="sdb" bus="scsi"/>
<readonly/>
</disk>
<controller type="scsi" index="0" model="virtio-scsi"/>
<interface type="network">
<source network="default"/>
<mac address="52:54:00:ce:48:26"/>
<model type="virtio"/>
</interface>
<console type="pty"/>
</devices>
</domain>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-06-28 13:34 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-22 11:51 [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks Kevin Zhao
2016-06-22 12:04 ` Peter Maydell
2016-06-22 12:34 ` Kevin Zhao
2016-06-24 4:58 ` Kevin Zhao
2016-06-24 7:51 ` Peter Maydell
2016-06-24 11:35 ` Cole Robinson
2016-06-27 13:05 ` Kevin Zhao
2016-06-27 18:23 ` Cole Robinson
2016-06-28 13:34 ` Kevin Zhao
2016-06-22 12:08 ` Dr. David Alan Gilbert
2016-06-22 12:53 ` Kevin Zhao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.