VMware guestinfo interface

cyruspy

Renowned Member
Jul 2, 2013
73
2
73
Hello!,

I know cloud-init support is the way to go usually, but when using appliances prepared for VMware Tools, have anybody found a workround for the guestinfo interface from VMware?. The idea would be to be able to deploy those appliances with Proxmox defining arbitrary parameters.

It's used in a similar manner to pass parameters to the VM frm the hypervisor layer (like network configuration, hostname, password, etc).

Ref: https://github.com/vmware/govmomi/blob/master/govc/USAGE.md#vmchange

Regards.
 
Hi,

how should this work?
govc needs a vSphere API to communicate.
Also, the vmware-guest-tools need a communication device that does not exist in KVM/Qemu.
If this communication device is a simple serial dev, we do not know the communication protocol.
This is needed to configure the VM with the vmware-guest-tools.
 
Hi,

how should this work?
govc needs a vSphere API to communicate.
Also, the vmware-guest-tools need a communication device that does not exist in KVM/Qemu.
If this communication device is a simple serial dev, we do not know the communication protocol.
This is needed to configure the VM with the vmware-guest-tools.
Well, I've successfully deployed a VMware Cloud Builder appliance with a file with variables set passed with an ISO/CDROM. It seems to fallback to the file option when that interface is not available.

Not sure if all appliances do this fallback. The mechanism is simple, the appliances expect to receive variables and on first boot act upon then (define hostname, passwords, license serial numbers, etc)
 
I know cloud-init implementation in Proxmox works similarly, can it be extended to support arbitrary volume name, file name/path and content, if we don't want to be VMware specific?.

For example, an ISO file with volume name "OVF ENV" with a file named ovf-env.xml and the folowing content allowed me to pass the appliance parameters:

XML:
<?xml version="1.0" encoding="UTF-8"?>
<Environment xmlns="http://schemas.dmtf.org/ovf/environment/1"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:ovfenv="http://schemas.dmtf.org/ovf/environment/1"
xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" ovf:id="1/DMGR_1">

<PropertySection>
                <Property ovfenv:key="guestinfo.ROOT_PASSWORD" ovfenv:value="SuperSecure!"/>
                <Property ovfenv:key="guestinfo.ADMIN_USERNAME" ovfenv:value="admin"/>
                <Property ovfenv:key="guestinfo.ADMIN_PASSWORD" ovfenv:value="SuperSecure!"/>
                <Property ovfenv:key="guestinfo.hostname" ovfenv:value="cbuilder"/>
                <!--
                <Property ovfenv:key="guestinfo.DNS" ovfenv:value=""/>
                <Property ovfenv:key="guestinfo.domain" ovfenv:value=""/>
                <Property ovfenv:key="guestinfo.gateway" ovfenv:value=""/>
                <Property ovfenv:key="guestinfo.ip0" ovfenv:value=""/>
                <Property ovfenv:key="guestinfo.netmask0" ovfenv:value=""/>
                <Property ovfenv:key="guestinfo.ntp" ovfenv:value=""/>
                <Property ovfenv:key="guestinfo.searchpath" ovfenv:value=""/>
                -->

</PropertySection>
</Environment>

Parameters can be arbitrarily defined, in the file thay just need to be prepended with "guestinfo."

Volume created with the following command:

Bash:
mkisofs -V "OVF ENV" -R -relaxed-filenames -joliet-long -iso-level 3 -l -o /tmp/ovf-env-CloudBuilder.iso /tmp/ovf-env-CB/
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!