Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Sudden fatal error when running any VM with QEMU-KVM

  1. #1
    Join Date
    May 2007
    Beans
    43

    Question Sudden fatal error when running any VM with QEMU-KVM

    I'm running KUbuntu 20.04 as the host, and since yesterday, I'm getting the following error when attempting to start any VM I have set up.

    https://imgur.com/P8zk50N

    Up till now, everything worked fine. I've rebooted the system (Windows got me started doing THAT!), and noticing the "permission denied" on accessing
    the kvm kernel module, I checked to be sure my user account was still a member of the "kvm" group.. It was. The only thing I could think of, was the
    fact I wanted to test a flash drive I made yesterday to install OS using the Ventoy package on the flash drive. I ran "sudo kvm -hdb /dev/sdc" and it booted
    the Ventoy menu. I didn't try running any vms then, until today. That "permission denied" appears to be a "smoking gun", but other than being a member
    of the "kvm" group, I'm lost..

    Thanks
    Dave
    Last edited by LVDave; September 11th, 2021 at 06:42 PM. Reason: Not sure why the imgur screen shot doesn't show up..

  2. #2
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Sudden fatal error when running any VM with QEMU-KVM

    There are three log files that you would want to look at for KVM problems...
    1. $HOME/.virtinst/virt-install.log – virt-install tool log file.
    2. $HOME/.virt-manager/virt-manager.log – virt-manager tool log file.
    3. /var/log/libvirt/qemu/ – Log files for each running virtual machine.

    Since you are having troubles with more than one VM, and it specifically notes, virt-manager, that is the log I would look at first.

    You did say you installed a VM yesterday using sudo privileges, which gave that VM ownership as root, instead of a group permission, whic you may want to chenck the domain install lof for that VM...

    Check the syslog, that kvm intitialized... (kvm [1]: Hyp mode initialized successfully)

    And check your groups
    Code:
    $ groups
    kvm libvirt
    Then see if you can access these without problem or permission errors..

    Code:
    which qemu
    which kvm
    which virt-manager
    kvm --version
    virt-manager --version
    sudo systemctl status libvirtd

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  3. #3
    Join Date
    May 2007
    Beans
    43

    Re: Sudden fatal error when running any VM with QEMU-KVM

    Thanks for the info.. Actually I didn't *install* a VM, I simply tested a Ventoy USB stick I'd just created, to carry the ISO files to be used FOR installing distros on bare-metal. In case you're not familiar with Ventoy, its a fantastic package that installs on a USB stick as two partitions, one called VentEFI, that boots the stick, the other partition can, when mounted, have ISO files copied to it, and when you boot the stick, you get a menu of the ISO files in the second partition and you can select which ISO you want to boot/install. I simply tested if the stick would boot to the menu. BUT... Now that I think about it, I did do the "kvm -hdb /dev/sdc" as root (sudo).. Am away from the machine with this problem right now but will check everything you listed when I get home... THANKS.. Kind of new to KVM...

  4. #4
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Sudden fatal error when running any VM with QEMU-KVM

    If I do something with a VM booting off USB, then I set the details of that VM to use hardware USB pass-through... Then I boot from and write USB's from the VM... If you did that... Then I know the problem... LOL. (That is the only way a VM will boot from USB.)

    It is a pain in the behind and does happen to me often. It happens even if you you take the USB out and plug it into the same USB port... I do not know why it is so picky, but it is. It's broken, until...

    Open Virt-Manager, Go to the VM you had open to do that. Go to details view. Go to the USB Hardware from psychical, and remove/update. Everything will strat working again.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  5. #5
    Join Date
    May 2007
    Beans
    43

    Re: Sudden fatal error when running any VM with QEMU-KVM

    Finally got time to try your suggestions..


    Addressing the logs you mentioned, I don't have the following directories in $HOME..

    $HOME/.virinst or $HOME/.virt-manager

    I DO have the /var/log/libvirt/qemu with logs for each of my installed vms.. I did not see any log in the directory that might indicate it was a log for the
    USB stick test I ran that apparently caused this problem.

    As for groups, my user account is a member of kvm, libvirt

    Here's a weird one..

    which qemu is not found
    which kvm is /usr/bin/kvm
    which virt-manager is /usr/bin/virt-manager
    kvm --version is QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.17)
    Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
    virt-manager --version is 2.2.1
    systemctl status libvirtd is running


    As for your comment where you said you knew where the problem was, let me clarify what I did with the USB kvm boot. I did not use Virt-manager at all with
    this usb test. As I mentioned earlier in the thread, from the command line, I did "sudo kvm -hdb /dev/sdc". At no time did I use virt-manager to do this test. I recall testing a USB stick with an ISO before and did not have this malfunction.

  6. #6
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Sudden fatal error when running any VM with QEMU-KVM

    hmmm. Let me look

    The user's virt-manager.log is now located at $HOME/.cache/virt-manager/virt-manager.log

    You had said that you now couldn't start "any" VM's. The logs of those VM's you tried to start and failed, might show "something" on why they are failing to start.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  7. #7
    Join Date
    May 2007
    Beans
    43

    Re: Sudden fatal error when running any VM with QEMU-KVM

    Made an interesting discovery, where I can see all of my vms listed in virt-manager, if I did a "virsh list -all" I see NONE of them. Was going to try and
    start one from virsh, if I can't see em, I can't start em.. Curious, is this getting to the point where I should just uninstall kvm and reinstall it?

  8. #8
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,515
    Distro
    Ubuntu Development Release

    Re: Sudden fatal error when running any VM with QEMU-KVM

    Quote Originally Posted by LVDave View Post
    Made an interesting discovery, where I can see all of my vms listed in virt-manager, if I did a "virsh list -all" I see NONE of them. Was going to try and
    start one from virsh, if I can't see em, I can't start em.. Curious, is this getting to the point where I should just uninstall kvm and reinstall it?
    Did you mean to write "--all"?
    For example, this is what I get:
    Code:
    doug@s19:~$ virsh list --all
     Id   Name      State
    --------------------------
     1    desk-ii   running
     -    desk-ff   shut off
     -    desk-hh   shut off
     -    serv-xx   shut off
    And I started the running VM via:
    Code:
    doug@s19:~$ virsh start desk-ii
    Domain desk-ii started
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  9. #9
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: Sudden fatal error when running any VM with QEMU-KVM

    Made an interesting discovery, where I can see all of my vms listed in virt-manager, if I did a "virsh list -all" I see NONE of them.
    You may need to use sudo to run that. At least that's true on Fedora, which I use as my WM host. Notice:

    Code:
    [dmn@Tyana ~]$ virsh list --all
     Id   Name   State
    --------------------
    
    [dmn@Tyana ~]$ sudo virsh list --all
    [sudo] password for dmn: 
     Id   Name                 State
    -------------------------------------
     -    Ubuntu-2004-BIOS     shut off
     -    Ubuntu-2010-UEFI-2   shut off
     -    Ubuntu-2104-UEFI     shut off
     -    Zorin-16-UEFI        shut off

  10. #10
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Sudden fatal error when running any VM with QEMU-KVM

    @Dennis N:

    Well no... Not on Ubuntu (for Virsh), unless you are trying to do a virsh connect. Is default for Ubuntu:
    Code:
    ubuntu_system:~$ echo $LIBVIRT_DEFAULT_URI 
    qemu:///system
    But that doesn't exist outside of Ubuntu systems for virsh, unless you
    Code:
    export LIBVIRT_DEFAULT_URI=qemu:///system
    Which will allow non-sudo users to do that.
    Last edited by MAFoElffen; September 19th, 2021 at 10:11 PM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •