Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
kvm:kvm [2020/06/20 14:30] – [Commands] tmadekvm:kvm [2021/09/29 18:41] – [Volume] 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    #ubuntu 20.04
 +
   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://github.com/LuyaoHuang/virsh-bash-completion                               #bash completion   https://github.com/LuyaoHuang/virsh-bash-completion                               #bash completion
 +  
 +====Network====
 +
 +Set your network devices on OS level such as (example with 2 network interfaces "enp4s0" and "eno1" which is bridge slave interface for bridge "vmbr0"):
 +
 +<code>
 +# This file describes the network interfaces available on your system
 +# For more information, see netplan(5).
 +network:
 + version: 2
 + renderer: networkd
 + ethernets:
 +   enp4s0:
 +     dhcp4: no
 +     dhcp6: no
 +     addresses: [192.168.1.100/24]
 +     gateway4: 192.168.1.1
 +     mtu: 1500
 +     nameservers:
 +       addresses: [192.168.1.1]
 +       search: [local]
 +   eno1:
 +     dhcp4: no
 +     dhcp6: no
 + bridges:
 +   vmbr0:
 +     dhcp4: no
 +     dhcp6: no
 +     interfaces: [eno1]
 +     addresses: [10.0.0.100/24]
 +     gateway4: 10.0.0.1
 +     mtu: 1500
 +     #nameservers:
 +     #  addresses: [8.8.8.8,8.8.4.4]
 +     #parameters:
 +     #  stp: true
 +     #  forward-delay: 4
 +</code>
 ====Commands==== ====Commands====
  
Line 100: Line 140:
 ====Pool==== ====Pool====
  
-  virsh pool-list                                                  #show active storage pool 
   virsh pool-list --all                                            #show also inactice pool   virsh pool-list --all                                            #show also inactice pool
-  virsh pool-list --details                                        #show details+  virsh pool-list                                                  #show active storage pool 
 +  virsh pool-list --details                                        #show details like disk usage
   virsh pool-info poolname                                         #detailed pool info   virsh pool-info poolname                                         #detailed pool info
   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:
kvm/kvm.txt · Last modified: 2022/03/12 09:13 by tmade
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki