Vmware

From Federal Burro of Information
Revision as of 14:02, 23 December 2013 by David (talk | contribs)
Jump to navigationJump to search

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:

  1. In the OS powered down with a shutdown /i ( pointed back to itself)
  2. ssh into the esxi host: cd to the vmfs dir and : vmkfstools --extendvirtualdisk 100G mydisk.vmdk
  3. vim-cmd vmsvc/getallvms to figure out what the ID of the vm is
  4. vim-cmd vmsvc/power.on 81

cool tools

files REQUIRED for a vm

hostname.vmx
hostname.vmdk
hostname-flat.vmdk
hostname_1.vmdk
hostname_1-flat.vmdk

on files:

http://www.vmware.com/support/ws5/doc/ws_learning_files_in_a_vm.html

See Also