Skip to content

Instantly share code, notes, and snippets.

@lamw
Created August 16, 2013 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lamw/6251557 to your computer and use it in GitHub Desktop.
Save lamw/6251557 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl -w
use strict;
use warnings;
use VMware::VIRuntime;
use VMware::VILib;
Opts::parse();
Opts::validate();
Util::connect();
my $vms = Vim::find_entity_views(view_type => 'VirtualMachine', properties => ['name','config.guestId']);
foreach my $vm (@$vms) {
print $vm->{'name'} . "\t" . $vm->{'config.guestId'} . "\n";
}
Util::disconnect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment