Questions tagged [virsh]

The tag has no usage guidance.

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

KVM empty virsh pool-list

I am trying to move the KVM storage .qcow2 file from /var/lib/libvirt/images to an external HD to save space on my laptop. I am trying to follow this guide but when I prompt: virsh pool-list I got ...
1
vote
1answer
33 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
80 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
605 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
24 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
32 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> &...
1
vote
1answer
217 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 ...
0
votes
0answers
98 views

virt-customize modifications not present in guest VM

I am trying to make some changes in the Ubuntu cloud image. For start, i am trying to copy a file from the host to the guest vm or create a dir via --run-command. However, none of the modifications ...
1
vote
0answers
113 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
149 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
467 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
146 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
22 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
415 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
1k 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 ...
0
votes
1answer
3k views

How to change default text edior for virsh edit? (setting EDITOR env variable didn't work)

I recently installed virt-manager on an Arch Linux install, 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 ...
0
votes
1answer
1k 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... ...
3
votes
1answer
1k 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 ...
0
votes
1answer
583 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
82 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/...
10
votes
1answer
4k 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
645 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
505 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-...
0
votes
1answer
801 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 ...
2
votes
0answers
643 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
343 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> ...
3
votes
2answers
4k 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 ...
0
votes
1answer
4k 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 ...
0
votes
1answer
1k 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
2k 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 ...
1
vote
2answers
3k 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
413 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
1answer
713 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
3k 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 ...
1
vote
3answers
8k views

Create virbr0 for virsh

I'm trying to setup a KVM based VMs on a local server, and following this doc: https://wiki.debian.org/KVM In this documentation it states that you'll get virbr0 for bridge connection, but ...
3
votes
0answers
728 views

Allow KVM guests on virsh virtual network to access the real internal network

I have a home network 192.168.1.0 behind a router 192.168.1.1. A set of existing Linux and Windows hosts are on this network, most on wired ethernet connections. I am configuring a new server that ...
1
vote
0answers
540 views

KVM - List snapshots in order of creation

I've only just realized that KVM snapshots default to being listed in alphabetical order, rather than chronological. This can be confusing if you sometimes use the command virsh snapshot-create-as $ID ...
0
votes
0answers
45 views

How to dumpxml to a file when authentication enabled?

I set up authentication for the libvirtd, because it has right to operate pools and hence to write to raw disk devices. Now I need to dumpxml from existing domain. But the dumpxml command has no ...
27
votes
1answer
49k views

How to create a VM from scratch with virsh?

It looks like that you cannot create a brand new VM with virsh unless you already have a working XML file. I have just installed all the needed bits for QEMU-KVM to work, and need now to create my ...
6
votes
2answers
2k views

Using virsh to control VMs created in virt-manager [closed]

here's a question for you that's been driving me round the bend. I've managed to find plenty of resource from folk that want to do the opposite from me i.e see a machine they created using virsh in ...
0
votes
1answer
2k views

Shutting down kvm guest without acpi

I've got a KVM guest that won't shut down from virsh or from virt-manager. Most everything I've read says to install ACPI on the guest and do a bunch of configuring on the host to make this work. Is ...
2
votes
0answers
985 views

Virsh (libvirt-bin) is not able to communicate with Xen server

I have installed the latest version of Xen server 6.5. Now I want to connect to it with virsh (libvirt-bin). When I do this I get the error error:end of file while reading data: sh:nc:command not ...
0
votes
1answer
4k views

Where does KVM hypervisor store VM files?

For a guest machine how can I know where the files created in vm (not the VM config files but actual files which I create while using VM) are stored on my host machine? To which directory of my host ...
1
vote
0answers
593 views

Virsh migrate fails with “process exited while connecting to monitor” error

I am trying to migrate a VM from one host to another with below command virsh migrate --live nodetwo qemu+ssh://192.168.1.33/system nodetwo = VM name But I am getting an error as error: ...
5
votes
1answer
8k views

virsh and creating storage pools - What is sourcepath “- - - -”

I am running CentOS 7 and was following a chapter in a book dealing with virtualization and creating storage pools. I successfully ran the following command, but I'm not sure what setting - - - - as ...
0
votes
1answer
65 views

Is it possible to allocate slices of disk to a KVM storage pool?

When using virt-manager to create a storage pool it does not give the option to set the size. Instead, it assumes that an entire partition is available to the pool. I would expect this to cause ...
3
votes
1answer
2k views

Modifying files inside a snapshot (qemu img file)

I have taken a snapshot recently to assist me build VMs quickly with the operating system I desire (through virsh), however, every time I build a VM, I would like to modify few files inside the img ...
1
vote
1answer
733 views

nova volume-detach fails silently, compute log shows libvirtError: invalid argument: no target device vdb

Using Openstack Havana, I'm trying to detach a cinder volume from a nova instance. Nova volume-list shows it as in-use: | 34b0ea26-f85c-4b62-8ebd-884b0e63e2d5 | in-use | filestore | 256 | None| ...
2
votes
0answers
2k views

How to convert the qemu parameters for an osx guest for libvirtd

I managed to have an osx guest running in qemu with the following commands: // create the virtual image $ qemu-img create -f qcow2 mac_hdd.img 35G // .. install osx ... // start the guest $ qemu-...
0
votes
1answer
3k views

unable to start vm on kvm

I'm not able to start a vm on kvm with the following error [root@dev1 RHEL5-7]# virsh start demo-57-test error: Failed to start domain demo-57-test error: Unable to add port vnet0 to OVS bridge br0: ...