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

Error: [ERROR] Wait VM until ready: waiting for VM (node-01) to become ready: [ERROR] can't convert vbox network to terraform data: No match with get guestproperty output #149

Open
mohang6770 opened this issue Aug 29, 2022 · 15 comments
Assignees
Labels

Comments

@mohang6770
Copy link

mohang6770 commented Aug 29, 2022

Terraform Version

<MISSING>

Virtualbox Provider version

<MISSING>

Operating System

<MISSING>

Describe the Bug

<MISSING>

To Reproduce

Steps to reproduce the behavior:

  1. <MISSING>

Expected Behaviour

<MISSING>

Configuration

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

resource "virtualbox_vm" "node" {
  count     = 1
  name      = format("node-%02d", count.index + 1)
  image     = "https://app.vagrantup.com/ubuntu/boxes/bionic64/versions/20210916.0.0/providers/virtualbox.box"
  cpus      = 1
  memory    = "1024 mib"
  user_data = file("${path.module}/user_data.sh")
  
  network_adapter {
    type           = "nat"
  }
  network_adapter {
    type           = "bridged"
    host_interface = "eno1"
  }

  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)
}

Log Output

Error: [ERROR] Wait VM until ready: waiting for VM (node-01) to become ready: [ERROR] can't convert vbox network to terraform data: No match with get guestproperty output
@billyjsubs
Copy link

snap.

@VoyTechnology VoyTechnology self-assigned this Sep 4, 2022
@VoyTechnology
Copy link
Member

Hi @mohang6770, thank you for submitting this issue. I took some liberty in applying the latest issue template to this bug report, I hope you don't mind. Can you please provide some of the missing fields? Thank you.

@nikstuckenbrock
Copy link
Contributor

nikstuckenbrock commented Oct 24, 2022

I think the issues #138 and #134 report the same problem. Maybe a maintainer could close them as duplicates. I have the same issue using the following configuration:

Terraform version

v1.2.2

Virtualbox provider version

v0.2.2-alpha.1

Operating system

Debian 11

Describe the bug

This is my terraform configuration I'm trying to apply.

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     = "virtualbox_windows-10.box"
  network_adapter {
    type           = "hostonly"
    host_interface = "vboxnet0"
  }
}

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)
}

When I apply the configuration file two virtual machines are created and one of them is running, the other is powered off. Then I run into the following error message:

╷
│ Error: [ERROR] Wait VM until ready: waiting for VM (node-02) to become ready: [ERROR] can't convert vbox network to terraform data: No match with get guestproperty output
│
│   with virtualbox_vm.node[1],
│   on main.tf line 12, in resource "virtualbox_vm" "node":
│   12: resource "virtualbox_vm" "node" {
│
╵
╷
│ Error: [ERROR] Clone *.vdi and *.vmdk to VM folder: exit status 1
│
│   with virtualbox_vm.node[0],
│   on main.tf line 12, in resource "virtualbox_vm" "node":
│   12: resource "virtualbox_vm" "node" {
│
╵

To Reproduce

Just use the provided terraform file with a windows box.

Expected behaviour

I would just expect the build to finish. The network used in the configuration exists.

@nikstuckenbrock
Copy link
Contributor

nikstuckenbrock commented Oct 25, 2022

I think I found the bug in the terra-form/go-virtualbox repository and have created a pull request for it. You can find further details on the bug in the PR.

@mohang6770
Copy link
Author

mohang6770 commented Oct 25, 2022 via email

@VoyTechnology
Copy link
Member

Hey @nikstuckenbrock, now that your change is merged, do you want to create another PR to this repository to bump the go-virtualbox dependency version?

@nikstuckenbrock
Copy link
Contributor

Hey @VoyTechnology, thanks for reaching out. I've provided a new PR #155 to bump the version.

@VoyTechnology
Copy link
Member

Merged. Can you validate that the problem has been fixed? If so, I will tag a new release.

@nikstuckenbrock
Copy link
Contributor

nikstuckenbrock commented Oct 28, 2022

Hey @VoyTechnology , build proceeds now and resolves in another error. So reading out the guestproperty works now. You could flag a new release or wait until I have investigated the new error message if you want.

Update: It seems like it's not really an error. The time waiting for the VM to become available is set to 30 seconds which seems to be to short for my use case. I would be a nice feature though.

@mohang6770
Copy link
Author

mohang6770 commented Oct 28, 2022 via email

@nikstuckenbrock
Copy link
Contributor

Hey @mohang6770 ,
a little bit more communication would be helpful. It looks like you're not using the source version, instead you use the same version as before? Furthermore you're reporting a completely different error message than before. Could you provide more details?

@EduardoSantanaSeverino
Copy link

EduardoSantanaSeverino commented Feb 15, 2023

Hi there,

I am still struggling to get this to work, and I am still getting the same error as previously described:

can't convert vbox network to terraform data: No match with get guestproperty output

@nikstuckenbrock
Copy link
Contributor

Hey @EduardoSantanaSeverino,

it would be very nice if you could provide all the information mentioned in the bug report template. Have you tried debugging the provider (after compiling it yourself) as mentioned in the docs? Moreover I would suggest to check your version again. The latest released version does not contain the fix provided in #156, you'll need to use the explicit commit hash to get the latest code. I hope this helps you to analyse/fix your problem,

@amnet04
Copy link

amnet04 commented May 18, 2023

Today I got this error. In my case, the problem was that the vm doesn't have enough memory to start Ubuntu.

@edward8e
Copy link

I got this error also. I only saw it when I tried to increase the count from 1 to 2. The VM was able to boot up just fine, but the error showed up before it could finish booting up. I think it was a timeout issue for me.

I instead made each resource boot up with a "depends_on" parameter to the previous resource. It's a workaround for me.

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

7 participants