VMware Cloud Community
MyersCarpenter
Contributor
Contributor

How are guests supposed to discover their assigned IP address when using Static IP Pool

I'm setting up a base ubuntu image that I plan on making into a template.  If I use DHCP vcloud directory doesn't seem to know what the IP address the VM has.  If I use Static IP Pool, vCloud director knows what IP address it wants the guest to use, but I have no idea how to have the guest use that address.

I suspect the ip address that was allocated is some how accessable via the vmware-rpctool, but unfortuantly it's not very well documented.

Right now I have this vm booted up and the guest is using DHCP while the vcloud host has it marked as using Static IP Pool

vmware-rpctool 'info-get guestinfo.ip' returns the DHCP address.

I would imaging I could use something like https://gist.github.com/3105700 this startup script to write to /etc/network/interface

Failing that, is it possible to access a key that is set with vmware-rpctool 'info-set guestinfo.xxxx foo' via the vCloud API?  I could use DHCP, and write the ip address out at startup time.

0 Kudos
2 Replies
MyersCarpenter
Contributor
Contributor

It seems like the root of my troubles is that there isn't any support for "Guest Customization" for Ubuntu 12.04.

0 Kudos
MyersCarpenter
Contributor
Contributor

After more research:

I was confused before because I missed this: To use Static IP Pool you *MUST* enable Guest Customization.

While Ubuntu 12.04 is not listed as supported as near as I can tell it works fine.  It set the hostname, static ip config, root password, and runs the customization script.

The one error I've seen in /var/log/vmware-imc/customization.log is this

Dec 29 23:47:39 customize-guest: /var/tmp/dhclient.conf.old not found

Which I think is caused because /etc/dhcp3 has been renamed to /etc/dhcp.  A fix is to create a symlink

ln -s /etc/dhcp /etc/dhcp3

Once this was in place I didn't see that error any more, and the /etc/dhcp/dhclient.conf file was updated.

0 Kudos