VMware Cloud Community
mblake4u
Contributor
Contributor
Jump to solution

ovftool --nodisks still creates .ovf file with disk information

Hi All,

I'm using ovftool with the --noDisks option, but there still seems to be disk information in the .ovf file (see attachments).

I'm trying to import the virtual appliance on a ESXI 3.5 update 2 server, using VM Converter 4.0.1.

When I try and import the virtual appliance, I get the following error:

FAILED: Unable to download the OVF file 'http: //xxx.xxx.xxx.xxx/vm_ovf_backups/esxi-test-disk1.vmdk'.

I thought the --noDisks option would leave out any information relating to the disks - am I wrong?

Regards, Michael

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Hi Michael,

You specify the datastore by using the option --datastore (or the shorthand -ds). Try ovftool --datastore=ESXi-vmdk-1 /esxi-test.ovf vi://111.111.111.111/ instead.

- Kristian

View solution in original post

0 Kudos
6 Replies
admin
Immortal
Immortal
Jump to solution

Hi Michael,

You are right. OVF Tool behavior with this option is non-intuitive. The original intention of this option was simply to download a raw OVF descriptor for inspection from, e.g., an ESX host an discarding the disks, but I can see that in this scenario it would be nice if it removed the references to the disk in the OVF descriptor itself. For now you will have to remove the references by hand yourself. There are two ways you can do it:

  1. Either remove the element <File ovf:href="esxi-test-disk1.vmdk" ovf:id="file1" ovf:size="0"/> from the reference section and the attribute ovf:fileRef="file1" from the Disk element (this will import the OVF package without importing the data from the disk, but it will still create an empty disk),

  2. Or, remove the elements <File ovf:href="esxi-test-disk1.vmdk" ovf:id="file1" ovf:size="0"/>, <Disk ovf:allocationUnits="1073741824" ovf:capacity="5" ovf:capacityAllocationUnits="byte * 2^30" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:populatedSize="0"/> and the element <Item>
    <rasd:AddressOnParent>0</rasd:AddressOnParent>
    <rasd:ElementName>disk1</rasd:ElementName>
    <rasd:HostResource>ovf:/disk/vmdisk1</rasd:HostResource>
    <rasd:InstanceID>7</rasd:InstanceID>
    <rasd:Parent>3</rasd:Parent>
    <rasd:ResourceType>17</rasd:ResourceType>
    </Item> (this will import the OVF package without any reference to the disk).

- Kristian

mblake4u
Contributor
Contributor
Jump to solution

Thanks Kristian for the advice. I edited the .ovf and made those changes, but I still can't import the .ovf with VM Converter - I get the same error as before.

Do you think converter requires a disk? I'm wondering what would happen if someone tried to do a P2V with a diskless server/workstation..

Is there anything else I can try?

Regards, Michael

0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi Michael,

Have you tried to import the OVF package with OVF Tool? You should be able to use OVF Tool for that purpose. Depending on your setup you should be able to invoke ovftool , and get what you want.

- Kristian

0 Kudos
mblake4u
Contributor
Contributor
Jump to solution

Hi Kristian,

Thanks for the recommendation. I've been having problems with using ovftool to import a .ovf to a ESXi host (3.5 update 2).

When I run the command as you advised I get the following output:

  1. ovftool /esxi-test.ovf vi://111.111.111.111

Opening OVF source: /esxi-test.ovf

Please enter login information for target vi://111.111.111.111/

Username: root

Password: *************

Opening VI target: vi://root@111.111.111.111/

Error: No target datastore specified

Datastores found on target:

ESXi-vmdk-1

ESXi-vmdk-2

datastore1

So I run the command as follows but still get an error..

  1. ovftool /esxi-test.ovf vi://111.111.111.111/ESXi-vmdk-1/

Opening OVF source: /esxi-test.ovf

Please enter login information for target vi://111.111.111.111/

Username: root

Password: *************

Error: Locator does not refer to an object: vi://root@111.111.111.111/ESXi-vmdk-1/

Can you make any suggestions?

Regards,

Michael

0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi Michael,

You specify the datastore by using the option --datastore (or the shorthand -ds). Try ovftool --datastore=ESXi-vmdk-1 /esxi-test.ovf vi://111.111.111.111/ instead.

- Kristian

0 Kudos
mblake4u
Contributor
Contributor
Jump to solution

Hi Kristian,

Thanks for your reply - that worked. It imported the appliance to my ESXi server without any reference to the old disk.

It looks like there might be some problems with the GUI (VM Converter) but scripting will work fine Smiley Happy

Thanks again for your help, Michael

0 Kudos