This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
kvm:kvm [2020/06/20 14:30] – [Commands] tmade | kvm:kvm [2022/03/12 09:13] (current) – [Commands] tmade | ||
---|---|---|---|
Line 4: | Line 4: | ||
apt-get install qemu-kvm virtinst virt-manager bridge-utils libosinfo-bin | apt-get install qemu-kvm virtinst virt-manager bridge-utils libosinfo-bin | ||
+ | apt install -y qemu qemu-kvm libvirt-daemon libvirt-clients bridge-utils virt-manager | ||
+ | |||
sudo adduser $USER kvm | sudo adduser $USER kvm | ||
#apt-get install qemu-kvm libvirt-bin virtinst bridge-utils cpu-checker | #apt-get install qemu-kvm libvirt-bin virtinst bridge-utils cpu-checker | ||
Line 11: | Line 13: | ||
https:// | https:// | ||
+ | | ||
+ | ====Network==== | ||
+ | |||
+ | Set your network devices on OS level such as (example with 2 network interfaces " | ||
+ | |||
+ | < | ||
+ | # This file describes the network interfaces available on your system | ||
+ | # For more information, | ||
+ | network: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | mtu: 1500 | ||
+ | | ||
+ | | ||
+ | | ||
+ | eno1: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | mtu: 1500 | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | </ | ||
====Commands==== | ====Commands==== | ||
Line 16: | Line 56: | ||
virsh list --all #show all vm´s | virsh list --all #show all vm´s | ||
virsh undefine vm1 | virsh undefine vm1 | ||
- | virsh destroy vm1 #forcefully stop a given domain, | + | virsh destroy vm1 # |
virsh start vm-name | virsh start vm-name | ||
virsh autostart test # | virsh autostart test # | ||
Line 100: | Line 140: | ||
====Pool==== | ====Pool==== | ||
- | virsh pool-list | ||
virsh pool-list --all #show also inactice pool | virsh pool-list --all #show also inactice pool | ||
- | virsh pool-list --details | + | |
+ | | ||
virsh pool-info poolname | virsh pool-info poolname | ||
virsh pool-autostart poolame | virsh pool-autostart poolame | ||
Line 120: | Line 160: | ||
virsh vol-create-as default test_vol2.qcow2 2G | virsh vol-create-as default test_vol2.qcow2 2G | ||
virsh vol-clone --pool default vol1.qcow2 vol2.qcow2 | virsh vol-clone --pool default vol1.qcow2 vol2.qcow2 | ||
- | qemu-img resize volume-name.qcow2 30G | + | qemu-img resize volume-name.qcow2 30G && virsh pool-refresh --pool poolname0 #vm has to be shutdown! |
| | ||
Pool refesh an volume list: | Pool refesh an volume list: |