[one-users] Attachiing disk to running VM error

Shankhadeep Shome shank15217 at gmail.com
Sun Aug 31 10:42:59 PDT 2014


Turns out that it's apparmor


On Sun, Aug 31, 2014 at 11:36 AM, Shankhadeep Shome <shank15217 at gmail.com>
wrote:

> Basically, I am assuming the script that creates the qcow2 file with the
> backing store configured would run first to create the local file. This
> isn't happening.
>
>
> On Sun, Aug 31, 2014 at 11:23 AM, Shankhadeep Shome <shank15217 at gmail.com>
> wrote:
>
>> Hi I am trying to attach a pre-created empty datablock to a running VM.
>> It doesn't seem like this is working correctly as the qcow file isn't
>> actually created in the directory. Am I missing something? Is this not
>> supported?
>>
>> Shankhadeep
>>
>> Sun Aug 31 10:59:59 2014 [Z0][VMM][E]: attach_disk: Command "virsh
>> --connect qemu:///system attach-device one-3
>> /var/lib/one//datastores/0/3/disk.2.attach" failed: error: Failed to attach
>> device from /var/lib/one//datastores/0/3/disk.2.attach
>> Sun Aug 31 10:59:59 2014 [Z0][VMM][I]: error: operation failed: open disk
>> image file failed
>> Sun Aug 31 10:59:59 2014 [Z0][VMM][E]: Could not attach
>> /var/lib/one//datastores/0/3/disk.2 (vdb) to one-3 *!! virsh is trying
>> to attach disk.2 to the running vm !!*
>> Sun Aug 31 10:59:59 2014 [Z0][VMM][I]: ExitCode: 1
>> Sun Aug 31 11:00:00 2014 [Z0][VMM][I]: Successfully execute transfer
>> manager driver operation: tm_detach.
>> Sun Aug 31 11:00:00 2014 [Z0][VMM][I]: Failed to execute virtualization
>> driver operation: attach_disk.
>> Sun Aug 31 11:00:00 2014 [Z0][VMM][E]: Error attaching new VM Disk: Could
>> not attach /var/lib/one//datastores/0/3/disk.2 (vdb) to one-3
>>
>>
>> Attach File
>>
>> oneadmin at oncn01:/var/lib/one/datastores/0/3# cat disk.2.attach
>> <disk type='file' device='disk'>
>>   <driver name='qemu' type='qcow2' cache='none'/>
>>   <source file='/var/lib/one//datastores/0/3/disk.2' >
>>
>>   </source>
>>
>>   <target dev='vdb'/>
>>
>> </disk>
>>
>> The vm running directory *!! Where is the disk.2 qcow2 file??? !!*
>>
>> oneadmin at oncn01:/var/lib/one/datastores/0/3# ls -l
>> total 2150519
>> -rw-rw-r-- 1 oneadmin oneadmin       1881 Aug 28 23:57 deployment.0
>> -rw-r--r-- 1 oneadmin oneadmin 2201812992 Aug 31 10:17 disk.0
>> -rw-rw-r-- 1 oneadmin oneadmin     372736 Aug 28 23:57 disk.1
>> lrwxrwxrwx 1 oneadmin oneadmin         34 Aug 28 23:57 disk.1.iso ->
>> /var/lib/one/datastores/0/3/disk.1
>> -rw-rw-r-- 1 oneadmin oneadmin        189 Aug 31 10:59 disk.2.attach
>>
>> Image Info
>>
>> oneadmin at OPENNEBULA-CONTROLLER:/var/lib/one/remotes$ oneimage show 1
>> IMAGE 1 INFORMATION
>> ID             : 1
>> NAME           : 100GB Disk
>> USER           : oneadmin
>> GROUP          : oneadmin
>> DATASTORE      : VMSTOREDT
>> TYPE           : DATABLOCK
>> REGISTER TIME  : 08/31 10:44:21
>> PERSISTENT     : No
>> SOURCE         :
>> /var/lib/one//datastores/100/fdd29fec570a5333c5808ad4a3f4ebc8
>> FSTYPE         : qcow2
>> SIZE           : 100G
>> STATE          : rdy
>> RUNNING_VMS    : 0
>>
>> PERMISSIONS
>> OWNER          : um-
>> GROUP          : ---
>> OTHER          : ---
>>
>> IMAGE TEMPLATE
>> DESCRIPTION="100GB Virtual Disk"
>> DEV_PREFIX="vd"
>> DRIVER="qcow2"
>>
>> VIRTUAL MACHINES
>>
>> Datastore Info
>>
>> oneadmin at OPENNEBULA-CONTROLLER:/var/lib/one/remotes$ onedatastore show
>> 100
>> DATASTORE 100 INFORMATION
>>  ID             : 100
>> NAME           : VMSTOREDT
>> USER           : oneadmin
>> GROUP          : oneadmin
>> CLUSTER        : DooToo
>> TYPE           : IMAGE
>> DS_MAD         : fs
>> TM_MAD         : qcow2
>> BASE PATH      : /var/lib/one//datastores/100
>> DISK_TYPE      : FILE
>>
>> DATASTORE CAPACITY
>> TOTAL:         : 199.9G
>> FREE:          : 184.8G
>> USED:          : 15.1G
>> LIMIT:         : -
>>
>> PERMISSIONS
>> OWNER          : um-
>> GROUP          : u--
>> OTHER          : ---
>>
>> DATASTORE TEMPLATE
>> BASE_PATH="/var/lib/one//datastores/"
>> CLONE_TARGET="SYSTEM"
>> DISK_TYPE="FILE"
>> DS_MAD="fs"
>> LN_TARGET="NONE"
>> TM_MAD="qcow2"
>> TYPE="IMAGE_DS"
>>
>> IMAGES
>> 0
>> 1
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140831/8cdcc166/attachment.htm>


More information about the Users mailing list