Use Raspberry Pi as VDI Client to access Proxmox VMs | Proxmox Home Server Series

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and thank you much for watching this is me Mr P and this is another episode on approxbox Home Server Series in this video I'll show you how I converted my network boot Raspberry Pi to act as a vdi client basically A Thin Client to access VMS inside the proxbox so let's begin for this to work I'm gonna use the GitHub script created by Josh and his details exactly everything what you need to do I'm gonna do slightly different what he is mentioning in this um this GitHub repository is basically the way that once you get all this done is going to be a manual initiated and vdi client where I'm sure I will show you how you can get that automated which means every time when the Raspberry Pi starts or network boots from a proxbox you can automatically you will get the login screen a login prompt to login you the username and a password to access the particular video so first thing what we need to do for this to work is obviously get VMS created that will be accessed test using this vdi client for this tutorial I'm going to use two VMS one is going to be Linux pop OS and then one is going to be windows or more specific is Windows 11. so I by the way this is my main proxbox so I'm going to use this as on my main problem server I'm not going to use inside my proximox sandbox which I'm usually do which I usually use when I'm doing this kind of tutorials so 102 the vm102 is my pop OS vdi and this is basically a basic Pro pop OS VM created with nothing fancy except couple of things that I had to change for this to work for this VM to actually work using BDI so first thing um and the display from default I chose to be spice and we're going to use a spice protocol to connect to be the spice is basically with a configuration file that if you go for example into this VM and under here as you can see if I click spice is going to automatically download the file but right now it doesn't because the file is closed but you download the file and then you can use them any like a remote access programs that can read spice spice files and then you can automatically log in ETC so right summary propos vdi so this is what I'm going to use I'm going to use spice on Linux you don't need to specify spice Duo monitor three or four monitors on Windows you will have to specify how many models you connect Raspberry Pi 4 has two display outputs or two mini HDMI outputs so if you select two displays and you want to use both windows you obviously need to select spies dual monitor on Linux it's automatically will detect how many monitors you have to connect it to your Thin Client it's just gonna work straight away automatically just checking for Microsoft and 16 Mega 16 megabytes memory display is fine next thing it is USB devices spice USB devices added as a Raspberry Pi 4 has four USB ports to 3.0 and two 2.0 ports I added all these ports here that means I can pass through up to four devices into that VM so let's say one is gonna be keyboard one is going to be Mouse maybe something else let's see a card reader or whatever to add the USB spice you click on ADD you see you select USB device and then just leave the bubble next to spy sport you click add and right now as you can see this is the fifth one showed up I'm just going to remove that because Raspberry Pi only have four USB ports and pretty much that's it on the Windows side this is the windows VM Windows 11 vdi again similar configuration on the display I left this in spice and Raspberry Pi I have only one display connected so I'm not gonna choose two three or four so one and next thing obviously as you can see here is USB USB stuff is happening as well so we have one two three and four and another thing that is quite important and the options use table for pointer is off if you notice that your vdi client or when you BD when you're using remote or Thin Client connection to the Windows machine and the mouse pointer accident wonky there's a big chance that you use tablet 4.2 is actually turned on on your system so you make sure that that's off for that to properly work you need to install additional drivers which I'm not gonna actually go into this video so you just select that as off or none no and that's going to be fine so 102 is my the pop OS and 113 is my windows next thing what you need to do you need to go into the uh data center click on the users and you need to create users I have created two users one is Mr P another one is the win Mr P has access to pop OS and wind has access to Windows two created users quite simply click add click add then give it the name let's say it's going to be test one two three make sure realm is changed from Linux to proxbe that means that it's not Linux like Linux core or Linux kernel everybody like all the underlying basic CLI will manage the connections the proxmox will manage the connections that is means that it doesn't have the full access to the system to a proximal system as you would normally have violinux so let's change choose that as a proxbox give it a password and obviously it needs to be same password and let's say you click save and user name or users created once you have user Creator users created you click on the actual VM that you want to give access to and as you can see I click the 102 which is pop OS I click through missions click add add a user select that let's say Mr P again and then no access change that to pvem user that user will have access to utilize the VM without all the admin access to change the let's say amount of ram this VM has or CPU or anything else it just it's a user that just uses the VM can start VM shut down the VM restart the VM and pretty much that's it so that's how you add the users into this so once you have all this sorted let's go right now into Raspberry Pi and get the Raspberry Pi going so I'm going to open the SSH client here and I will SSH into my Raspberry Pi so pxc Pi 3 this is one of the free Raspberry Pi's I have under the um under Pixi boot so I'm going to use the third one which is actually connected next to me to a capture card which is outputs display or outputs into a separate display so I'm logged in into Raspberry Pi Step One is obviously go and let's start getting the sorted let's get sorted basically got this so sudo after date and then sudo apt upgrade Dash Y and press enter so this is just going to update and upgrade depository packages and everything else by the way all the commands I'm using this tutorial you'll find in the description below in the chronology chronological order that you need to follow so while this is going I'm just going to copy another command which is quite lengthy so I'm just going to copy that and then paste in and what this will do is going to install X server or X org lxd core and LX appearances we're going to use the lxde desktop environment because this is Linux and this is raspberry pios with just CLI no desktop GUI so we need to have some sort of GUI installed and activated for vdi client to actually show up on the screen because it can't just show up in the terminal so we need to have some sort of a desktop GUI to to allow us to show vdi client interface so that's why we're going to install all these three here to make the lxd get that's the Google work python free pip will need that to install a couple of packages from a pip repository python 2K is a package that allows python to manipulate with the let's say um like desktop the graphical graphical end of the code word viewer is a program that will read the spice file that will be retrieved from the proximal using API and git is obviously to get clone the repository that we're going to use so this by the way will take some time to install so while it's installing you have plenty time to go and make yourself a cup of tea or coffee or subscribe to my Channel or even watch another video of Mine by the time this is finished obviously we'll be able to get everything going so this um from my testing takes about 10 to 15 minutes depending on internet speed and all the other factors so I would say at least 10 plus minutes will be spent installing all this so I'll be back when all this is installed after lxd installation which actually feels like it's it was happening for eternity we are ready to continue setting up the BDI client so we have a python python free pip install so we can install a couple more things so pip install and what we need is a proxboxer prox ER I think is going to nag that I need sudo probably not or I forgot to add the pip3 so pip 3 install proxboxer let's wait for that to get installed here we go next one what we need to install is PIP free install by simple GUI that's obviously allows the video client to display properly that's why we needed python free TK installation the next one is bit free install request requests sorry and that is to allow python to initiate the API connection to your proximox server to retrieve the things as you can see looking already satisfy requests and everything has been sorted so pip free stuff is installed so right now we can go and start getting the vdi client sorted if we go here this is the repository what we're going to use like I mentioned so we go into the terminal I'm going to copy the link which by the way you will find in description below so what we're going to do is just copy that give me a second here we go copy that and paste so we get clone the PVE DDI client Repository so once that's cloned we're going to have folder created here and inside this folder we're going to have all the files that we need to make this work first thing straight away I suggest to create or make the vdi client dot pi as actually executable so it's sudo CH mode plus space plus lowercase x vdi client pi because some of the things in the future are going to have to use that and if you forget to see each mod into the executable is going to be a bit of a pain to troubleshoot exactly why it doesn't work so once that is done what we need to do next is we create a file here we're going to call it touch and Thin Client should a cold thinker and a pipeline pipeline let's let's name the pine Pi client obviously we need to sudo that so right now we have this file which is going to say Pi client and we're going to use that file in the future to make the FCO automated BDI run so we have the desktop installed and everything's fine let's test if it's all correct to do that sudo raspi Dash config under system options we select enter that and then there is option as five you enter that and then B4 you press that and that will make all the changes automatically to make the load into a desktop instead of a terminal and then obviously Auto login with the user in my case username is Mr P and the password is super easy password so finish and then reboot and like I said I have a Raspberry Pi 4 here connected next to me which is goes to capture card and on a separate display so right now hopefully I will see Raspberry Pi goo is starting up so right now we're just gonna wait for Raspberry Pi to restart and hopefully like I said I will see my desktop and here we are I can see a Debian name here and this is Alex De showing up inside my Raspberry Pi 4 which is by the way by the way is the network boot from my proxbox by and by the way too if you don't know what I'm talking about it as I already done a video how to make Raspberry Pi Network boot from your from your proxbox instance so I'll leave the link to that video in description below so that's it okay so I do have access to this I think this is a terminal now this is the files I don't really use this so I don't really know let's go into a system nlx terminal here we go so this is Raspberry Pi all well and good so let's go back to the SEC client so to let's say that's it if you're happy to initiate BDI client from uh from lxd desktop there's a couple of things you need to do let's login back into Raspberry Pi on my main SSH terminal and let's navigate to this folder where we have vdi client dot Pi so we need to copy that into a user bin folder to make that as executable and accessible from anywhere inside the terminal doesn't matter which folder you are in so sudo CP vdi client dot pi and we're going to move that into a USR so stands for user local Ben and enter so once that end let's go back to my lxd contain lxd display and I will type vdi client Dash Pi press enter and I should see the error message which is great that means the vdi client is starting but the configurations is missing that's what we're going to do now let's go back to main SSH client and there is a file as you can see here vdi client in the example so first thing what we're going to do we're going to say copy vdi client actually via copy vdi client in the example to vbi client any and obviously we need to do sudo so now I should have the file which is called vdi and this is the file that vdi client created by Josh will look for to make all the configurations work first we need to amend that or change a couple of things inside this file so sudo Nano vdi client dot ini and testing what we're going to change is from vdi client we're going to name this you put whatever name you want it's actually Galaxy so I'm gonna name it Galaxy because my home server name is Galaxy next thing on the kiosk from false I'll make this true and that means that the vdi will run in a kiosk mode that means that user can interact with anything else except DDI client that's okay full screen doesn't matter because it says not applicable in Kiosk mode Let's go down to the list and we're gonna end up at the host 100 and then pve1 we're just gonna comment that out and enter the AP address of your proxbox space equals 8006 so proxbox as you know proximal GUI or desktop environment lows a browser the environment lows under 8006 port and this is what we're gonna do an ID number and this one where it says here I'm just going to comment that out that's it nothing else that's it so you just change the title whatever title you want you obviously can go and change the um change the the theme the icons Etc I'm just changing just enough for this to work so Galaxy kiosk is true and obviously add 192 168.78.123 my proxbox insta so control X to close y to right enter to confirm and the file is being amended to double check I can write cat for or cat vdi client uni and I can see that there is a my API showing up here and I do have a name somewhere supposed to be showing up some at the top here we go galaxy so everything is okey dokey next thing we need to move this file into one of the three locations that the this vdi client program will check will check for the one that we're going to use in this video is inside the ECT folder so first we need to create this fault this folder inside ECT so sudo mkdr slash Etc vdi client I think I'm spelling correctly BDI client here we go that's done and now sudo move vdi client in a file into ECT BDI client that's it so this file is inside that so now if I go back into my proxy into my lxd screen and if I'm gonna bring back the same program name as you can see it shows up so username is going to be Mr P and a password whatever password you created for this particular proxmox user click load and now as you can see this user has access to pop OS vdi and click connect and what's happening in the background is this DM by the way is off so DDI climbed via the IP my API connection using a proxmox requests sends a message to the proxmox server which is there and it just says hold on this user wants to access pop OS I do make sure that VM starts and it wants to access it so right now what you see is actually pop OS login screen so I'm just going to log in and I'm accessing pop OS VM from raspberry python client and if I click on this so do I have no fetchy he never fetch here we go as you can see this is a pop o s 2204 it runs on KVM and Etc all these two gigabytes Ram so this is Pop OS I'm accessing popos VM from The Thin Client raspberry piping client so next thing once I get all this done I click on the top here click on this and say power off and right now VM will be powered off and same time bigger client will stop the connection to this VM so I'm going to click log out now and we can go and you again as a different user which is then click on that so Windows 11 vdi so click connect so right now again vdi client sends its signal to my proximox server saying hold on there is a user wants to access this VM so make sure it's up and running so it's just proximal sounds a VM for me as you can see here this is a Windows VM one thing about this Windows VM there's a bunch of things that I preset up for my this is this DDM is basically the copy of my main virtual machine that I'm using for work so I'm not gonna log in because I don't want to start showing all the stuff for my work so instead I'm just gonna click on here and go straight away into a shutdown process but basically again I've been I've entered the pin number and log into Windows VM I can manipulate how much as I want and then just shut down and it's going to disconnect from this from this connection and I will be back into a vdi client login page so while this is happening great I can access itself but what if I want to make that to be automated now what I mean is like Raspberry Pi starts and I get vdi client login screen straight away without giving user access to the rest of the lxd system or Raspberry Pi system that's what we're going to do right now creating the startup script so back on the main SSH you know SSH terminal what I need to do is I need to go into the home directory and in here as you can see there is just a desktop that it is nothing else there is a files hidden here a folders and the folder that we're looking for is config this folder will be automatically created once you install lxde desktop environment and do have initial restart if you can't see this this means that lxd desktop hasn't properly installed or you haven't restarted your Raspberry Pi so we navigate into this folder so dot config dot in front of the folder file makes the file a folder hidden so in here I should find a folder called LX session so CD inside LX session inside here you should see a name of your desktop environment in my case it's lxde so CD into lxde and now there is a file called auto start so sudo Nano auto start and this is the three lines that initiates the basically all XD lxde desktop environment so boot up screen login screen and obviously the screen saver so what I'm going to do I'm just gonna uncomment all this out and I'm just going to click add and now I need to enter here slash USR slash bin slash bash and now I need to point to this script that we created a couple of minutes ago which I named it Pi client so this is what I'm gonna go so home Mr P I'm gonna call it Pi client so this is going to be the file that the bash needs to initiate Ctrl X to close y to right enter to confirm let's go back in the home screen in the home folder so I'm inside the home Mr P go inside this and I think this is where I left this file so I'm just gonna move this file out of this place because it's the wrong location where I saved it so it's just gonna go into my home yeah let's go home Mr P that's it so just make sure that this is correct this is where it needs to go I'm just quickly going to double check um the startup LX session lxde auto start so it needs to go inside home Mr P Pi client and it's right now located inside home Mr P by client let's make sure it goes here so right now let's edit this file so sudo Nano Pi client and inside here we need to write couple of commands I'm just going to copy and paste everything what I prepared earlier so copy that and drop that in so what this is going to do is going to CD into your home folder then PBI client this is the location where we call clone they get reported to three and while it's true just initiate this program and basically just run this this program so while it's true run it so it runs the program done and then goes back through okay run done and then it's basically an infinite Loop and that basically stops the user of your Thin Client to access anything else except that vdi client screen so user bin python free space and then all this so Ctrl X to close oh I just I just basically killed it hold on so contracts to close y to right enter to confirm and now let's quickly check this so right now as you can see the script is here so if everything's done correctly I just reboot the system which will reboot the Raspberry Pi and hopefully I will see nothing else but just the LA vdi client loading or login screen so I'm just gonna wait for Raspberry Pi to start and I'll see what's gonna happen so fingers crossed so my Raspberry Pi restarted as you can see I can't see nothing else except this vdi screen so if I go back here and type Mr P and then the password press enter and I do have a pop OS connection so just connect this and again the vdi client sends the signal to my Prof smoke server initiates the the dvl and I'm gonna log in into a pop OS and inside the proxmox you can add user as a permission to access VM to multiple VMS so once the one user can access pop OS and windows every user can access only popovas and obviously can access only windows and etc etc and if I punch that in so it's loading in into a pop OS once they've done everything what I need to do with pop OS let's say I go back in the terminal say sudo chat shut down now the m is shutting down and back to here I click log out and now another user can jump on this Pi or python client and connect to their user let's say I don't really say mic and it's going to connect it might get you a totally different VM access to uh to uh to whatever they need to do in that video so that's it this is how you set up the vdi client on the Raspberry Pi to access your VMS inside the proxbox and I did everything on my basically Pixi boot Raspberry Pi so I can take this Raspberry Pi actually I can disconnect right now all this let's quickly do that so shut down now sudo so here you go this is a Raspberry Pi that I was using to get everything working foreign hat so right now this can be powered by a Poe or just connect this to a div any display keep it on a mouse and it can access any DM I give access to the to that user so it's super simple to set up and it's easy easy to use a couple ideas I had while I Was preparing for this video what if I'm for example I can fix your boot let's say from my proxbox but then vdi client remote into let retropie for example or Mac OS a virtual machine as I do have a Mac OS something besides just the standard Linux Desktop Windows desktop so keep I will keep tinkering around if I'll find something very funky or very strange and it's like very wow kind of thing um just make sure you subscribe to my channel follow my community post I post it there not quite irregular but I post there every everything that I found that something just becomes like oh my God this I do believe it's actually working anyway enough yapping thank you very much for watching I hope you enjoyed this video and I'll see you in the next one goodbye
Info
Channel: MRP
Views: 5,800
Rating: undefined out of 5
Keywords: proxmox home server series, vdi client, raspberry pi thinclient, rpi thinclient, vdi client for proxmox, pxe boot raspberry pi, proxmox vdi client, Use Raspberry Pi as VDI Client to access Proxmox VMs
Id: Vv3yUmbja1U
Channel Id: undefined
Length: 25min 29sec (1529 seconds)
Published: Tue Aug 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.