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

Is it possible to set up two NICs at VM creation time? #75

Open
jlerm opened this issue Dec 12, 2017 · 2 comments
Open

Is it possible to set up two NICs at VM creation time? #75

jlerm opened this issue Dec 12, 2017 · 2 comments

Comments

@jlerm
Copy link

jlerm commented Dec 12, 2017

How can I specify the IP settings for more than one NIC?

I tried the spec below, but it didn't take it...:

with_machine_options :bootstrap_options => {
num_cpus: 8,
memory_mb: 8192,
host: '10.177.65.252',
network_name: ["VM Network"],
datacenter: 'DAL10',
template_name: 'cheftemplate',
datastore: "datastore3",
additional_disk_size_gb: [50,20],
customization_spec: {
ipsettings: {
ip: '10.176.113.236',
subnetMask: '255.255.255.192',
gateway: ["10.176.113.193"],
dnsServerList: ['10.0.80.11','10.0.80.12']
},
ipsettings: {
ip: '192.176.113.236',
subnetMask: '255.255.255.192',
gateway: ["192.176.113.193"]
},
:domain => 'local'
},
:ssh => {
:user => 'root',
:password => 'password',
:paranoid => false,
}
},
:sudo => false,
:convergence_options => {
:ssl_verify_mode => :verify_none,
:ignore_failure => false
}

Thanks.

@hrmmmwhynot
Copy link

Not sure about the current state of the code base here or whether you still need it or not, but for us, we had to extend the "add_extra_nic" method under "vsphere_helpers.rb", and modify "clone_spec.config.deviceChange = changes" to "clone_spec.config.deviceChange += changes" inside the "def build(vm_template, vm_name, options)" method under "clone_spec_builder.rb"

I had to do this about a year ago + added the ability extend the existing hdd drive from template to make it usable for our vcenter environment. So, short answer is that a year ago I think the answer is no - at least not from chef-provisioning-vsphere itself without extending the functionalities from what I know.

@qubitrenegade
Copy link

👍 here. We have a few use cases where being able to add two NICs (even if on the same vds) would be extremely helpful for our test kitchen runs.

Thanks!

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

3 participants