delete, then add disk to machine -> KVM machine not detected as running

Hello, I have some problem with KVM when managing disks and can be reproduced this way:

I create empty machine (probably doesn't matter) with installation ISO attached - so in "Manage Disks" I have two devices, Hard disk and CD or DVD drive. The hard disk is located here (important): /kvm/ubuntu.cloudmin.isshou.cz.img

Then I delete this hard disk (for any reason) and create new one. As default there is name: /kvm/ubuntu.cloudmin.isshou.cz.2.img so I just click on create.

As you can see HDD has different name, which is ok for me but not for Cloudmin :) . As a result I get error when starting up the machine: Starting up ubuntu.cloudmin.isshou.cz .. .. failed : some qemu monitor text here

The machine is running when I check running processes but for Cloudmin it is down.

Now what I have find out. I tried to debug that and in /usr/share/webmin/server-manager/kvm-type-lib.pl there is a method called "get_server_kvm_instance" which checks if KVM instance I just started up is running. It compares "filesystem" of running KVM instances to "kvm_filesystem" attribute set in machine configuration file. The problem is the attribute "kvm_filesystem" has not been changed when new HDD has been added/removed, there is stil old path. After I changed it to new path manually it works ok.

So the solution would be to handle attribute "kvm_filesystem" better - clear or set it as new HDD are removed/added.

Status: 
Closed (fixed)

Comments

Thanks for pointing this out - I didn't consider that someone would remove the primary disk :-)

I will fix this in the 5.4 release.

Automatically closed -- issue fixed for 2 weeks with no activity.