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
vote
3answers
123 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
8 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
67 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
24 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
20 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
27 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
77 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
0answers
11 views

Is there a way to use pager like more or less with virsh?

It's well known that MySQL's CLI client has notion of configurable pager of choice. WEB-searching doesn't reveal anything like that for virsh, hence I'm pretty sceptical asking this question, but let'...
0
votes
1answer
21 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
67 views

firewalld on KVM/QEMU virsh host blocking bridged guest IPv6

I am having some issues with my new IPv6 network involving my virsh KVM/QEMU guests. I could ping my gateway, and the rest of the internet. I could not however connect with TCP or UDP to anything even ...
0
votes
0answers
48 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
508 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
764 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
204 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
500 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
155 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
46 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
49 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
98 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
728 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
952 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
0answers
50 views

Kvm Guest Vm Network Unreachable

in my guest vm i can easily update and download as i want but if ping it says Request timed out after that i installed httpd (apache) in centos 7 port 80 unreachable in trace C:\Users\problem>...
0
votes
1answer
199 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
284 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
498 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
348 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
291 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
545 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
260 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
183 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
540 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
465 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/...
0
votes
0answers
615 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
5k 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
119 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
345 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 ...
0
votes
1answer
748 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
4k 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....
1
vote
2answers
3k views

Offline migrating KVM guests using virsh?

I want to offline migrate the KVM guest e-devel to another centos73 host using virsh. So I do # virsh -d 0 migrate --offline --persistent e-devel qemu+ssh://kvm2/system migrate: offline(bool): (none) ...
0
votes
1answer
3k views

Change KVM cpu threads/Cores after Build

So, changing Vcpus and RAM is easy enough. How can I change the number of threads and cores per vcpu in KVM? I need 1 Vcpu, four cores, and two threads per core. Barring that, four cpus with two ...
13
votes
3answers
26k views

How to change the default Storage Pool from libvirt?

I'm trying to use a different Storage Pool on KVM in order to store the virtual disks of my VMs and also the ISOs from the operating systems which I'm using. For example: I want to use the directory /...
0
votes
0answers
61 views

KVM guests show wrong source IP in apache logs

I have a few KVM guests running on a Fedora 22 host using a bridged network. It all seems to be woring fine apart from one niggle. One of the guests has apache running on it. Any access to the web ...
1
vote
1answer
4k views

Error when adding network interface to VM on KVM host using virsh

I'm attempting to script adding a network interface to a centos 6 guest. I know the interface can be set up using the virt-manager gui but it's highly desirable for it to be added as part of an ...
-1
votes
1answer
231 views

Cloudstack VM use more CPU than restricted

I have a private cloudstack cloud with the following configuration: host server: ubuntu 14.04 KVM hypervisor 2x 2400 MHz CPU (amd athlon 64 X2 Dual Core Processor 4600+) virtual machines: 1x 500 ...
0
votes
1answer
6k views

Install guest CentOS 7 on KVM also on CentOS7 without GUI [duplicate]

I'm a bit stuck with virtualization on CentOS 7 using KVM. Whenever I try to create a virtual machine it keeps telling me to connect to the machine via console and finish the installation. Whenever I ...
0
votes
1answer
157 views

Determine which VIF interface belong to which Xen domain on SLES12.1

As mentioned I have a list of Xen Domain as below: Vm01<br>Vm02<br>Vm03<br>Vm04 And using bright network for communicating outside, After I launched 4 VM it automatically created 4 ...
11
votes
4answers
8k views

How do I list virsh networks without sudo?

I noticed a strange behavior on one machine using Debian that I can't reproduce on another machine running Ubuntu. When listing virsh networks as an ordinary user, it shows an empty list: ~$ virsh ...
0
votes
1answer
283 views

Block certain ports on certain VMs running on KVM

I have 2 VMs Running on KVM hosts. I run a web server on one and use the other for experimental stuff - basically just use ssh on it. I want to block all incoming connections on all ports except on ...