Jul 21 17:08:58.446: vmx| DICT --- CONFIGURATION
Jul 21 17:08:58.446: vmx| DICT config.version = 8
Jul 21 17:08:58.446: vmx| DICT virtualHW.version = 6
Jul 21 17:08:58.446: vmx| DICT scsi0.present = TRUE
Jul 21 17:08:58.446: vmx| DICT memsize = 512
config.version = "8"
virtualHW.version = "6"
scsi0.present = "TRUE"
memsize = "512"
#!/usr/bin/perl
use strict;
use warnings;
if ($#ARGV != 0) {
print "Recovers .vmx files from .log files. Usage:\n";
print "$0 logfile > vmxfile\n\n";
exit;
}
while (<>) {
# Scan until we reach the config section
if (/: vmx\| DICT --- CONFIGURATION/) { last; }
}
while (<>) {
if (/: vmx\| DICT --- \S/) { last; } # Keep going until the next section
s/^.*: vmx\| DICT\s*//; # Strip off the leading timestamp and other stuff
s/\r//; # Get rid of any \r's that may have somehow snuck in
s/([^=]*=) (.*)/$1 "$2"/; # Quote the value
print;
}
#!/usr/bin/perl
use strict;
use warnings;
if ($#ARGV != 0) {
print "Recovers .vmx files from .log files."
print "Usage:\n$0 logfile > vmxfile\n";
exit;
}
while () {
if (/: vmx\| DICT --- CONFIGURATION/) { last; }
}
while () {
if (/: vmx\| DICT --- USER DEFAULTS/) { last; }
s/.*: vmx\| DICT[ ]*//;
s/(^[^=]*=) (.*$)/$1 "$2"/;
print;
}
if ($#ARGV != 0) {
print "\nRecovers .vmx files from .log files.\n";
print "Usage: $0 logfile > vmxfile\n\n";
exit;
}
s/^([^=]*=) (.*)$/$1 "$2"/;
s/\r//;
s/\r//;
Online access to the latest VMworld Sessions & Labs and online services.
Learn morePurchase credits to redeem training and consulting services online.
Buy Now