title: Terraform: use of closed network connection
body: <p>I'm using this plugin for terraform: <a href="https://github.com/terra-farm/terraform-provider-virtualbox" rel="noreferrer">https://github.com/terra-farm/terraform-provider-virtualbox</a></p>
  
  <p>I just try to install an ubuntu 18.04 box in virtualbox.</p>
  
  <p>This is my <code>main.tf</code></p>
  
  <pre><code>resource "virtualbox_vm" "node" {
      count = 2
      name = "${format("node-%02d", count.index+1)}"
      url = "https://vagrantcloud.com/ubuntu/boxes/bionic64/versions/20180802.0.0/providers/virtualbox.box"
      image = "./virtualbox-ubuntu.box"
      cpus = 2
      memory = "512 mib",
  
  
      network_adapter {
          type = "bridged",
          host_interface = "en0",
  
      }
  
  
  }
  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)}"
  }
  </code></pre>
  
  <p>When I perform <code>terraform apply</code> it fails with:</p>
  
  <pre><code>2018-08-07T22:17:41.256+0200 [DEBUG] plugin.terraform-provider-virtualbox: pid-3041-vbm.go:75: executing: VBoxManage showvminfo node-02 --machinereadable
  2018-08-07T22:17:41.346+0200 [DEBUG] plugin.terraform-provider-virtualbox: pid-3041-vbm.go:75: executing: VBoxManage showvminfo node-01 --machinereadable
  2018-08-07T22:17:41.352+0200 [DEBUG] plugin.terraform-provider-virtualbox: pid-3041-vbm.go:45: executing: VBoxManage clonehd /Users/name/.terraform/virtualbox/gold/virtualbox-ubuntu/ubuntu-xenial-16.04-cloudimg-configdrive.vmdk /Users/name/.terraform/virtualbox/machine/node-02/ubuntu-xenial-16.04-cloudimg-configdrive.vmdk
  2018-08-07T22:17:41.412+0200 [DEBUG] plugin.terraform-provider-virtualbox: pid-3041-resource_vm.go:247: [ERROR] Clone *.vdi and *.vmdk to VM folder: exit status 1
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalWriteState
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalApplyProvisioners
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalIf
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalWriteState
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalWriteDiff
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalApplyPost
  2018/08/07 22:17:41 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:
  
  * virtualbox_vm.node.1: exit status 1
  2018/08/07 22:17:41 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:
  
  * virtualbox_vm.node.1: exit status 1
  2018/08/07 22:17:41 [TRACE] [walkApply] Exiting eval tree: virtualbox_vm.node[1]
  2018-08-07T22:17:41.454+0200 [DEBUG] plugin.terraform-provider-virtualbox: pid-3041-vbm.go:45: executing: VBoxManage clonehd /Users/name/.terraform/virtualbox/gold/virtualbox-ubuntu/ubuntu-xenial-16.04-cloudimg-configdrive.vmdk /Users/name/.terraform/virtualbox/machine/node-01/ubuntu-xenial-16.04-cloudimg-configdrive.vmdk
  2018-08-07T22:17:41.516+0200 [DEBUG] plugin.terraform-provider-virtualbox: pid-3041-resource_vm.go:247: [ERROR] Clone *.vdi and *.vmdk to VM folder: exit status 1
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalWriteState
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalApplyProvisioners
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalIf
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalWriteState
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalWriteDiff
  2018/08/07 22:17:41 [TRACE] root: eval: *terraform.EvalApplyPost
  2018/08/07 22:17:41 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:
  
  * virtualbox_vm.node.0: exit status 1
  2018/08/07 22:17:41 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:
  
  * virtualbox_vm.node.0: exit status 1
  2018/08/07 22:17:41 [TRACE] [walkApply] Exiting eval tree: virtualbox_vm.node[0]
  2018/08/07 22:17:41 [TRACE] dag/walk: upstream errored, not walking "output.IPAddr_2"
  2018/08/07 22:17:41 [TRACE] dag/walk: upstream errored, not walking "provider.virtualbox (close)"
  2018/08/07 22:17:41 [TRACE] dag/walk: upstream errored, not walking "output.IPAddr"
  2018/08/07 22:17:41 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
  2018/08/07 22:17:41 [TRACE] dag/walk: upstream errored, not walking "root"
  2018/08/07 22:17:41 [TRACE] Preserving existing state lineage "782abaa9-e567-10d4-1902-6d1223713e6a"
  2018/08/07 22:17:41 [TRACE] Preserving existing state lineage "782abaa9-e567-10d4-1902-6d1223713e6a"
  2018/08/07 22:17:41 [TRACE] Preserving existing state lineage "782abaa9-e567-10d4-1902-6d1223713e6a"
  2018/08/07 22:17:41 [TRACE] Preserving existing state lineage "782abaa9-e567-10d4-1902-6d1223713e6a"
  
  2018/08/07 22:17:41 [DEBUG] plugin: waiting for all plugin processes to complete...
  Error: Error applying plan:
  
  2 error(s) occurred:
  
  * virtualbox_vm.node[1]: 1 error(s) occurred:
  
  * virtualbox_vm.node.1: exit status 1
  * virtualbox_vm.node[0]: 1 error(s) occurred:
  
  * virtualbox_vm.node.0: exit status 1
  
  Terraform does not automatically rollback in the face of errors.
  2018-08-07T22:17:41.522+0200 [DEBUG] plugin.terraform-provider-virtualbox: pid-3041-rpc_server.go:48: [ERR] plugin: plugin server: accept unix /var/folders/y4/v8w900l115lbtzylp143pxfr0000gn/T/plugin055999022: use of closed network connection
  Instead, your Terraform state file has been partially updated with
  any resources that successfully completed. Please address the error
  above and apply again to incrementally change your infrastructure.
  </code></pre>
  
  <p>What am I doing wrong? the example with an older image seems to work?</p>