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)
}