Reuben13
Contributor
Contributor

Unable to add host with used/busy NIC to a VDS

Creation of a new DVS never shows a busy/used NIC. But If the DVS is already created then we can add hosts with busy/used nic (which are plugged to other VSS or DVS).

Manually we can do this. While doing it from coding it is throwing error that NIC is busy. Any idea how to do that ?

This is what i am doing while reconfiguring the dvs.

        dvs_config_spec = vim.DistributedVirtualSwitch.ConfigSpec() 

        dvs_config_spec.configVersion = dvs.config.configVersion 

    for host in hosts: 

        dvs_host_config = vim.dvs.HostMember.ConfigSpec() 

        dvs_host_config.operation = vim.ConfigSpecOperation.add 

        dvs_host_config.backing = vim.dvs.HostMember.PnicBacking() 

        pnic_spec = vim.dvs.HostMember. \ 

        PnicSpec(pnicDevice=pnic_device.lower()) 

        dvs_host_config.backing.pnicSpec = [pnic_spec] 

        dvs_host_config.host = host 

        dvs_config_spec.host = [dvs_host_config] 

        dvs.ReconfigureDvs_Task(dvs_config_sp

0 Kudos
0 Replies