Hello everyone ,
I’m encountering a strange issue with this provider :
https://registry.terraform.io/providers/terra-farm/virtualbox/latest
For some reason i can’t seem to build my linux vms using this provider ; i watched a few youtube videos when it clearly works as intended but off course not it’s not happening on my end.
This what my main.tf looks like :
terraform {
required_providers {
virtualbox = {
source = “terra-farm/virtualbox”
version = “0.2.2-alpha.1”
}
}
}
There are currently no configuration options for the provider itself.
resource “virtualbox_vm” “node” {
count = 2
name = format(“node-%02d”, count.index + 1)
image = “https://app.vagrantup.com/ubuntu/boxes/bionic64/versions/20180903.0.0/providers/virtualbox.box”
cpus = 2
memory = “512 mib”
network_adapter {
type = “hostonly”
host_interface = “vboxnet1”
}
}
output “IPAddr” {
value = element(virtualbox_vm.node.*.network_adapter.0.ipv4_address, 1)
}
output “IPAddr_2” {
value = element(virtualbox_vm.node.*.network_adapter.0.ipv4_address, 2)
}
I already set up my “vboxnet1” my virtualbox software and just so you know i’m trying to build VM locally has it says on the documentation.
Unfortunately i always end up with this message:
Error: [ERROR] Starting VM: exit status 1
with virtualbox_vm.node[1],
on main.tf line 14, in resource “virtualbox_vm” “node”:
14: resource “virtualbox_vm” "node
Error: [ERROR] Starting VM: exit status 1
with virtualbox_vm.node[0],
on main.tf line 14, in resource “virtualbox_vm” “node”:
14: resource “virtualbox_vm” “node” {
And off course no signs of any VMs on my UI as seen on several youtube videos.
Any ideas ?
Some help would be greatly appreciated.
Regards