[debian-edu-commits] [Debian Wiki] Update of "DebianEdu/HowTo/TestInstallVirtualMachine" by RolandClobus
Debian Wiki
wiki at debian.org
Thu Oct 22 17:21:27 BST 2026
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Debian Wiki" for change notification.
The "DebianEdu/HowTo/TestInstallVirtualMachine" page has been changed by RolandClobus:
https://wiki.debian.org/action/diff/DebianEdu/HowTo/TestInstallVirtualMachine?action=diff&rev1=33&rev2=34
Comment:
Rewrite based on trixie and virt-manager
#language en
- = How to test Debian Edu CD/DVDs on Virtual Machines =
+ = How to test Debian Edu CD/BDs on Virtual Machines =
- Varning: This is for testing on test-versions of Debian Edu. You my encounter bugs which needs restart.
+ <<TableOfContents>>
- 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).
+ '''Warning''': This is for testing of development versions of Debian Edu running Debian unstable (sid). You may encounter bugs which might require you to reinstall everything.
- For testing you can choose between [[KVM|KVM]], [[QEMU#Virt-Manager|QEMU with Virt-Manager]], [[QEMU|QEMU]] or VirtualBox. The guide got the
+ For the virtualisation environment you can choose between [[QEMU#Virt-Manager|QEMU with Virt-Manager]], [[KVM|KVM]], [[QEMU|QEMU]] or VirtualBox. This guide uses the first method.
- same test network commendation, IP addresses.
+ '''Test config 1a with thin client(s)''': The user can run a combi-server (main + thin client sever) on one virtual machine and 1+n thin clients on 1+n virtual machines.
- '''Test config 1a with thin client(s)''': The user can choose to test combi-server (main + thin
- client sever) on one virtual machine and 1+n thin clients on an 1+n
- virtual machines.
- '''Test config 1b with diskless client(s)''': The user can run a combi-server with a virtual machine
+ '''Test config 1b with diskless client(s)''': The user can run a combi-server on one virtual machine and running diskless clients on 1+n virtual machines.
- running diskless client on 1+n virtual machines.
- '''Test config 1a+1b running both thin clients and diskless clients'''.
+ '''Test config 1c running both thin clients and diskless clients'''.
+ '''Test config 2 (not described yet)''': 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).
- '''Test config 2 (not described yet)''': 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:'''
+ == Sharper view of the VMs ==
+ For a sharper view in the virtual machine window:
- 1. Short guide on how to report bugs at the TestCDinstall page.
- 2. Short guide how to get access to logs and screen dumps as easy as possible. This makes it easier making accurate bug reports.
- 3. 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 :)
+ * Select ''View | Scale Display | Never''
+ * Select ''View | Resize to VM''
+ == Set up the network environment for the VMs ==
- == Fetching the test install CD or DVD ==
- Fetch the debian-edu-12.<x>.0-amd64-BD-1.iso image from the server. You can use your web browser, or the wget command.
- {{{
- wget https://cdimage.debian.org/mirror/cdimage/release/12.5.0/amd64/iso-bd/debian-edu-12.5.0-amd64-BD-1.iso
- }}}
+ Set up a collection of virtual machines that works independently of the configuration of the host.
+ === Configure virtual networks (simulated switches) ===
- == 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.
+ The following steps simulate 2 switches, as mentioned in the [[https://wiki.debian.org/DebianEdu/Documentation/Trixie/Architecture#Network|DebianEdu network architecture diagram]]
- == VirtualBox setup ==
- You need VirtualBox 4.3 or newer. To install VirtualBox on Ubuntu, see this page https://itsfoss.com/install-virtualbox-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.
+ * In ''Virtual Machine Manager'', select ''Edit | Connection Details | Virtual Networks''.
+ * Define the switch to connect the gateway and the Main server:
+ * Click on the plus icon (''Add Network'')
+ * ''Name:'' {{{bridge_edu_wan}}}
+ * Choose ''Mode:'' {{{Isolated}}}
+ * Disable ''Enable IPv4''
+ * Confirm that ''Enable IPv6'' is also disabled
+ * Click ''Finish''
+ * Define the switch to connect the LTSP server located on the Main server to the networked clients:
+ * Click on the plus icon (''Add Network'')
+ * ''Name:'' {{{bridge_edu_lan}}}
+ * Choose ''Mode:'' {{{Isolated}}}
+ * Disable ''Enable IPv4''
+ * Confirm that ''Enable IPv6'' is also disabled
+ * Click ''Finish''
+ == Set up the VMs ==
- DebianEdu needs a 10.0.0.0/8 network as default, see the [[http://wiki.debian.org/DebianEdu/Documentation/Bookworm/Architecture#The_default_network_setup|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.
+ === VM1: Set up the gateway ===
+
+ First prepare the VM for the gateway using ''debian-edu-router'' based on Debian testing.
+
+ For the debian-edu-router gateway, a non-!DebianEdu netinst image is required:
+ {{{
+ wcurl https://get.debian.org/images/weekly-builds/amd64/iso-cd/debian-edu-testing-amd64-netinst.iso -o debian-testing-amd64-netinst-$(date +%Y)-W$(date +%V).iso
+ }}}
+
+ * In ''Virtual Machine Manager'', select ''File | New Virtual Machine''
+ * Select ''Connection'' {{{QEMU/KVM}}}
+ * Select ''Local installation media''
+ * Click ''Forward''
+ * Click ''Browse'' and choose the regular netinst image
+ * Click ''Forward''
+ * Just 1GiB of memory is sufficient: ''Memory'' {{{1024}}}
+ * ''CPUs'' {{{1}}}
+ * Click ''Forward''
+ * A small disk image is sufficient: {{{4}}} GiB
+ * Click ''Forward''
+ * ''Name:'' {{{debian-edu-gateway}}}
+ * Enable ''Customise configuration before install''
+ * Click ''Finish''
+ * Click ''Add Hardware''
+ * Select ''Network''
+ * Choose in ''Network source'' {{{Virtual network 'bridge_edu_wan': Isolated network}}}
+ * Click ''Finish''
+ * Click ''Begin Installation''
+ * Select the graphical installer
+ * When the Debian Installer runs, select the default answers, except:
+ * ''Configure the network'', choose {{{enp1s0}}}. This is the interface which gets an IP address via DHCP from the host
+ * If the VM host is running a proxy, enter the information when prompted (this speeds up the installation)
+
+ After the Debian Installer has finished and rebooted the VM, prepare access to the debian-edu-router-config package, which is currently not available in testing (this sentence is written on 2026-10-21):
+ * Log in as ''root''
+ * Type in the root console:
+ {{{
+ echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list.d/allow_sid.list
+ echo -e "Package: *\nPin: release n=sid\nPin-Priority: 1\n\nPackage: debian-edu-router-config\nPin: release n=sid\nPin-Priority: 400" > /etc/apt/preferences.d/50pin_debian_edu_router_config
+ apt update
+ }}}
+
+ Follow the installation steps as described in the [[https://wiki.debian.org/DebianEdu/Documentation/Trixie/Installation#Installing_a_gateway_using_debian-edu-router|Installation]] chapter.
+
- === Set up the main server ===
+ === VM2: Set up the main server ===
- In VirtualBox GUI, create a new virtual machine for the main server. Recommended values are 2 GB memory, 60 GiB hard drive (you might due with 40 GiB at a minimum, but having 60 GiB is more safe). Select New, give the machine a name. For this example choose "tjener" as a name.
+ Before you set up the main server, make sure that the gateway VM is running.
- Select "Linux" for type, and "Debian (64 bit)" for version. Click next, select or input 2048 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.
+ ==== Variant sid ====
- 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.
+ '''Note:''' The (re-)installation works much faster, if the host has a proxy configured (apt-cacher-ng at port 3142 or squid-deb-proxy at port 3128).
- Important. Before installing the main server "tjener", 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".
+ When writing this documentation (2026-10-21), many packages were (temporarily) not available on Debian testing (forky), so these instructions are for sid.
+ For the main server, use a netinst image (network-based installation, ca. 1GB):
- After the server are installed, click Settings on the tjener 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 tjener --nic1 natnetwork
+ wcurl https://get.debian.org/images/weekly-builds/amd64/iso-cd/debian-edu-testing-amd64-netinst.iso -o debian-edu-testing-amd64-netinst-$(date +%Y)-W$(date +%V).iso
}}}
+ Configure the VM for a main server that can act as an LTSP server too based on Debian unstable (sid).
+
+ * In ''Virtual Machine Manager'', select ''File | New Virtual Machine''
+ * Select ''Local installation media''
+ * Select ''Connection'' {{{QEMU/KVM}}}
+ * Click ''Forward''
+ * '''IMG''' Choose the DebianEdu netinst image
+ * Click ''Forward''
+ * ''Memory'' {{{2048}}}
+ * ''CPUs'' {{{2}}}
+ * Click ''Forward''
+ * You'll need some large amount of disk space: {{{70}}} GiB
+ * Click ''Forward''
+ * ''Name:'' {{{debian-edu-tjener}}}
+ * Enable ''Customise configuration before install''
+ * Change ''Network selection'' to {{{Virtual network 'bridge_edu_wan': Isolated network}}}
+ * Click ''Finish''
+ * Click ''Add Hardware''
+ * Select ''Network''
+ * Change ''Network source'' to {{{Virtual network 'bridge_edu_lan': Isolated network}}}
+ * Click ''Finish''
+ * Click ''Begin Installation''
+ * Move the cursor to the ''Graphical install'' line and press {{{Tab}}}
+ * '''TWEAKS''': in other variants other tweaks will be required
+ * On the command line append after ''quiet'': {{{mirror/suite=unstable mirror/codename=sid apt-setup/services-select=none}}}<<BR>>
+ If you are using a host with a proxy, also add: {{{mirror/http/proxy=<the proxy IP-addres and port>}}}
+ * Press {{{Enter}}} to start the installer
+ * When the Debian Installer runs, select the default answers, except:
+ * ''Configure the network'', choose {{{enp1s0}}}. This is the interface which is connected to the gateway.
+ * Select ''Configure network manually'' after the DHCP request timed out.
+ * ''IP address'': {{{10.0.2.2/8}}}
+ * ''Really use the automatic partitioning tool?'': {{{Yes}}}
+ * '''Note:''' The password for the user must be sufficiently strong, i.e. at least 5 characters and different from the username, see [[https://wiki.debian.org/DebianEdu/Documentation/Trixie/Installation#The_installation_process|the Wiki]]
+ * There will be an error message from ''XXX''. Press ''Continue'' to continue. This error message is due to the additional commandline options and shows that they will be used.
+ * When the Debian Installer shows the ''Installation complete'' dialog, make some adjustments:
+ * Switch to a console with ''Send Key | Ctrl+Alt+F3''
+ * Activate the console with ''Enter''
+ * Modify the file that contains the Debian version: {{{chroot /target sed -i -e 's/forky/unstable/' /etc/debian_version}}}
+
+ ==== Variant trixie 13.7.0 ====
+
+ Before you set up the main server, make sure that the gateway VM is running.
+
+ '''Note:''' The (re-)installation works much faster, if the host has a proxy configured (apt-cacher-ng at port 3142 or squid-deb-proxy at port 3128).
+
+ When writing this documentation (2026-10-21), a small fix is required to make the BD offline installation with the 13.7.0 image work. And some tweaks are needed to use the proxy of the VM host (if desired).
+
+ Configure the VM as in variant sid, with modifications as parts '''IMG''' and '''TWEAKS''':
+ * At step '''IMG''', use the following BD image instead of the DebianEdu netinst image:
+ {{{
+ wcurl https://get.debian.org/images/release/current/amd64/iso-bd/debian-edu-13.7.0-amd64-BD-1.iso
+ }}}
+ * Replace the steps after '''TWEAKS''' with:
+ * Press {{{Enter}}} to start the installer
+ * When the Debian Installer runs, select the default answers, except:
+ * ''Configure the network'', choose {{{enp1s0}}}. This is the interface which is connected to the gateway.
+ * Select ''Configure network manually'' after the DHCP request timed out.
+ * ''IP address'': {{{10.0.2.2/8}}}
+ * When the step ''Choose Debian Edu profile'' is shown, do the following:
+ * Switch to a console with ''Send Key | Ctrl+Alt+F3''
+ * Activate the console with ''Enter''
+ * Get the updated script:<<BR>>
+ {{{
+ cd /usr/lib/finish-install.d
+ rm 13debian-edu-profile-udeb
+ wget https://people.debian.org/~rclobus/13debian-edu-profile-udeb
+ chmod a+x 13debian-edu-profile-udeb
+ }}}
+ * Disable the IP-address to guarantee offline installation<<BR>>
+ {{{
+ ip -o addr | awk '$4 ~ /10\.0\.2\.2\/8$/ { printf "ip addr delete %s dev %s\n", $4, $2 }' | sh
+ }}}
+ * Return to the installer screen with ''Send Key | Ctrl+Alt+F5'' and resume the installation
+ * ''Really use the automatic partitioning tool?'': {{{Yes}}}
+ * '''Note:''' The password for the user must be sufficiently strong, i.e. at least 5 characters and different from the username, see [[https://wiki.debian.org/DebianEdu/Documentation/Trixie/Installation#The_installation_process|the Wiki]]
+ * If you are using a proxy on the host, make some adjustments when the Debian Installer shows the ''Installation complete'' dialog:
+ * Switch to a console with ''Send Key | Ctrl+Alt+F3''
+ * Create a configuration file for the proxy:
+ {{{
+ echo 'Acquire::http::Proxy "http::IPADDRESS:PORT";' > /target/etc/apt/apt.conf.d/proxy_of_host
+ }}}
+ * Allow the first-boot script to use the proxy:
+ {{{
+ sed -i -e '/set -e/aeval $(apt-config shell http_proxy Acquire::http::Proxy)' /target/usr/sbin/debian-edu-ltsp-install
+ }}}
+
+ '''Note:''' some of the issues you'll see in this setup have been fixed already and are available either in ''trixie-proposed-updates'' or ''sid''.
+
+ ==== Variant trixie 13.8 preview ====
+
+ '''TODO'''
+
- === Set up a diskless workstation ===
+ === VM3: 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 "ws-01"), 4096 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).
+ Before you set up a diskless workstation, make sure that the gateway and the main server VMs are running.
+ Configure the VM for a diskless workstation.
+
+ * In ''Virtual Machine Manager'', select ''File | New Virtual Machine''
+ * Select ''Manual install''
+ * Click ''Forward''
+ * Select {{{Debian testing}}}
+ * Click ''Forward''
+ * ''Memory'' {{{2048}}}
+ * ''CPUs'' {{{2}}}
+ * Click ''Forward''
+ * Disable ''Enable storage for this virtual machine''
+ * Click ''Forward''
+ * ''Name:'' {{{debian-edu-dlw01}}}
+ * Change ''Network selection'' to {{{Virtual network 'bridge_edu_lan': Isolated network}}}
+ * Enable ''Customise configuration before install''
+ * XXXX
+ * Click ''Finish''
+
- 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.
+ '''Note:''' Interestingly, you can choose to run a diskless workstation or a thin client on the skolelinux 10.0.0.0/8 net (''bridge_edu_wan''). 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 "tc-01"), 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.
-
More information about the debian-edu-commits
mailing list