-
Notifications
You must be signed in to change notification settings - Fork 166
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
Unable to set static ip address using vagrant-vshpere #80
Comments
vmware guest tools install on that SUSE Linux VM? |
Hi, Yes. vmware tools were installed on that box. Thanks!
Excuse typos Sent from Samsung Mobile
|
Hi, same problem here. The VM is a Ubuntu14.04 installed in VSphere, and converted to template. Here's my configuration:
Any idea? |
I'm having a similar problem. My guest is OS X 10.9.5 and while vagrant-vsphere creates the machine, with the following Vagrantfile it does NOT reassign the IP address of the network adapter:
|
The same issue. Any progress on that? |
Negative here. I'm having to configure the IP via Puppet inside the VM kicked off by shellscript from Vagrant. It's ugly, but it gets it done. |
I've had some success with this when bringing up Ubuntu12.04 guest OS. It is necessary to specify a customization spec in the Vagrantfile:
Where From what I've seen, it is necessary to specify the desired IP in the customization spec (the 'prompt user for an address' option results in Anyone have any idea how to create a single customization spec that will allow vagrant to specify the IP? |
Update, it appears that the IP address specified in the Vagrantfile will override whatever IP is specified in the VMWare customization-spec. |
Same issue here - any plans on fixing this? |
I think setting a static IP address with this solution only works if vSphere supports guest OS customization for that particular OS. There is a support matrix on vmware.com with a list of guest OS's and vSphere releases that work together with customization specs: It sounds like @dylancwood is on the right track. I would highly suggest reading through the vSphere documentation he linked (above) about setting up customization specs and perhaps testing your deployments through the vSphere client before attempting them with vagrant-vsphere. To my knowledge, vagrant-vsphere doesn't do any network customization itself. It just overrides the IP address used by vSphere during its guest OS customization process. |
Agreed, it looks like the guest OS has to support that. It may be ugly but something that works for me is to write a wrapper script that in addition to firing up a machine SSH's in and reconfigures that part, THEN runs Puppet or anything else I need. It's not pretty, but on OSes that don't support customization you're kinda stuck. |
Okay, another work around would be to have a DHCP server installed which would give the IP addresses when you clone the virtual machine and then do a vagrant provisioning [https://docs.vagrantup.com/v2/provisioning/shell.html], which allows you to make configurations after the vagrant up command. Thus you would be using your DHCP only temporarily and then assign the required IP after boot up |
@jwbraucher is correct, setting a static IP using If you are having problems with this feature, please state:
|
I am also experiencing the same issue with the following. vSphere 6.0 |
@karnold What VM hardware version is your guest OS? |
VM Hardware version 11 |
so I have same problem |
problem exist - does anyone planning to check it ? |
I run into same issue with Centos8 base image. After one day research I found a working workflow.
dnf update -y
dnf clean all
systemctl start vmtoolsd.service
systemctl enable vmtoolsd.service
rm -vf /etc/ssh/ssh_host_*
dnf install -y perl
systemctl stop systemd-journald.socket
find /var/log -type f -exec rm {} \;
mkdir -p /var/log/journal
cd /root ; rm -f .bash_history ; history -c
systemctl poweroff
|
I am unable to set static IP address using this plugin. I have the template in vSphere [a vCenter template] and it is a SUSE linux . The VM boots up properly, but IP address does not gets correctly assigned.
The contents of my Vagrantfile looks something like this:
Vagrant.configure("2") do |config|
config.vm.box = 'dummy'
config.vm.box_url = './example_box/dummy.box'
config.vm.provider :vsphere do |vsphere , override|
override.vm.network 'private_network' , ip: 'xxx.xxx.xxx.xxx'
vsphere.customization_spec_name = '<My_Customization_Specification_Manager_In_vSphere>'
end
config.vm.provider :vsphere do | vsphere |
vsphere.host = 'xxx.xxx.xxx.xxx'
vsphere.data_center_name = 'My_DataCenter_Name'
vsphere.data_store_name = 'My_Store_Name'
vsphere.template_name = 'Template_Name_In_vSphere'
vsphere.name = 'Name_Of_The_VM'
vsphere.user = ''
vsphere.password = ''
vsphere.insecure = true
vsphere.compute_resource_name = 'xxx.xxx.xxx.xxx'
end
I have also made the necessary settings in the Customization Specification Manager part in vShpere. When i see the virtual machine in the console, it fails to bring up the eth0 on the machine.
The text was updated successfully, but these errors were encountered: