Commit graph

145 commits

Author SHA1 Message Date
Raphael Dannecker
9f1c60eefd Use variable instead of group membership to install localhome
Use variable localhome to determines whether the localhome module is installed.
Default: localhome=false

Further changes:
- Move pam-exec from common-auth to common-session
- Move pam-mkhomedir before pam-mount to avoid double login on first use
  on localhome devices
2025-03-19 11:08:57 +01:00
Raphael Dannecker
3d01394820 Separate exam-mode stuff in own role 2025-03-18 14:37:13 +01:00
Raphael Dannecker
18b2cb8ccf Add TPM support for win11 VMs 2025-02-27 19:21:49 +01:00
Raphael Dannecker
97b9ba8d97 Shorten path for XDG_CONFIG_HOME and clean dir
In Linux socket paths are limited to 108 char length.
/var/tmp/vm/$UID/.config will be too long in some cases.
So we use /var/tmp/vm/$UID

/var/tmp/vm must be
- cleaned on startup
- created with sticky-bit (used by different users)
2025-02-18 14:16:56 +01:00
Raphael Dannecker
e3396ef06c Start firewalld when -exam user logs in 2025-02-05 13:15:42 +01:00
Raphael Dannecker
5998c5900e Trixies uses tmpfs for /tmp, so let's use /var/tmp/vm for temporary VM files 2025-01-27 17:11:12 +01:00
Raphael Dannecker
f4dffc06fc Rename instead of delete -exam media directories (belongs to commit 39da308) 2025-01-27 17:01:03 +01:00
Raphael Dannecker
a6eadce948 Sync application starters on boot and separate ansible tasks from lmn_vm role 2025-01-22 14:36:38 +01:00
Raphael Dannecker
9c8a8bdc69 Increase minimum available disk space after downloading a new vm image 2025-01-15 12:22:37 +01:00
Raphael Dannecker
352a897d88 Start user-squid-proxy at login so that all programs without kerberos support have proxy access 2025-01-09 12:31:24 +01:00
Raphael Dannecker
f5f3d9557d Add missing file for commit 23a9b6f 2024-12-13 18:40:42 +01:00
Raphael Dannecker
a507c1decf Downloading changed images takes a lot of time, so let's ask the user before 2024-12-11 13:38:05 +01:00
Raphael Dannecker
23a9b6ff97 Enable firewall activation for exam-mode
For working exam-mode we need to block direct internet access by firewall.
Users have to use squid-proxy on firewall, which can be disabled for exam-users.
To allow VM-traffic (anonymous user), we use a local squid server with users
kerberos-ticket to authenticate on the parent squid.

When using VMs on teacherdevices offsite, the local squid has to use direct internet access.
So we need two squid configs. When switching between offsite and onsite,
the squid has to be restartet with corresponding config.
2024-12-11 13:09:30 +01:00
Raphael Dannecker
3ff31771f7 The path for the persistent VMs was incorrectly not always set 2024-11-27 18:29:39 +01:00
Raphael Dannecker
1a48d82224 Prevent wasting disk space by accident 2024-11-27 12:04:43 +01:00
Andreas B. Mundt
77f4643628 Make tests for group membership more readable 2024-11-21 12:42:37 +01:00
Raphael Dannecker
b1816effdb create a list of network drives that can be mounted in the VM
Some Windows programs have problems with virtiofsd drives.
So that the appropriate SMB shares can be mounted directly in Windows,
a corresponding list of network drives is created before the VM starts.
2024-11-04 18:26:53 +01:00
Raphael Dannecker
6c8de6d49c Running virtiofsd with systemd-run prevents process from beeing killed when closing virt-viewer 2024-07-23 08:11:28 +02:00
Raphael Dannecker
48a3aa831d Create cleanup-config to remove /lmn/media/*-exam on boot. 2024-07-01 11:59:55 +02:00
Raphael Dannecker
4e229b4a5d Merge branch 'virtiofsd-usermapping' into fvs 2024-06-24 07:20:55 +02:00
Raphael Dannecker
a3d8fbaa82 Improved temporary fix for assigning default UID and GID mappings for linux-VMs. 2024-06-23 18:02:16 +02:00
Raphael Dannecker
2d7372e0c3 Fix spelling of virtiofsd binary. 2024-06-21 19:00:59 +02:00
Raphael Dannecker
1c4554e9e0 Run VM-sync only when server is reachable. 2024-06-21 15:49:36 +02:00
Raphael Dannecker
f201332a4b Run virtiofsd in usermode and mount shares with correct gid.
- The new virtiofsd provides the ability to map a specified
  UID and GID to that of the user when running in user mode.
  As a result, virtiofsd is moved to userland for VMs and
  the new -uid and -gid options are introduced that specify
  the IDs on the guest.New v
- The drives no longer have to be mounted with the group ID 1010.
  Therefore, the mount options are changed to the real group ID
2024-06-17 21:35:18 +02:00
Andreas B. Mundt
4d961c60e9 Adapt to latest macvtap device names. 2024-06-14 14:24:26 +02:00
Raphael Dannecker
07ff7f258c Merge branch 'macvtap' into fvs 2024-06-11 14:45:15 +02:00
Raphael Dannecker
679e0cc0aa Rework printer setup.
Don't remove local printers.
Create printerlist.csv for VMs.
2024-06-04 14:42:10 +02:00
Raphael Dannecker
ce9b1806f1 Create macvtap devices based on all physical network devices (en[pos]). 2024-06-04 14:26:40 +02:00
Raphael Dannecker
93d261e73b Network devices are now only managed by NetworkManager.
Systemd-networkd is no longer used.
NetworkManager creates a MACVTAP device for each physical Ethernet device.
When calling vm-run with option macvtap, all macvtap-devices are passed to the VM.
2024-05-23 09:58:41 +02:00
Andreas B. Mundt
edf92566cf Allow multiple VMs. 2024-04-30 11:16:32 +02:00
Raphael Dannecker
08f0f082fd Introduction of a new device class (localhome).
- user-home is on local disk
- additional entry in dolphin: home@server
- display info about localhome on login-screen
- provide unison-config for sync home with home@server
- force user to be logged out immediately after first login, because
  home-dir must exists for bind-mounts on /lmn/media
2024-04-28 19:37:13 +02:00
Raphael Dannecker
4aeee9442c Allow local squid direct internet access if parent proxy not available. This is important for devices that are not exclusively in the school network. 2024-04-28 19:37:13 +02:00
Raphael Dannecker
ecad541567 Make sure there is at least 5GB of free space after the VM sync. 2024-04-28 19:37:13 +02:00
Raphael Dannecker
4c6a499cf0 Fix misspelled name of lmnsynci-User. 2024-03-12 10:39:18 +01:00
Raphael Dannecker
30f24bb666 delete old VM-images when running out of space 2024-03-10 10:02:31 +01:00
Andreas B. Mundt
07f34be546 Fix VMs with home on CIFS. 2024-02-14 15:06:05 +01:00
Andreas B. Mundt
d4f6d91f15 Allow starting multiple VMs where the first uses the macvtap device. 2024-02-13 20:16:47 +01:00
Raphael Dannecker
9320f6fd67 allways pull torrent-files from backing-files 2024-02-08 09:22:26 +01:00
Raphael Dannecker
1a9cb2d68a fix path of qcow2 file for outdated-check 2024-02-08 07:22:40 +01:00
Andreas B. Mundt
72a134fcbf Fixes for the laptop role merged before.
Packages need to be installed before messing around
with network configurations.
2024-02-07 17:20:11 +01:00
Andreas B. Mundt
6e49613f4c Merge branch 'dev-vm' into fvs 2024-02-05 19:57:39 +01:00
Raphael Dannecker
d285b9dbf0 vm-upload must be run as user root 2024-02-05 12:59:23 +01:00
Andreas B. Mundt
eeec281bb0 Fix path for RAM image. SIP client on request. 2024-02-05 11:46:11 +01:00
Andreas B. Mundt
1e91e30a3f Add RAM option to allow exploring DHCP. 2024-02-04 10:21:02 +01:00
Andreas B. Mundt
9590af9ba2 Minor fixes and improvements. 2024-02-02 19:29:27 +01:00
Raphael Dannecker
ccec0f7fea fix owner of starters 2024-02-01 15:01:59 +01:00
Raphael Dannecker
89f851bc73 vm cpu utilization optimized 2024-02-01 09:08:33 +01:00
Raphael Dannecker
a410f4528c 2nd nic for TIA-VM (--bridge Option in vm-start) 2024-02-01 08:13:27 +01:00
Raphael Dannecker
fb4041b6f2 remove old desktop VM-starters 2024-01-30 15:17:02 +01:00
Raphael Dannecker
a18bb05551 Merge branch 'fvs' into dev-vm 2024-01-30 08:38:46 +01:00