81 votes

virt-manager can't connect to libvirt

After installing KVM, run this command then that error will not occur again. sudo virt-manager
Abhi Abhishek's user avatar
42 votes
Accepted

virt-manager can't connect to libvirt

An alternative to reboot/logout is to run the following commands from a terminal: newgrp libvirt virt-manager The newgrp command allows the user to join the libvirt group without logout, for ...
alkisg's user avatar
  • 550
38 votes

Why do I have a "libvirt qemu" account in Lock/Switch account options in Ubuntu 16.04?

The accountsservice package seems to have a bug, since it shows nologin-shell accounts. As a workaround, simply use these two commands: printf "[User]\nSystemAccount=true\n" | sudo tee /var/lib/...
Devendra Bhat's user avatar
30 votes

Is there any prebuilt QEMU Ubuntu image(32bit) online?

This answer contains detailed steps for the following setups: cloud image amd64 and arm64 debootstrap amd64 and arm64 desktop image amd64 All was tested on an Ubuntu 18.04 host targeting 18.04 ...
Ciro Santilli OurBigBook.com's user avatar
27 votes
Accepted

How to install "qemu-img" and use it to convert a "qcow2" image to a Virtual Box one?

The package you want is qemu-utils: % apt-file search qemu-img qemu-utils: /usr/bin/qemu-img qemu-utils: /usr/share/man/man1/qemu-img.1.gz So install qemu-utils: sudo apt-get install qemu-utils To ...
kos's user avatar
  • 36.1k
23 votes

How to run Ubuntu desktop on QEMU?

Working Ubuntu 18.04 setup Tested in an Ubuntu 18.10 host. ubuntu-18.04.1-desktop-amd64.sh #!/usr/bin/env bash set -eux # Parameters. id=ubuntu-18.04.1-desktop-amd64 disk_img="${id}.img.qcow2&...
Ciro Santilli OurBigBook.com's user avatar
22 votes

Ubuntu 22.04 GPU passthrough (QEMU)

GPU PASSTHROUGH GUIDE FOR UBUNTU 22.04 LTS AND LATER This guide was tested on Ubuntu 22.04 LTS, 22.10, 23.04, 23.10 with Nouveau driver and the following system configuration: MSI® motherboard Z170A ...
21 votes
Accepted

How do I install QEMU 3.0 on Ubuntu 18.04?

It seems that we need to compile QEMU 3.0.0 manually. At first we remove version installed from official repository (if any): sudo apt-get purge "qemu*" sudo apt-get autoremove We should start by ...
N0rbert's user avatar
  • 100k
17 votes

virt-manager can't connect to libvirt

For me, the error was caused because group membership changes don't apply without a logout-login (or reboot). I had just installed KVM and libvirt-bin. The installer automatically added my user to the ...
Andrew Grasso's user avatar
14 votes
Accepted

QEMU warning: "Image format was not specified for 'flash0.img' and probing guessed raw."

This is no error, just a warning. As your virtual flash disks are raw devices (created by dd), qemu-system is not able guessing the disk format. Therefore writes to block 0 (which might be the MBR or ...
ridgy's user avatar
  • 2,356
12 votes

Sharing folder with VM through libvirt, 9p, permission denied

I know, that this is an old thread, but I just came across a similar problem and found a solution that works at least in parts. I also changed the user and group values in /etc/libvirt/qemu.conf to ...
Alexander's user avatar
  • 221
12 votes

Is there something like "VirtualBox Guest Additions" for QEMU/KVM?

Yes, the SPICE guest additions https://www.spice-space.org/download.html#guest
Dzamo Norton's user avatar
12 votes
Accepted

Virt-Manager can't connect to graphical console

In working to try to Merge the latest virt-manager 1.4.0 to Ubuntu I came across this same issue. It does not appear to be a bug in virt-manager just a change how it sends display data to VMs. I'...
gQuigs's user avatar
  • 455
12 votes

Libvirt Qemu password

Update This solution is for LightDM (default display manager up to Ubuntu 16.04 LTS), not for GDM (default display manager in newer Ubuntu versions). It's a bug The bug is described and discussed ...
Rarylson Freitas's user avatar
12 votes

QEMU frequency mismatch on Kubuntu

I had the same problem due to some updates, I opened my Android Virtual Device Manager from Android Studio (Tools->AVD Manager) then matched the emulator where the problem occurred. I clicked the ...
Md. Sultanul Arefin's user avatar
12 votes

Enabling OpenGL in Windows 10 Guest VM in QEMU

Full credit to this post by Thomas Schwery. You could just follow the instructions there but I will summarize below. This should get you a more recent version of OpenGL (for me that was 3.1) running ...
Chris's user avatar
  • 221
11 votes
Accepted

Add physical partition to QEMU/KVM virtual machine in virt-manager

The solution appears to be passing the whole block device, like /dev/sda or the equivalent from /dev/disk/by-id/, to the <source dev=''> setting. This allows the Windows setup to see the ...
Marc.2377's user avatar
  • 407
11 votes

KVM guest can't access internet

I received a comment on Reddit that pointed me in the right direction with this one: https://www.reddit.com/r/linuxadmin/comments/bdy6sz/kvm_guest_cant_access_internet/ The problem is that Docker ...
colincameron's user avatar
10 votes

How do I convert a multiple-part VMDK disk image to qcow2?

It looks like the qemu-img command has been enhanced now. I just converted a bunch of VMware multi-part images to qcow2 with the command: $ qemu-img convert <base of the image without the S0001,...
Stuart's user avatar
  • 1,196
10 votes
Accepted

What is the purpose of "Libvirt qemu" user?

It's created by libvirt-bin: $ grep libvirt-qemu /var/lib/dpkg/info/*.postinst /var/lib/dpkg/info/libvirt-bin.postinst:# Allocated UID and GID for libvirt-qemu /var/lib/dpkg/info/libvirt-bin.postinst:...
muru's user avatar
  • 198k
10 votes

qemu failed to passthrough a tpm device

I have run into the same error. I refered the next web page and found the Apparmor makes this problem. I added /dev/tpm0 rw, in /etc/apparmor.d/abstractions/libvirt-qemu right before /dev/net/tun rw, (...
Norio Suzuki's user avatar
9 votes
Accepted

QEMU frequency mismatch on Kubuntu

I have the solution via a workaround! tl;dr version: -use-system-libs option with the emulator is a temporary workaround. longer version: Googling TSC frequency mismatch gave no ideas as to what ...
itarill's user avatar
  • 280
8 votes

9p (libvirt/QEMU) share modes

Share modes define how the virtualised (p9fs) file system is presented to the guest machine. There are important implications for permission mapping. To understand this, it's important to remember ...
FGiorlando's user avatar
8 votes
Accepted

Is there something like "VirtualBox Guest Additions" for QEMU/KVM?

Yes, there is something like guest additions in virt-manager - it just has to be done a little bit differently. To make it easy for you to see how it works, I'll provide you with some screenshots. ...
cl-netbox's user avatar
  • 31.2k
7 votes

virt-manager can't connect to libvirt

Logged in user has to be added to libvirt usergroup sudo usermod -a -G libvirt $USER
Moazzem Hossen's user avatar
7 votes
Accepted

How to view live file system of QEMU/KVM VM externally?

When in virt-manager you may find the path to the respective file in the configuration of the VM/disk (something like "source path"); default path is /var/lib/libvirt/images/. Find out the name of the ...
ridgy's user avatar
  • 2,356
7 votes

Why do I have a "libvirt qemu" account in Lock/Switch account options in Ubuntu 16.04?

warning : In case you work with libvirt I would advice against doing this, since it deletes the account and makes libvirt stop working I accidentally pressed CtrlAltF10 once trying out some shortcuts ...
himanshuxd's user avatar
7 votes
Accepted

Virtual Machine best practices, and RAW vs QCOW2

you have combined a few questions, let me try to answer them one by one. The guest uses the default network and dhcp in there with your latter command. I assume you have set up a user on install. The ...
Christian Ehrhardt's user avatar
7 votes
Accepted

How to properly configure Virt-Manager (QEMU/KVM) with Windows guest

The easiest way to get all of the required drivers into a Windows guest is to use the SPICE Guest Tools Windows installer. Downloading spice-guest-tools-latest.exe should always give you the latest ...
Michael Hampton's user avatar
6 votes

Blacklist a Nvidia gpu for qemu/kvm passthrough

I have run into similar problems like you (Lubuntu 16.04). This comes due to drivers/modules binding the devices to them before pci-stub is able to do this. You have at least two options in here: ...
AlexOnLinux's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible