summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-10-09 11:40:34 +0000
committerAlyssa Ross <hi@alyssa.is>2022-11-13 23:58:31 +0000
commit7266451ab6136d75142e6e45e2bc8c6843bbc994 (patch)
tree78354dc94c7e7a4f5b28101ad597df71042616a4
parentd04bcd86aed029dedcd68af16168921dd93a83a0 (diff)
downloadspectrum-7266451ab6136d75142e6e45e2bc8c6843bbc994.tar
spectrum-7266451ab6136d75142e6e45e2bc8c6843bbc994.tar.gz
spectrum-7266451ab6136d75142e6e45e2bc8c6843bbc994.tar.bz2
spectrum-7266451ab6136d75142e6e45e2bc8c6843bbc994.tar.lz
spectrum-7266451ab6136d75142e6e45e2bc8c6843bbc994.tar.xz
spectrum-7266451ab6136d75142e6e45e2bc8c6843bbc994.tar.zst
spectrum-7266451ab6136d75142e6e45e2bc8c6843bbc994.zip
host/start-vm: boot using partition label
This will allow booting reliably from multiple disk images, without
relying on order.

Thanks-to: Puck Meerburg <puck@puckipedia.com>
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Message-Id: <20221009114036.463071-5-hi@alyssa.is>
-rw-r--r--host/start-vm/lib.rs2
-rw-r--r--host/start-vm/tests/vm_command-basic.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/host/start-vm/lib.rs b/host/start-vm/lib.rs
index 5d43a3e..ef79091 100644
--- a/host/start-vm/lib.rs
+++ b/host/start-vm/lib.rs
@@ -43,7 +43,7 @@ pub fn vm_command(dir: PathBuf, config_root: &Path) -> Result<Command, String> {
     command.args(&["-dc", "test -S env/cloud-hypervisor.sock"]);
     command.arg("cloud-hypervisor");
     command.args(&["--api-socket", "env/cloud-hypervisor.sock"]);
-    command.args(&["--cmdline", "console=ttyS0 root=/dev/vda"]);
+    command.args(&["--cmdline", "console=ttyS0 root=PARTLABEL=root"]);
     command.args(&["--memory", "size=128M"]);
     command.args(&["--console", "pty"]);
     command.arg("--kernel");
diff --git a/host/start-vm/tests/vm_command-basic.rs b/host/start-vm/tests/vm_command-basic.rs
index a577a71..b9585f9 100644
--- a/host/start-vm/tests/vm_command-basic.rs
+++ b/host/start-vm/tests/vm_command-basic.rs
@@ -35,7 +35,7 @@ fn main() -> std::io::Result<()> {
         OsStr::new("--api-socket"),
         OsStr::new("env/cloud-hypervisor.sock"),
         OsStr::new("--cmdline"),
-        OsStr::new("console=ttyS0 root=/dev/vda"),
+        OsStr::new("console=ttyS0 root=PARTLABEL=root"),
         OsStr::new("--memory"),
         OsStr::new("size=128M"),
         OsStr::new("--console"),