Add WIP kvm guide stuff

master^2
Nathan Steel 3 years ago
parent ea8580a90c
commit 0a37652623

@ -51,6 +51,7 @@
<li><a href="/guides/setup-qemu-kvm.html">Setup Qemu/KVM</a></li> <li><a href="/guides/setup-qemu-kvm.html">Setup Qemu/KVM</a></li>
<li><a href="/guides/setup-kvm-bridge.html">Setup a bridged adapter</a></li> <li><a href="/guides/setup-kvm-bridge.html">Setup a bridged adapter</a></li>
<li>TODO:<a href="/guides/install-kvm-virtual-machine.html">Install a virtual machine</a></li> <li>TODO:<a href="/guides/install-kvm-virtual-machine.html">Install a virtual machine</a></li>
<li>TODO:<a href="/guides/kvm-optimisation.html">Optimisate KVM Virtual Machines</a></li>
<li>TODO:<a href="/guides/virsh-cheatsheet.html">Virsh cheatsheet</a></li> <li>TODO:<a href="/guides/virsh-cheatsheet.html">Virsh cheatsheet</a></li>
<li><a href="/guides/vm-seperation-of-concerns">Example of Separation of Concerns (SoC)</a></li> <li><a href="/guides/vm-seperation-of-concerns">Example of Separation of Concerns (SoC)</a></li>
</ul> </ul>

@ -40,6 +40,20 @@
<h2>Install with virt (CLI)</h2> <h2>Install with virt (CLI)</h2>
<h2>Install with virt-manager (GUI)</h2> <h2>Install with virt-manager (GUI)</h2>
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'
</section> </section>
</main> </main>

@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Nathan (Aney) Steel">
<meta name="theme-color" content="white">
<meta name="theme-color" content="black">
<link rel="stylesheet" type="text/css" href="/main.css">
<link rel="icon" type="image/png" href="/images/favicon.svg">
<title>KVM Optimisation</title>
</head>
<body>
<header>
<a href="#main" class="vh">Jump directly to main content</a>
<h1>KVM Optimisation</h1>
<input id="burger-toggle" type="checkbox"/>
<label class="burger-container" for="burger-toggle"><div class="burger"></div><span class="sr">Burger menu</span></label>
<hr/>
<nav>
<a href="/">home</a>
<a href="/about.html">about</a>
<a href="/projects.html">projects</a>
<a href="/blog/">blog</a>
<a href="/sitemap.html">misc</a>
<a href="/support.html">support</a>
</nav>
<hr/>
</header>
<main id="main">
<section>
<h2>KVM Optimisations</h2>
transmit queue
virsh domiflist <vm>
# this is then the txqueuelen change below ???
# changing to 4096
ifconfig <interface_name> txqueuelen <length>
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<Paste>
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
</section>
</main>
<footer>
<hr/>
<p>Written by <a href="https://aney.co.uk" target="_blank" rel="noopener">@aney</a> with <a href="https://danluu.com/web-bloat/" target="_blank" rel="noopener">web bloat</a> in mind | <a href="https://github.com/Aney/website" target="_blank" rel="noopener">Source Code</a></p>
</footer>
</body>
</html>

@ -77,6 +77,11 @@
<pre><code>virsh snapshot-delete --domain $vm --snapshotname $snapshot_name</code></pre> <pre><code>virsh snapshot-delete --domain $vm --snapshotname $snapshot_name</code></pre>
<h2>(TODO)Drive management</h2> <h2>(TODO)Drive management</h2>
<h3>Resize virtual drives</h3>
<p>Find the name of your drive.</p>
<pre><code>virsh domblklist $vm</code></pre>
<p>Resize with qemu</p>
<pre><code>sudo qemu-img resize /location/drive.qcow2 +10G</code></pre>
<h2>Change Memory</h2> <h2>Change Memory</h2>
<p>In variantions of 512M, 1G, etc</p> <p>In variantions of 512M, 1G, etc</p>

Loading…
Cancel
Save