2013/8/12 varun bhatnagar <varun292006(a)gmail.com>:
Hi,
Today I was trying to start a node using libvirt on ESX (esxi-5.1)
hypervisor and I got the following error message:
virsh # define /local/myNode/esxdomain.xml
Domain testNode defined from /local/myNode/esxdomain.xml
virsh # start testNode
error: Failed to start domain testNode
error: internal error: Could not start domain: GenericVmConfigFault - Cannot
open the disk /vmfs/volues/5208f99d-760cf4a2-000c29520788/testNode.vmdk or
one of the snapshot disks it depends on.
I checked the datastore of my ESX server and found out that instead of file
one directory is getting created with the name cluster.vmdk and inside it
there are few more files but cluster.vmdk file is not there.
/vmfs/volumes # cd datastore1
/vmfs/volues/5208f99d-760cf4a2-000c29520788 # ls
cluster.vmdk
/vmfs/volues/5208f99d-760cf4a2-000c29520788 # cd cluster.vmdk
/vmfs/volues/5208f99d-760cf4a2-000c29520788/cluster.vmdk # ls -ltr
-rw-r--r-- 1 root root 261 Aug 12 17:30 cluster.vmdk
-rw-r--r-- 1 root root 674 Aug 12 17:30 cluster.vmx
-rw-r--r-- 1 root root 0 Aug 12 17:30 cluster.vmsd
/vmfs/volues/5208f99d-760cf4a2-000c29520788/cluster.vmdk #
Okay, libvirt should not have created a directory named cluster.vmdk,
I think there is a bug, but I can't test it at the moment because my
ESX setup is unavailable due to a hardware failure.
Can anyone tell me how to start a node and why I am getting that
error
message.
Below is my xml file.
<domain type='vmware'>
<name>testNode</name>
<uuid>50115e16-9bdc-49d7-f171-53c4d7f91710</uuid>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64'>hvm</type>
</os>
<devices>
<disk type='file' device='disk'>
<source file='[datastore1] cluster.vmdk'/>
Here is a problem. Typically all files of a virtual machine should be
located in a subdirectory named after the virtual machine. But you
placed the VMDK file in the datastore root. I think this confused
libvirt. This should read
<source file='[datastore1] testNode/cluster.vmdk'/>
instead. Also "virsh define" cannot create this VMDK file for you if
it doesn't exist already, because there is not enough information in
the domain XML. You need to do this yourself using "virsh vol-create".
I suggest you delete the cluster.vmdk directory from the datastore and
start over with the domain XML modified as suggested, but create
"[datastore1] testNode/cluster.vmdk" before defining the virtual
machine.
--
Matthias Bolte
http://photron.blogspot.com