(LINUX) LINUX (2021)

KVM Handbook

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

4. 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 root@144.XXX.XXX.107

And only than try to connect by command

# /usr/bin/virt-manager -c 'qemu+ssh://root@144.XXX.XXX.107/system?keyfile=id_rsa'


5. Bridge control.

Define bridge in host level.



Bridge control.



More - Linux Bridge


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


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



7. 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

8. 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://root@144.XX.XX.107/system
# ssh root@144.XX.XX.107 virsh -c qemu:///system list
# virsh console D82-site

9. Connect to VM with graphic.


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



10. More - Linux Handbook.




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