X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=v3_config_guest.pl;h=28fb36acb48bf6ee2639f0e31ce4303357ab6901;hb=f2b335d52378f2df90738e450ceacca598e2178a;hp=a0606d5e5251fc298a77bb20ff497188c537a724;hpb=fb9b30c4e53136c98b1e59b91ac934114bd9b0e7;p=palacios.git
diff --git a/v3_config_guest.pl b/v3_config_guest.pl
index a0606d5..28fb36a 100755
--- a/v3_config_guest.pl
+++ b/v3_config_guest.pl
@@ -9,7 +9,7 @@ These guests *should* work for any host embedding (e.g., Kitten) but
there may be hidden Linux assumptions.
The tool assumes you have already built Palacios, the Linux embedding,
-and the Linux user-sapce tools. If you haven't done this, hit CTRL-C
+and the Linux user-space tools. If you haven't done this, hit CTRL-C
now, configure and build Palacios, the user-space tools, and run
v3_config_v3vee.pl.
@@ -191,12 +191,6 @@ print "\nWe will now consider storage controllers and devices.\n\n";
do_storage(\%config, $pdir, $dir, $name, "pci0", "southbridge");
-#
-# NVRAM
-#
-# Note: do_storage *must* have placed an IDE named ide0 in order for this to work
-#
-do_device(\%config, $pdir, "V3_CONFIG_NVRAM", "NVRAM", "nvram", 1, undef, " ide0\n"); #must have
#
@@ -208,6 +202,33 @@ do_network(\%config, $pdir, $dir, $name, "pci0", "southbridge");
#
+# Sanity-check - is there something bootable?
+#
+#
+if (!($config{havecd} && !($config{havehd}))) {
+ print "The guest's storage configuration does not have either a CD or an HD. \n";
+ print "This means the guest BIOS will have nothing local to boot. \n";
+ if (!($config{havenic})) {
+ print "The guest also does does not have a NIC, which means the BIOS cannot\n";
+ print "do a network boot.\n";
+ } else {
+ print "The guest does have a NIC, so a network boot is possible, if the\n";
+ print "BIOS supports it.\n";
+ }
+ print "If this is not your intent, you probably want to CTRL-C and try again.\n";
+}
+
+print "The BIOS boot sequence will be set to CD,HD. If you need to change this\n";
+print "later, edit the block within the NVRAM device.\n";
+
+#
+# NVRAM
+#
+# Note: do_storage *must* have placed an IDE named ide0 in order for this to work
+#
+do_device(\%config, $pdir, "V3_CONFIG_NVRAM", "NVRAM", "nvram", 1, undef, " ide0\n cd,hd\n"); #must have
+
+#
#
# Generic Catch-all Device
#
@@ -234,7 +255,14 @@ print $target "\n";
close(PAL);
-print "\n\nYour guest is now ready in the directory $dir\n";
+print "\n\nYour guest is now ready in the directory $dir\n\n";
+print "To run it, do:\n\n";
+print " cd $dir\n";
+print " v3_create -b $name.pal $name\n";
+print " v3_launch /dev/v3-vmN (N given by v3_create)\n\n";
+print "Other useful tools:\n\n";
+print " v3_console (CGA console)\n";
+print " v3_stream (connect to stream, for example, serial port)\n\n";
exit;
@@ -422,7 +450,7 @@ sub do_consoles_and_ports {
if (!($cancga || $canvga || $canserial || $canvirtioconsole)) {
print "Hmm... No console mechanism is enabled in your Palacios build...\n";
print " This is probably not what you want...\n";
-}
+ }
$didcga=0;
if ($cancga) {
@@ -488,6 +516,7 @@ sub do_consoles_and_ports {
print "You have configured your guest without any obvious way of interacting with it....\n";
print " This is probably not what you want...\n";
}
+
}
@@ -588,6 +617,10 @@ sub do_network {
}
$num++;
}
+
+ if ($num>0) {
+ $cr->{havenic}=1;
+ }
}
@@ -634,7 +667,9 @@ sub do_storage {
do_storage_backend($cr, $pdir, $dir, $name, "virtioblk$i", "data$i", "");
}
}
-}
+
+}
+
sub do_storage_backend {
@@ -678,7 +713,6 @@ sub do_storage_backend {
print " * FILEDISK - the data is kept in a host file (common) : ".($canfiledisk ? "available" : "UNAVAILABLE")."\n";
print " * NETDISK - the data is accessed via the network (uncommon) : ".($cannetdisk ? "available" : "UNAVAILABLE")."\n";
print " * TMPDISK - the data is kept in memory and discarded (common) : ".($cantmpdisk ? "available" : "UNAVAILABLE")."\n";
- print " * RAMDISK - the data is kept in memory (common) : ".($canramdisk ? "available" : "UNAVAILABLE")."\n";
while (1) {
print "Which option do you want for this device? {".join(", ",@disks)."} [] : ";
$type = get_user("");
@@ -711,9 +745,11 @@ sub do_storage_backend {
if ($what eq "cd") {
$attach.=" V3VEE CDROM\n".
" CDROM\n".$frontendblock;
+ $cr->{havecd}=1;
} else {
$attach.=" V3VEE HD\n".
" HD\n".$frontendblock;
+ $cr->{havehd}=1;
}
$attach.=" \n";