Vmware: Difference between revisions
From Federal Burro of Information
Jump to navigationJump to search
(Created page with " <pre> #!/usr/bin/perl -w use strict; use Data::Dumper; $/ = "\n\n"; print "Name,State,Status,Host,provisioned,used,cpu,mem,percent,vmwaretools,dnsname,evc,uuid,notes,alar...") |
No edit summary |
||
Line 1: | Line 1: | ||
== block2csv == | |||
Copy paste all selected servers in the cluster view | |||
use this to csv it. | |||
block2csv.pl | |||
<pre> | <pre> | ||
#!/usr/bin/perl -w | #!/usr/bin/perl -w | ||
Line 16: | Line 21: | ||
print $r->{'name'} .",". $r->{'state'}.",". $r->{'status'}.",". $r->{'host'}.",". $r->{'provisioned'}.",". $r->{'used'}.",". $r->{'cpu'} .",". $r->{'mem'}.",". $r->{'percent'}.",". $r->{'vmwaretools'}.",". $r->{'dnsname'}.",". $r->{'evc'} .",". $r->{'uuid'} .",". $r->{'notes'} .",". $r->{'alarms'} . "\n";} | print $r->{'name'} .",". $r->{'state'}.",". $r->{'status'}.",". $r->{'host'}.",". $r->{'provisioned'}.",". $r->{'used'}.",". $r->{'cpu'} .",". $r->{'mem'}.",". $r->{'percent'}.",". $r->{'vmwaretools'}.",". $r->{'dnsname'}.",". $r->{'evc'} .",". $r->{'uuid'} .",". $r->{'notes'} .",". $r->{'alarms'} . "\n";} | ||
</pre> | </pre> | ||
== extending a disk with no vcentre == | |||
windows: | |||
# In the OS powered down with a shutdown /i ( pointed back to itself) | |||
# ssh into the esxi host: cd to the vmfs dir and : vmkfstools --extendvirtualdisk 100G mydisk.vmdk | |||
# vim-cmd vmsvc/getallvms to figure out what the ID of the vm is | |||
# vim-cmd vmsvc/power.on 81 |
Revision as of 20:54, 17 December 2012
block2csv
Copy paste all selected servers in the cluster view
use this to csv it.
block2csv.pl
#!/usr/bin/perl -w use strict; use Data::Dumper; $/ = "\n\n"; print "Name,State,Status,Host,provisioned,used,cpu,mem,percent,vmwaretools,dnsname,evc,uuid,notes,alarms\n"; while (<>){ # print; my $r; ( $r->{'name'} , $r->{'state'}, $r->{'status'}, $r->{'host'}, $r->{'provisioned'}, $r->{'used'}, $r->{'cpu'} , $r->{'mem'}, $r->{'percent'}, $r->{'vmwaretools'}, $r->{'dnsname'}, $r->{'evc'}, $r->{'uuid'} , $r->{'notes'} , $r->{'alarms'} ) = split "\n"; print $r->{'name'} .",". $r->{'state'}.",". $r->{'status'}.",". $r->{'host'}.",". $r->{'provisioned'}.",". $r->{'used'}.",". $r->{'cpu'} .",". $r->{'mem'}.",". $r->{'percent'}.",". $r->{'vmwaretools'}.",". $r->{'dnsname'}.",". $r->{'evc'} .",". $r->{'uuid'} .",". $r->{'notes'} .",". $r->{'alarms'} . "\n";}
extending a disk with no vcentre
windows:
- In the OS powered down with a shutdown /i ( pointed back to itself)
- ssh into the esxi host: cd to the vmfs dir and : vmkfstools --extendvirtualdisk 100G mydisk.vmdk
- vim-cmd vmsvc/getallvms to figure out what the ID of the vm is
- vim-cmd vmsvc/power.on 81