-
Hello Community, I have a question regarding image provisioning. Is there a way to define volumes so that images are not downloaded to the Terraform instance first and then copied? For example, can they be provided directly on the remote instance or accessed via NBD? Would this be possible in general? If so, do you have any best practice recommendations? Example: Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 3 replies
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
@scabala I have changed/omitted the I think the provider is always looking for local paths on my laptop. I have tried the following: if I specify a local path to the image located on my laptop, the volume is created correctly on the Ubuntu instance (as described in the documentation). This does not work: I also checked whether the images specified via remote paths (http/https) are downloaded directly onto the Ubuntu instance, and here too, the source paths are only checked by the instance running Terraform. Since I connect via But you said you have a similar use case and do similar stuff, so I would be interested to know what your configuration looks like if you want to share it. I would like to try to replicate it. Edit: I also found someone who addressed the similar problematic: #299 Again, thank you for your support! |
Beta Was this translation helpful? Give feedback.
-
Your welcome @fuenfgek HTTP(S) source for volumes is not a feature of libvirt -it's only a feature of this Terraform provider so it is completely normal and expected that file is downloaded to local machine running Terraform and then sent to libvirt server. In case of local file, I think there's something wrong in the setup or maybe a difference between Ubuntu and Rocky, because I do use Terraform on different machine then libvirt server... and it just works. I have few ideas what to check. Could you add Are you using plain configuration with flat Do you have libvirt daemon installed on local machine running Terraform? Usually simple Do you have Also, do you happen to have |
Beta Was this translation helpful? Give feedback.
-
Helllo again :),
The A question regarding your configuration. You use rocky on you management instance (with Terrafrom) right? Cheers. |
Beta Was this translation helpful? Give feedback.
-
Yes, I'm using Rocky Linux 9 as server. However, I think the issue might be coming from your local machine setup. Output of |
Beta Was this translation helpful? Give feedback.
-
@scabala
|
Beta Was this translation helpful? Give feedback.
@scabala
Many thanks for your help.
The error was on my side, I kept trying to reference the images via the
source
parameter in thelibvirt_volume
, which was unnecessary in the end as I can specify the paths via thebase_volume_id
andbase_volume_pool
Here the config how it worked for me.