[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several
From: |
Kevin Zhao |
Subject: |
Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks |
Date: |
Tue, 28 Jun 2016 21:34:18 +0800 |
On 28 June 2016 at 02:23, Cole Robinson <address@hidden> wrote:
> On 06/27/2016 09:05 AM, Kevin Zhao wrote:
> > Hi Cole,
> >
> > On 24 June 2016 at 19:35, Cole Robinson <address@hidden> wrote:
> >
> >> On 06/24/2016 12:58 AM, Kevin Zhao wrote:
> >>> Hi Peter,
> >>> Follow your advice, I have complied the Qemu v2.6.
> >>> address@hidden:~$ 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 :
> > address@hidden:/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 :
> > address@hidden:/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:
> > address@hidden:/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
>
>
f23.xml
Description: Text Data
- [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks, Kevin Zhao, 2016/06/22
- Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks, Peter Maydell, 2016/06/22
- Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks, Kevin Zhao, 2016/06/22
- Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks, Kevin Zhao, 2016/06/24
- Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks, Peter Maydell, 2016/06/24
- Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks, Cole Robinson, 2016/06/24
- Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks, Kevin Zhao, 2016/06/27
- Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks, Cole Robinson, 2016/06/27
- Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks,
Kevin Zhao <=
Re: [Qemu-devel] Question about a qemu Aarch64 error when adding several SCSI disks, Dr. David Alan Gilbert, 2016/06/22