One advantage of the combination of Knoppix and Qemu/kvm is that it is not necessary to do any setup of a virtual machine to run Knoppix, and with Knoppix copies on separate partitions bootable with grub, one may simply run gemu/kvm on the MBR of the harddisk and pick the desired install from the ordinary grub boot menu. The actual partition should be mounted read-only at most, as it gets mounted on /mnt-system in the virtual machine.
One complication with qemu/kvm is only simple networking support out of the box: I can reach the internet through the host, default network-manager works just fine for that, but direct communication with the Knoppix guest system isn't set up. Furthermore, with wireless adapters, the traditional simple bridge techique doesn't work.
There are lots of ways to overcome this, and here I want to report just one rather simple, presented in the blog post http://yalb.blogspot.no/2012/04/wire...g-for-kvm.html
It uses the tunctl, from uml-utilities, and parprouted from parprouted
In this case, my internet connection is through a mobile router (192.168.1.1) and wlan0 (192.168.1.100). The guest must be on the same subnet.
I issued the following commands
Then I started qemu/kvm to boot an ordinary Knoppix PMI through grub:Code:sudo sysctl -w /net/ipv4/ip_forward=1 sudo tunctl -t tap0 sudo ip link set tap0 up sudo ip addr add 10.10.10.10/32 dev tap0 sudo parprouted wlan0 tap0
In the guest, disable network-manager's networking and setup the virtual eth0, as root:Code:sudo qemu -machine accel=kvm -hda /dev/sda -net nic -net tap,ifname=tap0,script=no -m 1024 &
Somewhat miraculously to me, this worked!Code:ifconfig eth0 192.168.1.99 up # Static IP echo 'nameserver 192.168.1.1' > /etc/resolv.conf # Use the nameserver of the host route add default gw 192.168.1.100 # Host IP
I haven't tried yet, but this should work for at least a few VM's, creating tap1, tap2 etc and using them instead of tap0.
This way, servers can be tested out or routinely run with qemu/kvm just by copying the KNOPPIX directory (to be precise, in this case KNOPPIX705R1, remastering 1 of 7.0.5) to a partition (which may contain just about anything besides), setting up a grub menu entry for the copy and run qemu/kvm.
My practical motivation for this is to run a database server and a web server on separate virtual machines, possibly an application server too. With three extra partitions, I can easily run three VMs simulataneously this way.
I have used VMware Workstation for this earlier, but this approach seems both simpler and more flexible to me. Plus I can spare myself the frequent VMware module compilation blues. (Workstation 8.0.5 works fine with Knoppix 7.0.5, BTW - Workstation 8.0.4 does not.)
CORSAIR VENGEANCE DDR5 RAM 32GB (2x16GB) 6000MHz CL36
$89.99
HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM
$19.50
HyperX FURY DDR3 16GB 2x 8GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pins
$23.50
A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G
$13.99
CORSAIR Vengeance RGB Pro 32GB (2 x 16GB) 288-Pin PC RAM DDR4 3600 (PC4 28800) I
$94.99
Team T-FORCE VULCAN Z 16GB (2 x 8GB) 288-Pin PC RAM DDR4 3200 (PC4 25600) Intel
$38.99
Crucial - 32GB (2PK 16GB) 3200MHz speed PC4-25600 DDR4 SODIMM Laptop Memory K...
$78.99
G.SKILL Ripjaws V Series 16GB (2x8GB) DDR4 3200 Memory Kit (F4-3200C16D-16GVKB)
$32.90
【DDR4 RAM】Gigastone Black RGB Game PRO Desktop RAM 32GB(2x16GB) DDR4-3200MHz PC4
$79.99
LOT OF 25 Mixed Major Brands 4GB PC4-2400T DDR4 19200 Desktop Memory Ram TESTED
$100.00