[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] add a rbd disk by virsh attach-device , the operation fails



The problem has been resolved,.
qemu-kvm is required to support the Ceph RBD versions, and restart the virtual machine;







---------------------------------------------------------------------------


-----邮件原件-----
发件人: Martin Kletzander [mailto:mkletzan redhat com] 
发送时间: 2015年5月5日 14:15
收件人: 饶俊明
抄送: libvir-list redhat com
主题: Re: [libvirt] add a rbd disk by virsh attach-device , the operation fails

On Tue, May 05, 2015 at 03:25:39AM +0000, 饶俊明 wrote:
>Hello:
>	add a rbd disk by virsh attach-device ,the operation fails; libvirt 
>version: libvirt-0.10.2-46.el6.x86_64 operated virsh pool-info, pool-edit, attach-device domain_id /tmp/rbddisk.xml command:
>

Hi there,

this list is for upstream discussions and as I can see, the version of libvirt you are using is a little old and it's downstream.  Try whether this problem persist with e.g. the now released version 1.2.15 or feel free to contact your support specialist in case you are using RHEL.

>virsh # pool-info 0a081d22-070b-3f58-a883-78e29012b052
>Name:           0a081d22-070b-3f58-a883-78e29012b052
>UUID:           0a081d22-070b-3f58-a883-78e29012b052
>State:          running
>Persistent:     no
>Autostart:      no
>Capacity:       305.50 TiB
>Allocation:     173.06 GiB
>Available:      304.98 TiB
>
>virsh # pool-edit 0a081d22-070b-3f58-a883-78e29012b052
><pool type='rbd'>
>  <name>0a081d22-070b-3f58-a883-78e29012b052</name>
>  <uuid>0a081d22-070b-3f58-a883-78e29012b052</uuid>
>  <capacity unit='bytes'>335898508001280</capacity>
>  <allocation unit='bytes'>185824236409</allocation>
>  <available unit='bytes'>335327800442880</available>
>  <source>
>    <host name='szebs01.app.paic.com.cn' port='6789'/>
>    <name>ebs_sz_01_01</name>
>    <auth username='szbcs' type='ceph'>
>      <secret uuid='0a081d22-070b-3f58-a883-78e29012b052'/>
>    </auth>
>  </source>
></pool>
>
>virsh # attach-device 52 /tmp/rbddisk.xml
>error: Failed to attach device from /tmp/rbddisk.xml
>error: internal error unable to execute QEMU command 
>'__com.redhat_drive_add': Device 'drive-virtio-disk1' could not be 
>initialized
>

This error comes from qemu, but it doesn't say much.

Does the domain fail to start with the disk already in the XML or is this a problem just with hot-plugging?

>This context of /tmp/rbddisk.xml :
>    <disk type='network' device='disk'>
>      <driver name='qemu' type='raw' cache='none'/>
>      <auth username='szbcs'>
>        <secret type='ceph' uuid='0a081d22-070b-3f58-a883-78e29012b052'/>
>      </auth>
>      <source protocol='rbd' name='ebs_sz_01_01/5eba8a02-f251-4674-88b8-e368a07d50c5'>
>        <host name='szebs01.app.paic.com.cn' port='6789'/>
>      </source>
>      <target dev='vdb' bus='virtio'/>
>      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
>    </disk>
>
>This error information in libvirtd log file:
>2015-05-05 02:51:52.005+0000: 32082: error : 
>qemuMonitorJSONCheckError:359 : internal error unable to execute QEMU 
>command '__com.redhat_drive_add': Device 'drive-virtio-disk1' could not 
>be initialized
>

This is only one line and it doesn't say anything more than the error from virsh.  Try looking at more context, or rather in the domain's log file where qemu might've said more about the error.




********************************************************************************************************************************
The information in this email is confidential and may be legally privileged. If you have received this email in error or are not the intended recipient, please immediately notify the sender and delete this message from your computer. Any use, distribution, or copying of this email other than by the intended recipient is strictly prohibited. All messages sent to and from us may be monitored to ensure compliance with internal policies and to protect our business. 
Emails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. Anyone who communicates with us by email is taken to accept these risks. 

收发邮件者请注意:
本邮件含保密信息,若误收本邮件,请务必通知发送人并直接删去,不得使用、传播或复制本邮件。
进出邮件均受到本公司合规监控。邮件可能发生被截留、被修改、丢失、被破坏或包含计算机病毒等不安全情况。 
********************************************************************************************************************************


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]