Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.
rubiojr edited this page Dec 13, 2011 · 5 revisions

#Frequent Asked Questions

##Q. Is it possible to connect to multiple esx-hosts?

Judging by the configuration example, I don't see an easy way to connect to multiple esx hosts:

knife[:esx_host] = "Your ESX host address"
knife[:esx_username]  = "root"
knife[:esx_password]  = "secret"knife[:esx_host] = "Your ESX host address"

###A.

To be honest, I never use knife configuration because of that. I always use command line parameters --esx-host, --esx-user and --esx-password, i.e.

knife esx vm list --esx-host <my-esx-host> --esx-password secret --esx-user root

That way I can change ESX host without changing the knife.rb config file. Having said that, I'm very open to new feature requests.

##Q. How do specify the properties that are specific to a particular machine? specifically ip address and hostname?

###A.

I always use DHCP for VMs. If I need to hardcode a specific address/hostname in a VM I use Boxgrinder with the ESX delivery plugin to build a pre-configured template. You can use this boxgrinder templates and build upon:

https://github.com/rubiojr/boxgrinder-appliances/blob/master/centos-jeos/centos5-with-vmware-tools.appl

https://github.com/rubiojr/boxgrinder-appliances/blob/master/centos-jeos/centos6-with-vmware-tools.appl

https://github.com/rubiojr/boxgrinder-appliances/blob/master/ubuntu-jeos/oneiric-with-vmware-tools.appl

Unfortunately I haven't found a good way to fix an IP address at runtime since this requires communication with the guest AFAIK. I believe you can't do this via vSphere API.

Clone this wiki locally