[one-users] 回复: Attachdisk image to VM failed

Ruben S. Montero rsmontero at opennebula.org
Thu Oct 25 02:45:25 PDT 2012


Hi

So as a summary, it seems that if target is not specified there is no
default_prefix set for the image, and that is missing from Sunstone?

David, could you send the contents of disk.2.attach file please?


Thanks

Ruben




On Thu, Oct 25, 2012 at 10:48 AM, André Monteiro <andre.monteir at gmail.com>wrote:

> Hi,
>
> I was executing from Sunstone. From the command line it also failed if no
> target is supplied. I ran
>
> onevm attachdisk 10 --image datablock_ext4 --target vd
> And it attached well the disk!
>
> DISK=[
>   CLONE="YES",
>   DATASTORE="default",
>   DATASTORE_ID="1",
>   DEV_PREFIX="hd",
>   DISK_ID="2",
>   IMAGE="datablock_ext4",
>   IMAGE_ID="17",
>   READONLY="NO",
>   SAVE="NO",
>
> SOURCE="/opt/opennebula/var/datastores/1/a9edec2a65484bef413bedaecb7fb85b",
>   TARGET="vd",
>   TM_MAD="shared",
>   TYPE="FILE" ]
>
>
> --
> André Monteiro
>
>
>
>
> On Thu, Oct 25, 2012 at 9:42 AM, David <david1228 at foxmail.com> wrote:
>
>> Hi,
>>
>> I added the default type value according to what you said, but the
>> problem truly exist.
>>
>> Output the default type value is raw, before modification the value is
>> file. Error did not change.  are you no problem?
>>
>> the TARGET arg is "sda" and do you know why?
>> -------------------------------------type raw
>> ERROR: attach_disk: Command "virsh --connect qemu:///system attach-device
>> one-17 /one_images/0/17/disk.2.attach" failed: error: Failed to attach
>> device from /one_images/0/17/disk.2.attach
>> error: operation failed: adding lsi,id=scsi0,bus=pci.0,addr=0x10 device
>> failed: Parameter 'driver' expects a driver name
>> Try with argument '?' for a list.
>> ERROR MESSAGE --8<------
>> Could not attach /one_images/0/17/disk.2 (sda) to one-17
>> ERROR MESSAGE ------>8--
>>
>> Regards!
>> david
>> **
>>
>>
>> ------------------ 原始邮件 ------------------
>> *发件人:* "André Monteiro"<andre.monteir at gmail.com>;
>> *发送时间:* 2012年10月25日(星期四) 下午4:08
>> *收件人:* "David"<david1228 at foxmail.com>; **
>> *抄送:* "users"<users at lists.opennebula.org>; **
>> *主题:* Re: [one-users] Attachdisk image to VM failed
>>
>> Hi,
>>
>> I had the same problem on 3.6 and sent to user list, but no answer. The
>> problem is on /var/tmp/one/vmm/kvm/attach_disk, the code expression doesn't
>> get a value. Go to line 50 and add a default type to bus like:
>>
>> TYPE="raw"
>> TYPE=$(echo "$TYPE"|tr A-Z a-z)
>> and leave the other expression also to override if it is not empty.
>>
>> --
>> André Monteiro
>>
>>
>>
>>
>> On Thu, Oct 25, 2012 at 8:17 AM, David <david1228 at foxmail.com> wrote:
>>
>>> Hi,
>>>
>>> I am testing vm atachdisk detachdisk features In OpenNebula3.8,but I
>>> can't succeed attach the disk (from image respository) to VM,Operation
>>> proccess is as follows:
>>> 1. Create the datablock's image ,command:
>>>   $oneimage create -d 100 --name datablock_ext4 --type DATABLOCK
>>> --size=200 --fstype ext4
>>>   $oneimage list
>>>     ID USER       GROUP      NAME            DATASTORE     SIZE TYPE PER
>>> STAT RVMS
>>>      1 oneadmin   oneadmin   Centos6.0       default        10G OS    No
>>> rdy     0
>>>      11 oneadmin   oneadmin   ext3DataBlock   fs_ds         200M DB
>>>  No rdy     0
>>>      13 oneadmin   oneadmin   datablock_ext4  fs_ds         200M DB
>>>  No rdy     0
>>> 2. $ onevm list
>>>     17 oneadmin oneadmin test-rhel_swap  runn    6    512M 192.168.32
>>> 0d 03h00
>>> Start attachdisk,command:
>>>     $onevm attachdisk 17 --image ext3DataBlock
>>> The VM log as follows:
>>> Thu Oct 25 12:49:48 2012 [VMM][I]: clone: Cloning
>>> compute-13-10.local:/opt/nebula/ONE/var/datastores/100/b5f5dd05338244bca82fee1b33837fc0
>>> in /one_images/0/17/disk.2
>>> Thu Oct 25 12:49:48 2012 [VMM][I]: ExitCode: 0
>>> Thu Oct 25 12:49:48 2012 [VMM][I]: Successfully execute transfer manager
>>> driver operation: tm_attach.
>>> Thu Oct 25 12:49:48 2012 [VMM][I]: Command execution fail:
>>> /var/tmp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RPjA8L1NFUT48SE9TVE5BTUU+MTkyLjE2OC4zMi45NzwvSE9TVE5BTUU+PEhJRD43PC9ISUQ+PFNUSU1FPjEzNTExMzgxMDY8L1NUSU1FPjxFVElNRT4wPC9FVElNRT48Vk1NTUFEPnZtbV9rdm08L1ZNTU1BRD48Vk5NTUFEPmR1bW15PC9WTk1NQUQ+PFRNTUFEPnNzaDwvVE1NQUQ+PERTX0xPQ0FUSU9OPi9vbmVfaW1hZ2VzPC9EU19MT0NBVElPTj48RFNfSUQ+MDwvRFNfSUQ+PFBTVElNRT4xMzUxMTM4MTA2PC9QU1RJTUU+PFBFVElNRT4xMzUxMTM4MzU0PC9QRVRJTUU+PFJTVElNRT4xMzUxMTM4MzU0PC9SU1RJTUU+PFJFVElNRT4wPC9SRVRJTUU+PEVTVElNRT4wPC9FU1RJTUU+PEVFVElNRT4wPC9FRVRJTUU+PFJFQVNPTj4wPC9SRUFTT04+PC9ISVNUT1JZPjwvSElTVE9SWV9SRUNPUkRTPjwvVk0+PC9WTU1fRFJJVkVSX0FDVElPTl9EQVRBPg==
>>> 17 192.168.32.97
>>> Thu Oct 25 12:49:48 2012 [VMM][E]: attach_disk: Command "virsh --connect
>>> qemu:///system attach-device one-17 /one_images/0/17/disk.2.attach" failed:
>>> error: Failed to attach device from /one_images/0/17/disk.2.attach
>>> Thu Oct 25 12:49:48 2012 [VMM][I]: error: operation failed: adding
>>> lsi,id=scsi0,bus=pci.0,addr=0x5 device failed: Parameter 'driver' expects a
>>> driver name
>>> Thu Oct 25 12:49:48 2012 [VMM][I]: Try with argument '?' for a list.
>>> Thu Oct 25 12:49:48 2012 [VMM][E]: Could not attach
>>> /one_images/0/17/disk.2 (sda) to one-17
>>> Thu Oct 25 12:49:48 2012 [VMM][I]: ExitCode: 1
>>> Thu Oct 25 12:49:48 2012 [VMM][I]: Failed to execute virtualization
>>> driver operation: attach_disk.
>>> Thu Oct 25 12:49:48 2012 [VMM][E]: Error attaching new VM Disk: Could
>>> not attach /one_images/0/17/disk.2 (sda) to one-17
>>> Thu Oct 25 12:52:41 2012 [VMM][I]: ExitCode: 0
>>> Thu Oct 25 12:52:41 2012 [VMM][D]: Monitor Information:
>>> what the above reason ?
>>> How to successfully attch disk image to virtual machine?
>>> Looking forward to reply!
>>>
>>> Regards!
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>
>>>
>> **
>>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
Ruben S. Montero, PhD
Project co-Lead and Chief Architect
OpenNebula - The Open Source Solution for Data Center Virtualization
www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20121025/2df24a13/attachment-0002.htm>


More information about the Users mailing list