-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't find storage pool 'default' #446
Comments
My bad. default pool was not there. created and it worked |
Still got this issue even if the pool exist, also recreate it on different path still got issue Host Config:Fedora 31 Terraform Version Report Libvirt version terraform-provider-libvirt plugin version (stable binary) Setup#
# worker nodes
#
resource "libvirt_volume" "worker_image" {
count = local.workers
name = "worker-${count.index + 1}"
pool = "default"
source = "https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img"
format = "qcow2"
}
resource "libvirt_volume" "worker" {
count = local.workers
name = "volume-${count.index + 1}"
base_volume_id = element(libvirt_volume.worker_image.*.id, count.index)
size = var.worker_root_size
}
resource "libvirt_cloudinit_disk" "commoninit" {
count = local.workers
name = "k8s-worker-${count.index + 1}-commoninit.iso"
pool = "default"
user_data = element(data.template_file.user_data.*.rendered, count.index + 1)
}
data "template_file" "user_data" {
count = local.workers
template = file("${path.module}/kubernetes_cloudinit.cfg")
vars = {
hostname = "k8s-worker${count.index + 1}"
public_key = var.public_key
k8s_version = var.k8s_version
k8s_minor = var.k8s_minor
}
}
resource "libvirt_domain" "worker" {
count = local.workers
name = "k8s-worker${count.index + 1}"
memory = var.worker_mem
vcpu = var.worker_cpu
disk {
volume_id = element(libvirt_volume.worker.*.id, count.index + 1)
}
network_interface {
network_name = "default"
}
cloudinit = element(libvirt_cloudinit_disk.commoninit.*.id, count.index + 1)
console {
type = "pty"
target_port = "0"
target_type = "serial"
}
graphics {
type = "spice"
listen_type = "address"
autoport = "true"
}
autostart = var.enable_autostart
}
terraform {
required_version = ">= 0.14"
} Also : Nom État Démarrage automatique
------------------------------------------
default actif yes And the provider declaration : terraform {
required_providers {
libvirt = {
# According to new terraform 0.13 hacky plugin path
source = "hashicorp/libvirt"
version = "1.0.0"
}
}
}
provider "libvirt" {
uri = "qemu:///system"
} Current behavior :module.k8s.libvirt_volume.worker_image[1]: Creating...
module.k8s.libvirt_cloudinit_disk.commoninit[1]: Creating...
module.k8s.libvirt_volume.worker_image[0]: Creating...
module.k8s.libvirt_cloudinit_disk.commoninit[0]: Creating...
Error: can't find storage pool 'default'
on k8s/main.tf line 5, in resource "libvirt_volume" "worker_image":
5: resource "libvirt_volume" "worker_image" {
Error: can't find storage pool 'default'
on k8s/main.tf line 5, in resource "libvirt_volume" "worker_image":
5: resource "libvirt_volume" "worker_image" {
Error: can't find storage pool 'default'
on k8s/main.tf line 20, in resource "libvirt_cloudinit_disk" "commoninit":
20: resource "libvirt_cloudinit_disk" "commoninit" {
Error: can't find storage pool 'default'
on k8s/main.tf line 20, in resource "libvirt_cloudinit_disk" "commoninit":
20: resource "libvirt_cloudinit_disk" "commoninit" { Expected behaviorAccess the default storage pool using terraform libvirt provider |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version Reports:
Distro version of host:
ubuntu 18.04
Terraform Version Report
(
11.8
.)Libvirt version
4.0.0
terraform-provider-libvirt plugin version (0.5.0)
Setup
Steps to Reproduce Issue
The text was updated successfully, but these errors were encountered: