<p dir="ltr">Thanks a ton for the reply Matthias.<br>
I am little confused here. How to add volume on my esx server using virsh?<br>
I did SCP and copied my vmdk image to [datastore1]  testNode/cluster.vmdk and also modified my xml file as you suggested. Now when I tried starting the node it gave me an error message saying:</p>
<p dir="ltr">"error: Failed to start testNode<br>
error: internal error: Could not start domain: GenericVmConfigFault - Failed to start the virtual machine."</p>
<p dir="ltr">How to resolve this?</p>
<p dir="ltr">Regards,<br>
Varun<br>
</p>
<div class="gmail_quote">On 13 Aug 2013 13:21, "Matthias Bolte" <<a href="mailto:matthias.bolte@googlemail.com">matthias.bolte@googlemail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2013/8/12 varun bhatnagar <<a href="mailto:varun292006@gmail.com">varun292006@gmail.com</a>>:<br>
> Hi,<br>
><br>
> Today I was trying to start a node using libvirt on ESX (esxi-5.1)<br>
> hypervisor and I got the following error message:<br>
><br>
> virsh # define /local/myNode/esxdomain.xml<br>
> Domain testNode defined from /local/myNode/esxdomain.xml<br>
> virsh # start testNode<br>
> error: Failed to start domain testNode<br>
> error: internal error: Could not start domain: GenericVmConfigFault - Cannot<br>
> open the disk /vmfs/volues/5208f99d-760cf4a2-000c29520788/testNode.vmdk or<br>
> one of the snapshot disks it depends on.<br>
><br>
><br>
> I checked the datastore of my ESX server and found out that instead of file<br>
> one directory is getting created with the name cluster.vmdk and inside it<br>
> there are few more files but cluster.vmdk file is not there.<br>
><br>
> /vmfs/volumes # cd datastore1<br>
>  /vmfs/volues/5208f99d-760cf4a2-000c29520788 # ls<br>
> cluster.vmdk<br>
>  /vmfs/volues/5208f99d-760cf4a2-000c29520788 # cd cluster.vmdk<br>
>  /vmfs/volues/5208f99d-760cf4a2-000c29520788/cluster.vmdk # ls -ltr<br>
> -rw-r--r--   1  root    root   261 Aug 12 17:30 cluster.vmdk<br>
> -rw-r--r--   1  root    root   674 Aug 12 17:30 cluster.vmx<br>
> -rw-r--r--   1  root    root   0 Aug 12 17:30 cluster.vmsd<br>
>  /vmfs/volues/5208f99d-760cf4a2-000c29520788/cluster.vmdk #<br>
<br>
Okay, libvirt should not have created a directory named cluster.vmdk,<br>
I think there is a bug, but I can't test it at the moment because my<br>
ESX setup is unavailable due to a hardware failure.<br>
<br>
> Can anyone tell me how to start a node and why I am getting that error<br>
> message.<br>
> Below is my xml file.<br>
><br>
> <domain type='vmware'><br>
>   <name>testNode</name><br>
>   <uuid>50115e16-9bdc-49d7-f171-53c4d7f91710</uuid><br>
>   <memory>1048576</memory><br>
>   <currentMemory>1048576</currentMemory><br>
>   <vcpu>1</vcpu><br>
>   <os><br>
>     <type arch='x86_64'>hvm</type><br>
>   </os><br>
>   <devices><br>
>     <disk type='file' device='disk'><br>
>       <source file='[datastore1] cluster.vmdk'/><br>
<br>
Here is a problem. Typically all files of a virtual machine should be<br>
located in a subdirectory named after the virtual machine. But you<br>
placed the VMDK file in the datastore root. I think this confused<br>
libvirt. This should read<br>
<br>
<source file='[datastore1] testNode/cluster.vmdk'/><br>
<br>
instead. Also "virsh define" cannot create this VMDK file for you if<br>
it doesn't exist already, because there is not enough information in<br>
the domain XML. You need to do this yourself using "virsh vol-create".<br>
<br>
I suggest you delete the cluster.vmdk directory from the datastore and<br>
start over with the domain XML modified as suggested, but create<br>
"[datastore1] testNode/cluster.vmdk" before defining the virtual<br>
machine.<br>
<br>
--<br>
Matthias Bolte<br>
<a href="http://photron.blogspot.com" target="_blank">http://photron.blogspot.com</a><br>
</blockquote></div>