Remove a Provisioning NIC Once Provision is Complete

Hi All,

I create a VM with two NICs, one for the network, and another for provisioning. Once it is complete, I would like to remove that provisioning NIC. Any ideas? I don’t seem to be able to remove the configuratin once it is there.

@tinaafitz Can you help out here?

What provider are you provisioning into (i.e. VMware, RHV, Amazon etc), and what’s the VM operating system?

pemcg

I am provisioning to vmware, currently Windows, but will be doing the same for Linux .

A add with:

prov       = $evm.root['miq_provision']

prov.set_option(:requested_network_adapter_count, 2)

prov.set_network_adapter(0, {:network => 'prod-vlan', :devicetype => 'VirtualVmxnet3', :is_dvs => false})
prov.set_nic_settings(0, {:addr_mode => ['dhcp', 'DHCP']})
prov.set_network_adapter(1, {:network => 'provision-vlan', :devicetype => 'VirtualVmxnet3', :is_dvs => false})
prov.set_nic_settings(1, {:addr_mode => ['dhcp', 'DHCP']})

For Linux VMs I’d probably use an Ansible playbook, and a module such as vmware_guest_network. For Windows VMs I’m guessing that you could do something similar with Ansible and/or a PowerShell script.

pemcg

Thanks pemcg, not surprised with the answer. Cheers