diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-03-24 21:21:00 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-03-24 21:21:00 +0200 |
commit | ecd8eef97006686b8686803b0eaf0a37b87eff08 (patch) | |
tree | 1bd1266858ca6d4e78e999aa5c0f8119131ff41b /src/cmd | |
parent | cc7f874e03a6050c47b592fe5ed7b3704eeedfcc (diff) | |
download | vmadm-ecd8eef97006686b8686803b0eaf0a37b87eff08.tar.gz |
refactor: when starting, stopping do all VMs at once
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/shutdown.rs | 2 | ||||
-rw-r--r-- | src/cmd/start.rs | 2 |
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); |