summaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-24 21:21:00 +0200
committerLars Wirzenius <liw@liw.fi>2021-03-24 21:21:00 +0200
commitecd8eef97006686b8686803b0eaf0a37b87eff08 (patch)
tree1bd1266858ca6d4e78e999aa5c0f8119131ff41b /src/cmd
parentcc7f874e03a6050c47b592fe5ed7b3704eeedfcc (diff)
downloadvmadm-ecd8eef97006686b8686803b0eaf0a37b87eff08.tar.gz
refactor: when starting, stopping do all VMs at once
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/shutdown.rs2
-rw-r--r--src/cmd/start.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/shutdown.rs b/src/cmd/shutdown.rs
index b53ebd3..cdd3069 100644
--- a/src/cmd/shutdown.rs
+++ b/src/cmd/shutdown.rs
@@ -9,7 +9,7 @@ pub fn shutdown(specs: &[Specification]) -> Result<(), VirtError> {
let libvirt = Libvirt::connect("qemu:///system")?;
for spec in specs {
info!("shutting down virtual machine {}", spec.name);
- libvirt.shutdown(&spec.name)?;
+ libvirt.trigger_shutdown(&spec.name)?;
}
for spec in specs {
debug!("waiting for {} to become inactive", spec.name);
diff --git a/src/cmd/start.rs b/src/cmd/start.rs
index a69f54c..8e74c49 100644
--- a/src/cmd/start.rs
+++ b/src/cmd/start.rs
@@ -22,7 +22,7 @@ pub fn start(specs: &[Specification]) -> Result<(), StartError> {
let libvirt = Libvirt::connect("qemu:///system")?;
for spec in specs {
info!("starting virtual machine {}", spec.name);
- libvirt.start(&spec.name)?;
+ libvirt.trigger_start(&spec.name)?;
}
for spec in specs {
wait_for_ssh(&spec.name);