{"id":983,"date":"2022-03-27T16:13:42","date_gmt":"2022-03-27T14:13:42","guid":{"rendered":"https:\/\/apfelcast.com\/?p=983"},"modified":"2022-03-27T16:13:42","modified_gmt":"2022-03-27T14:13:42","slug":"vms-auf-dem-pi-steuern-proxmox-thin-client-mit-raspberry-pi-einrichten","status":"publish","type":"post","link":"https:\/\/it-ion.de\/index.php\/2022\/03\/27\/vms-auf-dem-pi-steuern-proxmox-thin-client-mit-raspberry-pi-einrichten\/","title":{"rendered":"VMs auf dem Pi steuern &#8211; Proxmox Thin Client mit Raspberry Pi einrichten"},"content":{"rendered":"\n<div class=\"brlbs-cmpnt-container brlbs-cmpnt-content-blocker brlbs-cmpnt-with-individual-styles\" data-borlabs-cookie-content-blocker-id=\"default\" data-borlabs-cookie-content=\"PGlmcmFtZSB0aXRsZT0iWW91VHViZSB2aWRlbyBwbGF5ZXIiIHNyYz0iaHR0cHM6Ly93d3cueW91dHViZS5jb20vZW1iZWQvd0JBV0FXcURvb2ciIHdpZHRoPSI1NjAiIGhlaWdodD0iMzE1IiBmcmFtZWJvcmRlcj0iMCIgYWxsb3dmdWxsc2NyZWVuPSJhbGxvd2Z1bGxzY3JlZW4iPjwvaWZyYW1lPg==\">\n<div class=\"brlbs-cmpnt-cb-preset-a\">\n<p class=\"brlbs-cmpnt-cb-description\">Sie sehen gerade einen Platzhalterinhalt von <strong>Standard<\/strong>. Um auf den eigentlichen Inhalt zuzugreifen, klicken Sie auf die Schaltfl\u00e4che unten. Bitte beachten Sie, dass dabei Daten an Drittanbieter weitergegeben werden.<\/p>\n<div class=\"brlbs-cmpnt-cb-buttons\"> <a class=\"brlbs-cmpnt-cb-btn\" href=\"#\" data-borlabs-cookie-unblock role=\"button\">Inhalt entsperren<\/a> <a class=\"brlbs-cmpnt-cb-btn\" href=\"#\" data-borlabs-cookie-accept-service role=\"button\" style=\"display: none\">Erforderlichen Service akzeptieren und Inhalte entsperren<\/a> <\/div>\n<p> <a class=\"brlbs-cmpnt-cb-provider-toggle\" href=\"#\" data-borlabs-cookie-show-provider-information role=\"button\">Mehr Informationen<\/a> <\/div>\n<\/div>\n<p>Unterst\u00fctze meinen Kanal auf Patreon: https:\/\/patreon.com\/apfelcast In diesem Video zeige Ich euch, wie ihr einen Raspberry Pi als Thin Client nutzen k\u00f6nnt. Das bedeutet ihr k\u00f6nnt virtuelle Maschinen, die sich auf eurem Proxmox Server befinden \u00fcber den Pi und daran angeschlossene Peripherie wie Maus, Tastatur und Monitor steuern. Auch USB-Ger\u00e4te, die ihr an den Raspberry Pi anschlie\u00dft werden automatisch an die VM weitergereicht.<\/p>\n<p>\u00bb Windows VM konfigurieren:<\/p>\n<p>\u00bb Ben\u00f6tigte Hardware:<br \/>\nRaspberry Pi 3 Set: <a href=\"https:\/\/amzn.to\/359ELr8\">https:\/\/amzn.to\/359ELr8<\/a><br \/>\nRaspberry Pi 4 Set: <a href=\"https:\/\/amzn.to\/36wABdv\">https:\/\/amzn.to\/36wABdv<\/a><br \/>\nRaspberry Pi 400: <a href=\"https:\/\/amzn.to\/36IYZZd\">https:\/\/amzn.to\/36IYZZd<\/a><br \/>\nMaus + Tastatur Set: <a href=\"https:\/\/amzn.to\/36u4DyD\">https:\/\/amzn.to\/36u4DyD<\/a><br \/>\n24 Zoll HDMI Monitor: <a href=\"https:\/\/amzn.to\/3Nl2TZ9\">https:\/\/amzn.to\/3Nl2TZ9<\/a><\/p>\n<p>&nbsp;<\/p>\n<div id=\"93964-1\"><script src=\"\/\/ads.themoneytizer.com\/s\/gen.js?type=1\"><\/script><script src=\"\/\/ads.themoneytizer.com\/s\/requestform.js?siteId=93964&#038;formatId=1\"><\/script><\/div>\n<p>&nbsp;<\/p>\n<h3>Im Video verwendete Befehle:<\/h3>\n<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\">1. Display-Mode bei gew\u00fcnschter VM anpassen \nModus SPICE w\u00e4hlen (qxl) (\u00dcbertr\u00e4gt Video Keyboard Muas + USB) (Bis zu 4 Displays m\u00f6glich)\n(QEMU Guest Agent muss installiert sein)\n\n2. Neuen Nuter f\u00fcr Proxmomx Authentifizierung am Pi\nUsername: vdiuser\nMode Proxmox VE\n\nRolle erstellen:\nVDI user\nPrivileges: VM.Console +(VM.PowerMgmt)\n\nPermission ertsllen (je VM):\nVMs w\u00e4hlen\nUser: vdiuser@pam\nRole VDI.User\n\n\n3. Raspberry Pi Setup\n- Raspberry Pi OS Lite installieren (SSH aktiviren)\n\nRaspberry Pi configurieren \n\n3.1 raspi-config\n\nsudo raspi-config\n\nSystem Options &gt; Hostname vergeben\nSystem Options &gt; Passwort \u00e4ndern\nSystem Options &gt; Boot \/ Auto Login &gt; B2 Console Autologin (loggt sich automatisch als user pi auf Textkonsole ein)\nLocalication Options &gt; Timzone\n\napt update &amp;&amp; apt upgrade \n\n3.2 ben\u00f6tigte Pakete installieren\n\nsudo apt install xserver-xorg x11-xserver-utils xinit openbox\nsudo apt install virt-viewer\n\n3.3 Proxmox SPICE Proxy konfigureieren\n\nexit (zm Pi User wechseln)\n\nnano thinclient.sh\n\n\n##################################################################################\n\n#!\/bin\/bash\nset -e\n\n# Set auth options\nPASSWORD='vdiuser'\nUSERNAME='vdiuser@pve'\n\n# Set VM ID\nVMID=\"100\"\n\n# Set Node\n# This must either be a DNS address or name of the node in the cluster\nNODE=\"pvehost\"\n\n# Proxy equals node if node is a DNS address\n# Otherwise, you need to set the IP address of the node here\nPROXY=\"$NODE\"\n\n#The rest of the script from Proxmox\nNODE=\"${NODE%%\\.*}\"\n\nDATA=\"$(curl -f -s -S -k --data-urlencode \"username=$USERNAME\" --data-urlencode \"password=$PASSWORD\" \"https:\/\/$PROXY:8006\/api2\/json\/access\/ticket\")\"\n\necho \"AUTH OK\"\n\nTICKET=\"${DATA\/\/\\\"\/}\"\nTICKET=\"${TICKET##*ticket:}\"\nTICKET=\"${TICKET%%,*}\"\nTICKET=\"${TICKET%%\\}*}\"\n\nCSRF=\"${DATA\/\/\\\"\/}\"\nCSRF=\"${CSRF##*CSRFPreventionToken:}\"\nCSRF=\"${CSRF%%,*}\"\nCSRF=\"${CSRF%%\\}*}\"\n\ncurl -f -s -S -k -b \"PVEAuthCookie=$TICKET\" -H \"CSRFPreventionToken: $CSRF\" \"https:\/\/$PROXY:8006\/api2\/spiceconfig\/nodes\/$NODE\/qemu\/$VMID\/spiceproxy\" -d \"proxy=$PROXY\" &gt; spiceproxy\n\n#Launch remote-viewer with spiceproxy file, in kiosk mode, quit on disconnect\n#The run loop will get a new ticket and launch us again if we disconnect\nexec remote-viewer -f spiceproxy\n\n\n##################################################################################\n\n\n## Skript ausf\u00fchrbar machen ##\nchmod +x thinclient.sh\n\n\n## Window Manager Openbox konfigureiren ##\n\nsudo nano \/etc\/xdg\/openbox\/autostart\n\n(folgendes hinzuf\u00fcgen)\n\n##################################################################################\n\n#Allow exit of X server with ctrl+alt+backspace\n#If you don't want to let the user terminate\/restart, leave this out\n#You can always `killall xinit` via SSH to return to a terminal\nsetxkbmap -option terminate:ctrl_alt_bksp\n\n#Start the shell script we already wrote in our home directory\n#Runloop restarts the thin client (new access token, new config file)\n#if the session is terminated (i.e the VM is inaccessible or restarts)\n#User will see a black screen with a cursor during this process\nwhile true\ndo\n    ~\/thinclient.sh\ndone\n\n##################################################################################\n\n3.3 Auto-Start konfigureiren\n\nnano .bash_profile\n[[ -z $DISPLAY &amp;&amp; $XDG_VTNR -eq 1 ]] &amp;&amp; startx --\n\n\n\n\n\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Quellen:<\/strong><br \/>\nhttps:\/\/pve.proxmox.com\/wiki\/SPICE<br \/>\nhttps:\/\/www.apalrd.net\/posts\/2022\/raspi_spice\/<\/p>\n<h3>apfelcast Support<\/h3>\n<p>Du ben\u00f6tigst Unterst\u00fctzung bei deinem Projekt oder hast Fragen zur Umsetzung?<br \/>\n<strong>Dann melde ich gern bei uns!<\/strong><\/p>\n<p>[button link=&#8220;https:\/\/apfelcast.com\/kontakt&#8220; type=&#8220;big&#8220; class=&#8220; custom-button&#8220;] Kontaktieren[\/button]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sie sehen gerade einen Platzhalterinhalt von Standard. Um auf den eigentlichen Inhalt zuzugreifen, klicken Sie&#8230;<\/p>\n","protected":false},"author":1,"featured_media":984,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-983","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allgemein"],"taxonomy_info":{"category":[{"value":1,"label":"Allgemein"}]},"featured_image_src_large":["https:\/\/it-ion.de\/wp-content\/uploads\/2022\/03\/thumb_pi-thinclinet-A-1024x576.jpg",1024,576,true],"author_info":{"display_name":"Daniel Klozb\u00fccher","author_link":"https:\/\/it-ion.de\/index.php\/author\/wp-master\/"},"comment_info":0,"category_info":[{"term_id":1,"name":"Allgemein","slug":"allgemein","term_group":0,"term_taxonomy_id":1,"taxonomy":"category","description":"","parent":0,"count":89,"filter":"raw","cat_ID":1,"category_count":89,"category_description":"","cat_name":"Allgemein","category_nicename":"allgemein","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/posts\/983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/comments?post=983"}],"version-history":[{"count":0,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/posts\/983\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/media\/984"}],"wp:attachment":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/media?parent=983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/categories?post=983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/tags?post=983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}