terra-farm / terraform-provider-virtualbox

VirtualBox provider for Terraform
https://terra-farm.github.io/provider-virtualbox/
MIT License
323 stars 134 forks source link

Terraform apply fails due to --synthcpu setting #4

Closed jzohrab closed 8 years ago

jzohrab commented 8 years ago

Running the example with the provided ubuntu image fails:

2 error(s) occurred:
* virtualbox_vm.node.1: exit status 1
* virtualbox_vm.node.0: exit status 1

Setting Terraform tracing gives the output file with the following lines:

... [snip] ...
2016/01/12 11:43:43 [DEBUG] terraform-provider-virtualbox: pid-21335-vbm.go:45: executing: VBoxManage modifyvm node-01 ... [snip] ... --synthcpu off ...
...
2016/01/12 11:43:43 [DEBUG] terraform-provider-virtualbox: VBoxManage: error: Unknown option: --synthcpu
2016/01/12 11:43:43 [DEBUG] terraform-provider-virtualbox: pid-21335-resource_vm.go:215: [ERROR] Setup VM properties: exit status 1

synthcpu is no longer supported in VirtualBox 5. Docker also ran into this issue, ref https://github.com/docker/machine/pull/1496, and removed that flag.

This flag should be removed, and the code should use default VBoxManage flags as much as possible.

jzohrab commented 8 years ago

The code doesn't actually contain "synthcpu" ... checking further. ... update. After further checking, I wonder if the inclusion of Docker in the example image is what is causing trouble. Will try later with a different image.

joaocc commented 8 years ago

This parameter stopped being supported on VirtualBox 5. Similar problems solved here ref, fix.

joaocc commented 8 years ago

Found where it appears. CCLL is included by Gopfile.

Proposed a fix in https://github.com/ccll/go-virtualbox/pull/1. This will require a recompile of the provider.

jzohrab commented 8 years ago

Thanks @joaocc! I'd seen the Docker PR, but hadn't looked further. I hope @ccll can get to this, would be interested to try it out. Update: have emailed the project owner as some issues have been open for a while.

joaocc commented 8 years ago

Hi. Any news on this? Thx

jzohrab commented 8 years ago

Looks like this is a dead project, unless @ccll replies here.

ccll commented 8 years ago

Sorry for the late response, lately I've been occupied by other stuff, the PR is merged now.

jzohrab commented 8 years ago

Thanks @ccll for the response.