[libvirt-users] Hotplug of disk devices in LXC failed with libvirt of version 1.0.2
hzguanqiang
hzguanqiang at corp.netease.com
Mon Jul 15 09:18:04 UTC 2013
Hi, Gao Feng
I've tried what you said, but still exists the problem:
ubuntu at lxc:~$ vir attach-disk instance-0000002c /dev/dm-0 sdb
error: Failed to attach disk
error: Unable to create device /proc/10366/root/dev/sdb: Permission denied
I think finding what it means by saying 'Unable to create device /proc/10366/root/dev/sdb: Permission denied' is the key.
But anyway, thanks for your help!
>On 07/15/2013 04:01 PM, hzguanqiang wrote:
>> Hi Daniel,
>>
>> I noticed that the patch "Add support for hotplug/unplug of disk devices in LXC" you wrote had been merged into libvirt of version 1.0.2.
>> But when I used this function, it report an error with details as following:
>>
>> ubuntu at lxc:~$ vir attach-device instance-0000002c disk.xml --config
>> error: Failed to attach device from disk.xml
>> error: Unable to create device /proc/18377/root/dev/sdb: Permission denied
>>
>> ubuntu at lxc:~$ vir attach-device instance-0000002c disk.xml
>> error: Failed to attach device from disk.xml
>> error: Unable to create device /proc/18377/root/dev/sdb: Permission denied
>>
>> ubuntu at lxc:~$ cat disk.xml
>> <disk type='block' device='disk'>
>> <driver type='raw' cache='none'/>
>> <source dev='/dev/dm-0'/>
>> <target dev='sdb' bus='scsi'/>
>> </disk>
>>
>
>You should use attach-disk not attach-device.
>
>vir attach-disk instance-0000002c /dev/dm-0 sdb
More information about the libvirt-users
mailing list