Host 1 - nuc.example.net: https://www.jetwaycomputer.com/NU591.html w/ 8GB RAM, 64GB M2 SSD
Host 2 - brick2.example.net: HP ProDesk 600 G4 Mini Desktop PC Intel i5-8500T 2.10GHz 16GB 512GB SSD
Linux distribution
Both hosts are fresh installs of Ubuntu 20.04.3 LTS 64-bit x86 Server.
msnow@brick:~/terraform_kvm_remote-only$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
msnow@brick:~/terraform_kvm_remote-only$ uname -a
Linux nuc 5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
msnow@brick:~/terraform_kvm_remote-only$ dpkg --list |grep libvirt
ii gir1.2-libvirt-glib-1.0:amd64 3.0.0-1 amd64 GObject introspection files for the libvirt-glib library
ii libsys-virt-perl 5.0.0-1build1 amd64 Perl module providing an extension for the libvirt library
ii libvirt-clients 6.0.0-0ubuntu8.15 amd64 Programs for the libvirt library
ii libvirt-daemon 6.0.0-0ubuntu8.15 amd64 Virtualization daemon
ii libvirt-daemon-driver-qemu 6.0.0-0ubuntu8.15 amd64 Virtualization daemon QEMU connection driver
ii libvirt-daemon-driver-storage-rbd 6.0.0-0ubuntu8.15 amd64 Virtualization daemon RBD storage driver
ii libvirt-daemon-system 6.0.0-0ubuntu8.15 amd64 Libvirt daemon configuration files
ii libvirt-daemon-system-systemd 6.0.0-0ubuntu8.15 amd64 Libvirt daemon configuration files (systemd)
ii libvirt-glib-1.0-0:amd64 3.0.0-1 amd64 libvirt GLib and GObject mapping library
ii libvirt0:amd64 6.0.0-0ubuntu8.15 amd64 library for interfacing with different virtualization systems
ii python3-libvirt 6.1.0-1 amd64 libvirt Python 3 bindings
msnow@brick:~/terraform_kvm_remote-only$
Terraform version
The issue happens with both the latest 1.1 and 0.13 versions of terraform.
msnow@brick:~/terraform_kvm_remote-only$ /opt/bin/terraform_0.13.7 -v
Terraform v0.13.7
Your version of Terraform is out of date! The latest version
is 1.1.2. You can update by downloading from https://www.terraform.io/downloads.html
msnow@brick:~/terraform_kvm_remote-only$ /opt/bin/terraform_1.1.2 -v
Terraform v1.1.2
on linux_amd64
+ provider registry.terraform.io/dmacvicar/libvirt v0.6.12
msnow@brick:~/terraform_kvm_remote-only$
[ No ] Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?
[x] Make sure you explain why this option is important to you, why it should be important to everyone. Describe your use-case with detail and provide examples where possible.
This is important to me and others as we should be able to remotely provision KVMs using multiple providers.
[x] If it is a very special case, consider using the XSLT support in the provider to tweak the definition instead of opening an issue
[x] Maintainers do not have expertise in every libvirt setting, so please, describe the feature and how it is used. Link to the appropriate documentation
[x] Is it a bug or something that does not work as expected? Please make sure you fill the version information below:
Description of Issue/Question
Provisioning locally with the libvirt provider uri = "qemu:///system works as expected. I can create networks, pools, domains, etc...
Creating the local default network via the terraform provider requires I first destroy and undefine the 'vanilla' network first since the default net is created when libvirt is installed. This vanilla network is configured with NAT, but I want a bridged network setup so that the VMs can be accessible on the LAN. The bridge netplan config is here )
Provisioning to remote KVM hosts using the examples/v0.13/multiple/main.tf method while relying on password-less SSH keys results in Error: can't find storage pool 'default' .
I have tried creating a new pool name (_poolremote) via the libvirt_pool resource as well as relying on the default, as well as including and/or omitting the definition of the pool to use.
In either case the remote pool is created but volumes cannot be created agains the pool.
Both hosts have been setup using Ansible roles I created here: https://github.com/mattsn0w/ubuntu_hypervisor
a single user was created during OS install and is member to the following groups:
System Information
Host 1 - nuc.example.net: https://www.jetwaycomputer.com/NU591.html w/ 8GB RAM, 64GB M2 SSD Host 2 - brick2.example.net: HP ProDesk 600 G4 Mini Desktop PC Intel i5-8500T 2.10GHz 16GB 512GB SSD
Linux distribution
Both hosts are fresh installs of Ubuntu 20.04.3 LTS 64-bit x86 Server.
Terraform version
The issue happens with both the latest 1.1 and 0.13 versions of terraform.
Provider and libvirt versions
I tried this with 0.6.11 and the latest 0.6.12.
Checklist
[ No ] Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?
[x] Is it a bug or something that does not work as expected? Please make sure you fill the version information below:
Description of Issue/Question
Provisioning locally with the libvirt provider
uri = "qemu:///system
works as expected. I can create networks, pools, domains, etc...Creating the local
default
network via the terraform provider requires I first destroy and undefine the 'vanilla' network first since the default net is created when libvirt is installed. This vanilla network is configured with NAT, but I want a bridged network setup so that the VMs can be accessible on the LAN. The bridge netplan config is here )Provisioning to remote KVM hosts using the
examples/v0.13/multiple/main.tf
method while relying on password-less SSH keys results inError: can't find storage pool 'default'
.I have tried creating a new pool name (_poolremote) via the libvirt_pool resource as well as relying on the
default
, as well as including and/or omitting the definition of the pool to use.In either case the remote pool is created but volumes cannot be created agains the pool.
Setup
Both hosts have been setup using Ansible roles I created here: https://github.com/mattsn0w/ubuntu_hypervisor a single user was created during OS install and is member to the following groups:
Clone the remote_debug branch from https://github.com/mattsn0w/terraform_kvm/tree/remote_debug
main.tf
- https://github.com/mattsn0w/terraform_kvm/blob/remote_debug/main.tfterraform.tfvars
- https://github.com/mattsn0w/terraform_kvm/blob/remote_debug/terraform.tfvarsSteps to Reproduce Issue
(Include debug logs if possible and relevant).
terraform init
terraform apply --var-file=terraform.tfvars
Full debug output
Additional information:
Do you have SELinux or Apparmor/Firewall enabled? Some special configuration?