(LINUX) LINUX (2021)

KVM Handbook

I collect to this page various recipes to work with my new server under KVM:

6. Connect to KVM host with GUI.

If you try to connect to KVM with standard client you usually receive only errors and no more.



So, firstly need to generate new public SSH key and upload it to server.

# ssh-keygen
# ssh-copy-id [email protected]

And only than try to connect by command

# /usr/bin/virt-manager -c 'qemu+ssh://[email protected]/system?keyfile=id_rsa'


7. Bridge control.

Define bridge in host level.



Bridge control. More - Linux Bridge



Check IP inside VLAN by asp-scan.



Link to bridge in VmConfig.



Default KVM network.



8. Host control after QEMU/KVM admin panel or SSH lost connection.


Reset network and set up PING to gateway each 3-5 sec.



9. KVM host control.


# nano /etc/netplan/01-netcfg.yaml
# ufw status verbose
# ip a
# netplan --debug apply

# systemctl status libvirtd
# /etc/init.d/libvirt-bin restart
# cat /etc/libvirt/qemu.conf

# systemctl status ssh.service
# service sshd restart
# cat /etc/ssh/sshd_config
# cat .ssh/known_hosts

# tail -n 100 /var/log/ufw.log
# tail -n 100 /var/log/auth.log

# lsblk
# blkid
# fdisk /dev/sdd

# top
# watch iostat
# watch free -m

10. Most usable VIRSH commands.


# virsh pool-list --all
# virsh vol-list --details dsk-c
# virsh pool-dumpxml dsk-c

# virsh capabilities
# virsh nodeinfo
# virsh domstats --cpu-total

# virsh dumpxml D82-site

# virsh list --all
# virsh shutdown U162
# virsh start U162

# virsh --connect qemu+ssh://[email protected]/system
# ssh [email protected] virsh -c qemu:///system list
# virsh console D82-site

11. Connect to VM with graphic.


Use SPICE client https://virt-manager.org/download/ for example version (virt-viewer-x64-10.0-1.0.msi)



12. More - Linux Handbook.




Comments ( )
<00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17>  <18>  <19>  <20>  <21>  <22>  <23
Link to this page: //www.vb-net.com/KvmHandbook/Index.htm
<SITEMAP>  <MVC>  <ASP>  <NET>  <DATA>  <KIOSK>  <FLEX>  <SQL>  <NOTES>  <LINUX>  <MONO>  <FREEWARE>  <DOCS>  <ENG>  <CHAT ME>  <ABOUT ME>  < THANKS ME>