Virtualization of Debian Edu Bullseye with virt-manager and kvm.
virt-manager + KVM
sudo apt install virt-manager qemu-system
Modify default subnet for skolelinux network
sudo virsh net-edit default
- Remove dhcp related settings. Example:
<network> <name>default</name> <uuid>bb8e8f0f-218e-447a-a718-d83d5e010850</uuid> <forward mode='nat'/> <bridge name='virbr0' stp='on' delay='0'/> <mac address='52:54:00:1e:fa:7f'/> <ip address='10.0.0.1' netmask='255.0.0.0'> </ip> </network>
Create an isolated network for LTSP
- Create a new file edultsp.xml.
sudo nano edultsp.xml
Example:
<network> <name>edultsp</name> <bridge name='edubr0' stp='on' delay='0'/> <mac address='52:54:00:cf:58:07'/> <ip address='192.168.0.1' netmask='255.255.255.0'> </ip> </network>
- To define a network from an XML file without starting it, use:
sudo virsh net-define edultsp.xml
The mac address is chosen randomly in hexadecimal for the last three pairs of numbers
- Add yourself into libvirt group
sudo adduser <youruser> libvirt
Virt manager
Be sure that the default and edulstp networks in QEMU/KVM details are active and Autostart with On boot checked.
- choice of iso file (debian-edu-11.5.0-amd64-netinst.iso)
- operating system (debian 11)
Memory (RAM = 8096) & numbers of CPU (CPU = 2)
- System storage = 40Gb (vol.qcow2)
- Machine name (debian-edu_server) net ('default' :NAT)
Installing the system
- Select language
- Select your location
- Configure your location
- Configure the network (try DHCP, but being disabled it cannot)
- Manually select for network configuration
- Server IP 10.0.2.2
- Gateway 10.0.0.1
- DNS 8.8.8.8
- Choose Debian Edu profile (selected one: Main Server+Workstation+LTSP)
- Really use the automatic partitioning tool? (Yes)
- Partecipate in the package usage survey? (No)
- Root password
- Full name for the first user
- Username for the first user
- Password for the first user (the password must be at least 5 characters long and is not the same as the username)
- Start installation
- Finish installation
Adding a second NIC to the server for LTSP
The debian-edu_server must be turned off and then edited by inserting a second virtual Nic. Example:
sudo virsh edit debian-edu_server
Scroll the file down to the <interface> and </interface> tags with <source network='default'/> and add the second virtual card with <source network='edultsp'/> and bus='0x07'
<interface type='network'> <mac address='52:54:00:10:92:64'/> <source network='default'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:09:a3:14'/> <source network='edultsp'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </interface>
Creating a diskless_VM
- Running debian-edu_server
- Type of installation: PXE or manual
- Operating system to be installed: Debian 11
- Memory and CPU choice: Memory 2 Gb, Cpu 1
- DESELECT Enable storage for this virtual machine
- Name and network: name: diskless_VM, network: 'edultsp'
- Running diskless_VM