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

If nat + host network cards defined, it will timeout #122

Open
habhabhabs opened this issue Sep 30, 2021 · 3 comments
Open

If nat + host network cards defined, it will timeout #122

habhabhabs opened this issue Sep 30, 2021 · 3 comments
Labels

Comments

@habhabhabs
Copy link

habhabhabs commented Sep 30, 2021

Hi, appreciate everyone's effort in maintaining this provider.

I've the following code block which the nodes need to connect to the internet via the nat gateway:

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"
  user_data = file("${path.module}/user_data")

  network_adapter {
    type           = "nat"
  }

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

}

Everything is deployed fine, but it does not receive the callback from VirtualBox that the VMs are created.

│ Error: [ERROR] Wait VM until ready: waiting for VM (tf-dbserver) to become ready: [ERROR] can't convert vbox network to terraform data: No match with get guestproperty output
│                                                                                                                                                        
│   with virtualbox_vm.node[2],                                             
│   on main.tf line 12, in resource "virtualbox_vm" "node":                                                                                              
│   12: resource "virtualbox_vm" "node" {                                                                                                                
│                                                      

It works fine if only host-only adapters are mentioned (in the terraform example). Thanks

@VoyTechnology VoyTechnology added this to the v0.4 (Network) milestone Oct 4, 2021
@nemonik
Copy link

nemonik commented Nov 22, 2021

This issue appears to remain unresolved.

If you have a nat defined network_adapter

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

  on main.tf line 14, in resource "virtualbox_vm" "node":
  14: resource "virtualbox_vm" "node" {

@h3ct0rjs
Copy link

Yes I can confirm this. After testing this provider I'm not so sure if this is the best way to play with terraform locally, it seems like the best option will be using other provider for docker or something like that but this provider needs more love ❤️

@VoyTechnology
Copy link
Member

Added syntax hightlighting to the terraform configuration in the original comment.

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

4 participants