From 94bc8dc8b4537d228121f877513aafcae42cbb44 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 8 Dec 2021 12:12:09 +0200 Subject: feat: give a more useful error message when VM image already exists Sponsored-by: author --- vmadm.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'vmadm.md') diff --git a/vmadm.md b/vmadm.md index 4a49465..1db6307 100644 --- a/vmadm.md +++ b/vmadm.md @@ -270,6 +270,33 @@ when I invoke vmadm delete --config config.yaml smoke.yaml +# Give useful error if image for new VM already exists + +This scenario verifies that if the VM image file already exists, vmadm +gives a useful error message. + +~~~scenario +given an installed vmadm +given a Debian 10 OpenStack cloud image +given file smoke.yaml +given file config.yaml +given file ca_key +given file .ssh/id_rsa from ssh_key +given file .ssh/id_rsa.pub from ssh_key_pub +given file .ssh/config from ssh_config +given file .ssh/known_hosts from known_hosts +given file images/smoke.qcow2 from dummy.qcow2 +when I try to run vmadm new --config config.yaml smoke.yaml +then exit code is 1 +then stderr contains "images/smoke.qcow2" +then stderr contains "exists" +~~~ + +~~~{#dummy.qcow2 .file} +This dummy file pretends to be a QCOW2 image file. +~~~ + + # Dump config This scenario verifies that vmadm can show its actual configuration. -- cgit v1.2.1