[one-users] Unable to attach raw disk to vm

Campbell, Bill bcampbell at axcess-financial.com
Thu Jan 23 08:04:45 PST 2014


So I tried this (because I know it was working before) and here's what I
noticed:

1. The 'rbd.attach' file is being placed in the /var/lib/one directory.
Javier, might want to see about getting that moved to the VMID directory
under /var/lib/one/datastores/DSID, might conflict (assume it's a bug)

2. Here's the contents of the rbd.attach:

<disk type='network' device='disk'>
  <driver name='qemu' type='raw' />
  <source protocol='rbd' name='rbd/one-20'/>
  <target dev='vdb'/>

</disk>

This should work for deployments not utilizing newer libvirt, but for
those newer versions with CephX those parameters may need to be added to
this definition (they'll work either way, the changes that require those
settings in Libvirt is just the order in which it assumes that CephX is
used).  Make sense?

-----Original Message-----
From: users-bounces at lists.opennebula.org
[mailto:users-bounces at lists.opennebula.org] On Behalf Of Javier Fontan
Sent: Thursday, January 23, 2014 10:51 AM
To: Marco Lanzotti - AD Glamor
Cc: users at lists.opennebula.org
Subject: Re: [one-users] Unable to attach raw disk to vm

I stopped reading too soon :(

--8<------
Thu Jan 23 14:10:10 2014 [VMM][D]: Message received: LOG E 27
attach_disk: Command "virsh --connect qemu:///system attach-device
one-27 /var/lib/one//datastores/0/27/disk.3.attach" failed: error:
Failed to attach device from /var/lib/one//datastores/0/27/disk.3.attach

Thu Jan 23 14:10:10 2014 [VMM][D]: Message received: LOG I 27 error:
Unable to allow access for disk path
/var/lib/one//datastores/0/27/disk.3: No such file or directory
------>8--

It seems it can not read the image to be attached. I am not used to ceph
datastore but I think that path is not correct. Maybe some other in the
list can tell you more.



On Thu, Jan 23, 2014 at 3:13 PM, Marco Lanzotti - AD Glamor
<marco.lanzotti at adglamor.com> wrote:
> On 23/01/2014 12:34, Javier Fontan wrote:
>> --8<------
>> Wed Jan 22 16:59:22 2014 [VMM][D]: Message received: LOG I 27 Command
>> execution fail: /var/tmp/one/vmm/kvm/attach_disk 'one-27'
>> '/var/lib/one//datastores/0/27/disk.3' 'hdd' '3' 'PFZ[...]Pg==' 27
>> metal10
>> ------>8--
>>
>> The device you're trying to attach is 'hdd'. That's an IDE disk in my
book.
>>
>> virtio starts with 'vd' and scsi with 'sd'.
>
> If I change prefix to 'sd' I have the same error:
>
>
> Thu Jan 23 14:10:09 2014 [VMM][D]: Message received: LOG I 27
> Successfully execute transfer manager driver operation: tm_attach.
>
> Thu Jan 23 14:10:10 2014 [VMM][D]: Message received: LOG I 27 Command
> execution fail: /var/tmp/one/vmm/kvm/attach_disk 'one-27'
> '/var/lib/one//datastores/0/27/disk.3' 'sda' '0' 'PFZ[...]EE+' 27
> metal10
>
> Thu Jan 23 14:10:10 2014 [VMM][D]: Message received: LOG E 27
> attach_disk: Command "virsh --connect qemu:///system attach-device
> one-27 /var/lib/one//datastores/0/27/disk.3.attach" failed: error:
> Failed to attach device from
> /var/lib/one//datastores/0/27/disk.3.attach
>
> Thu Jan 23 14:10:10 2014 [VMM][D]: Message received: LOG I 27 error:
> Unable to allow access for disk path
> /var/lib/one//datastores/0/27/disk.3: No such file or directory
>
> Thu Jan 23 14:10:10 2014 [VMM][D]: Message received: LOG E 27 Could
> not attach /var/lib/one//datastores/0/27/disk.3 (sda) to one-27
>
> Thu Jan 23 14:10:10 2014 [VMM][D]: Message received: LOG I 27
> ExitCode: 1
>
> Thu Jan 23 14:10:10 2014 [VMM][D]: Message received: LOG I 27 Failed
> to execute virtualization driver operation: attach_disk.
>
> Thu Jan 23 14:10:10 2014 [VMM][D]: Message received: ATTACHDISK
> FAILURE
> 27 Could not attach /var/lib/one//datastores/0/27/disk.3 (sda) to
> one-27
>
>
> Thank you,
> Marco



--
Javier Fontán Muiños
Developer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org | @OpenNebula | github.com/jfontan
_______________________________________________
Users mailing list
Users at lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
NOTICE: Protect the information in this message in accordance with the company's security policies. If you received this message in error, immediately notify the sender and destroy all copies.



More information about the Users mailing list