Want to build a Virtualization Home-Lab?

This past week, I decided to give a try to build my own Virtualized Home-Lab environment using Proxmox VE. The thought behind was learning Proxmox VE and building a Home Virtual Lab that I can use to:

  • Create Virtual Machines to support Home Automation projects.
  • Learn and setup Kubernetes, Cloud Foundry, Hadoop, MongoDB, or other multi-node clusters.
  • Build a VDI (Virtual Desktop Infrastructure) setup.

What is going to be covered?

We will cover following:

  • Prerequisites
  • Creating Bootable USB
  • Installation Proxmox VE version 6.3.2
  • Uploading ISO Images for VM creation
  • Create a Linux VM and access it Windows and Raspberry Pi based desktop tools
  • Create a Windows VM and access it from Raspberry Pi based desktop tools
  • So, let's get started without any further delays.

Prerequisites:

Here are some prerequisites before we get started on this:

  • A server grade computer OR a workstation that has enough juice. I used Dell Precision T7600. It has 2 sockets/physical CPUs - both are Intel Xeon E5-2667. Each CPU has 6 Cores with 12 threads. It has 32 gig RAM and 500GB SSD. It is a pretty decent machine to start with. I will refer this computer as "Server" hereinafter for clear instructions.
  • Couple of additional Hard Drives or SSDs to store ISO Images and Virtual Machines (VMs). Don't worry if you don't have them. I used the same hard drive where OS was installed for ISO images and Virtual Machines storage. At this point of time it is just an R&D project. I will follow the recommendations or best practices later when I finally convert to have a proper setup from recoverability perspective.
  • A USB stick. It is needed for Proxmox installation. I had 32GB USB stick at home so I just repurposed that.
  • Another computer (Laptop or Desktop) that you can use to burn OS on the USB stick. This can also be used for Remote Desktop or VDI setup. I used my Desktop computer to burn OS on the USB and I also planned using existing Raspberry Pi for VDI/Thin Client testing/access.
  • You will have to attach Monitor, Keyboard and Mouse to the Server for initial setup. Once we install required software we can unplug those things as Proxmox can be managed via Chrome browser.

Getting Started

Let's create the bootable USB:

  • Use laptop or desktop and download Proxmox VE ISO Image. I downloaded the Proxmox VE version 6.3 from their website.
  • Burn the downloaded image onto USB stick. I already had Etcher installed on my desktop computer so I used that to create a bootable USB.

Proxmox Installation

Let's install Proxmox software by following the below listed steps:

  • Attach existing monitor, keyboard and mouse to Server for the initial setup.
  • Ensure you've changed BIOS settings to enable Virtualization and have adjusted Boot Sequence to boot from USB on the Server.
  • Plug-in the USB and turn on the Server. The bootable USB will take few moments to bring the installation screen. During the installation, you will be asked about Disk Drive where Proxmox will be installed, FQDN, IP address etc. Detailed Installation steps are documented on Proxmox website and listing them here is an overkill - just follow the instruction and you will be all set.
  • Once installation is complete, you will be given an IP address and a port number. Open Chrome or other Internet Browser and access Proxmox Virtual Environment by entering the IP address along with the port. For example: https://192.168.1.118:8006.
  • You will be asked for the root login and password you setup during installation process.
  • Click on the given host name. In my case, I gave "enz-pve.example.com" as FQDN during the installation process. So, I could see "enz-pve" in the Data Center menu (the left most menu). Click on "Updates" option within the Node menu area and then click on "Refresh" button in the top pane. You may get a popup saying you don't have valid subscription. Don't worry about that. Click "OK" and message will go away but the Updates request will be submitted.
No alt text provided for this image
  • Task Viewer window will show up and start accessing Repositories and of course you will get error messages saying you don't have valid subscription. Close the window once Repository access has stopped and you see error something like "TASK Error: apt-get update failed".
  • On closing of the Task Viewer window, you will see all Free updates listed within main area. You may not get some subscription based updates but that's OK for a Home Lab.
  • Once you see the list of all updates, click the "Upgrade" button in the top pane and follow the instruction displayed in the new window. System will start applying all pending updates.
  • Please note the ">_ Shell" option will open up a Shell within the browser for you. You will not be asked for the root password again because you're already signed in as root.

ISO Image Uploading for Virtual Machines

Let's upload ISO Images that can be used later on for the creation of Virtual Machines. Download the required ISO Images from respective sources and upload them into Proxmox by following the below listed instructions:

  • Click "local (enz-pve)" menu option within Data Center menu and then click on "ISO Images" option available under Node menu and then click on "Upload" button.
No alt text provided for this image
  • A popup will show up. Select the ISO files one by one and upload them. I downloaded "Ubuntu-20.04.1-desktop-amd64.iso" and created "Windows-10.iso" using Microsoft provided tool. In order to create Windows 10 VM, you will need "Windows VirtIO Drivers". I downloaded drivers image from Fedora's website and uploaded.
No alt text provided for this image

Create Ubuntu VM and access it using Remote Desktop Tools

Let's create Linux based VM:

  • Click on "Create VM" button
No alt text provided for this image
  • Specify a name to identify VM. Please note Proxmox refers VM ID internally. You can check the "Start at boot" box incase you would like to start the VM automatically incase of Server restart. Checking this would be good in case you're planning to use VM for Home Assistant or VDI Setup or something that you want always running.
  • You can ignore Start/Shutdown, Startup Delay and Shutdown Timeout options for now.
  • Click Next
No alt text provided for this image
  • Select ISO image using dropdown and ensure Guest OS Type is accurate.
  • Click Next
No alt text provided for this image
  • You can leave the default settings as-is for now.
  • Click Next
No alt text provided for this image
  • You can leave the default settings as-is unless you want to have a bigger Disk Size. If you're using a different disk to store VMs then you will have to pick the correct storage using the Storage dropdown.
  • Click Next
No alt text provided for this image
  • Specify how many sockets and cores you want to allocate to this VM. I selected 1 Socket and 2 Cores.
  • Click Next
No alt text provided for this image
  • Specify Maximum and Minimum RAM. I specified 6144 and 2048 MBs. Please note there is a different between MB and MiB but for the sake of simplicity I used MBs.
  • Click Next
No alt text provided for this image
  • You can leave the default settings.
  • Click Next
No alt text provided for this image
  • Review what you specified and check the "Start after created" box in case you would like to start this VM automatically after its creation.
  • Click Finish
No alt text provided for this image
  • Proxmox will create the VM and start it if you checked the box. If not, you can start it.
  • Click on created VM and then click on the Console to see VM Console inside the browser. I assume you know how to install Ubuntu. I won't provide that detail here.
  • Once installation is complete, please remove the mounted ISO image from the CD/DVD drive by clicking on VM in the Data Center menu then Hardware option within the VM menu and then select "CD/DVD Drive". Click Edit and select "Do not use any media" option.
No alt text provided for this image
  • Follow the instruction to restart the VM and then Log onto Ubuntu using password you specified during the Ubuntu installation process.
No alt text provided for this image

You have successfully created VM and installed Ubuntu on it. Let's install "xrdp" package and get it's IP address so that we can try accessing it remotely.

  • Open Terminal and run "apt install xrdp -y" to install xrdp package.
  • Check the IP Address using "ip address" command. In my case the address is 192.168.68.125

Let's use Remote Desktop app available in Microsoft Store to connect to this Ubuntu VM. I chose this app because I already had it and also it is better than the Remote Desktop Connection utility shipped with Windows for ages.

  • Launch Remote Desktop app and click on "+ Add" button.
  • Enter the name of the VM or IP and click Save. You can explore additional options later on by clicking the "Show more" link.
No alt text provided for this image
  • Launch the Remote Desktop connection by double-clicking it. It will show "Can't verify the remote PC" warning message. Click on "Connect Anyway".
  • You will get XRDP connection screen asking about credentials. Use credential that you specified during Ubuntu installation process and you should be able to see Ubuntu Desktop. Remote Desktop app should automatically adjust the screen resolution.
No alt text provided for this image

Let's try accessing it via Raspberry Pi. I already had a Raspberry Pi running in my home which of course I set it up to be accessed via Remote Desktop app so that I don't need to connect any peripherals for interaction. So, let's use Remote Desktop app to access Raspberry Pi which then I will use to access Ubuntu VM running in Proxmox VE.

  • Remote into Raspberry Pi.
  • Open Terminal once you are in.
  • Run sudo apt install remmina -y. You will be asked for the sudo password.
  • Once installed exit the Terminal and then click on Raspberry menu, Internet and then click on Remmina application.
  • Click on new icon and enter IP address or VM Name along with User Name and Password. I chose "Use client resolution" to have better screen resolution.
No alt text provided for this image
  • Click Connect
  • You should be able to see below screen that shows Raspberry Pi is able to remote into Ubuntu VM. Initially, it took couple minutes to load but later on there was no delay.
No alt text provided for this image

Create Windows 10 VM and access it using Remote Desktop Tools

Let's get started to create Windows 10 VM:

  • Click on "Create VM" button
No alt text provided for this image
  • Specify a name to identify VM. Please note Proxmox refers VM ID internally. You can check the "Start at boot" box incase you would like to start VM automatically incase of Server restart.
  • You can ignore Start/Shutdown, Startup Delay and Shutdown Timeout options for now.
  • Click Next
No alt text provided for this image
  • Select ISO image using the dropdown and ensure Guest OS Type is accurate.
  • Click Next
No alt text provided for this image
  • You can leave the default settings as-is for now.
  • Click Next
No alt text provided for this image
  • Make sure you select "VirtIO Block" in "Bus/Device" field, "Write back" in Cache field and Disk Size is 32GB. Write Back Cache increases the performance. You can leave rest of the settings as-is.
  • Click Next
No alt text provided for this image
  • Specify how many sockets and cores you want to allocate to this VM. I selected 1 Socket and 4 Cores. I also Enabled NUMA. The NUMA architecture means that instead of having a global memory pool available to all your cores, the memory is spread into local banks close to each socket. This can bring speed improvements as the memory bus is not a bottleneck anymore.
  • Click Next
No alt text provided for this image
  • Specify Maximum and Minimum RAM. I specified 8192 and 4096 MBs. Please note there is a different between MB and MiB but for the sake of simplicity I used MBs.
  • Click Next
No alt text provided for this image
  • Select "VirtIO (paravirtualized)" as the Model and rest of the settings can remain as-is.
  • Click Next
No alt text provided for this image
  • Review what you specified. Do not check "Start after created" because we will be adding additional CD/DVD drive before starting the VM.
  • Click Finish
No alt text provided for this image
  • Select the created VM and then click on Hardware under the VM menu. Then click on Add button and select "CD/DVD Drive" option. Select VirtIO Windows Drivers ISO Image.
No alt text provided for this image
  • Click Start to boot up the VM. It will take few moments to bring the installation screen. Windows installation is bit tricky so I will list steps/screenshots where necessary.
No alt text provided for this image
  • Select appropriate options and click Next
  • Click on "Install Now" button on the next screen.
  • You will be asked to provide the Product key. Please enter if you have it and click Next. Otherwise select "I don't have a product key" option.
  • You will be presented with License terms. Accept the terms and click Next.
  • Click on "Custom Install Windows only (Advanced)" option. You will get a notice saying "We couldn't find any drives. To get a storage driver, click Load driver."
No alt text provided for this image
  • Click on "Load Driver" link and then click on browse button. Expand virtio-win CD/DVD drive and drilldown to "viostor", "w10" and then "amd64" folder and click OK. Windows will select the driver for you. Click Next and Windows will install that driver.
No alt text provided for this image
  • Once driver is installed you will be able to see virtual drive allocated to the VM.
  • Select the drive and click Next. Installation process will begin.
  • Once the initial installation is complete Windows will ask you to restart the machine. At that time remove the CD/DVD drive that has Windows 10 OS installation image by clicking on the VM in the Data Center menu then Hardware menu option. Select "CD/DVD Drive" and click Edit and select "Do not use any media" option.
  • Restart the machine and then continue with rest of the installation process. Rest of the installation process is same as installing Windows on a laptop or desktop.
  • During the installation process you will get screen saying "Let's connect you to a network". Select "I don't have internet" for now. This option is being selected because we selected "VirtIO (paravirtualized)" as our Network Adapter during the VM creation process. We will have to install the driver first before we can connect to internet.
  • Select appropriate user name, password and security questions and complete rest of the setup process.

Once you have Windows Desktop ready, follow below steps to setup Network, PCI devices etc.

No alt text provided for this image
No alt text provided for this image
  • Open Device Manager, Navigate to Ethernet Controller and update the driver by navigating to the virtio-win CD/DVD drive, expanding "NetKVM", "w10" and then selecting "amd64" folder. Click OK button and Windows should detect and install the "Red Hat VirtIO Ethernet Adapter".
  • Update the PCI Device driver by expanding virtio-win CD/DVD. Drill down to "Balloon", "w10" and then selecting "amd64" folder. Click OK button and Windows should detect and install the "VirtIO Balloon Driver".
  • Open command prompt and run "ipconfig" command to see the allocated IP Address. In my case it is 192.168.68.126
No alt text provided for this image
  • Enable Remote Desktop access by clicking Settings, System, Remote Desktop.

Let's try accessing Windows 10 VM via Raspberry Pi. I assume you already installed Remmina application as part of Ubuntu VM Creation. You may want to review those steps if you haven't done it yet.

  • Remote into Raspberry Pi using Remote Desktop app and then click on Raspberry menu, Internet and then click on Remmina application.
No alt text provided for this image
  • Click on new icon and enter IP address or VM Name along with User Name and Password. I chose "Use client resolution" to have better screen resolution. You may be presented with below screen confirming the Certificate.
No alt text provided for this image
  • Click Yes and you will be able to see Windows Desktop.
No alt text provided for this image

That's it. Enjoy!!!!




Jeetesh Nariya

??????Software Development | ??Nodejs, ReactJs Developer

3 年

I want to know more about Docker, Kubernetes, and Home Lab for web development companies? do you share articles about these topics?

回复
Hussain Ali

Manager - Data & Analytics at Ally

4 年

Great document Sohail.

回复

要查看或添加评论,请登录

Sohail M. Naushahi的更多文章

  • Self Driven Car using Raspberry Pi

    Self Driven Car using Raspberry Pi

    In first phase, assembled Adeept Smart Robot car, installed Rashberry Pi, tested Camera and basic functions. Next…

  • How to create Three Nodes Linux Cluster using VirtualBox

    How to create Three Nodes Linux Cluster using VirtualBox

    I wanted to create three nodes cluster for some R&D. Of course, I didn't have three physical boxes available at home…

    9 条评论

社区洞察

其他会员也浏览了