You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When investigating #196, I noticed that if a VM created with terrraform is stopped a subsequent terraform plan will not show that the VM will be started. This means the power_state property is not being refreshed properly.
The text was updated successfully, but these errors were encountered:
╷
│ Error: jsonrpc2: code 13 message: VM state is halted but should be running: {"objectId":"1daf4d69-58e3-1976-b7c4-7e6edb0ee595","expected":"running","actual":"halted"}
│
│ with xenorchestra_vm.vm,
│ on main.tf line 1, in resource "xenorchestra_vm""vm":
│ 1: resource "xenorchestra_vm""vm" {
│
╵
Terraform config
Using this config:
resource"xenorchestra_vm""vm" {
name_label="${local.projekt}"template=data.xenorchestra_template.template.idcpus=1memory_max=1* local.gibwait_for_ip=truecdrom {
id=data.xenorchestra_vdi.iso.id
}
network {
network_id=data.xenorchestra_network.network.id
}
disk {
sr_id=data.xenorchestra_sr.storage.idname_label="Data disk for ${local.projekt}"size=1* local.gib
}
tags=[
"dev",
]
}
Running apply
wait till completion
stop vm via xoa (normal stop)
run plan, see changed powerstate
run apply see terraform crash.
Running terraform with debug logging seems to list all my vms, settings and the like, so i'd rather not post that publicly
When investigating #196, I noticed that if a VM created with terrraform is stopped a subsequent
terraform plan
will not show that the VM will be started. This means thepower_state
property is not being refreshed properly.The text was updated successfully, but these errors were encountered: