PROXMOX VDI Client - A Better Approach to Thin Clients for Proxmox

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you guys love my thin client videos so i'm back with another today we have a new login system written by one of my viewers named josh patton with this login system you can log in using the credentials for your proxmox server and the thin client will give you a list of which vms you can access in this case this user has access to three vms by clicking on one of them i can connect to it and start a virtual session this one supports sound too something you guys have been asking me about for a while like my last video i have instructions for both debian and for raspberry pi os although this time i walked through them on debbie and on this tiny little thin client but don't worry i tested them on a raspberry pi 2 and a raspberry pi 4 as well so follow along with me as we set up the software to make this work if you head down to the description there's a link to my blog post with all of the commands you can execute to set this up on both debian and raspberry pi os and if you like this video like and subscribe so you can see more thin client videos like this statistically if you're watching my video you're probably not subscribed so you probably didn't see the previous videos in this series it's a link up there to the playlist so just a quick recap here is how you have to set up proxmox to use spice so by default proxmox will have the display set to default which is standard vga with the default you can use vnc to connect using the no vnc console built into proxmox however using vnc to connect outside of proxmox's built in no bnc console isn't super easy you have to set up a separate port number for each vm and just kind of remember what they are and you don't get a lot of security or authentication so instead i've set the display for this vm to spice and since it's linux i can just set spice and get as many monitors as i want up to four if you have a windows vm you have to pick how many monitors you want ahead of time with spice clicking on the console in proxmox will download a configuration file for remote viewer the app that's used to connect to the spice server this thin client setup is going to connect to proxmox's api and download that same file and launch remote viewer on the remote system with spice we also have the option to pass through some hardware so these four usb devices here are set as the spice port and that means the spice client can pick up to four usb devices to redirect through the spice session to the virtual machine you can create as many as you want by clicking add usb device spice port also for audio we go to add audio device and you can choose the driver you want to emulate ich9 intel is a pretty generic solution that should work with most modern operating systems ac 97 should work with anything in the last two decades and the back end driver of spice forwards it through the spice session on the options page you have a couple things you can choose you can set use tablet for pointer if you don't install the spice drivers on your windows vm you'll need to uncheck this or the mouse won't work until the drivers are installed linux doesn't have any problems with that and spice enhancements you have the option of turning on video streaming which i leave off it may or may not help depending on what you're trying to do so once we have our virtual machine configured we need to configure our users let's go to data center users i have created a user called vdi user at pve so pve realm means that proxmox is managing the authentication through the proxmox system it's not relying on a linux backend or an authentication service so that means that the username and password are both part of proxmox's database then under permissions i've created a permission that gives vdi user at pve pve vm permission on vmwano set 106. and this means that that user gets all the permissions of this role which in this case means vm audit backup config cd-rom autonit console power management in order to use this script all we actually need is power management console and audit but the other ones aren't too bad to keep to so the tool we're using today is written by a guy named josh patton it's called pve vdi client and he is a viewer of mine and he wrote this after seeing one of my past videos so great thanks to josh for writing this and today we're going to install this to run on boot to make a thin client appliance so you can see it's got a login screen here and unlike our past videos where you've logged into the local system or not logged in at all with this system you log in using proxmox authentication so everyone who logs in has an account in proxmox either through pve or active directory or ldap and they log in with that account and it gives them a list of all of the vms which their account has access to and they can choose to connect to them i know i've done past videos on the raspberry pi and i've tested this on both the raspberry pi and debian but today i'm going to walk through the steps on deviant so if you need the raspberry pi version the commands are down in the description below in the link to my blog post there's very slight differences between debian and raspberry pious most notably raspberry pi os support for acute is a bit of a hot mess so getting pi simple gui cute installed on raspberry pi os was a bit of a pain but on debut that's really easy so we're going to walk through this on debian and we're going to get this installed this is my debian system so we're running debian bullseye and i've installed it with the lxde desktop environment and that is so that it's as similar as possible to the raspberry pi because i want to keep the instructions as close as possible to the pi and the debian so no matter what hardware you have you'll have something that works so that's why we're using lxte so now we need to do some some basic housekeeping so we're going to do apt update app upgrade as we usually would must have done an upgrade during the install process so now we need to install a few packages so first one is python 3 pip so we can install packages through pip we also need git so we can download his code from github we need divert viewers so we have the remote viewer package that we use for our thin clients and that's it so we're using the same spice protocol i've used in previous raspberry pi thin client videos so vert viewer is the package that includes the remote viewer app that connects to spice if you're on raspberry pi you have to do a little dance here to also install pi side 2 which is the cute libraries for raspberry pi okay so now we need to install the packages through pip so pip3 install proxvoxer which is the proxmox api client for python i simple buoy cute okay so now we're going to clone josh's repository and then cd and do it so here are all the files from his repository we need to make the python file executable in theory we could execute it now but it's not going to have a configuration file we get this error here unable to read supplied configuration file from any location so now we get to configure the vdi client so on linux it'll look for the file in a couple different places but we're going to use etsy vdi client so we're going to make that directory and then create a file called vdi client.eni in that folder so josh has a complete example file for vdi client.eni in the github project and i'm just going to go through and put some examples in here so we need a general section we need an authentication section we need a host section everything else is optional so in general in theory we could leave all of this blank and we would have no icon no title and all that stuff we're gonna put a title title now authentication this section describes what authentication realm should be used by pve among other things the first keyword here is off backend so pve tells us to authenticate clients using the pve realm so if a user enters the username and password it'll pass that to proxmox as username at pve if you're using a different off backend in proxmox like ldappers active directory you would put that here if you're using a two-factor authentication you can enable or disable that here off totp in this case i'm not using it so that's false the next one is to verify tls certificates if you're using a self science certificate you should set this one to false if you'd like you can put in a username and api token and it'll automatically log in with that user or you can put nothing and it'll make the user log in with their proxmox credentials so host here's where we put what our proxmox server is so you'd put the ip address to your server and then equals the port it's on which should always be 8006 unless you're proxying it so we'll save that and now let's see what happens when we run it we go that looks decent so i got the logo that josh created i got the icon that josh created i named it apple art vdi and we can log in so looks like i have one vm that i can connect to so let's see what happens when we connect to it so remote viewer pops up we're connecting to the remote session and there we go so we've got a pretty standard raspberry pi login screen here we got our user pi we got a little bit more we got windows so even audio works we didn't have to set anything up on this side we just added the audio device in proxmox and audio works you guys have been bugging me about audio so there it goes a lot easier on debbie than it is in the pie so now what happens is i can click log out and that takes us back to login screen and hit cancel it closes the end so if you just want to use this on your desktop and log into your proxmox vms it's pretty handy for that but what if we want to make this launch at boot so we have a couple files we need to edit to make it launch into this instead of launching into lxde the first thing we're going to do is we're going to etc xdg lx session lxde you're on pi the folder is lxde-pi instead so there's a file here called auto start and the auto start file is launched when an lxde session is launched and that's what launches lx panel the desktop icons all that good stuff and so we are going to make a copy of that and then delete it so that when a user logs in it doesn't auto start anything and then we're going to create a blank auto start file so lxd doesn't complain so now if we were to reboot now or log in now we'd have completely blank desktop and no way to do anything so now we're going to create an auto start file in our user's home directory so when our user logs in it launches the vdi client then all we have to do is set our user to log in automatically on boot and it'll launch right into our vdi client so the folder we need to edit this time is is in home directory dot config lx session lxde and again on raspberry pi os it's lxde-pi file is called autostart so future app alert here i made a little bit of a mistake the actual path here should be at slash user slash bin slash bash and the full path to the thin client script which in this case is slash home slash vdi user slash then client and obviously vdi user whatever whatever user you're using for this so i'm going to actually make that shell script and so here we're going to do is we're going to say while true do so we're calling python3 and giving it to the path to the vdi client file done and make it executable so now our client comes up if we close it comes up again see here now it won't quit now we're just going to kill the whole terminal to get rid of it so before we log out while we still have a desktop environment here we're going to change it so that it automatically logs into our user we're going to edit the litevm configuration light dm is the login manager and tell it what user to all the login as around the raspberry pi you can just run sudo raspi config and tell it to auto log into a desktop and it'll do this for you so looking for a line that says auto login dash user it's gonna be somewhere here under seat configuration auto login user and in this case we're going to type our username which in this case is vdi user done so now if we reboot we're not going to have a desktop environment we're going to get automatically logged in and it's going to launch the pin client script so let's see what happens so now we boot it up and we got this so we got a black screen and we got a login prompt and we have one vm we can connect to and we connect yes thinking about it there we go straight to the ritual good thing sound still works too we exit we get taken back here we can log out get back to login screen so on raspberry pi this is very similar there's a couple quirks to getting pie simple gooey cute installed because cute on raspberry pi is a bit of a hot mess at the end of my last video i said that my goal is to get to a place like commercial vdi solutions where a user can come up to the thin client log in with their system-wide account information and be given a list of vm types to choose from do they need windows do they need linux do they need special installed software and a vm clone would be created for them we're not there yet still but we're getting closer now we're at a point where each user can have their own virtual machine or virtual machines and the thin client lets them log into whichever ones they have access to from this proxmox central authentication database this is a big step up from the last revision of this project if you're in an environment where you have centralized user authentication with this setup we no longer need to allocate specific vm ids for the thin client and hard code those vmids in the scripts the python tool downloads the list of all vms that the user has access to for us again thanks to josh patton who wrote this python tool link to his github is down in the description below stay tuned for more virtual desktop infrastructure under linux fun you
Info
Channel: apalrd's adventures
Views: 84,920
Rating: undefined out of 5
Keywords:
Id: oLatrZBFQrw
Channel Id: undefined
Length: 15min 56sec (956 seconds)
Published: Thu Apr 07 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.