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.

148 questions
3
votes
1 answer

How to automatically start virtual Networks using virsh?

Following this answers, configuring domains to autostart using virsh is easy; set aside they fail with following error message: error: Failed to start domain [name] error: internal error Network 'default' is not active. I can start this network…
Jens Erat
  • 1,400
  • 2
  • 11
  • 26
3
votes
4 answers

virt-manager doesn't show list of local KVMs but virsh does

When I open virt-manager GUI it doesn't show list of KVMs but virsh does. how can fix it?
Zim3r
  • 1,384
  • 5
  • 23
  • 45
3
votes
3 answers

virsh autostart not working

root@virtual3:~# virsh autostart nstest Domain nstest marked as autostarted root@virtual3:~# virsh dominfo nstest Id: - Name: nstest UUID: 8cf691cd-7246-442b-a26b-3580e24600c5 OS Type: hvm State: …
David
  • 51
  • 1
  • 2
2
votes
0 answers

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. vm host: 192.168.178.14 vm guest:…
Forkbeard
  • 121
  • 4
2
votes
2 answers

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 it the NIC card number changes. ports eth0 and…
2
votes
2 answers

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, however its 4 years+ old and never actually came to…
Backtogeek
  • 557
  • 2
  • 6
  • 14
2
votes
0 answers

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/SRV13.xml --live Give me this error: Failed to…
MrCalvin
  • 305
  • 1
  • 4
  • 17
2
votes
1 answer

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 \ --machine q35 \ --ram 16384 \ --disk…
KillerSnail
  • 121
  • 2
2
votes
2 answers

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) migrate: persistent(bool): (none) migrate:…
Jasmine Lognnes
  • 2,490
  • 8
  • 31
  • 51
2
votes
1 answer

QEMU cannot find device nor node_name

When I do virsh list I get ubuntu14.10 and ubuntu15.10 running but when I run this command to take a snapshot. virsh qemu-monitor-command ubuntu15.10 '{ "execute": "transaction", "arguments":{"actions": [{ "type": "blockdev-snapshot-sync", "data"…
2
votes
1 answer

CentOS 7 Virsh - Allow Non Sudo Users to Interface with QEMU / KVM / Virtual Machines

Is there a way to allow non sudo users access to KVM QEMU virtual machines in CentOS 7? I want to allow a non-root user to manage KVM guest virtual machines without having sudo access. Mainly, I'd like the user to be able to run virsh commands such…
OwN
  • 177
  • 3
  • 13
2
votes
1 answer

libvirt kvm qemu virtual machine - hard code domain-id?

Is there a way to hard code the domain-id of a virtual machine kvm guest? I tried adding an id attribute to the XML configuration via virsh edit name And I also tried to edit the XML directly stored in /etc/libvirt/qemu Basically, I'd like all of…
OwN
  • 177
  • 3
  • 13
2
votes
1 answer

OpenStack Juno Live-Migration never completes for instances with high load and size >64GB

I have run into situations where live migrations never seem to complete or error out. Here is how I have been able to reproduce the problem. Here is the instance I am migrating: [root@osc1-mgmt-001 tmp]# nova show…
Red Cricket
  • 462
  • 2
  • 7
  • 20
2
votes
3 answers

virsh console hangs whenever I connect to Virtual Machine

Whenever I try to connect to VM using virsh console my screen hangs and displays: Connected to domain Escape character is ^] I have found many solutions on the internet but nothing has worked for me and I am even not able to…
sachin
  • 21
  • 1
  • 1
  • 4
2
votes
0 answers

virsh (xen) not listing dom0 nor domU

I have Xen 4.4.2 installed on Ubuntu. xl list shows Dom0 and all DomU but virsh -c xen:/// list --all doesn't return anything. virsh version returns Compiled against library: libvirt 1.2.2 Using library: libvirt 1.2.2 Using API: Xen 1.2.2 Running…
dstrbad
  • 21
  • 3
1
2
3
9 10