Skip to content

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

@habhabhabs

Description

@habhabhabs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions