summaryrefslogtreecommitdiff
path: root/vmadm.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-12-08 12:12:09 +0200
committerLars Wirzenius <liw@liw.fi>2021-12-08 12:12:09 +0200
commit94bc8dc8b4537d228121f877513aafcae42cbb44 (patch)
treec5a8d68f5fc9e9814b8918d7a7f3ceabddaea685 /vmadm.md
parent31dc6df2d478e66eb39388dedd48080da0e72645 (diff)
downloadvmadm-94bc8dc8b4537d228121f877513aafcae42cbb44.tar.gz
feat: give a more useful error message when VM image already exists
Sponsored-by: author
Diffstat (limited to 'vmadm.md')
-rw-r--r--vmadm.md27
1 files changed, 27 insertions, 0 deletions
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.