terraform-provider-libvirt
terraform-provider-libvirt copied to clipboard
Re-running terraform apply after initial Error will error out with "domain [...] already exists"
Related to #920 and also #423
System Information etc.
See #920
Description of Issue/Question
Setup
See #920
Steps to Reproduce Issue
-
terraform apply
until you hit #920 - Manually fix by editing
/etc/apparmor.d/local/abstractions/libvirt-qemu
-
terraform apply
libvirt_domain.domain-ubuntu: Creating...
╷
│ Error: error defining libvirt domain: operation failed: domain 'terraform-kvm-ansible' already exists with uuid 7454585d-3a7c-42a9-a822-835b9ca3c1b6
│
│ with libvirt_domain.domain-ubuntu,
│ on main.tf line 33, in resource "libvirt_domain" "domain-ubuntu":
│ 33: resource "libvirt_domain" "domain-ubuntu" {
│
Solution
- Run
virsh undefine terraform-kvm-ansible
-
terraform apply
-
terraform-kvm-ansible
will come up successfully
Additional information:
Apparmor as articulated in #920
This also is happening to me, any updates?
Same here while deploying Centos 8 guests on a Fedora35 Host. Additionally, the domain does not get destroyed when running terraform destroy
Yeah, I'm also on a F35 host. Additionally, I'm doing a UEFI deployment and running the destroy also removes the /usr/share/edk2/OVMF_VARS.fd file so when I got re-deploy the file is now missing.