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.)
IBM Power8 S822L Storage Server 8247-22L - With Ram, Some Cards, No HDD's
$399.95
IBM SYSTEM X3500 M3 SERVER 7380AC1 2*XEON E5620 2.4GHz 8GB SEE NOTES
$33.21
IBM x3650 M4 2x Xeon E5-2670 2.6ghz 16-Core / 64GB / M5110e / 2x PSU
$129.99
IBM X3650 M5 5462-AC1,2 X E5-2640V3 2.6GHZ 8C, 16 GB, DUAL 750W, 2 X 1TB SERVER
$249.99
IBM 8284-22A S822 Dual Power8 Cpu 512Gb (16x 32Gb) RAM
$795.00
IBM Power S822 12-Bay Server System Power8 Core 3.42Ghz DVD-Rom Drive 64GB No HD
$399.99
IBM Lenovo X3650 M5 2U 8x 2.5” CTO Rack Server – 2x HS, 2x 750W
$199.00
Dell PowerEdge R730xd 24B SFF 2U Xean E5-2690 V4 2.6 ghz 28-cores 4x 1.2 TB
$500.00
IBM System X3650 M4 Server, 2 x Xeon E5-2630 2.3Ghz 32GB RAM, 2 x 1.2 TB HDD
$132.46
IBM Power S822 8284-22A 12SFF Power8 3.89GHz 6-Core 64GB RAM No Bezel/HDD Server
$359.99