vApp role/module

Hi,
did anybody try vsphere vApp setup? (there is a support for it in pysphere) It will be quite nice to have possibility to deploy from cloning/creating to setup IP and start up fully functional VM (some internal init script which will grab set vApp and change networking)

Vasek

Just for example:

Setup script (from params/cmdb/…):

Replace vApp properties

vapp = set_vapp_property(vapp, ‘hostname’, data[item][‘hostname’])
vapp = set_vapp_property(vapp, ‘eth0_IP’, data[item][‘ipv4’])
vapp = set_vapp_property(vapp, ‘eth0_mask’, data[item][‘ipv4_netmask’])
vapp = set_vapp_property(vapp, ‘eth0_gw’, data[item][‘ipv4_gateway’])

Server init script (run once at start, after boot ansible/puppet/… can take control):

GET_VAPP=vmtoolsd --cmd "info-get guestinfo.ovfEnv"

VAPP_HOSTNAME=echo "$GET_VAPP" | grep '<Property oe:key="hostname"' | cut -d '"' -f 4
VAPP_DOMAIN=echo "$GET_VAPP" | grep '<Property oe:key="domain"' | cut -d '"' -f 4
VAPP_ETH0_IP=echo "$GET_VAPP" | grep '<Property oe:key="eth0_IP"' | cut -d '"' -f 4
VAPP_ETH0_MASK=echo "$GET_VAPP" | grep '<Property oe:key="eth0_mask"' | cut -d '"' -f 4
VAPP_ETH0_GW=echo "$GET_VAPP" | grep '<Property oe:key="eth0_gw"' | cut -d '"' -f 4

Dne pondělí 16. února 2015 8:51:22 UTC+1 Vaclav Adamec napsal(a):

So far whats working for me:

  1. Clone VM
  2. Set vAPP parameters
  3. Boot machine with connection to network

and now issues:

  1. Clone automatically start up VM (clone and power state are mutually exclusive)
  2. How to use reconfigure state ?
    2a. VLAN change (reconfigure state) it’s not working
    2b. Adding notes to VM not working (jenkins build number, date, …)
    2c. All parameters need to be set, even If you need to change one

https://gist.github.com/VAdamec/95bb855330a00dff325a

Can you open an issue on github as a feature request?

Hi,
already done, but I was not sure if it’s not my problem with playbook setup

Vasek