diff --git a/guides/guide-to-server-hosting.html b/guides/guide-to-server-hosting.html index 1f779ed..447293a 100644 --- a/guides/guide-to-server-hosting.html +++ b/guides/guide-to-server-hosting.html @@ -51,6 +51,7 @@
  • Setup Qemu/KVM
  • Setup a bridged adapter
  • TODO:Install a virtual machine
  • +
  • TODO:Optimisate KVM Virtual Machines
  • TODO:Virsh cheatsheet
  • Example of Separation of Concerns (SoC)
  • diff --git a/guides/install-kvm-virtual-machine.html b/guides/install-kvm-virtual-machine.html index 3e2eac0..2659cd4 100644 --- a/guides/install-kvm-virtual-machine.html +++ b/guides/install-kvm-virtual-machine.html @@ -40,6 +40,20 @@

    Install with virt (CLI)

    Install with virt-manager (GUI)

    + +By default virsh lists vms belonging to user +virsh --connect qemu:///system list --all +The above run as root shows all vms + + +For virtmanager, etc to controll vms from an remote host +It needs ssh-key shared + +If a different port, then use virt-manager -c 'qemu+ssh://myuser@192.168.1.139:2222/system?keyfile=id_rsa' + +e.g. +virt-manager -c 'qemu+ssh://nathan@aney.co.uk:2020/system?keyfile=id_rsa' + diff --git a/guides/kvm-optimisation.html b/guides/kvm-optimisation.html new file mode 100644 index 0000000..4ffdb84 --- /dev/null +++ b/guides/kvm-optimisation.html @@ -0,0 +1,73 @@ + + + + + + + + + + + + KVM Optimisation + + + +
    + Jump directly to main content +

    KVM Optimisation

    + + +
    + +
    +
    + +
    +
    +

    KVM Optimisations

    + +transmit queue +virsh domiflist +# this is then the txqueuelen change below ??? +# changing to 4096 +ifconfig txqueuelen + +txqueuelen (iwbcman comment) +defaults to 1000, apparently 200 is good + +ip link set eth0 txqueuelen 200 +vim /etc/network/interfaces +add +post-up /sbin/ip link set eth0 txqueuelen 200 +to the end + +If virtual hdd is slow can try +Cache mode: none (not default!) +I/O mode: native +https://unix.stackexchange.com/a/48584 + +non caching on dirves? +https://blog.jdpfu.com/2012/07/30/improving-kvm-performance +://documentation.suse.com/smart/linux/html/concept-virtual-disk-cache-modes/concept-virtual-disk-cache-modes.html#:~:text=A%20disk%20cache%20is%20a,example%2C%20by%20setting%20its%20type. +On VM turning cache off essentially acts like accessing the drive itself. No exactly a passthrough, but decent enough + +http://www.linux-kvm.org/page/Tuning_KVM + +
    +
    + + + + + diff --git a/guides/virsh-cheatsheet.html b/guides/virsh-cheatsheet.html index 89a7e65..7a2a366 100644 --- a/guides/virsh-cheatsheet.html +++ b/guides/virsh-cheatsheet.html @@ -77,6 +77,11 @@
    virsh snapshot-delete --domain $vm --snapshotname $snapshot_name

    (TODO)Drive management

    +

    Resize virtual drives

    +

    Find the name of your drive.

    +
    virsh domblklist $vm
    +

    Resize with qemu

    +
    sudo qemu-img resize /location/drive.qcow2 +10G

    Change Memory

    In variantions of 512M, 1G, etc