Skip to content
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

virtualbox provider fails to create a VM #142

Open
sajusat opened this issue Apr 25, 2022 · 3 comments
Open

virtualbox provider fails to create a VM #142

sajusat opened this issue Apr 25, 2022 · 3 comments
Labels

Comments

@sajusat
Copy link

sajusat commented Apr 25, 2022

Hi,
I am using Ubuntu 20.04. I have tried the following

terraform {
    required_providers {
        virtualbox = {
            source = "terra-farm/virtualbox"
            version = "0.2.2-alpha.1"
        }
    }
}

resource "virtualbox_vm" "node" {
  count     = 1
  name      = "bullseye"
  image     = "https://app.vagrantup.com/debian/boxes/bullseye64/versions/11.20220328.1/providers/virtualbox.box"
  cpus      = 2
  memory    = "512 mib"

  network_adapter {
    type           = "hostonly"
    host_interface = "vbnet"
  }
}

output "IPAddr" {
  value = element(virtualbox_vm.node.*.network_adapter.0.ipv4_address, 1)
}

I did terraform apply

  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

virtualbox_vm.node[0]: Creating...
virtualbox_vm.node[0]: Still creating... [10s elapsed]
virtualbox_vm.node[0]: Still creating... [20s elapsed]
virtualbox_vm.node[0]: Still creating... [30s elapsed]
╷
│ Error: [ERROR] Starting VM: exit status 1
│ 
│   with virtualbox_vm.node[0],
│   on main.tf line 10, in resource "virtualbox_vm" "node":
│   10: resource "virtualbox_vm" "node" {
│ 
╵

I can see a VM is created in virtualbox UI. It is powered off.
When I try to manually start the VM it complains that Could not start the machine bullseye because the following physical network interfaces were not found. vbnet (adapter 1)

:(

@dgvigil
Copy link

dgvigil commented Jul 7, 2022

Did you figure out how to fix this @sajusat ?

@antonioepoibo
Copy link

I have the same problem

@choman
Copy link

choman commented Aug 18, 2024

Same issue here

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

No branches or pull requests

5 participants