KVM Handbook
I collect to this page various recipes to work with my new server under KVM:
- 1. Set up QEMU/KVM storage pool (define, build, start, autostart and using)
- 2. Tune KVM Hypervisor with directly attached MacVTap driver to VLAN device or with bridge to VLAN device
- 3. Optimize KVM host performance by mapping virtual CPU to physical
- 4. LibVirt Net Core wrapper test on production QEMU/KVM server.
- 5. Microservice with report of QEMU-KVM server (VirtualMachines, Storage, Network). Also demo of Linq, Lambda, Inheritance model.
- 6. Connect to KVM host with GUI.
- 7. Bridge control.
- 8. Host control after QEMU/KVM admin panel or SSH lost connection.
- 9. KVM host control.
- 10. Most usable VIRSH commands.
- 11. Connect to VM with graphic.
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 (
)
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> |