Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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 ...

1
vote
1answer
20 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
23 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
0answers
26 views

redirect all web trafic from network through proxy server to a specific URL

I have a network env, which has outgoing traffic using proxy only. I want to create some sort of "unproxying GW" for my specific internal network. I am okey to use any Linux based solution for this, ...
0
votes
1answer
62 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
20 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 ...
0
votes
0answers
18 views

Use xl or virsh to manage virtual guests?

It seems that you can use either xl or virsh for managing virtual guests. How do these compare? We're using Xen 4.10 if that matters.
2
votes
2answers
330 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
0answers
46 views

Vm connect to everywhere but the host

I have the following issue. Vms in virsh net2 are fine. Vms in net1 connect everywhere but the host. They can ping and connect to each other including vms in net1. Vms in net2 can only connect to ...
0
votes
1answer
51 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
175 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 ...
0
votes
0answers
86 views

virsh: Cannot restore snapshot in VirtualBox

I establish the connection to Virtual Box locally using the command: virsh -c vbox:///session The connection is established successfully and allows me to execute some commands without problems. But ...
1
vote
0answers
192 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
134 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 \ --...
0
votes
1answer
955 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
57 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 ...
0
votes
0answers
53 views

attach a new lvm volume to kvm vm

On Centos 6, a KVM VM (also running Centos) is built using a couple of LVM volumes for root & swap. I can create a new lvol in the same vol-group on the underlying server fine, and format/mkfs/...
0
votes
0answers
160 views

libvirt snapshot-create-as failing when using --disk-only flag with apparmor

I am trying to create a snapshot for an existing domain using the following command. virsh snapshot-create-as test-vm test-backup "test-backup-1" --disk-only --atomic --no-metadata I get the ...
0
votes
0answers
149 views

What's the safest way for backup and restore external snapshot using virsh libvirtd

Dears, I've followed the following steps in order to get a snapshot of a running VM on my KVM, but actually i'm not sure if that the correct way or no : /usr/bin/virsh snapshot-create-as \ --domain ...
1
vote
1answer
490 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
268 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
205 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
2k 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
2k 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
1k 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 ...
8
votes
3answers
9k 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
46 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
3k 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
133 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
4k 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
93 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 ...
2
votes
3answers
3k 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
143 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 ...
0
votes
1answer
189 views

How does 'virsh' determine (iscsi) unit names and can they be changed?

I've got a kvm host running that has and iscsi backed storage pool: virsh # pool-info mypool Name: mypool UUID: 913210f2-f8a0-4a56-b7bf-ef00b0080ee1 State: running ...
0
votes
0answers
31 views

How are disc backups more useful than memory backups in KVM/QEMU

So, I have to take disc snapshots of a VM but I cannot comprehend why are they useful and better than memory snapshots as said by a lot of people. Suppose we have a computation going on, we take a ...
0
votes
1answer
140 views

How to take the network snapshot in QEMU/KVM

So, I have two guests which I can easily snapshot but suppose a guest sends a packet to another guest and the packet is in transit while we take the snapshot of both guests. How can I also snapshot ...
0
votes
1answer
183 views

How to decrease the snapshotting time in QEMU/KVM?

I am using QEMU snapshots of disc as well as ram(combined) using QEMU GUI and terminal(using virsh command). My guest VMs have 1 gb RAM each. The snapshots work very fine for my work but there is a ...
0
votes
1answer
657 views

Is there a way to snapshot the computation without pausing in QEMU/KVM?

We can take snapshots easily but we have to pause the computation state to do so. We can backup the disc without pausing the system. Is there any way that we can also snapshot the computation state ...
0
votes
1answer
157 views

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":{"...
1
vote
1answer
294 views

KVM - Adding public IP over bridge

I am working on setting up a KVM environment and normally I just take it for granted that the networking has been set up. I am running into difficulty getting the public IPs accessible from the VMs. ...
1
vote
2answers
8k views

virsh command that displays the cpu and memory consumption?

I want to know if there is a command virsh to display the cpu and memory consumption of each machine virtual. I created the virtual machine using KVM in ubuntu system.
0
votes
0answers
68 views

Assign 2 IP addresses to one virtual machine

I would like to assign 2 IP addresses to one virtual machine but cannot make it working. I have IP MAC 151.180.39.138 02:aa:cc:73:b1:39 78.132.120.30 02:cc:aa:79:fb:e7 /etc/network/...
0
votes
0answers
1k views

virsh, how to get full screen resolution via VNC

I've got a few KVM VMs running on my home server, some of them running X. I use virsh to manage them, and tunnel 5900x ports via SSH to access them via VNC. I can't get the resolution to go higher ...
1
vote
1answer
3k views

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 ...
2
votes
1answer
288 views

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 ...
2
votes
1answer
458 views

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 ...
0
votes
2answers
3k views

virsh console hangs whenever I connect to Virtual Machine

Whenever I try to connect to VM using virsh console <vm name> my screen hangs and displays: Connected to domain <vm name> Escape character is ^] I have found many solutions on the ...
0
votes
2answers
1k views

KVM - Access from an external computer to the Virtual Machine

I have the following setup: Notebook (IP: 192.168.1.100) Host: (IP:192.168.1.129) Both Notebook and Host are connected to a router (Internet IP:192.168.1.1)¨ The host (Host) has two virtual machine ...
3
votes
1answer
3k views

Clone KVM virtual machine with snapshots

I've created a virtual machine using virt-manager and saved a snapshot of it's current state. Now I'd like to create an exact duplicate machine with all snapshots from the first machine. How could I ...
0
votes
1answer
1k views

QEMU, Virsh and SMBIOS tables edit

I am currently running qemu-kvm on an Ubuntu server box and I use libvirt with Virsh to create, manage, start and stop VMs. I edited VM's XML configuration through virsh edit command to change CPU ...
1
vote
0answers
172 views

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 ...