terraform-provider-virtualbox: Creating virtualbox machine on linux failed
Test environment: Terraform: v1.0.3 OS: Ubuntu 20.04 Virtualbox: 6.1.18-142142~Ubuntu~eoan
This is my main.tf file `terraform { required_providers { virtualbox = { source = “terra-farm/virtualbox” version = “0.2.1-alpha.1” } } }
resource “virtualbox_vm” “node” { count = 1 name = “node” image = “/home/user/terraform/virtualbox.box” cpus = 2 memory = “512 mib” status = “running”
network_adapter { type = “bridge” host_interface = “wlp0s20f3” device = “IntelPro1000MTDesktop” } }`
terraform error:
╷ │ Error: [ERROR] Setup VM properties: exit status 1 │ │ with virtualbox_vm.node[0], │ on main.tf line 10, in resource "virtualbox_vm" "node": │ 10: resource "virtualbox_vm" "node" { │ ╵ 2021-07-26T08:19:02.553+0430 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info 2021-07-26T08:19:02.553+0430 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock 2021-07-26T08:19:02.553+0430 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2021-07-26T08:19:02.554+0430 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/terra-farm/virtualbox/0.2.1-alpha.1/linux_amd64/terraform-provider-virtualbox_v0.2.1-alpha.1 pid=8063 2021-07-26T08:19:02.554+0430 [DEBUG] provider: plugin exited
Virtualbox errors:
00:00:00.983692 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=0, Machine-state=5 00:00:31.821611 GUI: UIFrameBufferPrivate::performResize: Size=720x400, Using fallback buffer since no source bitmap is provided 00:00:31.996285 GUI: Request to close Runtime UI because VM is powered off already. 00:00:31.996335 GUI: Passing request to close Runtime UI from machine-logic to UI session. 00:00:32.473771 ERROR [COM]: aRC=NS_ERROR_UNEXPECTED (0x8000ffff) aIID={c0447716-ff5a-4795-b57a-ecd5fffa18a4} aComponent={SessionWrap} aText={The session is not locked (session state: Unlocked)}, preserve=false aResultDetail=0 00:00:32.475982 ERROR [COM]: aRC=NS_ERROR_UNEXPECTED (0x8000ffff) aIID={c0447716-ff5a-4795-b57a-ecd5fffa18a4} aComponent={SessionWrap} aText={The session is not locked (session state: Unlocked)}, preserve=false aResultDetail=0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 18 (7 by maintainers)
Commits related to this issue
- Update go-virtualbox with no synthcpu changes The flag is deprecated, and is causing problems as show in #105. — committed to terra-farm/terraform-provider-virtualbox by VoyTechnology 3 years ago
I am not sure have I solved everybody’s issues, but please try and use the provider again using version
0.2.2-alpha.1I have built a custom TF provider using the above PR. Now I see the following error:
After creating a test VM using vagrant, I see that VM created using this TF Virtualbox provider has the SATA disks ordered incorrectly. If I swap the SATA ports, the same VM boots with out any error.