0% found this document useful (0 votes)
3 views3 pages

Qemu-kvm Using Virt-Viewer vs Remote-Viewer - Unix & Linux Stack Exchange

The document discusses issues with connecting to a QEMU/KVM virtual machine using virt-viewer versus remote-viewer on an Ubuntu host. It highlights that virt-viewer requires libvirt to be enabled or installed, while remote-viewer does not. Several solutions and command-line options are suggested for successfully connecting to the virtual machine using virt-viewer.

Uploaded by

Ifrain Colina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Qemu-kvm Using Virt-Viewer vs Remote-Viewer - Unix & Linux Stack Exchange

The document discusses issues with connecting to a QEMU/KVM virtual machine using virt-viewer versus remote-viewer on an Ubuntu host. It highlights that virt-viewer requires libvirt to be enabled or installed, while remote-viewer does not. Several solutions and command-line options are suggested for successfully connecting to the virtual machine using virt-viewer.

Uploaded by

Ifrain Colina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

23/7/23, 21:31 Qemu-kvm using virt-viewer vs remote-viewer - Unix & Linux Stack Exchange

Qemu-kvm using virt-viewer vs remote-viewer


Asked 4 years ago Modified 1 year, 3 months ago Viewed 5k times

Host: Ubuntu 18.04


Guest: Ubuntu 10.04
1
I started a virtual machine with the following command line:

qemu-system-x86_64 G.qcow2 -m 4096 -smp 4 -no-acpi -enable-kvm \


-name system76 -device virtio-net,netdev=net0 \
-netdev tap,id=net0,ifname=tap0,script=no,downscript=no,br=br0 \
-vga qxl -spice port=5900,addr=127.0.0.1,disable-ticketing &

I can access the guest with the following command:

remote-viewer spice://127.0.0.1:5900 # from the user (not root)

But I cannot access it with:

virt-viewer spice://127.0.0.1:5900 # from the user (not root)

This shows a pop-up window that says:

Failed to connect: No virtual machine found

or

virt-viewer -c libvirtd:///system system76

This shows a pop-up window that says:

Unable to connect to libvirt with URI libvirtd:///system

Although that is precisely what virt-admin , uri reports (from root).

So how do I connect with virt-viewer ?

https://unix.stackexchange.com/questions/526849/qemu-kvm-using-virt-viewer-vs-remote-viewer 1/3
23/7/23, 21:31 Qemu-kvm using virt-viewer vs remote-viewer - Unix & Linux Stack Exchange

kvm qemu libvirt

Share Improve this question Follow asked Jun 25, 2019 at 15:12
asoundmove
2,465 2 24 27

Sorted by:
3 Answers
Highest score (default)

qemu-system-x86_64 command does not need libvirt to be enabled or installed in order to


execute a VM. It uses QEMU/KVM only. So apparently you don't have libvirt enabled or
2 installed on your host system. That's perfectly fine, but virt-viewer won't work, because it
depends on libvirt .

Share Improve this answer Follow answered May 24, 2021 at 7:44
Krackout
2,480 9 24

Try

virt-viewer spice://[email protected]:5900
0
or

sudo virt-viewer spice://127.0.0.1:5900

Share Improve this answer Follow answered Apr 1, 2020 at 8:18


Philippe Gachoud
1,539 16 17

Personally I use virt-viewer -fw system76 to connect to my VMs.

-f is to open it in full screen


0
-w virt-viewer will wait that the VM is correctly turned on

system76 is just the name of the VM

PS : I use a script to open my VM so the -w flag is to avoid virt-viewer to open while VM isn't
loaded yet. Without the -f flag the VM will open in windowed mode
https://unix.stackexchange.com/questions/526849/qemu-kvm-using-virt-viewer-vs-remote-viewer 2/3
23/7/23, 21:31 Qemu-kvm using virt-viewer vs remote-viewer - Unix & Linux Stack Exchange

Share Improve this answer Follow edited Apr 24, 2022 at 8:53 answered Apr 8, 2022 at 14:20
Severin Robert
1 1

So, are you saying that the -w flag makes the difference? Does it work for you if you leave out the f ?
– G-Man Says 'Reinstate Monica' Apr 8, 2022 at 19:36

I use a script to open my VM so the -w flag is to avoid virt-viewer to open while VM isn't loaded yet.
Without the -f flag the VM will open in windowed mode – Severin Robert Apr 9, 2022 at 21:38

Please edit your original answer to add the supporting information from your comment. – rubynorails Apr
18, 2022 at 19:22

https://unix.stackexchange.com/questions/526849/qemu-kvm-using-virt-viewer-vs-remote-viewer 3/3

You might also like