Skip to content

Image provisioning on remote instances #1160

Closed Answered by fuenfgek
fuenfgek asked this question in Q&A
Discussion options

You must be logged in to vote

@scabala
Many thanks for your help.
The error was on my side, I kept trying to reference the images via the source parameter in the libvirt_volume, which was unnecessary in the end as I can specify the paths via the base_volume_id and base_volume_pool
Here the config how it worked for me.

source "libvirt_pool" "base" {
  name = local.base_image_pool
  type = "dir"
  target {
    path = "/home/ubuntu/base_images"
  }
}
resource "libvirt_pool" "overlay" {
  name = local.overlay_pool
  type = "dir"
  target {
    path = "/home/ubuntu/overlay_pool" # Images on remote (can also be mounted path)
  }
}
resource "libvirt_volume" "main_volume" {
  name           = "test.qcow2"
  pool           = …

Replies: 6 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@fuenfgek
Comment options

@scabala
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@scabala
Comment options

Answer selected by fuenfgek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants