Questions tagged [virsh]
78 questions
44
votes
2 answers
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 very first VM.
How to?
Hint: I don't have graphics!
EnzoR
- 893
- 1
- 7
- 11
38
votes
1 answer
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 that libvirt is an abstraction ontop of QEMU, which…
falsePockets
- 758
- 1
- 7
- 13
16
votes
3 answers
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.
user26053
11
votes
2 answers
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 know what that is?
daisy
- 53,527
- 78
- 236
- 383
8
votes
4 answers
How to change default text editor for virsh edit?
I recently installed virt-manager on Arch Linux, 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 vi (or vim, not sure).
From this thread in the RedHat…
Stonecraft
- 779
- 2
- 13
- 29
8
votes
1 answer
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 sat on the login screen.
I have confirmed acpid…
Steve Brown
- 163
- 1
- 8
7
votes
2 answers
Using virsh to control VMs created in virt-manager
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 virt-manager.
However, I have a couple of VMs that…
I_GNU_it_all_along
- 1,702
- 13
- 20
6
votes
3 answers
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.
Is it possible to configure additional consoles,…
Irfy
- 215
- 2
- 7
6
votes
1 answer
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 the sourcepath actually does.
virsh pool-define-as…
Narayana
- 295
- 3
- 4
- 11
6
votes
2 answers
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 connecting to the qemu:///system hypervisor . This is…
nass
- 1,438
- 8
- 19
- 35
5
votes
3 answers
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 in linux environmen,
Thanks :)
Hamlet
- 53
- 1
- 4
4
votes
1 answer
virsh: Connected to domain 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...
Connected to domain ApacheServer
Escape character…
Joshua Schlichting
- 411
- 1
- 4
- 11
4
votes
2 answers
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 filesystem?
This example from man virt-install:
EXAMPLES
…
Thufir
- 1,810
- 6
- 33
- 60
4
votes
1 answer
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 snapshot
virsh snapshot-create-as \
--domain…
Programster
- 2,157
- 9
- 23
- 35
4
votes
1 answer
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 tried to delete the pool by
virsh pool-delete…
syss
- 691
- 9
- 20