projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve VMware GSX Server support.
[pintos-anon]
/
src
/
utils
/
pintos
diff --git
a/src/utils/pintos
b/src/utils/pintos
index 74b1c796ae6e1959581547e65dbe8dca3edd0b53..744889a733e898a73d44111c8ca355b94604e2c0 100755
(executable)
--- a/
src/utils/pintos
+++ b/
src/utils/pintos
@@
-6,7
+6,7
@@
$mem = 4;
$headless = 0;
while (@ARGV) {
my ($arg) = shift (@ARGV);
$headless = 0;
while (@ARGV) {
my ($arg) = shift (@ARGV);
- if ($arg =~ /--(bochs|qemu|
vmware
)$/) {
+ if ($arg =~ /--(bochs|qemu|
gsx
)$/) {
$sim = $1;
} elsif ($arg =~ /--(monitor|gdb)$/) {
$debug = $1;
$sim = $1;
} elsif ($arg =~ /--(monitor|gdb)$/) {
$debug = $1;
@@
-77,6
+77,8
@@
while (@ARGV) {
close (SRC);
exit 0;
close (SRC);
exit 0;
+ } else {
+ die "unknown option `$arg'\n";
}
}
usage ();
}
}
usage ();
@@
-95,7
+97,7
@@
sub usage {
print "Available options:\n";
print " --bochs Use Bochs as simulator (default)\n";
print " --qemu Use qemu as simulator\n";
print "Available options:\n";
print " --bochs Use Bochs as simulator (default)\n";
print " --qemu Use qemu as simulator\n";
- print " --
vmware Use VMware Workstation
as simulator\n";
+ print " --
gsx Use VMware GSX Server 3.x
as simulator\n";
print " --monitor Debug with simulator's monitor\n";
print " --gdb Debug with gdb\n";
print " --mem=MB Run VM with MB megabytes of physical memory\n";
print " --monitor Debug with simulator's monitor\n";
print " --gdb Debug with gdb\n";
print " --mem=MB Run VM with MB megabytes of physical memory\n";
@@
-162,19
+164,16
@@
sub run_vm {
push (@cmd, '-S') if $debug eq 'monitor';
push (@cmd, '-s') if $debug eq 'gdb';
run_command (@cmd);
push (@cmd, '-S') if $debug eq 'monitor';
push (@cmd, '-s') if $debug eq 'gdb';
run_command (@cmd);
- } elsif ($sim eq '
vmware
') {
- print "warning: --$debug not supported by VMware
Workstation
, ignoring"
+ } elsif ($sim eq '
gsx
') {
+ print "warning: --$debug not supported by VMware
GSX Server
, ignoring"
if $debug ne '';
open (VMX, ">pintos.vmx") or die "pintos.vmx: create: $!\n";
chmod 0777 & ~umask, "pintos.vmx";
print VMX "#! /usr/bin/vmware -G\n";
print VMX "config.version = 6\n";
if $debug ne '';
open (VMX, ">pintos.vmx") or die "pintos.vmx: create: $!\n";
chmod 0777 & ~umask, "pintos.vmx";
print VMX "#! /usr/bin/vmware -G\n";
print VMX "config.version = 6\n";
- print VMX "gui.powerOnAtStartUp = TRUE\n";
- print VMX "gui.exitAtPowerOff = TRUE\n";
print VMX "guestOS = \"linux\"\n";
print VMX "guestOS = \"linux\"\n";
- print VMX "floppy0.fileName = \"null.bin\"\n";
- print VMX "floppy0.fileType = \"file\"\n";
+ print VMX "floppy0.present = FALSE\n";
if (! -e 'null.bin') {
open (NULL, ">null.bin") or die "null.bin: create: $!\n";
if (! -e 'null.bin') {
open (NULL, ">null.bin") or die "null.bin: create: $!\n";
@@
-208,7
+207,12
@@
sub run_vm {
}
close (VMX);
}
close (VMX);
- run_command ("./pintos.vmx");
+ use Cwd;
+ $vmx = getcwd () . "/pintos.vmx";
+ system ("vmware-cmd -s register $vmx >&/dev/null");
+ system ("vmware-cmd $vmx stop hard >&/dev/null");
+ system ("vmware -l -G -x -q $vmx");
+ system ("vmware-cmd $vmx stop hard >&/dev/null");
}
}
}
}