Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Can't find storage pool 'default' #15

Open
vadorovsky opened this issue Oct 21, 2019 · 4 comments
Open

Can't find storage pool 'default' #15

vadorovsky opened this issue Oct 21, 2019 · 4 comments

Comments

@vadorovsky
Copy link
Contributor

vadorovsky commented Oct 21, 2019

When you run on the fresh machine, you might see the following error:

libvirt_volume.data_volume[2]: Creating...
libvirt_volume.data_volume[1]: Creating...
libvirt_volume.data_volume[0]: Creating...
libvirt_cloudinit_disk.commoninit[1]: Creating...
libvirt_volume.kubic_image: Creating...
libvirt_cloudinit_disk.commoninit[0]: Creating...
libvirt_cloudinit_disk.commoninit[2]: Creating...

Error: can't find storage pool 'default'

  on kubic-kvm.tf line 5, in resource "libvirt_volume" "kubic_image":
   5: resource "libvirt_volume" "kubic_image" {



Error: can't find storage pool 'default'

  on kubic-kvm.tf line 16, in resource "libvirt_volume" "data_volume":
  16: resource "libvirt_volume" "data_volume" {



Error: can't find storage pool 'default'

  on kubic-kvm.tf line 16, in resource "libvirt_volume" "data_volume":
  16: resource "libvirt_volume" "data_volume" {



Error: can't find storage pool 'default'

  on kubic-kvm.tf line 16, in resource "libvirt_volume" "data_volume":
  16: resource "libvirt_volume" "data_volume" {



Error: can't find storage pool 'default'

  on kubic-kvm.tf line 33, in resource "libvirt_cloudinit_disk" "commoninit":
  33: resource "libvirt_cloudinit_disk" "commoninit" {



Error: can't find storage pool 'default'

  on kubic-kvm.tf line 33, in resource "libvirt_cloudinit_disk" "commoninit":
  33: resource "libvirt_cloudinit_disk" "commoninit" {



Error: can't find storage pool 'default'

  on kubic-kvm.tf line 33, in resource "libvirt_cloudinit_disk" "commoninit":
  33: resource "libvirt_cloudinit_disk" "commoninit" {

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.

@vadorovsky
Copy link
Contributor Author

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" {

@sebastian-philipp
Copy link
Member

Hm, wondering if we really should fix this ourselves. sounds like a general thing with the libvirt provider?

@vadorovsky
Copy link
Contributor Author

Yes, you are right. We probably should handle that in terraform-provider-libvirt.

@zeenix
Copy link

zeenix commented Oct 23, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants