Questions tagged [virsh]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
111 views

qemu-system-x86_64 not found when moving VMs between computers

I am moving GNOME Boxes virtual machines from Fedora to Guix following the guide on Fedora wiki. On the Fedora workstation: $ virsh list --all Id Name State -------------------------------...
Roman Riabenko's user avatar
0 votes
0 answers
83 views

Execute a virsh command as another user in interactive setup script

I am using a script to setup some Fedora machines and I can not execute a Virsh (cli tool for Libvirt) command as another user. The output given indicates that the command was successful but it fails ...
MathsJoe's user avatar
0 votes
0 answers
162 views

keyboard/mouse not working in VMM thru VNC

i remotely connect to my Virtual Machine Manager thru VNC client (MobaXTerm) to TightVNC (on the Debian host) on Win10. however, when i spin up a vm, the guest does not respond to any keyboard or ...
WhiteRau's user avatar
  • 213
0 votes
0 answers
28 views

`virsh start` crashes CentOS 7 host

This just began yesterday after the host system was shutdown and booted back up. Upon running virsh start [guest-name], it immediately dumps this output and forcibly reboots the host: The only thing ...
autobottodoggo's user avatar
0 votes
0 answers
35 views

Modifying multiple interfaces model types in virsh using a script, reboot restores original types

I am attempting to create a startup script that will modify the model of the following interfaces in virsh: </interface> <interface type='bridge'> <mac address='52:54:00:df:9a:65'/>...
Ashley Mark Brown's user avatar
3 votes
1 answer
91 views

Why don't I see any KVM domains when I run virsh through ssh?

I'm trying to automate checking several nodes running KVM domains. I was simply using ssh to run the commands directly instead of doing a full login: ssh user@kvmhost "virsh list --all" But ...
deltaray's user avatar
  • 1,301
1 vote
1 answer
1k views

How to fix (several) VM start-up issues in gnome-boxes?

in short: My virtual machine named CONAN01 is not starting up in gnome-boxes, I receive/see different errors and do not know what the real issues behind them are: Error 1: When starting gnome-boxes ...
Erdinc Ay's user avatar
  • 1,000
0 votes
0 answers
230 views

how can I do incremental backup of raw image?

the virsh checkpoint only works with qcow2 images. I wonder if it is possible to use qemu tools to create backup of raw image (offline). We use raw image due to performance issue of qcow2 on btrfs/zfs....
Wang's user avatar
  • 1,214
0 votes
0 answers
64 views

What is "virsh guest domain"? Any meaning to the name?

Web search for "virsh guest domain", "virsh" results in instructions how to use command and man page quote (no wikipedia article): The virsh program is the main interface for ...
Martian2020's user avatar
  • 1,083
1 vote
0 answers
29 views

Re-image disks of an existing vm

I am using the libvirt utility to manage vms and I had a specific requirement to restart a vm from scratch i.e. like a fresh bootup, wipe disks clean and restart. Is that possible with any of the ...
LinuxUser's user avatar
1 vote
1 answer
80 views

Limited permissions in tmux session

I am using a tmux session to run a script that runs some Python code (which uses a virtual environment stored at /opts/...; Python binaries have been copied not linked) that creates virtual machines ...
Eric M.'s user avatar
  • 51
2 votes
1 answer
543 views

How to export *all* VMs from KVM host

Searching for a good way to export all VMs from KVM nodes so I have some backups while doing in place OS upgrade of the KVM hosts. So far, I am using a hacky bash oneliner in order to dump all VMs as ...
Orsiris de Jong's user avatar
0 votes
1 answer
1k views

debian virt-install with import not working No 'bridge' attribute specified

new to Debian from Centos I'm trying to import an image Does anyone have any idea what I would be doing wrong? Debian VERSION="10 (buster)" packages installed: apt-get install --no-install-...
gstlouis's user avatar
0 votes
1 answer
195 views

How to make the libvirt VM installed under the regular user boot during the system bootup?

I installed a virtual machine under a regular user(in other words, not under root user) with virt-install and configured this VM to boot automatically: $ virsh dominfo vm Id: 1 Name: ...
Martin's user avatar
  • 7,356
1 vote
1 answer
6k views

How to tell qemu to use a specific MAC adderss on a network bridge?

When I create a VM using virt-install, the VM gets connected to the virbr0 network interface automatically by generating this XML configuration: <interface type="network"> <source ...
Forivin's user avatar
  • 817
0 votes
1 answer
1k views

Is it possible to modify libvirt virtual machine network related configuration without restarting the VM?

Let's say, that I have a virtual machine named test with following configuration: $ virsh dumpxml test <domain type='kvm' id='42'> <name>test</name> <uuid>4b72f3be-41f5-...
Martin's user avatar
  • 7,356
0 votes
1 answer
265 views

How to open (not only start) virtual machine from CLI

Installed qemu kvm, created Windows10 vm and I can start and open it from the GUI. Exited (quit, not close) KVM GUI. # virsh list --all Id Name State ------------------------ - win10 shut ...
folti7's user avatar
  • 1
0 votes
1 answer
393 views

Virsh - Autostart VM Upon Network Bootup

I started my first VM using a script my apprentice made. After a few days my graphics card froze so I had to reboot the server. Upon restart, I can see virsh list --all shows the VM I set up but the ...
powerhousemethod's user avatar
1 vote
1 answer
268 views

Libvirt and bash completion on Slackware-current: why domain is not completed?

Very strange situation on Slackware-current. With libvirt-6.8.0 compiled by source. Let start bash completion virst st<TAB> virsh start OK virsh start --dom<TAB> virsh start --domain OK ...
elbarna's user avatar
  • 12.1k
0 votes
0 answers
62 views

QEMU Guest IO Errors with Raw Image Once a Week

I am seeing a strange issue with virtual machines running on my server where once a week they will stall. Every Monday Morning PDT, the services running on the VMs will freeze up (for example, nginx, ...
Jason's user avatar
  • 1
0 votes
1 answer
1k views

Is it possible to rsync a live virtual machine image file?

I have several virtual machines on KVM. They are mostly stateless, and shutting them down would be impactful and is not ideal. Is it possible to: rsync /var/lib/libvirt/images/host1.qcow2 user@offsite:...
Kahn's user avatar
  • 1,672
0 votes
2 answers
4k views

Why does `virsh console x` hang on "Escape character is ^]"? (qemu-kvm)

The company where i start working for 2 months ago have an old hypervisor running with a few virtual machines. I logged in into one of the machines (at that point i did not know it was a virtual one) ...
CodeNinja's user avatar
  • 191
0 votes
1 answer
700 views

virsh / qemu external snapshots fail with more than one disk

I am running into this problem and have found no answer in my research. There is a similar post on SuperUser that hasn't had a comment, much less an answer, in close to 10 months. Maybe that is not ...
James Wilmoth's user avatar
0 votes
1 answer
298 views

How do rename virsh disk-only snapshots?

I created a few snapshots with virsh snapshot-create-as --name "yyyymmdd-snap.qcow2 --disk-only --domain my-vm.qcow2 and made a bit of a mess with the snapshot image filenames. It appears that ...
autobottodoggo's user avatar
2 votes
1 answer
430 views

virsh "live" vs "current" domain

From the virsh manpage, under attach-interface: If --live is specified, affect a running domain.  If --config is specified, affect the next startup of a persistent domain.  If --current is ...
erp's user avatar
  • 697
1 vote
0 answers
557 views

virsh attach-disk only work with name vd* instead of sd*

I have an qcow2 image and want to attach another disk to it. # create new qcow2 disk qemu-img create -f qcow2 vm-disk2 500G Then I attach it as sdb: virsh attach-disk myvm /var/lib/libvirt/images/...
Tuyen Pham's user avatar
  • 1,765
1 vote
1 answer
6k views

Why does my QEMU/KVM virtual machine not start after CentOS 7.7 update?

After an automatic update of CentOS to version 7.7 on Sep 17 2019 my QEMU/KVM virtual machines do not start when I reboot the hypervisor server. Trying to start the VM by hand gives this error: # ...
Ned64's user avatar
  • 8,536
2 votes
1 answer
140 views

How can I find virsh hosts by name?

tl;dr: How can I get DNS on my machine to look up virtual machines I create in virsh? I have virsh installed via the regular packaging on Ubuntu 18.04 (bionic). This results in two name servers - a ...
Kevin Lyda's user avatar
0 votes
1 answer
241 views

propagate virtualized Ethernet interface link status from qemu guest to host

Is it possible to propagate Ethernet interface link status from guest to host, i.e if one does ip l set dev eth0 down in guest, then something is triggered in host? virsh domif-getlink <domain> &...
Martin's user avatar
  • 7,356
2 votes
1 answer
1k views

Set L2 cache for QEMU qcow2 disk in virsh XML

In the QEMU commandline you can set a L2 cache for a disk using l2-cache-size=10M This option is not supported in Virsh XML but it should be able to use the XML element <qemu:commandline> but I ...
MrCalvin's user avatar
  • 659
1 vote
0 answers
470 views

virt-sysprep - Is it possible to use with LVM & LUKS?

I am trying to make a template VM using virt-sysprep. The host is CentOS 7, and the guests are CentOS 7 in LVM partitions (not RAW or qcow image files). The guest I'm working with has LUKS full disk ...
user2792137's user avatar
0 votes
2 answers
900 views

virsh preboot script

I am running a virtual machine that requires vfio access to a PCI card. Using this script I am able to successfully bind the PCI device and its iommu group to vfio-pci, which then lets me boot up the ...
erp's user avatar
  • 697
-1 votes
1 answer
1k views

Is KVM a hypervisor?

https://en.wikipedia.org/wiki/Hypervisor#Classification says QEMU is type 2 hypervisor, and KVM can be both type 1 and 2 hypervisor: The distinction between these two types is not always clear. ...
Tim's user avatar
  • 99k
2 votes
1 answer
520 views

How can I not give a virtual graphics card at all to your VM and have the console on serial?

Stéphane Chazelas wrote that Can I start Debian on a text virtual console in a virtual machine? You could also not give a virtual graphics card at all to your VM and have the console on serial. ...
Tim's user avatar
  • 99k
2 votes
0 answers
32 views

Is it possible to associate an existing NIC with guest without bridge?

I have an existing virtual Ethernet device veth0 and I want to use this for virtual-machine. At the moment, I create a bridge for this, e.g: virt-install --name vm --network bridge=br0,model=e1000 ......
Martin's user avatar
  • 7,356
0 votes
1 answer
2k views

Network Bridge for VM not working after reboot

I have a CentOS 7 host with a network bridge set up for guest VM's to use. All was well until a recent reboot. After the reboot, the guest VM does not have internet access, nor can it ping other local ...
Joshua Schlichting's user avatar
0 votes
1 answer
3k views

Why is a machine of type i440fx created when I specify q35 and how do I get q35 to work?

I need to create a Windows VM with a Q35 machine type. However, in spite of specifying q35, and i440fx machine is created. created with: sudo virt-install \ --name wintest \ --boot uefi \ --ram ...
Stonecraft's user avatar
8 votes
4 answers
20k views

How to change default text editor for virsh edit?

I recently installed virt-manager on Arch Linux, and unlike under Ubuntu, I was not prompted to choose a text editor on the first launch of virsh-edit. Instead, the XML file was opened in vi (or vim, ...
Stonecraft's user avatar
4 votes
1 answer
6k views

virsh: Connected to domain <name> Escape character is ^]

I'm having an issue with viewing output from a virtual machine installed via virt-install. I first used this method, but it left me with the following immediately after running: Starting install... ...
Joshua Schlichting's user avatar
8 votes
1 answer
5k views

Unable to shutdown Ubuntu 18.04 guest using virsh-shutdown

I am running Ubuntu 18.04 (desktop) in a VM using Debian 9 and KVM as the hypervisor but running virsh shutdown BS-MS01 I get a message saying the domain is shutting down but the VM is actually still ...
Steve Brown's user avatar
1 vote
2 answers
1k views

Libvirt Ubuntu VM: files created on guest in shared folder given root-only access on host

I have created a Ubuntu VM on a server running Ubuntu Server 16.04.5 LTS using the following command: sudo virt-install \ --name TEST \ --memory 2048 \ --vcpus 2 \ --location 'http://archive....
user3470185's user avatar
1 vote
0 answers
988 views

how to fix the devices name ordering in guest vm (devices name ordering changed after reboot vm by virsh)

my devices xml define: first vm only has a root volume, <disk type='file' device='disk' snapshot='external'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/dev/...
MaximJ's user avatar
  • 11
38 votes
1 answer
23k views

What's the difference between KVM, QEMU and libvirt?

I'm trying to understand how all the components of the VM ecosystem fit together. What's the difference between: KVM QEMU libvirt Which is controlled by virsh and virt-install? This comment says ...
falsePockets's user avatar
3 votes
0 answers
3k views

How to flush all the DHCP leases with virsh. So all not just one with net-update default delete ip-dhcp-host

OS: Fedora 28 KVM So I am trying to delete all the dhcp leases with virsh, so all of them at once not one by one or any one in particular. I know that you can use net-update default delete ip-dhcp-...
ChronicUser's user avatar
2 votes
0 answers
1k views

connect qemu/kvm(managed by virsh) VM to an existing tap device

I'm using virsh to manage my qemu/kvm VMs. Problematic VM has the following interface configuration: <interface type='bridge'> <mac address='52:54:00:92:f7:f8'/> <source bridge='br-...
Martin's user avatar
  • 7,356
2 votes
1 answer
3k views

Why does "virsh list --all" shows running as normal user but "shut off" with sudo?

The server1's correct state is shut off but when i run the command as normal user it shows the state as running for normal user and shut off with sudo [msingh@localhost VMFiles]$ virsh list --all Id ...
munish's user avatar
  • 7,825
3 votes
0 answers
2k views

Rename qcow2 internal snapshots created with virsh snapshot-create-as

Background I have a QEMU/KVM virtual machine whose virtual disk is a qcow2 file. To create snapshots, I have been using sudo virsh snapshot-create-as <vm_name> <snapshot_name> and now I ...
user avatar
0 votes
0 answers
855 views

virsh net-define error: this function is not supported

I'm trying to create a simple network using the following xml: <network> <name>net-bridge</name> <forward mode="bridge"/> <bridge name="virbr0"/> </network> ...
Adrian C's user avatar
5 votes
3 answers
8k views

One prompt pkexec - two command

Someone could answer me how make one prompt via pkexec when I've to use two command with authentication? My easy sample script: pkexec virsh net-start default; pkexec "/home/user/program"; I'm new ...
Hamlet's user avatar
  • 53
3 votes
1 answer
12k views

How do you change KVM VNC port at runtime, from the command line?

Currently I have a virtual machine running, and I can see that with: # virsh list Id Name State ---------------------------------------------------- 1 vmname ...
kvmuser's user avatar
  • 33