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 .

The virsh program is the main interface for managing virsh guest domains. The program can be used to create, pause, and shutdown domains. It can also be used to list current domains. Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the GNU Lesser General Public License. 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 . It currently supports Xen, QEmu, KVM , LXC , OpenVZ, VirtualBox, OpenNebula, and VMware ESX .

You can find all info and options on virsh on this page.

155 questions
0
votes
3 answers

Virsh command hangs when script runs in the background

I have a bash script which runs as a cronjob. This script runs several commands and one of them is the following virsh command: /usr/bin/virsh list --all When I run this script in the terminal (as root) or as a cronjob (as root also) the virsh…
Esteban
  • 35
  • 7
0
votes
2 answers

How to resize kvm vm host

KVM Host Environment:- # cat /etc/issue Welcome to openSUSE 13.2 "Harlequin" - Kernel \r (\l). # /usr/bin/qemu-system-x86_64 --version QEMU emulator version 2.1.3 With the below commands i have resized the VM host virsh destroy vm1 qemu-img resize…
0
votes
1 answer

reaching apache public reverse proxy virtualhost url from localhost behind a NAT using iptables

I have an issue with a guest using virsh behind a server running with iptables firewall. This guest hosts websites, one is mattermost with reverse proxy. Everything is working well. I then installed collabora online 1:…
gstlouis
  • 119
  • 3
  • 12
0
votes
0 answers

Loading a KVM guest with static IP using XML file

I have an XML template for the image I am loading on KVM using ansible. For now, the image loads without IP. I would like to know if there is a way to add static IP on the XML template so that my VM loads with static IP on eth0 interface. I tried…
ranji
  • 21
  • 6
0
votes
0 answers

Why is net-dhcp-leases coming up empty in VIRSH?

From the following command virsh net-edit default, I see: default 7a106327-942a-40e7-a977-018b5323832a
0
votes
0 answers

Virsh console not responding after rebooting guest machine

I have a server running Ubuntu 20.04 with KVM. Whenever I install a guest VM (CentOS 7 or Fedora 34), virsh console works fine in the beginning. However, when I reboot this VM, virsh console stops working. Does anybody know what's going wrong in…
0
votes
2 answers

Override virsh network from xml file to apply custom dnsmasq options outside

I want to automatically add a DNS CNAME entry using the dnsmasq namespace. Since this seems too complex to be handled by virsh net-edit, my idea is to use virsh net-dumpxml, apply the modifications and re-import the network. While the export works,…
Lion
  • 506
  • 10
  • 21
0
votes
2 answers

Ubuntu 20.04 cloud image can't get IP address

When using virt-install to create a guest, CentOS 7.9 cloud image successfully gets an IP address, which can be checked with sudo virsh domifaddr . However, Ubuntu 20.04 LTS cloud image cannot, it just won't be assigned an IP address, no…
os_user
  • 3
  • 2
0
votes
1 answer

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 happening. Also been looking for any settings in…
MrCalvin
  • 354
  • 1
  • 6
  • 18
0
votes
0 answers

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 this thread enter link description here I download…
gstlouis
  • 119
  • 3
  • 12
0
votes
1 answer

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). There's another dedicated machine ("vmhost") that will host…
MrSnrub
  • 153
  • 1
  • 3
  • 9
0
votes
1 answer

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 directory location defined! The default is into…
0
votes
1 answer

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) Run virt-clone --original 07xQBuild --name 07x2…
dsl101
  • 433
  • 1
  • 8
  • 14
0
votes
1 answer

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 passwordless SSH between the hosts. Still i am not able…
Ash
  • 31
  • 1
  • 3
0
votes
1 answer

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 my hypervisor setup works, as using the following…
turbonerd
  • 76
  • 5
  • 19
1 2 3
10
11