How to test Debian Edu CD/DVDs on Virtual Machines
Varning: This is for testing on test-versions of Debian Edu. You my encounter bugs which needs restart.
This is a guide for testing Debian Edu on virtual machines running Debian or Ubuntu connected to a dhcp network (also including steps to support networks with static Internet address).
For testing you can choose between virtualbox, kvm or qemu. The guide got the same test network commendation, IP addresses.
Test config 1a: The user can choose to test combiserver (main + thin client sever) on one virtual machine and 1+n thin clients on an 1+n virtual machines.
Test config 1b: The user can run a combiserver with a cirtual machine running diskless client on 1+n virtual machines.
Test config 1a+1b.
Test config 2: The user can run main server on a separate virtual machine, thin client server on an other virtual machine and thin clients and diskless clients (almost as 1a+1b).
What's also needs are:
- Short guide on how to report bugs at the TestCDinstall page.
- Short guide how to get access to logs and screen dumps as easy as possible. This makes it easier making accurate bug reports.
Test scripts to run for automatic setup and running the different test configs
I'll see 1 and 2 as mandatory documentation. Suggestion 3 is just a wish
Fetching the test install CD or DVD
Fetch the debian-edu-amd64-i386-BD-1.iso image from the server. You can use your web browser, or the wget command.
Fetching stable version of the USB-versjon Wheezy 7.1
Setting up bridge network for VM's
Here follows the full explanation of setting up a full virtual machine Debian Edu test with main and thin client server, also running diskless workstation and a thin client.
You need VirtualBox 4.3 or newer. To install VirtualBox on Ubuntu, see this page http://tecadmin.net/install-oracle-virtualbox-on-ubuntu/
Setting up VirtualBox network
Warning: if the host machine (the one you install VirtualBox on) is on the 10.0.0.0 network (it has an IP address in the 10.0.x.x range) you might get network trouble if you use this guide.
DebianEdu needs a 10.0.0.0/8 network as default, see the DebianEdu default network setup page. The main server provides it's own DHCP server, so DHCP needs to be turned off in VirtualBox. To set up a suitable network via the command line:
$ VBoxManage natnetwork add --netname skolelinux --network 10.0.0.0/8 --dhcp off
To verify that you have the network set up correctly, use the GUI: File, Preferences, Network, NAT Networks. You should have a network named "skolelinux" there, with "Network CIDR" set to "10.0.0.0/8". DHCP and IPv6 should both be unchecked.. From the command line you can also do
$ VBoxManage list natnets NetworkName: skolelinux IP: 10.0.0.1 Network: 10.0.0.0/8 IPv6 Enabled: No IPv6 Prefix: DHCP Enabled: No Enabled: Yes loopback mappings (ipv4) 127.0.0.1=2
the command line provides more information than the VirtualBox GUI.
Set up the main server
In VirtualBox GUI, create a new virtual machine for the main server. Recommended values are 1 GB memory, 60 GiB hard drive (you might due with 40 GiB at a minimum, but having 60 GiB are more safe). Select New, give the machine a name. For this example choose "server1" as a name.
Select "Linux" for type, and "Debian (64 bit)" for version. Click next, select or input 1024 MB for memory size, click next, select "create a virtual hard drive now", click next, select VDI for Hard drive file type, click next, select "dynamically allocated", click next, give it a name (the default suggestion is usually ok), and set the size to 60 GiB, click create.
In the "installer boot menu" when starting up the installation, select 64 bit (graphical) install. Follow the install guide for main server + thin client server.
Important. Before installing the main server1, the first Adapter 1 network card has to be sett to NAT and nothing else. This because it is a workstation when installing the server. After installation, the Adapter 1 are changed from "NAT" to "NAT Network".
After the server are installed, click Settings on the server1 virtual machine configuration, click Network, on Adapter 1, and change "NAT" to "NAT Network". The Name of the network on Adapter one is "skolelinux", if it isn't selected already. click ok. From the command line you can do it with
$ VBoxManage modifyvm server1 --nic1 natnetwork
Set up a diskless workstation
In VirtualBox GUI, create a new machine for a diskless workstation. Recommended values are 1024 MB RAM, 512 MB RAM is minimum. Give it a name (for example "ws1"), 1024 MB RAM and no hard drive. After creation, change settings. On System, allow the machine to boot from network in the Boot Order list. Under Network, Adapter 1, select "NAT Network" and the correct network ("skolelinux" in this example).
Interestingly, you can choose to run a diskless workstation or a thin client on the skolelinux 10.0.0.0/8 net. Please consult the boot menu. Select the diskless workstation, and the machine should boot.
Adding thin client network
You can also test the thin client network by using
$ VBoxManage natnetwork add --netname thinclient --network 192.168.0.0/24 --dhcp off
To verify that you have the network set up correctly, use the GUI: File, Preferences, Network, NAT Networks. You should have a network named "thinclient" there, with "Network CIDR" set to "192.168.0.0/24". DHCP and IPv6 should both be unchecked.. From the command line you can also do
NetworkName: thinclient IP: 192.168.0.1 Network: 192.168.0.0/24 IPv6 Enabled: No IPv6 Prefix: DHCP Enabled: No Enabled: Yes loopback mappings (ipv4) 127.0.0.1=2
Set up a thin client
In VirtualBox GUI, create a new machine for a thin client. The most easy way is to clone the ws1 image, and change the "NAT Network" to "thinclient". Recommended values for memory is 1024 MB RAM, 512 MB RAM is minimum. Give it a name (for example "tk1"), 1024 MB RAM and no hard drive. After creation, change settings. On System, allow the machine to boot from network in the Boot Order list. Under Network, Adapter 1, select "NAT Network" and the correct network ("thinclient" in this example). You might change the MAC address by pressing the two arrow circle under the Advance menu. Given that the main and thin client server already runs in a virtual machine, just start the wk1 virtual machine, and it should start. Easy peacy.