Questions tagged [virsh]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

Strange terminal problem with editing, virsh

I'm having formatting issue that only happens upon editing a line. It happens when I'm trying to edit a command in a shell from a VM using virsh, but I think I've seen something similar before on a ...
2
votes
1answer
47 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 ...
0
votes
1answer
31 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-...
0
votes
1answer
58 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: ...
0
votes
1answer
374 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 ...
0
votes
0answers
65 views

Fully unattended Windows 10 installation in KVM

I have a script that automatically creates and starts a (Q35/UEFI based) VM using virsh. The VM has a Windows10.iso mounted to it and also a virtual floppy disk that contains an unattend.xml file that ...
0
votes
0answers
25 views

Limit libvirt lxc container filesystem size

I'm running an lxc container through libvirt. First I've created a container with lxc-create -n test-container -t download -- -d ubuntu -r focal -a amd64 Then I create a new virsh guest with virsh -c ...
0
votes
1answer
54 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-...
0
votes
1answer
23 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 ...
0
votes
0answers
157 views

Can I isolate/de-isolate CPU core dynamically in runtime without reboot?

Can I isolate and de-isolate CPU core dynamically in runtime without reboot(like isolcpus)? I want to change vCPU pinning of virtual machine, which is executing, using virsh vcpupin --live command, ...
0
votes
0answers
287 views

Serial Console via TCP disconnects after some time and fails to reconnect

I am facing a rather unusual problem. I have Centos 8.2 installed on a machine. I have installed KVM, virtual machine manager and cockpit virtual machines. I have a Virtual machine inside of kvm which ...
0
votes
1answer
133 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 ...
0
votes
1answer
96 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 ...
0
votes
0answers
22 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, ...
0
votes
1answer
513 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:...
0
votes
2answers
2k 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) ...
0
votes
1answer
375 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 ...
0
votes
1answer
140 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 ...
1
vote
1answer
206 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 ...
0
votes
0answers
327 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/...
1
vote
1answer
3k 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: # ...
2
votes
1answer
54 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 ...
0
votes
1answer
108 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> &...
2
votes
1answer
666 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 ...
1
vote
0answers
284 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 ...
0
votes
2answers
463 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 ...
-1
votes
1answer
898 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. ...
2
votes
1answer
233 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. ...
2
votes
0answers
26 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 ......
0
votes
1answer
1k 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 ...
0
votes
1answer
2k 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 ...
4
votes
2answers
12k 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, ...
3
votes
1answer
4k 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... ...
6
votes
1answer
4k 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 ...
1
vote
1answer
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....
1
vote
0answers
602 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/...
27
votes
1answer
13k 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 ...
2
votes
0answers
2k 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-...
1
vote
0answers
931 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-...
2
votes
1answer
2k 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 ...
3
votes
0answers
1k 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 ...
0
votes
0answers
683 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> ...
5
votes
3answers
7k 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 ...
1
vote
1answer
9k 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 ...
-1
votes
1answer
3k views

virsh pool storage basics

How or where were these pools created? Where are configuration files? $ virsh pool-list --all Name State Autostart ------------------------------------------- default ...
2
votes
2answers
4k views

virt-install --disk size=10 does what?

How can I get read/write permissions to browse the guest filesystem from the host? (Presumably it's only safe when the guest is shutdown.) Where is the default path, as below, for the guest ...
4
votes
3answers
5k views

Multiple virsh/kvm guest consoles without graphics

I have a serial console working for a centos7 guest without graphics, which I access with virsh console vm. The guest has the appropriate console=ttyS0,115200n8 kernel command line parameter for it. ...
0
votes
0answers
496 views

Virsh guests lose network connectivity

A CentOS 7 host installs CentOS 7 virtual machines inside itself using a virt-install command, which includes an assigned MAC address. The CentOS 7 host is connected via Ethernet to a hardware ...
0
votes
2answers
1k views

Why is there no lost+found directory in storage pool?

I am studying this Red Hat documentation, which states that a validated storage pool should have a lost+found directory to indicate that it is properly mounted. I have followed the instructions ...
3
votes
1answer
4k views

KVM - live external snapshots and appropriate disk names

If I wish to take an external snapshot of a running KVM guest, I would run a command like below: # create the directory for the snapshot data mkdir /vms/$DOMAIN/snapshots/$SNAPSHOT_NAME # create the ...