diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-03-13 14:51:19 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-03-14 09:11:07 +0200 |
commit | b8119579a246727805a03c5a8e60fb44109410f6 (patch) | |
tree | b4e0698ae9f50b8757530f2332cb1c40872d4a5c /src/cloudinit.rs | |
parent | d4cba41b5674e6ca1cbd5669aeb42d5f7d62e8bd (diff) | |
download | vmadm-b8119579a246727805a03c5a8e60fb44109410f6.tar.gz |
fix: VMs can be restarted
Previously, the temporary file for the cloud-init configuration ISO
was left attached to the VM. This meant the VM couldn't be turned off
and back on again: the temporary no longer existed.
Now we detach the ISO file after the VM has booted.
As a side effect, vmadm has gained start and shutdown subcommands, so
that the fix can be tested.
Diffstat (limited to 'src/cloudinit.rs')
-rw-r--r-- | src/cloudinit.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cloudinit.rs b/src/cloudinit.rs index ec4efd3..169b13f 100644 --- a/src/cloudinit.rs +++ b/src/cloudinit.rs @@ -254,7 +254,7 @@ impl Hostkeys { debug!("generated Ed25519 host certificate {:?}", cert); Ok(Some(Self { ed25519_private: Some(pair.private().to_string()), - ed25519_certificate: Some(cert.to_string()), + ed25519_certificate: Some(cert), ..Self::default() })) } else { |