nsidc / vagrant-vsphere

VMware vSphere provider for Vagrant
Other
608 stars 166 forks source link

Option (vlan) to specify network name not for the first adapter #125

Open weldpua2008 opened 9 years ago

weldpua2008 commented 9 years ago

Hi There is an option (vlan) to specify network name for the first adapter. It would be nice (and I think consistent) if we have vlan as a hash that allows to specify network names for any adapter present. Something similar to: config.vm.vlan 1: "VLANx", 3: "vlanY" I succeeded setting vlan for 1st and 2nd adapters via vagrant-vsphere and see no problem in accomplishing the above task. Unfortunately my knowledge of ruby does not allow me to accomplish all modifications as required.

Etharin commented 9 years ago

Realise this is old but if you managed to set the name for both the first and second adapters could you share how you did it? Or how you would go about doing it?

As far as I can tell shouldn't the line "@card ||= template.config.hardware.device.grep(RbVmomi::VIM::VirtualEthernetCard).first" in clone.rb mean you can only modify the first adapter? My ruby isn't that good though so I may be wrong.