<div class="gmail_quote">2010/12/12 Sherif Nagy <span dir="ltr"><<a href="mailto:sherif.nagy@gmail.com" target="_blank">sherif.nagy@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div dir="ltr">thank you Matthias, i did follow what you said and i find the error,  I am connecting to vCenter server not to ESX directly and that what i have find.<br><span><br><br>Data Object Type: <b>NotImplemented</b></span><br>

</div></blockquote><div><br>That's the important information. The vCenter doesn't seem to implement the method to create a new volume. I wonder how a vSphere Client connected to a vCenter does volume creation. I'll have to investigate this.<br>
<br>Matthias<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">
          <span>Parent Managed Object ID: <b>task-267</b></span><br>          <span>Property Path: <b>info.error</b></span><br><p>Properties</p>                         <table>
<tbody><tr>                  <th>Name</th>                  <th>Type</th>                  <th>Value</th>                </tr><tr><td>dynamicProperty</td><td>DynamicProperty[]</td><td>Unset</td></tr>
<tr><td>dynamicType</td><td>string</td><td>Unset</td></tr><tr><td>faultCause</td><td>MethodFault</td><td>Unset</td></tr><tr><td>faultMessage</td><td>LocalizableMessage[]</td>
<td>Unset</td></tr></tbody></table><br><br>seems my volume's XML needs more configurations ? <br><br>Thank You,<br>Regards,<br><font color="#888888">Sherif</font><div><div></div><div><br><br><div class="gmail_quote">

On Mon, Dec 6, 2010 at 3:42 PM, Matthias Bolte <span dir="ltr"><<a href="mailto:matthias.bolte@googlemail.com" target="_blank">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;">Works for me with the given XML config.<br>
<br>
There might be some cases that could make it fail. For example the<br>
.vmdk file already exists, or the datastore is full, or the datastore<br>
is NFS backed and the ESX server lost the connection, etc.<br>
<br>
Unfortunately libvirt doesn't include detailed information into this<br>
error message. I'm currently improving this.<br>
<br>
For now you can get detailed error information from the managed object<br>
browser (mob). You can access it here:<br>
<br>
  https://<your-esx-server-name>/mob<br>
<br>
Then follow this chain of links: content > taskManager > recentTask<br>
and pick the last item in the list. It should be named like this:<br>
<br>
  haTask--vim.VirtualDiskManager.createVirtualDisk-88<br>
<br>
This is probably the failed .vmdk creation task. Then follow this<br>
second chain of links: info > error to get more detailed error<br>
information.<br>
<br>
As said the next libvirt release will include this more detailed<br>
information in error messages for failed tasks.<br>
<div><div></div><div><br>
Matthias<br>
<br>
2010/12/2 Sherif Nagy <<a href="mailto:sherif.nagy@gmail.com" target="_blank">sherif.nagy@gmail.com</a>>:<br>
> Great ! it did pass the error of directory/file thank you for the support<br>
> 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<br>
> 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<br>
> createXML<br>
>     if ret is None:raise libvirtError('virStorageVolCreateXML() failed',<br>
> 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<br>
> something ?<br>
><br>
> Regards,<br>
> sherif<br>
><br>
> On Thu, Dec 2, 2010 at 2:37 PM, Matthias Bolte<br>
> <<a href="mailto:matthias.bolte@googlemail.com" target="_blank">matthias.bolte@googlemail.com</a>> wrote:<br>
>><br>
>> This XML snippet should work<br>
>><br>
>> <volume><br>
>>  <name>test_vm/test_vm.vmdk</name><br>
>>  <allocation>0</allocation><br>
>>  <capacity unit='G'>2</capacity><br>
>> </volume><br>
>><br>
>> 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" target="_blank">sherif.nagy@gmail.com</a>>:<br>
>> > The XML i am trying to use is<br>
>> ><br>
>> > "<volume><name>test_vm.vmdk</name><key></key><allocation>0</allocation><capacity<br>
>> > unit='G'>2</capacity></volume>"<br>
>> ><br>
>> > or<br>
>> ><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" target="_blank">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<br>
>> >> > 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<br>
>> >> > 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" target="_blank">jclift@redhat.com</a>><br>
>> >> > 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 :<br>
>> >> > > 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<br>
>> >> > 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" target="_blank">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>
><br>
><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br>