Stack Exchange Network

Stack Exchange network consists of 175 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 tag has no usage guidance.

0
votes
0answers
5 views

virsh preboot script

I am running a virtual machine that requires vfio access to a PCI card. Using this script I am able to successfully bind the PCI device and its iommu group to vfio-pci, which then lets me boot up the ...
-2
votes
1answer
66 views

Is KVM a hypervisor?

https://en.wikipedia.org/wiki/Hypervisor#Classification says QEMU is type 2 hypervisor, and KVM can be both type 1 and 2 hypervisor: The distinction between these two types is not always clear. ...
-3
votes
0answers
48 views

How can I reconfigure my VM to have console on serial not graphical card?

I created a Debian virtual machine with LVM encryption in virt-manager. When I start the VM from virt-manager, I am asked to provide password for the LVM encryption. But now when I start the VM and ...
1
vote
1answer
40 views

How can I not give a virtual graphics card at all to your VM and have the console on serial?

Stéphane Chazelas wrote that Can I start Debian on a text virtual console in a virtual machine? You could also not give a virtual graphics card at all to your VM and have the console on serial. ...
2
votes
0answers
13 views

Is it possible to associate an existing NIC with guest without bridge?

I have an existing virtual Ethernet device veth0 and I want to use this for virtual-machine. At the moment, I create a bridge for this, e.g: virt-install --name vm --network bridge=br0,model=e1000 ......
0
votes
1answer
35 views

Network Bridge for VM not working after reboot

I have a CentOS 7 host with a network bridge set up for guest VM's to use. All was well until a recent reboot. After the reboot, the guest VM does not have internet access, nor can it ping other local ...
0
votes
1answer
155 views

Why is a machine of type i440fx created when I specify q35 and how do I get q35 to work?

I need to create a Windows VM with a Q35 machine type. However, in spite of specifying q35, and i440fx machine is created. created with: sudo virt-install \ --name wintest \ --boot uefi \ --ram ...
0
votes
1answer
230 views

How to change default text edior for virsh edit? (setting EDITOR env variable didn't work)

I recently installed virt-manager on an Arch Linux install, and unlike under Ubuntu, I was not prompted to choose a text editor on the first launch of virsh-edit. Instead, the XML file was opened in ...
0
votes
1answer
108 views

virsh: Connected to domain <name> Escape character is ^]

I'm having an issue with viewing output from a virtual machine installed via virt-install. I first used this method, but it left me with the following immediately after running: Starting install... ...
2
votes
1answer
73 views

Unable to shutdown Ubuntu 18.04 guest using virsh-shutdown

I am running Ubuntu 18.04 (desktop) in a VM using Debian 9 and KVM as the hypervisor but running virsh shutdown BS-MS01 I get a message saying the domain is shutting down but the VM is actually still ...
0
votes
1answer
167 views

Libvirt Ubuntu VM: files created on guest in shared folder given root-only access on host

I have created a Ubuntu VM on a server running Ubuntu Server 16.04.5 LTS using the following command: sudo virt-install \ --name TEST \ --memory 2048 \ --vcpus 2 \ --location 'http://archive....
2
votes
0answers
31 views

how to fix the devices name ordering in guest vm (devices name ordering changed after reboot vm by virsh)

my devices xml define: first vm only has a root volume, <disk type='file' device='disk' snapshot='external'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/dev/...
2
votes
1answer
538 views

What's the difference between KVM, QEMU and libvirt?

I'm trying to understand how all the components of the VM ecosystem fit together. What's the difference between: KVM QEMU libvirt Which is controlled by virsh and virt-install? This comment says ...
2
votes
0answers
214 views

How to flush all the DHCP leases with virsh. So all not just one with net-update default delete ip-dhcp-host

OS: Fedora 28 KVM So I am trying to delete all the dhcp leases with virsh, so all of them at once not one by one or any one in particular. I know that you can use net-update default delete ip-dhcp-...
1
vote
0answers
240 views

connect qemu/kvm(managed by virsh) VM to an existing tap device

I'm using virsh to manage my qemu/kvm VMs. Problematic VM has the following interface configuration: <interface type='bridge'> <mac address='52:54:00:92:f7:f8'/> <source bridge='br-...
0
votes
1answer
307 views

Why does “virsh list --all” shows running as normal user but “shut off” with sudo?

The server1's correct state is shut off but when i run the command as normal user it shows the state as running for normal user and shut off with sudo [msingh@localhost VMFiles]$ virsh list --all Id ...
2
votes
0answers
340 views

Rename qcow2 internal snapshots created with virsh snapshot-create-as

Background I have a QEMU/KVM virtual machine whose virtual disk is a qcow2 file. To create snapshots, I have been using sudo virsh snapshot-create-as <vm_name> <snapshot_name> and now I ...
0
votes
0answers
185 views

virsh net-define error: this function is not supported

I'm trying to create a simple network using the following xml: <network> <name>net-bridge</name> <forward mode="bridge"/> <bridge name="virbr0"/> </network> ...
3
votes
2answers
2k views

One prompt pkexec - two command

Someone could answer me how make one prompt via pkexec when I've to use two command with authentication? My easy sample script: pkexec virsh net-start default; pkexec "/home/user/program"; I'm new ...
0
votes
1answer
2k views

How do you change KVM VNC port at runtime, from the command line?

Currently I have a virtual machine running, and I can see that with: # virsh list Id Name State ---------------------------------------------------- 1 vmname ...
0
votes
1answer
439 views

virsh pool storage basics

How or where were these pools created? Where are configuration files? $ virsh pool-list --all Name State Autostart ------------------------------------------- default ...
0
votes
2answers
775 views

virt-install --disk size=10 does what?

How can I get read/write permissions to browse the guest filesystem from the host? (Presumably it's only safe when the guest is shutdown.) Where is the default path, as below, for the guest ...
1
vote
1answer
2k views

Multiple virsh/kvm guest consoles without graphics

I have a serial console working for a centos7 guest without graphics, which I access with virsh console vm. The guest has the appropriate console=ttyS0,115200n8 kernel command line parameter for it. ...
0
votes
0answers
315 views

Virsh guests lose network connectivity

A CentOS 7 host installs CentOS 7 virtual machines inside itself using a virt-install command, which includes an assigned MAC address. The CentOS 7 host is connected via Ethernet to a hardware ...
0
votes
1answer
333 views

Why is there no lost+found directory in storage pool?

I am studying this Red Hat documentation, which states that a validated storage pool should have a lost+found directory to indicate that it is properly mounted. I have followed the instructions ...
4
votes
1answer
2k views

KVM - live external snapshots and appropriate disk names

If I wish to take an external snapshot of a running KVM guest, I would run a command like below: # create the directory for the snapshot data mkdir /vms/$DOMAIN/snapshots/$SNAPSHOT_NAME # create the ...
0
votes
3answers
4k views

Create virbr0 for virsh

I'm trying to setup a KVM based VMs on a local server, and following this doc: https://wiki.debian.org/KVM In this documentation it states that you'll get virbr0 for bridge connection, but ...
4
votes
0answers
600 views

Allow KVM guests on virsh virtual network to access the real internal network

I have a home network 192.168.1.0 behind a router 192.168.1.1. A set of existing Linux and Windows hosts are on this network, most on wired ethernet connections. I am configuring a new server that ...
1
vote
0answers
437 views

KVM - List snapshots in order of creation

I've only just realized that KVM snapshots default to being listed in alphabetical order, rather than chronological. This can be confusing if you sometimes use the command virsh snapshot-create-as $ID ...
0
votes
0answers
42 views

How to dumpxml to a file when authentication enabled?

I set up authentication for the libvirtd, because it has right to operate pools and hence to write to raw disk devices. Now I need to dumpxml from existing domain. But the dumpxml command has no ...
14
votes
1answer
35k views

How to create a VM from scratch with virsh?

It looks like that you cannot create a brand new VM with virsh unless you already have a working XML file. I have just installed all the needed bits for QEMU-KVM to work, and need now to create my ...
6
votes
2answers
1k views

Using virsh to control VMs created in virt-manager [closed]

here's a question for you that's been driving me round the bend. I've managed to find plenty of resource from folk that want to do the opposite from me i.e see a machine they created using virsh in ...
0
votes
1answer
1k views

Shutting down kvm guest without acpi

I've got a KVM guest that won't shut down from virsh or from virt-manager. Most everything I've read says to install ACPI on the guest and do a bunch of configuring on the host to make this work. Is ...
2
votes
0answers
851 views

Virsh (libvirt-bin) is not able to communicate with Xen server

I have installed the latest version of Xen server 6.5. Now I want to connect to it with virsh (libvirt-bin). When I do this I get the error error:end of file while reading data: sh:nc:command not ...
0
votes
0answers
2k views

Where does KVM hypervisor store VM files?

For a guest machine how can I know where the files created in vm (not the VM config files but actual files which I create while using VM) are stored on my host machine? To which directory of my host ...
1
vote
0answers
513 views

Virsh migrate fails with “process exited while connecting to monitor” error

I am trying to migrate a VM from one host to another with below command virsh migrate --live nodetwo qemu+ssh://192.168.1.33/system nodetwo = VM name But I am getting an error as error: ...
3
votes
1answer
7k views

virsh and creating storage pools - What is sourcepath “- - - -”

I am running CentOS 7 and was following a chapter in a book dealing with virtualization and creating storage pools. I successfully ran the following command, but I'm not sure what setting - - - - as ...
0
votes
1answer
61 views

Is it possible to allocate slices of disk to a KVM storage pool?

When using virt-manager to create a storage pool it does not give the option to set the size. Instead, it assumes that an entire partition is available to the pool. I would expect this to cause ...
3
votes
1answer
2k views

Modifying files inside a snapshot (qemu img file)

I have taken a snapshot recently to assist me build VMs quickly with the operating system I desire (through virsh), however, every time I build a VM, I would like to modify few files inside the img ...
1
vote
1answer
684 views

nova volume-detach fails silently, compute log shows libvirtError: invalid argument: no target device vdb

Using Openstack Havana, I'm trying to detach a cinder volume from a nova instance. Nova volume-list shows it as in-use: | 34b0ea26-f85c-4b62-8ebd-884b0e63e2d5 | in-use | filestore | 256 | None| ...
2
votes
0answers
2k views

How to convert the qemu parameters for an osx guest for libvirtd

I managed to have an osx guest running in qemu with the following commands: // create the virtual image $ qemu-img create -f qcow2 mac_hdd.img 35G // .. install osx ... // start the guest $ qemu-...
0
votes
1answer
2k views

unable to start vm on kvm

I'm not able to start a vm on kvm with the following error [root@dev1 RHEL5-7]# virsh start demo-57-test error: Failed to start domain demo-57-test error: Unable to add port vnet0 to OVS bridge br0: ...
1
vote
1answer
1k views

libvirt-bin error on a VM when I try to list VM

I'm using Virtualbox 4.3.18 on my Arch Linux Host machine and libvirt-bin 1.2.9 on my Ubuntu Server Cloud guest machine. Everytime I try to follow this tutorial I receive the following error when I ...
4
votes
3answers
9k views

how can I create a KVM guest 100% as a non root user?

In a debian host with many users, I want to allow different users to create their own VMs, completely independent of each other. The closest relevant (non-root) way I have seen in guides is by ...
4
votes
1answer
3k views

How to delete a virsh pool without volumegroup?

My virsh version 0.9.12.3 I created a Volume Group Pool via virsh. virsh pool-define-as vg1 logical --source-name vg --target /dev/vg Bad thing is, that /dev/vg does not exist, I made a typo. I ...
6
votes
1answer
7k views

What commands in virsh corresponds to “Force Off” button in virt-manager?

I'm trying to find the corresponding command to the buttons in virt-manager, I read about virsh help domain and I found start, shutdown and reset etc. But the one for Force Off is missing. Anyone ...
3
votes
2answers
2k views

Is it possible to use comments in virsh / libvirt xml files?

I am using. virsh -c qemu:///system edit VM-Name And adding comments. <!-- test comment here --> It won't complain.* But the comment is removed. *Usually if you make a syntax error (for ...
9
votes
3answers
17k views

virsh, how to list autostart domains?

In virsh how do I see which domains are marked as autostart? virsh list does not show which domains are marked as autostart.