add virt-manager automatic launch

This commit is contained in:
lukas 2021-08-20 10:26:23 +02:00
parent b712d96fc8
commit ddb04feb59
4 changed files with 46 additions and 0 deletions

View File

@ -28,3 +28,18 @@ virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM
gnome-initial-setup # Add GNOME initial setup too to let user create local account. gnome-initial-setup # Add GNOME initial setup too to let user create local account.
%end # End of the packages section %end # End of the packages section
%post --nochroot --log=/mnt/sysimage/root/dhimd.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging.
# Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry]
Type=Application
Name=Virtual Machine Manager
Exec=virt-manager
EOF
# Download netboot.xyz # cannot resolve hostname
# wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /var/lib/libvirt/iso/
%end # End of the %post section

View File

@ -28,3 +28,18 @@ virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM
gnome-initial-setup # Add GNOME initial setup too to let user create local account. gnome-initial-setup # Add GNOME initial setup too to let user create local account.
%end # End of the packages section %end # End of the packages section
%post --nochroot --log=/mnt/sysimage/root/dhimd.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging.
# Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry]
Type=Application
Name=Virtual Machine Manager
Exec=virt-manager
EOF
# Download netboot.xyz # cannot resolve hostname
# wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /var/lib/libvirt/iso/
%end # End of the %post section

View File

@ -38,4 +38,12 @@ usermod -a -G libvirt liveuser # Make user "liveuser" part of the existing libvi
chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory
chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/images # Make the user "test" the owner of this directory chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/images # Make the user "test" the owner of this directory
# Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry]
Type=Application
Name=Virtual Machine Manager
Exec=virt-manager
EOF
%end # End of the %post section %end # End of the %post section

View File

@ -38,4 +38,12 @@ usermod -a -G libvirt liveuser # Make user "liveuser" part of the existing libvi
chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory
chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/images # Make the user "test" the owner of this directory chown liveuser:liveuser /mnt/sysimage/var/lib/libvirt/images # Make the user "test" the owner of this directory
# Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry]
Type=Application
Name=Virtual Machine Manager
Exec=virt-manager
EOF
%end # End of the %post section %end # End of the %post section