Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring Network #6

Closed
hinder90 opened this issue Aug 7, 2013 · 1 comment
Closed

Configuring Network #6

hinder90 opened this issue Aug 7, 2013 · 1 comment

Comments

@hinder90
Copy link

hinder90 commented Aug 7, 2013

Hi, I have been trying to get started by making my own base VM that vagrant will clone to use to provision hosts and I am looking to see how Vagrant can configure the network on these hosts. Ideally, I would want to be able to assign IPs to these hosts in the Vagrantfile and have them join an existing network. Is this possible or must I completely rely on what is set up in the image? Is there a way to make Vagrant "see" into the guest OS? That is kind of essential since the goal here is to be able to provision these instances with chef.

@agrauch
Copy link
Contributor

agrauch commented Aug 8, 2013

I believe there is a way for Vagrant to set the IP of the VM. The provider is calling the CloneVM_Task method in the vSphere API. One of the arguments to this method is a VirtualMachineCloneSpec object. I think setting the customization.nicSettingMap.adapter.ip property to a CustomizationFixedIP object will do the trick. See http://pubs.vmware.com/vsphere-50/index.jsp#com.vmware.wssdk.apiref.doc_50/vim.vm.CloneSpec.html.

This kind of configuration is not currently supported by the provider but could be added. We've been relying on dynamically assigned IP addresses. Vagrant stores the VM's UUID which we are using to get the IP for SSH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants