Refactor VM volume mounting
- Replace bind-mounts on /lmn/media/$USER with separate mounting for Home and Share SMB shares in the VM. - Update vm-run to start virtiofsd with /lmn/media/$USER (/home/$USER on localhome machines). - Use vm-vminfo to generate a JSON file containing user information, including Username, Groups, printer list krb5-ticket and some more - Configure vminfo.service (systemd-timer) to periodically call vm-vminfo. - Ensure krb5-ticket (TGT) is injected into the Windows VM. - Mount SMB-Home and SMB-Share shares as part of the new structure.
This commit is contained in:
parent
efd48de6c7
commit
b688a8df59
12 changed files with 560 additions and 24 deletions
|
|
@ -20,6 +20,7 @@
|
|||
- virt-manager
|
||||
- virt-viewer
|
||||
- dialog # for vm-netboot menu
|
||||
- python3-impacket
|
||||
|
||||
# - name: allow all users to use VMs
|
||||
# lineinfile:
|
||||
|
|
@ -150,6 +151,7 @@
|
|||
- vm-sync
|
||||
- vm-link-images
|
||||
- vm-virtiofsd
|
||||
- vm-vminfo
|
||||
- virtiofsd
|
||||
- vm-aria2
|
||||
- uploadseed
|
||||
|
|
@ -237,3 +239,26 @@
|
|||
src: vm-netboot
|
||||
dest: /usr/local/bin/
|
||||
mode: '0755'
|
||||
|
||||
- name: Provide vminfo service
|
||||
ansible.builtin.copy:
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Create .vminfo.json for VMs
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/bash -c 'umask 027; /usr/local/bin/vm-vminfo > "{% if localhome %}~{% else %}/lmn/media/${USER}{% endif %}/.vminfo.json"'
|
||||
dest: /etc/systemd/user/vminfo.service
|
||||
mode: '0644'
|
||||
|
||||
- name: Provide vminfo timer
|
||||
ansible.builtin.copy:
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Timer for vm-info
|
||||
[Timer]
|
||||
OnActiveSec=0s
|
||||
OnUnitActiveSec=1h
|
||||
Persistent=true
|
||||
dest: /etc/systemd/user/vminfo.timer
|
||||
mode: '0644'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue