I have an automation script that checks the running status of a KVM and does some action based on it. When I installed KVM using virt-install on a physical host the initial status of KVM ("Trying_a_nw_one" in this case) is "running" :-
$virsh --quiet list
6 kbUBU2 running
7 kbUBU3 running
9 kbUBU4 running
11 kbUBU5 running
12 Trying_a_nw_one running
After some time the status automatically becomes "shut off" and this is what I expect in my script. The problem happens when I create KVM using virt-install( same arguments ) on a KVM host which is again a VM running on ESX7.0. The initial status is "running" but it never changes. This makes the script behave differently. Can anyone help to understand why KVM status is different in these two scenarios and how can I achieve consistent behaviour? Ubuntu version is same in both case:-
$lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty