Hi,
Does anyone know of a way to add .vmx key/value pairs from an OVF?
As in: foo="bar"
As it stands I would have my newly imported OVF use VMware API (with host' ESX credentials) modify the .vmx file after boot but those changes aren't preserved unless the VM is powered down. Catch 22!
Hi Will,
Yes it is possible to add VMX configuration to an OVF descriptor (although it become less portable if you intent to deploy it on other virtualization platforms). The way you go about it is to add extra vmw:ExtraConfig elements at the end of the VirtualHardwareSection (after all the Item elements) of the VM you want to configure. The elements looks like this:
<vmw:ExtraConfig vmw:key="some.key1" vmw:value="some.value1"/>
<vmw:ExtraConfig vmw:key="some.key2" vmw:value="some.value2"/>
<vmw:ExtraConfig vmw:key="some.key3" vmw:value="some.value3"/>
There are, however, some limitations on the keys you are able to express. The OVF parser keeps a black list of all the properties you are forbidden to set in the OVF descriptor and these are:
annotation
bios.bootdelay
bios.bootretry.delay
bios.bootretry.enabled
bios.forcesetuponce
chipset.onlinestandby
cleanshutdown
config.version
cpuid.%d.eax
cpuid.%d.eax.amd
cpuid.%d.ebx
cpuid.%d.ebx.amd
cpuid.%d.ecx
cpuid.%d.ecx.amd
cpuid.%d.edx
cpuid.%d.edx.amd
debug
disable_acceleration
displayname
ethernet%d.address
ethernet%d.addresstype
ethernet%d.allowguestconnectioncontrol
ethernet%d.devname
ethernet%d.dvs.connectionid
ethernet%d.dvs.portgroupid
ethernet%d.dvs.portid
ethernet%d.dvs.switchid
ethernet%d.filename
ethernet%d.generatedaddress
ethernet%d.key
ethernet%d.name
ethernet%d.networkname
ethernet%d.present
ethernet%d.startconnected
ethernet%d.virtualdev
ethernet%d.vnet
ethernet%d.wakeonpcktrcv
extendedconfigfile
file
filesearchpath
floppy%d.allowguestconnectioncontrol
floppy%d.clientdevice
floppy%d.clientdevice
floppy%d.device
floppy%d.filename
floppy%d.filetype
floppy%d.key
floppy%d.name
floppy%d.present
floppy%d.startconnected
guestinfo.ip
guestos
guestosaltname
ide%d.present
ide%d:%d.allowguestconnectioncontrol
ide%d:%d.clientdevice
ide%d:%d.device
ide%d:%d.devicetype
ide%d:%d.exclusive
ide%d:%d.filename
ide%d:%d.key
ide%d:%d.mode
ide%d:%d.name
ide%d:%d.present
ide%d:%d.startconnected
ide%d:%d.writethrough
invmteam
log.filename
logging
managedupdate.version.history%d.name
memsize
migrate.hostlog
monitor.virtual_mmu
mouse.filename
mw.location
net.toe
numvcpus
parallel%d.allowguestconnectioncontrol
parallel%d.device
parallel%d.filename
parallel%d.filetype
parallel%d.key
parallel%d.name
parallel%d.present
parallel%d.startconnected
powertype.poweroff
powertype.poweron
powertype.reset
powertype.suspend
redologdir
sched.cpu.affinity
sched.cpu.htsharing
sched.cpu.max
sched.cpu.min
sched.cpu.shares
sched.cpu.units
sched.group
sched.mem.affinity
sched.mem.affinity
sched.mem.max
sched.mem.minsize
sched.mem.shares
sched.scsi%d:%d.shares
sched.swap.hostlocal
scsi%d.present
scsi%d.sharedbus
scsi%d.virtualdev
scsi%d:%d.allowguestconnectioncontrol
scsi%d:%d.device
scsi%d:%d.devicetype
scsi%d:%d.exclusive
scsi%d:%d.filename
scsi%d:%d.key
scsi%d:%d.mode
scsi%d:%d.name
scsi%d:%d.present
scsi%d:%d.startconnected
scsi%d:%d.writethrough
serial%d.allowguestconnectioncontrol
serial%d.filename
serial%d.filetype
serial%d.key
serial%d.name
serial%d.network.endpoint
serial%d.pipe.endpoint
serial%d.present
serial%d.startconnected
serial%d.trynorxloss
serial%d.vspc
serial%d.yieldonmsrread
snapshot.disabled
sound.allowguestconnectioncontrol
sound.autodetect
sound.device
sound.devicenr
sound.devnr
sound.filename
sound.key
sound.name
sound.present
sound.startconnected
sound.virtualdev
suspend.directory
svga.vramsize
tools.synctime
tools.upgrade.policy
toolscripts.afterpoweron
toolscripts.afterresume
toolscripts.beforepoweroff
toolscripts.beforesuspend
usb.ehci.present
usb.generic.autoconnect
usb.present
uuid.bios
uuid.ft
uuid.location
vc.uuid
virtualhw.version
vmci%d.id
vmci%d.present
vmi.present
vmware.tools.installstate
vmware.tools.internalversion
vmware.tools.lastinstallstatus
workingdir
wwn.node
wwn.port
wwn.type
- Kristian
Thanks for your response, much appreciated.
Tried hacking it into VMware Studio 1.0's mkovf xslt but saw an error on ESX4i import. I'm butchering Studio 2 OVF now...
Will DeHaan
HyTrust, Inc.