<div dir="ltr">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.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sun, Aug 31, 2014 at 11:23 AM, Shankhadeep Shome <span dir="ltr"><<a href="mailto:shank15217@gmail.com" target="_blank">shank15217@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><font face="courier new, monospace">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?</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">Shankhadeep</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">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</font></div>
<div><font face="courier new, monospace">Sun Aug 31 10:59:59 2014 [Z0][VMM][I]: error: operation failed: open disk image file failed</font></div><div><font face="courier new, monospace">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 </font><b style="font-family:'courier new',monospace">!! virsh is trying to attach disk.2 to the running vm !!</b></div>
<div><font face="courier new, monospace">Sun Aug 31 10:59:59 2014 [Z0][VMM][I]: ExitCode: 1</font></div><div><font face="courier new, monospace">Sun Aug 31 11:00:00 2014 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_detach.</font></div>
<div><font face="courier new, monospace">Sun Aug 31 11:00:00 2014 [Z0][VMM][I]: Failed to execute virtualization driver operation: attach_disk.</font></div><div><font face="courier new, monospace">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</font></div>
</div><div><br></div><div><br></div><div>Attach File</div><div><br></div><div><font face="courier new, monospace"><div>oneadmin@oncn01:/var/lib/one/datastores/0/3# cat disk.2.attach</div><div><disk type='file' device='disk'></div>
<div> <driver name='qemu' type='qcow2' cache='none'/></div><div> <source file='/var/lib/one//datastores/0/3/disk.2' ></div><div><br></div><div> </source></div><div><br>
</div><div> <target dev='vdb'/></div><div><br></div><div></disk></div><div><br></div><div>The vm running directory <b>!! Where is the disk.2 qcow2 file??? !!</b></div><div><br></div></font></div><div>
<font face="courier new, monospace"><div>oneadmin@oncn01:/var/lib/one/datastores/0/3# ls -l</div><div>total 2150519</div><div>-rw-rw-r-- 1 oneadmin oneadmin 1881 Aug 28 23:57 deployment.0</div><div>-rw-r--r-- 1 oneadmin oneadmin 2201812992 Aug 31 10:17 disk.0</div>
<div>-rw-rw-r-- 1 oneadmin oneadmin 372736 Aug 28 23:57 disk.1</div><div>lrwxrwxrwx 1 oneadmin oneadmin 34 Aug 28 23:57 disk.1.iso -> /var/lib/one/datastores/0/3/disk.1</div><div>-rw-rw-r-- 1 oneadmin oneadmin 189 Aug 31 10:59 disk.2.attach</div>
<div><br></div><div>Image Info</div><div><br></div></font></div><div><font face="courier new, monospace">oneadmin@OPENNEBULA-CONTROLLER:/var/lib/one/remotes$ oneimage show 1</font></div><div><font face="courier new, monospace">IMAGE 1 INFORMATION</font></div>
<div><font face="courier new, monospace">ID : 1</font></div><div><font face="courier new, monospace">NAME : 100GB Disk</font></div><div><font face="courier new, monospace">USER : oneadmin</font></div>
<div><font face="courier new, monospace">GROUP : oneadmin</font></div><div><font face="courier new, monospace">DATASTORE : VMSTOREDT</font></div><div><font face="courier new, monospace">TYPE : DATABLOCK</font></div>
<div><font face="courier new, monospace">REGISTER TIME : 08/31 10:44:21</font></div><div><font face="courier new, monospace">PERSISTENT : No</font></div><div><font face="courier new, monospace">SOURCE : /var/lib/one//datastores/100/fdd29fec570a5333c5808ad4a3f4ebc8</font></div>
<div><font face="courier new, monospace">FSTYPE : qcow2</font></div><div><font face="courier new, monospace">SIZE : 100G</font></div><div><font face="courier new, monospace">STATE : rdy</font></div>
<div><font face="courier new, monospace">RUNNING_VMS : 0</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">PERMISSIONS</font></div><div><font face="courier new, monospace">OWNER : um-</font></div>
<div><font face="courier new, monospace">GROUP : ---</font></div><div><font face="courier new, monospace">OTHER : ---</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">IMAGE TEMPLATE</font></div>
<div><font face="courier new, monospace">DESCRIPTION="100GB Virtual Disk"</font></div><div><font face="courier new, monospace">DEV_PREFIX="vd"</font></div><div><font face="courier new, monospace">DRIVER="qcow2"</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">VIRTUAL MACHINES</font></div><div><br></div><div><font face="courier new, monospace">Datastore Info</font></div><div><font face="courier new, monospace"><br>
</font></div><div><font face="courier new, monospace">oneadmin@OPENNEBULA-CONTROLLER:/var/lib/one/remotes$ onedatastore show 100</font></div><div><font face="courier new, monospace">DATASTORE 100 INFORMATION</font></div>
<div>
<font face="courier new, monospace">ID : 100</font></div><div><font face="courier new, monospace">NAME : VMSTOREDT</font></div><div><font face="courier new, monospace">USER : oneadmin</font></div>
<div><font face="courier new, monospace">GROUP : oneadmin</font></div><div><font face="courier new, monospace">CLUSTER : DooToo</font></div><div><font face="courier new, monospace">TYPE : IMAGE</font></div>
<div><font face="courier new, monospace">DS_MAD : fs</font></div><div><font face="courier new, monospace">TM_MAD : qcow2</font></div><div><font face="courier new, monospace">BASE PATH : /var/lib/one//datastores/100</font></div>
<div><font face="courier new, monospace">DISK_TYPE : FILE</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">DATASTORE CAPACITY</font></div><div><font face="courier new, monospace">TOTAL: : 199.9G</font></div>
<div><font face="courier new, monospace">FREE: : 184.8G</font></div><div><font face="courier new, monospace">USED: : 15.1G</font></div><div><font face="courier new, monospace">LIMIT: : -</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">PERMISSIONS</font></div><div><font face="courier new, monospace">OWNER : um-</font></div><div><font face="courier new, monospace">GROUP : u--</font></div>
<div><font face="courier new, monospace">OTHER : ---</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">DATASTORE TEMPLATE</font></div><div><font face="courier new, monospace">BASE_PATH="/var/lib/one//datastores/"</font></div>
<div><font face="courier new, monospace">CLONE_TARGET="SYSTEM"</font></div><div><font face="courier new, monospace">DISK_TYPE="FILE"</font></div><div><font face="courier new, monospace">DS_MAD="fs"</font></div>
<div><font face="courier new, monospace">LN_TARGET="NONE"</font></div><div><font face="courier new, monospace">TM_MAD="qcow2"</font></div><div><font face="courier new, monospace">TYPE="IMAGE_DS"</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">IMAGES</font></div><div><font face="courier new, monospace">0</font></div><div><font face="courier new, monospace">1</font></div>
<div><br></div></div>
</blockquote></div><br></div>