unix:virtualization:kvm:workstation
Differences
This shows you the differences between two versions of the page.
| unix:virtualization:kvm:workstation [2020/04/18 02:07] – created rodolico | unix:virtualization:kvm:workstation [2020/04/18 02:42] (current) – rodolico | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== KVM on personal workstation ====== | ====== KVM on personal workstation ====== | ||
| + | |||
| + | ===== Discussion ===== | ||
| + | |||
| + | WARNINIG: I'm still writing this, and most of it is coming off my (fallible) memory, so be careful if you use this before I've tested everything. I'll remove this warning when I have tested. | ||
| I have had great success with KVM on a workstation. If you like GUI's, virt-manager takes some of the pain out of learning a new system, at the loss of some capabilities. However, I was able to get very good response on an older Dell Inspiron 23 with 8G of RAM and a 4 core i5. I was able to run Windows 10, Windows 7, FreeBSD and a Devuan workstation on them (one at a time) and get very good response most of the time. | I have had great success with KVM on a workstation. If you like GUI's, virt-manager takes some of the pain out of learning a new system, at the loss of some capabilities. However, I was able to get very good response on an older Dell Inspiron 23 with 8G of RAM and a 4 core i5. I was able to run Windows 10, Windows 7, FreeBSD and a Devuan workstation on them (one at a time) and get very good response most of the time. | ||
| Line 5: | Line 9: | ||
| On my Lenovo ThinkStation D30, 32G RAM and 8 core Xeon E5-2637, I run multiple virtuals at the same time, depending on what I need. | On my Lenovo ThinkStation D30, 32G RAM and 8 core Xeon E5-2637, I run multiple virtuals at the same time, depending on what I need. | ||
| - | In this case, I'm | + | In this case, want the virtuals visible on the LAN, so I set up a bridge for them and let them get their IP's from the LAN's DHCP server. However, on my laptop, which may not have a network connection, I use the internal NAT. |
| + | |||
| + | ===== Installation ===== | ||
| + | |||
| + | First, install the necessary Devuan packages. I always do my installation as the root user, so you won't see ' | ||
| + | <code bash> | ||
| + | apt install bridge-utils qemu-kvm qemu-system-common qemu-system-x86 qemu-utils virt-manager virt-top virt-viewer virtinst xrdp xtightvncviewer libvirt-clients libvirt-daemon-system | ||
| + | </ | ||
| + | |||
| + | Now, build out the network using a bridge (don't do this if you're going to use virt-manager' | ||
| + | <code bash interfaces> | ||
| + | # This file describes the network interfaces available on your system | ||
| + | # and how to activate them. For more information, | ||
| + | |||
| + | source / | ||
| + | |||
| + | # The loopback network interface | ||
| + | auto lo | ||
| + | iface lo inet loopback | ||
| + | |||
| + | # The primary network interface | ||
| + | iface eth0 inet manual | ||
| + | iface eth0 inet6 manual | ||
| + | |||
| + | #set up bridge and give it a static ip | ||
| + | auto br0 | ||
| + | iface br0 inet dhcp | ||
| + | bridge_ports eth0 | ||
| + | bridge_stp off | ||
| + | bridge_fd 0 | ||
| + | bridge_maxwait 0 | ||
| + | </ | ||
| + | |||
| + | ===== Usage ===== | ||
| + | |||
| + | |||
| + | virt-manager has a nice little GUI interface to running virtuals, but I prefer to connect to them using xtightvncviewer or rdesktop, so I install those. | ||
| + | |||
| + | <code bash> | ||
| + | apt install xtightvncviewer rdesktop | ||
| + | </ | ||
| + | |||
| + | ==== Windows Virtuals ==== | ||
| + | On my Windows virtuals, I simply turn on Remote Desktop (' | ||
| + | <code perl rdesktop.pl> | ||
| + | #! / | ||
| + | |||
| + | use warnings; | ||
| + | use strict; | ||
| + | |||
| + | # these will be available to the Windows machines as network shares. The key | ||
| + | # is the name as seen by the Windows machine, the value is the actual path. | ||
| + | |||
| + | my %shares = ( ' | ||
| + | |||
| + | my $target = shift or die " | ||
| + | my $resolution = shift; $resolution = ' | ||
| + | # build my command | ||
| + | my $command = "/ | ||
| + | foreach my $share ( keys %shares ) { | ||
| + | | ||
| + | } | ||
| + | $command .= $target; | ||
| + | # and execute it | ||
| + | qx/ | ||
| + | </ | ||
| + | |||
| + | Just call it as <code bash> | ||
| + | |||
| + | ==== Unix VNC Targets ==== | ||
| + | |||
| + | Again, I have a quick and dirty script that I use to connect. | ||
| + | <code perl connectVNC> | ||
| + | #! / | ||
| + | |||
| + | use warnings; | ||
| + | use strict; | ||
| + | |||
| + | my $target = shift or die " | ||
| + | my $port = shift; $port = 5900 unless $port; | ||
| + | `vncviewer -compresslevel 6 -encodings " | ||
| + | </ | ||
| + | |||
| + | Call it with ./ | ||
| + | |||
| + | For Linux, there is a cute little script that works well that you can install on the target virtual. I'll include it here later. | ||
unix/virtualization/kvm/workstation.1587193628.txt.gz · Last modified: 2020/04/18 02:07 by rodolico
