Questions tagged [virsh]

The virsh program is the main interface for managing virsh guest domains. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aims at providing a long term stable C API .

Filter by
Sorted by
Tagged with
-1
votes
1answer
30 views

Disable libvirt storage pools

It seems every time I create a VM with virt-install a new storage pool is created. But I don't use storage pools at all! I looked in the virt-install manual but could find a way to prevent this from ...
1
vote
0answers
24 views

network interfaces are deleted after issuing a virsh shutdown on VM

I tried to instantiate a VM using virt-install command with few interfaces as needed. The exact command is as follows: virt-install \ --name VM \ --noautoconsole \ --input keyboard \ --...
0
votes
0answers
11 views

virsh domifaddr and net-dhcp-leases show no results

running CentOS 8, virsh 4.5.0, and libvirt. when i run either virsh domifaddr <domain> or virsh net-dhcp-leases default, i get no results whatsoever: Name MAC address Protocol ...
0
votes
0answers
58 views

virsh attach-disk not working for iso file driver

Does anyone have any idea why I can't get this working. I have a windows7 guest vm installed with virt-install on a bridge. Windows 7 or 10 cannot get a drive for the network installed. Following ...
0
votes
1answer
23 views

KVM trying to restore from backup and getting error unexpected data

Hello I made a backup of a VM guest with these steps: 1. virsh dumpxml --migratable test > /backup/test.xml 2. virsh snapshot-create-as --domain test \ --name backup....
1
vote
1answer
27 views

Xen VM continuously restarts and kernel fails to start init

I am using a VM built using the Xen hypervisor and libvirt management layer. I couldn't connect to the VM after updating the Debian verison from 8 to 9 so I tried logging into the physical machine the ...
0
votes
1answer
114 views

QEMU / KVM - Dedicated 802.1q VLAN for each VM - Communication only via router

I have a Linux firewall router (dedicated machine) with multiple ethN interfaces (my "big firewall"). All forwarded traffic is filtered by a set of iptables rules (default policy DROP). ...
0
votes
1answer
51 views

Where is virsh save directory location defined

The default location of the virsh save myVm goes into /var/lib/something which makes my slash partition full on a Vm save, which is really anoying. I could not figure out where is the virsh save myVm ...
1
vote
1answer
31 views

Restoring terminal/TTY to normal after virt-install?

After having created a VM with virt-install then the terminal is only 24 lines, where the terminal have 70 lines. I recall seeing a similar issue with virsh console. Question Ideally would I like both ...
0
votes
0answers
31 views

Can I get VM's CPU idle, load and steal time through Virsh?

There is domstats from virsh to get stats on CPU, memory, disk and network. But i couldnt find anything about load, steal time and idle time of VMs in Virsh. Does Virsh contains the data on load, ...
0
votes
0answers
121 views

How to backup KVM/QUEMU guests with virsh?

I am running some VMs with libvirt and KVM/QEMU. Now I want to backup them and save the backups into object storage where I can restore them from to another host if the harddrive of my host fails. I ...
0
votes
1answer
118 views

Can't start domain cloned with virt-clone

Final Update at bottom I have a working KVM domain which I've configured and want to use as a 'template' for other guests. So, my process is roughly this: Shut down the 'source' domain (07xQBuild) ...
0
votes
1answer
905 views

KVM live migration for non shared lvm storage

I am trying to live migrate my KVM based VM from one host to another for non shared storage using virsh migrate. I have set both the hostnames at /etc/hosts on each of the host. Also I have set ...
1
vote
3answers
341 views

How to reduce KVM qcow2 disk size?

When I boot in my guest Debian it says it size is 2.7G. df -h Filesystem Size Used Avail Use% Mounted on udev 718M 0 718M 0% /dev tmpfs 147M 6.2M 141M 5% /run /...
0
votes
0answers
313 views

KVM virsh: How to add VNET interface as a bridge port for a connected guest?

I am trying to add a VM guest to a host which some else set up originally. On the host: sudo brctl show bridge name bridge id STP enabled interfaces br0 8000....
1
vote
1answer
623 views

Using virt-install to create a Ubuntu VM with iso / access to virsh console

I am trying to set up a Ubuntu server VM (CLI only) on a Debian host (CLI only) using virt-install (version 1.0.1). But following install: sudo virt-install --name=<name> --disk path=/home/...
0
votes
1answer
182 views

Unable to access console or SSH on Amazon Linux 2 KVM image

I am trying to create a KVM guest instance running Amazon Linux 2 in an on-premises environment, on a CentOS 7 host. I am doing this over SSH (e.g. my local machine -> SSH to the CentOS host). I know ...
1
vote
1answer
625 views

Where are the OS specific properties located used by virt-install --os-variant

Using virt-install ... --os-variant win10 ... virt-install create a new VM optimized for Windows 10. But where are those OS specific properties located? E.g. machine-type and the <hyperv> ...
0
votes
1answer
72 views

KVM VM lost its public IP and access to the internet after reboot?

I have shut-downed one of the VMs with "virsh shutdown VM" and when I started it, it lost its access to the internet. The VM had its own pupblic IP that had its own interface. I'm not sure how this ...
0
votes
1answer
959 views

virt-install on Centos 8.1 doesn't complete when using --location http://localhost/inst

Should you reached this before, please let me know. ISSUE virt-install works well when passing arguments --cdrom /path/to/iso (and creates the guest) like [root@192-168-0-104 admin]# virt-install -...
0
votes
1answer
40 views

How to enable virsh console on Centos Atomic host?

I've Installed Centos AtomicHost Os on KVM , I just want to enable virsh console on it ! Tried below method but its is not working. 1. Added console=tty0 on /etc/grub/defailt GRUB_CMDLINE_LINUX="...
0
votes
0answers
52 views

why is kvm pool so small

I set up kvm on a fresh install ubuntu server 18.04 on a 1TB disk. There is nothing else on the disk. Whether I use virt-manager or virsh on cli to create a pool, I always get a pool of 3.75GB ...
0
votes
1answer
1k views

Virsh command not working to install Centos 8 virtual-machine on Ubuntu 18.04 via qemu/kvm [closed]

I am trying to install centos 8 on ubuntu 18.04 as a virtual machine. I have a wireless connection. When I run the following command: chh2@chh2-cpu:~$ sudo virt-install --name=chris_centos --ram=...
0
votes
1answer
6k views

KVM-QEMU bridged network not working - guest can only access host

I am trying to configure VMs to act like devices on my LAN, instead of hiding behind the host. This is the tutorial I followed: RHEL8 Network Bridged Interface My router/DHCP is at 10.10.1.254 Host ...
1
vote
1answer
815 views

libvirt & openvswitch VLAN tagging on the fly

I'm working on a project using libvirt with qemu and openvswitch on Debian 10. I would like to be able to modify the configuration of a network card of a domain in bash with the update-device command ...
0
votes
0answers
930 views

QEMU-KVM: VM will not start with virsh, only with qemu-system-x86_64

I have a vanilla Arch linux VM with disk in qcow2 format. I recently upgraded it and it stopped working. Every time I run $ virsh start Arch I get: Starting version 243.78-2-arch ERROR: device 'UUID=&...
1
vote
1answer
275 views

How to create internal snapshot with a virsh command

I want to create virsh snapshot that does not create any files, just keeps it in the same .qcow2 file. Basically the same thing that virt-manager does in the 'Manager VM Snapshots' page. How can I ...
0
votes
1answer
110 views

Get all virsh configs

I've several qemu vm's managed with virsh. I've already created a backup of the images. Now I want to create a backup of the config files. How can I do that? The only solution I've figured out so ...
0
votes
1answer
82 views

libvirt hot unplug cpu

I'm currently working with libvirt. after i reduce the number of vcpu cores with below command, the operation will be completed successfully. i should also mention that my current and max vcpus is 4, ...
0
votes
1answer
197 views

Virsh can't detect my new vm

I have a *.qcow2 image from my old OS, it contains Windows 10. Then I copied it to the new OS and tried to install it. I followed the method written here "How to create a new domain from an existing ...
2
votes
0answers
1k views

Configure netplan to use a different interface for bridge

I'm setting up a virtual machine host on Ubuntu 18.04.3. I installed KVM and have succesfully set up a qemu vm which connects through a bridged network. It shows up as a regular machine in my network. ...
3
votes
1answer
3k views

virt-install hangs, no apparent error in logs and virsh list later shows its running after ctrl c exit, no domifaddr though

Got thrown into a situation managing boxes that the person before me used virt, so trying to come up to speed. As a test doing a virt-install of this: virt-install --virt-type=kvm --name kosmos-icc --...
0
votes
1answer
340 views

How to achieve Host-and-Internet-Only networking within a Debian host and Windows Server guest using KVM/QEMU?

I have a physical/dedicated server which is running Debian 9 (Stretch). The server has enough resources to support its own load and the load of some virtual machines (in this question: Windows Server ...
1
vote
1answer
697 views

What do the IDs of PCI devices refer to and which ones are relevent for setting up passthrough?

In setting up a domain with virsh, I had always assumed that the "slot" of a PCI card referred to which slot on the motherboard it was in. However, that seems not two be the case, cards in two ...
0
votes
1answer
627 views

Apply Network Filter to Ovirt Guest without Rebooting

I am trying to change the clean-traffic IP address for a oVirt Guest VM. It works as long as I reboot the VM. ( Changed from within the Guest Virtual Machine Network Settings ) But for a production ...
2
votes
2answers
608 views

How to specify a NIC number in virsh/kvm?

Hoping I can get some help here. I am using the virt-clone command to get an image of VyOS (open source linux router). The clone works fine but when I copy the image to another KVM host and install ...
0
votes
0answers
607 views

Mount a disk image as mmc flash in libvirt

I'm trying to run the OS of my x64 NAS in a VM with kvm and libvirt. I made an image of the internal flash with dd. The image has a few partitions, starting with an EFI partition. virt-install -n ...
0
votes
1answer
716 views

Missing KVM snapshots in virt-manager

I need to resize an image and receive an error when using qemu-img the resize is not supported because snapshots exist. Sure enough, even though virt-manager does not show any snapshots, I see the ...
2
votes
1answer
972 views

Linux KVM if guest is rebooted it will not start, must be manually started

Have an Ubuntu server running KVM: Linux hyperv 4.4.0-109-generic #132-Ubuntu SMP Tue Jan 9 19:52:39 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux It is running a few VMs which are linux, and one windows ...
2
votes
2answers
2k views

Mount URL as cdrom/iso KVM/QEMU

I am looking for a way to mount an ISO as a cd rom, according to libvirt docs (referenced below) it should be possible, additionally in the question referenced below. I am aware of this question, ...
0
votes
1answer
244 views

virsh error: domain is already quiesced

My VM backup script fails while creating the snapshot. virsh snapshot-create-as --domain machine_1 snap --diskspec vda,file=/srv/test/test-snap.qcow2 --disk-only --atomic --no-metadata --quiesce ...
0
votes
2answers
737 views

virsh: Overwrite existing snapshot

How can I overwrite an existing snapshot with virsh? If I try to use an existing name, then I get this error message: > virsh -c qemu+tls://virtserv5/system snapshot-create-as myvm --name ...
2
votes
0answers
588 views

KVM/QEMU: cannot attach-device (disk) to a live domain

I'm trying to add a new disk to a running guest/domain (Win10) I succeed in using virsh attach-disk... --live and also using virsh attach-device.. --config But using: virsh attach-device SRV13 /tmp/...
1
vote
1answer
802 views

virt-install preseed not working

I have setup a pre-seed for the vm install but it still asks me for location first. My vm install is being trigger by a bash script create_vm.sh: virt-install --name test \ --boot uefi \ --...
1
vote
1answer
6k views

Ansible playbook shell command variable undefined

My ansible script is made for deploying vm's in virsh and installing them with cobbler. Using a IP address fixed on mac address. To do this the mac address is needed. But I am having a hard time ...
0
votes
1answer
141 views

Domain.xml not Updating For Console Directive

Good afternoon, I'm following the instructions here in order to get console access from libvirt The problem I'm having is the domain.xml does not accept the new changes. I have also done the ...
1
vote
1answer
2k views

VM started, but it is not listed by virsh

I have a VM started by TripleO setup script for OpenStack. I can connect to the VM console with vncviewer. The problem is that the VM is not listed by virsh. $ sudo virsh list --all Id Name ...
0
votes
1answer
395 views

How can I find out if a virsh VM has qcow storage attached as non persistent?

I have multiple (KVM) VM's being managed under virsh in different servers (ubuntu precise and up). I need to check if any of those have qcow disks attached non persistently. Was hoping for something ...
1
vote
1answer
978 views

Restrict users access to particular VM (libvirt)

I have a linux host (SLES12) and bunch of VMs on up of it via libvirt (KVM hypervisor). I assigned one GPU per each VM, and would like to be able to restrict each users access to particular VMs (e.g. ...
3
votes
1answer
5k views

Remove libvirt's dhcp lease entry using virsh

Using: $ virsh version Compiled against library: libvirt 1.3.1 Using library: libvirt 1.3.1 Using API: QEMU 1.3.1 Running hypervisor: QEMU 2.5.0 $ $ $ lsb_release -a No LSB modules are available....