Open vadorovsky opened 4 years ago
Oh, actually you might see also the error about the default network being not active if you don't activate it before:
Error: Error creating libvirt domain: virError(Code=55, Domain=19, Message='Requested operation is not valid: network 'default' is not active')
on kubic-kvm.tf line 40, in resource "libvirt_domain" "kubic-domain":
40: resource "libvirt_domain" "kubic-domain" {
Error: Error creating libvirt domain: virError(Code=55, Domain=19, Message='Requested operation is not valid: network 'default' is not active')
on kubic-kvm.tf line 40, in resource "libvirt_domain" "kubic-domain":
40: resource "libvirt_domain" "kubic-domain" {
Error: Error creating libvirt domain: virError(Code=55, Domain=19, Message='Requested operation is not valid: network 'default' is not active')
on kubic-kvm.tf line 40, in resource "libvirt_domain" "kubic-domain":
40: resource "libvirt_domain" "kubic-domain" {
Hm, wondering if we really should fix this ourselves. sounds like a general thing with the libvirt provider?
Yes, you are right. We probably should handle that in terraform-provider-libvirt.
Just FYI, you should not assume the existence of default
storage pool. It's not created by libvirt itself and hence not guaranteed to exist. Best is to create your own storage pool and terraform-provider-libvirt now a days support creating a pool.
When you run on the fresh machine, you might see the following error:
The fix is to run virt-manager which creates the default storage pool (and also the default network, which could be an another potential error). It would be nice to somehow handle the case if someone is not running virt-manager.