VMware Cloud Community
heilongshanke
Contributor
Contributor

OVFTool cannot set property successfully

I want to set some properties to ovf files.

I use ovftool as bellow:

ovftool --prop:ip=10.32.23.123 --prop:dns=255.255.254.0

when this command has been executed without error showing, I still cannot see the property of ovf files.

Then I used ovftool myovffile.ovf

I still can not see the property I want to set.

what should I do?

0 Kudos
14 Replies
admin
Immortal
Immortal

unknown properties are ignored. We are working on improving this for the next version.

Can you provide the result of

"ovftool my.ovf"  (aka probe mode)

as I need to see if you use/set the fully qualified names for the properties

eske

0 Kudos
heilongshanke
Contributor
Contributor

I  set the properties as the example of "OVF Tool Guide" like this:

ovftool --prop:adminEmail=hello@gmai.com --prop:concurrentSession=200 "c:\VMware Software\OVF tools\hello.ovf"
then the result is
OVF version:   1.0
VirtualApp:    false
Name:          kv16-r1s1-001
Download Size:     5.78 GB

Deployment Sizes:
  Flat disks:     20.00 GB
  Sparse disks:    9.14 GB

Networks:
  Name:        vm16-r1-p
  Description: The vm16-r1-p network

  Name:        VM Network
  Description: The VM Network network

Virtual Hardware:
  Family:       vmx-07
  Disk Types:   SCSI-lsilogic

Manifest info:
  Manifest:    Validates

I can not see the properties which I set just now.

then I execute the command line: ovftool "c:\VMware Software\OVF tools\hello.ovf"

the result is same.

0 Kudos
admin
Immortal
Immortal

Could you attached the OVF or PM me with it if you dont want it exposed.

But it looks like you have no properties in the OVF at all, but without the OVF can can not tell.

eske

0 Kudos
heilongshanke
Contributor
Contributor

Thanks for your help. I want to know if we can set some properties using OVF Tool.

I just exported OVF Template by vSphere Client. And I want to set some properties such as IP,DNS,NETMASK to OVF Template.

But when I using OVF Tool command as it shows in "OVF Tool Guide" to set properties, it can not work.

I will attach my .ovf files to you.  Is there any way to modify the .ovf files by tools,not manual?

Thanks for your help again.

0 Kudos
admin
Immortal
Immortal

Before you can set the properties the OVF have to contain what's is called a ProductSection containing some properties.

So, before you export the OVF you should via the UI go into the settings enable vApp options for the VM, then there is a add property page where you can add the different property.

Take a look at this blog post:

http://blogs.vmware.com/vapp/2009/07/selfconfiguration-and-the-ovf-environment.html

that explain on how to setup the VM with vApp properties and how to write guest OS scripts.

(the youtube like shows every step you need to do)

and this to explain the OVF package:

http://blogs.vmware.com/vapp/2009/07/selfconfiguration-and-the-ovf-environment.html

eske

0 Kudos
heilongshanke
Contributor
Contributor

I have tried it before. And I know it works very well. We can get infomation about properties.

But I want to find a automation way to modify the OVF Template not by click and choose the options in vSphere Client.

So I want to know if there are some way to set the properties using command of tools.

Can ovftool work well when we set property to OVF Template? What should I do?

Thanks for your answer.

0 Kudos
admin
Immortal
Immortal

For automation of VMs and properties you should take a look at VMware Studio (it is also free) but this is mostly used

to create new VMs and not modify existing VMs. I am not aware of any tools except the powerCli, perl, and java frameworks (sdks) but then you will

have to build the script by your self. We have been looking into provide a tool that do that but we have not started coding it yet.

Ovftool cannot add new properties to the OVF, it can only set the values when you deploy the OVF to a vCenter.

ovftool --prop:someKey=someValue

will set the value for the OVF as is done via the UI as shown in the video.

eske

0 Kudos
heilongshanke
Contributor
Contributor

you mean that ovftool can also set property values.

If we want to add keys, we should use VCenter as video shows.

ovftool --prop:adminEmail=john@example.com --prop:concurrentSessions=200 package.ovf vi://localhost/?dns=fast-esx=host1.example.com

Does this command can set the properties(key-value) and deploy a new virtual machine in vCenter?

If it can create a new key-value pair, it can resolve my problem.

Thanks.

0 Kudos
heilongshanke
Contributor
Contributor

you mean that ovftool can also set property values.

If we want to add keys, we should use VCenter as video shows.

ovftool --prop:adminEmail=john@example.com --prop:concurrentSessions=200 package.ovf vi://localhost/?dns=fast-esx=host1.example.com

Does this command can set the properties(key-value) and deploy a new virtual machine in vCenter?

If it can create a new key-value pair, it can resolve my problem.

Thanks.

0 Kudos
rwellum
Contributor
Contributor

I don't see vApp properties (vsphere 4.1.0) - is my version of vsphere to old to support this?

0 Kudos
heilongshanke
Contributor
Contributor

You should set app property in vSphere Client which access to vCenter not ESX.

0 Kudos
rwellum
Contributor
Contributor

Thank you - that worked.

0 Kudos
nsom
Contributor
Contributor

Hi I have successfully set the ovf properties like ip, dns,gateway etc,  I can see that on the vm vapp properties when I deploy one via ova using ovftool, the problem is these properties are not getting set to the actual windows vm , because when I do an ipconfig /all I dont see any of these properties getting reflected, how do these values could be set to the underlying windows vm

0 Kudos
nsom
Contributor
Contributor

The guestinfo.ovfENV displays all the keys provided in the vapp settings 

Inspite of that these are not configured on the windows vms, attaching the screenshots of both.


0 Kudos