Hi,
I can list selected VirtualNic if vMotion is enabled via API. I can list all nics that can be used for vMotion via:
HostVMotionInfo vMotionInfo = hs.getConfig().getVmotion();
for (HostVirtualNic nic : vMotionInfo.getNetConfig().getCandidateVnic()) {
System.out.println(nic.getSpec().getPortgroup() + " : " + nic.getKey());
}
But how do I enable vMotion on a nic?
This change vMotionInfo.getNetConfig().setSelectedVnic((vMotionInfo.getNetConfig().getCandidateVnic()[0]).getKey()); does not affect ESXi Any suggestions?