qemu Linux vm with virt-manager, problems with install/post install.

I created a vm for 'rocky linux' using virt-manager. A virtual console was presented and the install was completed normally. When I rebooted from the console the machine evidently restarted and is currently running. However, I cannot get a console window to open.

The virt-manager display shows that a serial device is configured. If I forcibly stop the vm and restart then the installation menu is displayed in the virtual console. I can break into the rescue mode and mount the file system. The contents of /mnt/sysimage/boot/ are correct when I compare them to an actual 'rocky linux' install.

However, the contents of /mnt/sysimage/boot/grub2/ do not match. On the VM this directory only contains a soft link from grubenv to ../efi/EFI/rocky/grubenv. This file contains a grub environment block which is similar to that found in /boot/grub2/grubenv/ on the actual rocky linux installation.

What needs to be done to get the VM to boot into the installed system instead of the installer?
 
If I am not mistaken virt-manager uses libvirtd as the back end.
All your VM's settings are saved in an XML format file.
You can edit your VM settings in the gui or edit the underlaying xml settings file.
There is also virsh for configuration.

Code:
virsh # help detach-device       
  NAME
    detach-device - detach device from an XML file

  SYNOPSIS
    detach-device <domain> <file> [--persistent] [--config] [--live] [--current]

  DESCRIPTION
    Detach device from an XML <file>

  OPTIONS
    [--domain] <string>  domain name, id or uuid
    [--file] <string>  XML file
    --persistent     make live change persistent
    --config         affect next boot
    --live           affect running domain
    --current        affect current domain
 
I'll start by saying I use virt-manager under KVM, but I expect that the principles are the same...

With virt-manager, open the console for the virtual machine.
Click on the light bulb (to show virtual hardware details).
Click on "Boot Options".
Select the appropriate boot device (probably VirtIO Disk 1).

You may also click on the box that says "Enable boot menu". This will allow you to select the boot device.
 
Last edited by a moderator:
In virt-manager under boot options I have the Enable Boot Menu selected and only the Hard Disk option selected. This does not change the boot console selection which is Install, Test Media and Install, or Troubleshoot.
 
Back
Top