chef-boneyard / chef-provisioning-vsphere

DEPRECATED: A chef-provisioning provisioner for VMware vSphere
MIT License
17 stars 15 forks source link

Setting network_name disconnects all devices on OSX #62

Closed bemehiser closed 6 years ago

bemehiser commented 6 years ago

Versions:

Platform Details

Scenario:

In an old version of kitchen-vsphere, it was possible to specify a network_adapter_device_key. I'm trying to upgrade our automation from kitchen-vsphere to kitchen-provision-vsphere , and I can't find the network_adapter_device_key option. Is this a missing feature?

The issue we solved with the network_adapter_device_key option is described in this ticket.

I found where the network_adapter_device_key is being set, but it doesn't set the adapter on OSX.

Steps to Reproduce:

Try to converge an osx vm.

Expected Result:

VM should create and become available for SSH

Actual Result:

Our machine starts just great, but never connects to the network because it doesn't see any network devices. Instead, I get a message which looks like

Power on VM [vm/node1-osx-10-9-75a3c422]
waiting for node1-osx-10-9-75a3c422 (50111929-da10-1cfc-b95e-ecc3b26e268b on 
vsphere://vcenter-ci-dev.company.us/sdk?use_ssl=true&insecure=true) to be ready ...
....................................................................
# eventually timeout occurs
bemehiser commented 6 years ago

I solved the issue....sort of. When I set a network_name to a network adapter on an OSX vm, it disconnects all network adapters. Apparently, I am able to clone an image and it will have an adapter by default, so a workaround is to just not set any adapters and let it figure itself out.

driver:
  name: vsphere
  driver_options:
    host: vcenter-ci-5.domain.us
    user: your_name
    password: your_mothers_maiden_name
    insecure: true
  machine_options:
    bootstrap_options:
      network_name: # if this is set, no network adapters will be set
        - 'VM LAN 10.0.x.x' # can't set this
      use_linked_clone: true
      datacenter: ci
      resource_pool: esxi-ci-14.domain.us