<div dir="ltr">Great ! it did pass the error of directory/file thank you for the support now i have another problem of creating the VMDK image with this XML <br><volume><name>test_vm/test_vm.vmdk</name><allocation>0</allocation><capacity unit='G'>2</capacity><target><format type='vmdk'/></target></volume><br>
<br>and error <br><br>libvir: ESX error : internal error Could not create volume<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1116, in createXML<br>
    if ret is None:raise libvirtError('virStorageVolCreateXML() failed', pool=self)<br>libvirt.libvirtError: internal error Could not create volume<br><br>may be it is an ESX server side problem or i am still missing or messing up something ?<br>
<br>Regards,<br>sherif<br><br><div class="gmail_quote">On Thu, Dec 2, 2010 at 2:37 PM, Matthias Bolte <span dir="ltr"><<a href="mailto:matthias.bolte@googlemail.com">matthias.bolte@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">This XML snippet should work<br>
<br>
<volume><br>
  <name>test_vm/test_vm.vmdk</name><br>
<div class="im">  <allocation>0</allocation><br>
  <capacity unit='G'>2</capacity><br>
</volume><br>
<br>
</div>The error message says that the volume name doesn't have the expected<br>
format <directory>/<file>. The <> might be misleading here, they don't<br>
refer to XML elements.<br>
<br>
I can probably relax this and allow files in the datastore root. The<br>
problem with a .vmdk file in the datastore root is that ESX doesn't<br>
allow a virtual machine to be registered (or defined in libvirt terms)<br>
in the datastore root. The typical layout is to have a subdirectory<br>
per virtual machine.<br>
<br>
Matthias<br>
<br>
2010/12/2 Sherif Nagy <<a href="mailto:sherif.nagy@gmail.com">sherif.nagy@gmail.com</a>>:<br>
<div><div></div><div class="h5">> The XML i am trying to use is<br>
> "<volume><name>test_vm.vmdk</name><key></key><allocation>0</allocation><capacity<br>
> unit='G'>2</capacity></volume>"<br>
><br>
> or<br>
><br>
> "<volume><name>test_vm.vmdk</name><directory>test_vm<file>test_vm.vmdk</file></directory><key></key><allocation>0</allocation><capacity<br>
> unit='G'>2</capacity></volume>"<br>
><br>
> and if i added directory and file directive i am still getting the same<br>
> error, i am not sure if i am doing something wrong or it is a bug , can<br>
> someone please advice me what is the correct XML structure for creating<br>
> volume using the ESX driver ?<br>
><br>
> Thank You<br>
> Regards,<br>
> Sherif<br>
><br>
> On Thu, Dec 2, 2010 at 2:04 PM, Justin Clift <<a href="mailto:jclift@redhat.com">jclift@redhat.com</a>> wrote:<br>
>><br>
>> Matthias, sounds like there's a bug or we need to update the docs?<br>
>><br>
>><br>
>> On 02/12/2010, at 11:02 PM, Sherif Nagy wrote:<br>
>> > yes i am using same template like KVM but it is not working, seems ESX<br>
>> > driver has a different XML structure since it is using datatstore<br>
>> > /dir/filename.vdk structure.<br>
>> ><br>
>> > so any idea what is the XML structure for creating the XML for volumes<br>
>> > using the ESX driver?<br>
>> ><br>
>> > On Thu, Dec 2, 2010 at 12:48 PM, Justin Clift <<a href="mailto:jclift@redhat.com">jclift@redhat.com</a>> wrote:<br>
>> > On 02/12/2010, at 8:18 PM, Sherif Nagy wrote:<br>
>> > > Hello,<br>
>> > ><br>
>> > > I am using libvirt 0.8.6 "python bindings " can someone point me to<br>
>> > > where i find the XML description of creating volumes using<br>
>> > > storagecolumecreateXML function ? i am getting libvir: ESX error : internal<br>
>> > > error Volume name 'nameXXXX.vmdk' doesn't have expected format<br>
>> > > '<directory>/<file>'<br>
>> ><br>
>> > Hi Sherif,<br>
>> ><br>
>> > In theory, it's probably supposed to work with the "standard" storage<br>
>> > and pool XML format documented here:<br>
>> ><br>
>> >  <a href="http://libvirt.org/formatstorage.html" target="_blank">http://libvirt.org/formatstorage.html</a><br>
>> ><br>
>> > But, it sounds like in practise that's not working for you.  Is that the<br>
>> > case?<br>
>> ><br>
>> > Regards and best wishes,<br>
>> ><br>
>> > Justin Clift<br>
>> ><br>
>><br>
>><br>
>> --<br>
>> libvir-list mailing list<br>
>> <a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a><br>
>> <a href="https://www.redhat.com/mailman/listinfo/libvir-list" target="_blank">https://www.redhat.com/mailman/listinfo/libvir-list</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>