I have recently setup a homelab with a KVM hypervisor:
I have almost everything working the way I want it (networking/vnc), but there is something that I cannot figure out and seem to be missing. When I reboot a guest from inside the guest (so far only when during an install of a guest), it never actually reboots, but a virsh list –all shows that its powered off.
The guests reboot normally after they have been installed and your logged into the guest OS. It is only during install and the initial reboot that this occurs. It has happened with Ubuntu 14.04, CentOS6/7 and Arch Linux (base ISO, nothing custom).
I am fine with it, but want to know if this is normal, or if there is something inherently setup wrong? I also don’t even know where I should be looking. I’ve really just been digging through the man pages of virt-install and virsh. I am new to KVM, not virtualization. I get the concepts of virtualization, but KVM is such a whole different animal.
When you install a virtual machine, the system uses a slightly different configuration than the normal running configuration (e.g. the installation ISO may be mounted, or PXE boot may be configured).
Once installation finishes, the installer is expected to reboot, and instead of rebooting, virt-install shuts down the VM. This is so that it can be reconfigured to its normal configuration (booting from the virtual hard drive, etc.).
If you had virt-manager or virt-install running at the time of the reboot, then it would restart the VM for you after shutting it down, (provided you didn’t pass the
--noreboot option) but if you interrupted virt-install before the OS installation was complete then it would not automatically restart the VM and you would need to do so yourself.
Either way, your VMs will reboot normally afterward. This logic only applies to the first boot, and is meant to facilitate OS installation.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.