<font><div>Hi, </div><div><br></div><div>I added the default type value according to what you said, but the problem truly exist. </div><div><br></div><div>Output the default type value is raw, before modification the value is file. Error did not change.  are you no problem?</div><div><br></div><div>the TARGET arg is "sda" and do you know why?</div><div><div>-------------------------------------type raw</div><div>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</div><div>error: operation failed: adding lsi,id=scsi0,bus=pci.0,addr=0x10 device failed: Parameter 'driver' expects a driver name</div><div>Try with argument '?' for a list.</div><div>ERROR MESSAGE --8<------</div><div>Could not attach /one_images/0/17/disk.2 (sda) to one-17</div><div>ERROR MESSAGE ------>8--</div></div><div><br></div><div>Regards!</div><div>david</div></font><div><includetail><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>发件人:</b> "André Monteiro"<andre.monteir@gmail.com>;</div><div><b>发送时间:</b> 2012年10月25日(星期四) 下午4:08</div><div><b>收件人:</b> "David"<david1228@foxmail.com>; <wbr></div><div><b>抄送:</b> "users"<users@lists.opennebula.org>; <wbr></div><div><b>主题:</b> Re: [one-users] Attachdisk image to VM failed</div></div><div><br></div><div>Hi,</div><div> </div><div>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:</div>

<div> </div><div>TYPE="raw"<br>TYPE=$(echo "$TYPE"|tr A-Z a-z)<br></div><div>and leave the other expression also to override if it is not empty.</div><div><br>--<br>André Monteiro<br><br><br>
<br><br></div><div class="gmail_quote">On Thu, Oct 25, 2012 at 8:17 AM, David <span dir="ltr"><<a href="mailto:david1228@foxmail.com" target="_blank">david1228@foxmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">

<font><div>Hi, </div><div><br></div><div>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:</div><div>1. Create the datablock's image ,command:</div>

<div>  $oneimage create -d 100 --name datablock_ext4 --type DATABLOCK --size=200 --fstype ext4</div><div>  $oneimage list</div><div><div>    ID USER       GROUP      NAME            DATASTORE     SIZE TYPE PER STAT RVMS</div>

<div>     1 oneadmin   oneadmin   Centos6.0       default        10G OS    No rdy     0</div><div>     11 oneadmin   oneadmin   ext3DataBlock   fs_ds         200M DB    No rdy     0</div><div>     13 oneadmin   oneadmin   datablock_ext4  fs_ds         200M DB    No rdy     0</div>

</div><div>2. $ onevm list</div><div>    17 oneadmin oneadmin test-rhel_swap  runn    6    512M 192.168.32   0d 03h00</div><div>Start attachdisk,command:</div><div>    $onevm attachdisk 17 --image ext3DataBlock</div><div>

The VM log as follows:</div><div><div>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</div><div>Thu Oct 25 12:49:48 2012 [VMM][I]: ExitCode: 0</div>

<div>Thu Oct 25 12:49:48 2012 [VMM][I]: Successfully execute transfer manager driver operation: tm_attach.</div><div>Thu Oct 25 12:49:48 2012 [VMM][I]: Command execution fail: /var/tmp/one/vmm/kvm/attach_disk one-17 /one_images/0/17/disk.2 sda 0 PFZNTV9EUklWRVJfQUNUSU9OX0RBVEE+PEhPU1Q+MTkyLjE2OC4zMi45NzwvSE9TVD48TkVUX0RSVj5kdW1teTwvTkVUX0RSVj48TUlHUl9IT1NULz48TUlHUl9ORVRfRFJWLz48REVQTE9ZX0lEPm9uZS0xNzwvREVQTE9ZX0lEPjxMT0NBTF9ERVBMT1lNRU5UX0ZJTEUvPjxSRU1PVEVfREVQTE9ZTUVOVF9GSUxFLz48Q0hFQ0tQT0lOVF9GSUxFLz48VE1f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PC9QU1RJTUU+PFBFVElNRT4xMzUxMTM4MzU0PC9QRVRJTUU+PFJTVElNRT4xMzUxMTM4MzU0PC9SU1RJTUU+PFJFVElNRT4wPC9SRVRJTUU+PEVTVElNRT4wPC9FU1RJTUU+PEVFVElNRT4wPC9FRVRJTUU+PFJFQVNPTj4wPC9SRUFTT04+PC9ISVNUT1JZPjwvSElTVE9SWV9SRUNPUkRTPjwvVk0+PC9WTU1fRFJJVkVSX0FDVElPTl9EQVRBPg== 17 192.168.32.97</div>

<div>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</div>

<div>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</div><div>Thu Oct 25 12:49:48 2012 [VMM][I]: Try with argument '?' for a list.</div>

<div>Thu Oct 25 12:49:48 2012 [VMM][E]: Could not attach /one_images/0/17/disk.2 (sda) to one-17</div><div>Thu Oct 25 12:49:48 2012 [VMM][I]: ExitCode: 1</div><div>Thu Oct 25 12:49:48 2012 [VMM][I]: Failed to execute virtualization driver operation: attach_disk.</div>

<div>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</div><div>Thu Oct 25 12:52:41 2012 [VMM][I]: ExitCode: 0</div><div>Thu Oct 25 12:52:41 2012 [VMM][D]: Monitor Information:</div>

</div><div>what the above reason ?</div><div><div>How to successfully attch disk image to virtual machine? </div></div><div><div>Looking forward to reply!</div></div><div><br></div><div>Regards!</div><div><br></div><div>
<br>
</div><div><br></div><div><br></div></font><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br></includetail></div>