Quantcast
Channel: VMware Communities : Discussion List - vSphere Client SDK
Viewing all articles
Browse latest Browse all 2218

how to retrieve dvs name from DVS Destroyed event

$
0
0

ManagedObjectReference mordvs = dvsDestroyedEvent.getDvs().dvs;

String mor_type = mordvs.getType();

 

DistributedVirtualSwitch dvs = null;

 

dvs = (DistributedVirtualSwitch) MorUtil.createExactManagedEntity(si.getServerConnection(), mordvs);

String dvsName = dvs.getName();

 

dvs.getName() is throwing exception as

Caught Exception :  Name : java.lang.RuntimeException Message : com.vmware.vim25.ManagedObjectNotFound: VmwareDistributedVirtualSwitch:dvs-122 Trace


Viewing all articles
Browse latest Browse all 2218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>