Hi,
If i stop a vm, there is a small timeframe, that vm status is wrong in api.
When i watch the vm console, and it's closed because "Guest not running". I use two api call:
and
As you can see, the status is different. Is this a bug or feature?
I got this issue, when i use ansible to stop + reconfigure + start vm. when i wanted to start, ansible module made a status check, and detect the status wrong.
(get_vm() func use cluster/resources api call)
If i stop a vm, there is a small timeframe, that vm status is wrong in api.
When i watch the vm console, and it's closed because "Guest not running". I use two api call:
Code:
#pvesh get /nodes/vps2/qemu/200/status/current --output-format json-pretty
{
"agent" : 1,
"cpu" : 0,
"cpus" : 2,
"disk" : 0,
"diskread" : 0,
"diskwrite" : 0,
"ha" : {
"managed" : 0
},
"maxdisk" : 21474836480,
"maxmem" : 2147483648,
"mem" : 0,
"name" : "ubuntu-root",
"netin" : 0,
"netout" : 0,
"qmpstatus" : "stopped",
"status" : "stopped",
"uptime" : 0,
"vmid" : 200
}
Code:
#pvesh get cluster/resources --type=vm --output-format json-pretty|grep qemu/200 -A14
"id" : "qemu/200",
"maxcpu" : 2,
"maxdisk" : 21474836480,
"maxmem" : 2147483648,
"mem" : 426774528,
"name" : "ubuntu-root",
"netin" : 4761,
"netout" : 1392,
"node" : "vps2",
"pool" : "test",
"status" : "running",
"template" : 0,
"type" : "qemu",
"uptime" : 32,
"vmid" : 200
As you can see, the status is different. Is this a bug or feature?
I got this issue, when i use ansible to stop + reconfigure + start vm. when i wanted to start, ansible module made a status check, and detect the status wrong.
(get_vm() func use cluster/resources api call)