VMware {code} Community
karthimin
Contributor
Contributor

How to get the virtual device node list

Hi all,

Can any one know about how to get the virtual device node list. in Virtual infrastructure client while creating rdm/vmdk the create wizard will ask to select any one virtual device node. i need to do this programatically,is there is any property in esxsever to get these virtual device list, i attached screen shot Sample.jpg just have a look.if any one having sample code please paste it.

Thanks

karthik.

0 Kudos
1 Reply
admin
Immortal
Immortal

VirtualMachineConfigInfo DataObject, has a property hardware, which lists out the virutal hardware of a vm. You can get the a list of the set of virtual devices belonging to the virtual machine, by fetchine the device property from the virtual hardware list. This list is unordered.

foreach (@$vm_views) {

my $vm_view = $_;

Util::trace(0,$vm_view->config->name);

my $len = @{$vm_view->config->hardware->device};

while($cnt<$len)

}

0 Kudos