Home Back

Self-hosting: Installing your first virtual machines on the Proxmox hypervisor

Neowin 2024/8/20

If you're thinking about self-hosting and haven't seen our write-up on the pros and cons, you should take a minute to check that out. The first article in the series explains how to install and setup a Proxmox virtual environment. In this article, we'll show you how to install both a Linux and Windows virtual machine onto your hypervisor so that you can start your self-hosted journey.

Placing an ISO on the Proxmox Server

There are two options for getting an ISO onto the Proxmox server. You can either download it to your local system and then upload it to Proxmox, or, if you know the full URL of the file, you can directly input it into the Proxmox interface. I'll show both options here.

Download the ISO (Option 1)

The first thing you have to do is download the ISO of whatever flavor of Linux you want to install on Proxmox. For our guide, we'll be using Rocky Linux 9, but you can use Ubuntu, RHEL, Kali, or whatever flavor you want.

Screenshot of the Rocky Linux download page highlighting the order to click to download the ISO

  1. Browse to https://rockylinux.org/download
  2. Identify the architecture you want; in most cases, it'll be AMD/Intel (x86_64), and that's the default
  3. Identify the version you want - Rocky Linux 8 or Rocky Linux 9. In our case, we're picking Rocky Linux 9
  4. Click on the image you want; I recommend a minimal version and install components you need manually after the fact, so selected v9.4, Minimal ISO

Upload the ISO to Proxmox (Option 1 continued)

Screenshot of Proxmox showing how to upload an ISO image to the system

  1. Click Datacenter->proxmox1->local (proxmox1)
  2. Click ISO Images
  3. Click Upload
  4. Click Select in the Upload box
  5. Select the ISO image from your filesystem
  6. Click Open
  7. Click Upload

Download the ISO directly to Proxmox (Option 2)

If you know the URL of the ISO, and don't want the intermediate step of copying the file to your Proxmox server, you can directly enter the URL into Proxmox and let the hypervisor download it for you. This has the added advantage that, if you know the checksum, it can confirm the file was not corrupted during download.

Screenshot showing the steps to download an ISO directly into Proxmox

  1. Click Datacenter->proxmox1->local (proxmox1)
  2. Click ISO Images
  3. Click Download from URL
  4. Type (or paste) the full download path into the URL input box
  5. Click Query URL to tell Proxmox to identify the filename from the path
  6. (optional) If using checksums, enter the data from the site you're downloading the ISO into the Checksum box and select the Hash algorithm it's using.
  7. Click Download

Install Rocky Linux on Proxmox

Create the Linux Virtual Machine framework in Proxmox

The next group of steps is to configure Proxmox to accept the installation of a new VM. In a nutshell, you're telling Proxmox what hardware your new virtual machine will have, determining the size of disks, how much RAM will be available, how many processors will be running, along with what type of network and graphics card will be available. This isn't installing the actual operating system yet, you're just configuring the hardware parameters.

Gallery: Proxmox Hardware Setup for Virtual Machine

1717350622_installlinuxvm1.jpg
1717350625_installlinuxvm2.jpg
1717350629_installlinuxvm3.jpg
1717350633_installlinuxvm4.jpg
1717350636_installlinuxvm5.jpg
1717350639_installlinuxvm6.jpg
1717350643_installlinuxvm7.jpg
1717350657_installlinuxvm8.jpg
1717350660_installlinuxvm9.jpg
  1. Click on Create VM
  2. Type in a unique number for VM ID; e.g.:separate VMs by OS by using 100-199 for Linux and 200-299 for Windows
  3. Give the VM a name to identify it by
  4. (optional) Click "Start at boot" if you want the VM to start when Proxmox starts
  5. Select the name of the Linux ISO you want to use
  6. Select Linux as the Guest OS and 6.x - 2.6 Kernel as the Version
  7. Leave this as default; don't make the mistake of selecting none for the Graphic card because then you won't be able to even connect to the console
  8. Ensure local-lvm is selected for Storage; we'll show you how to use external storage to host your VMs in the future
  9. Type in how large you want your system disk to be; we'll use 32 Gigabytes
  10. Determine how many sockets and cores you want to provide the VM; generally sockets should be the number of physical sockets your Proxmox server has and Cores can be set up to the maximum number of cores you have available on the system, but overprovisioning is allowed. For the guide, we'll give the system two Cores.
  11. Select how much memory the virtual machine is allowed to use; you can overprovision between all virtual machines and use ballooning, but these are advanced features we'll talk about in a future article; for now, we'll give the VM 2048 megabytes of RAM
  12. Leave the Network section default and click Next to go to the Confirm tab
  13. Click Finish to create the VM
  14. You now have a Virtual Machine configured and ready to build from the ISO

Install Rocky Linux 9 on Proxmox

Now that we have the virtual hardware configured for our Linux VM, it's time to boot off of the ISO we placed on Proxmox and install Rocky Linux.

Gallery: Installing Rocky Linux onto Proxmox

1717352835_installrockyfromiso01.jpg
1717352841_installrockyfromiso02.jpg
1717352844_installrockyfromiso03.jpg
1717352850_installrockyfromiso04.jpg
1717352857_installrockyfromiso05.jpg
1717352865_installrockyfromiso06.jpg
1717352870_installrockyfromiso07.jpg
1717352875_installrockyfromiso08.jpg
1717352880_installrockyfromiso10.jpg
1717352885_installrockyfromiso11.jpg
1717352890_installrockyfromiso12.jpg
1717352896_installrockyfromiso13.jpg
1717352899_installrockyfromiso14.jpg
  1. Select Datacenter->proxmox1->103(RockyLinux2); replace this with your VM name if you used a different one from what we described above
  2. Click Console
  3. Click on Start Now; this will boot the VM with the ISO you selected during setup
  4. Press the letter "I" to "Install Rocky Linux 9.4"
  5. Select what language and keyboard you want to use; we selected English
  6. Click Continue
  7. Click on "Root Password" (06)
  8. Type in a password you want to use for the root (admin) user
  9. Re-type the password to ensure it wasn't typed incorrectly the first time
  10. Click Done
  11. Click on User Creation
  12. Type in your name in the Full Name section; this will automatically create a user name of first initial followed by last name
  13. (optional) Change the user name if you want
  14. Click the checkboxes next to both "Make this user administrator" and "Require a password to use this account;" this allows you to limit access to the previously configured root account by allowing your custom user to have admin rights on the Linux server
  15. Type in a password you want to use for the user
  16. Re-type the password to ensure it wasn't typed correctly the first time
  17. Click Done
  18. Click on Installation Destination
  19. Verify that the drive information is correct; you should be able to leave this alone
  20. Click Done
  21. Click on Begin Installation
  22. When installation is complete, you can click Reboot System
  23. The ISO will automatically dismount, and after a few seconds, you'll be presented with the login page to your new Linux VM!

Install the QEMU agent

While your OS is running on Proxmox just fine, if you want to be able to see system information, such as the virtual machine's IP address, you'll need to install the QEMU agent on the Linux host. The process is easy.

Gallery: Install QEMU Agent on Linux for Proxmox

1717355205_installqemurocky01.jpg
1717355208_installqemurocky02.jpg
1717355213_installqemurocky04.jpg
1717355216_installqemurocky05.jpg
1717355219_installqemurocky06.jpg
  1. Select Datacenter->proxmox1->103(RockyLinux2); replace this with your VM name if you used a different one from what we described above
  2. Click Console
  3. Type your username in the console
  4. Type your password in the console
  5. Type sudo yum install qemu-guest-agent; note that if you use a different version of Linux, the installation command may use rpm, apt get, or dnf.
  6. Type in your password again; this is required by sudo, the command that escalates your normal user permissions into admin permissions
  7. Type "y" to proceed
  8. Type "y" to proceed again
  9. You'll be presented with the message, "Complete!" so you know the installation was successful
  10. Select Datacenter->proxmox1->103(RockyLinux2); replace this with your VM name if you used a different one from what we described above
  11. Click Options
  12. Double-click on QEMU Guest Agent; it's currently set to Default (Disabled)
  13. Click the checkbox next to Use QEMU Guest Agent
  14. Click OK
  15. Select Datacenter->proxmox1->103(RockyLinux2); replace this with your VM name if you used a different one from what we described above
  16. Right click on 103(RockyLinux2) and select Shutdown; keep in mind that for some reason, if you reboot from the operating system command line, QEMU will not properly start
  17. Click Yes
  18. After the system shuts down, click "Start Now"
  19. Click "Summary" and you'll now see data such as Memory Usage, system IP addresses, and more

Install Windows on Proxmox

The steps to install Windows on Proxmox are the same as for Linux, with only a few differences, including the need to download VirtIO drivers into the OS.

Download VirtIO drivers

The easiest way to do this is to import them directly into Proxmox. See "Download the ISO directly to Proxmox (Option 2)."

We will start by finding the most recent version.

  1. In a web browser, go to this FedoraPeople.org link: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/?C=M;O=D
  2. Click on the most recent folder, which is virtio-win-0.1.248-1 as of the time of this writing
  3. Right click on the most recent ISO (virtio-win-0.1.248.iso in this case) and select "copy link"
  4. See "Download the ISO directly to Proxmox (Option 2)" and paste the copied URL into the URL field
  5. Click Download

Install Windows on Proxmox

As noted earlier, the steps to install Windows are similar to that of installing Linux, so I'm only going to highlight some of the key points below.

Gallery: Install Windows on Proxmox

1717361536_installwindows01.jpg
1717361539_installwindows02.jpg
1717361542_installwindows03.jpg
  1. Follow the steps in "Download the ISO (Option 1)" above, but download the Windows ISO from Microsoft
  2. Follow the steps in "Upload the ISO to Proxmox (Option 1 continued)" above
  3. Follow the steps in "Create the Linux Virtual Machine framework in Proxmox" above, but keep the following keys in mind:
    1. In the OS tab, be sure to select "Microsoft Windows" in the Guest OS type and select the version you're installing
    2. In the OS tab, click the checkbox next to "Add addition drive for VirtIO drivers," and select the ISO image you uploaded to the system
    3. In the System tab, select local-lvm for EFI storage
    4. In the System tab, uncheck "Add TPM" unless you need it (e.g.: Windows 10/11 as opposed to Windows server); with this enabled, you will be unable to create snapshots in Proxmox.
  4. Start the VM to boot off of the ISO and follow the standard Windows installation steps; If installing Windows Server, I'd recommend installing the GUI if you're a beginner so that it's available on console
  5. If you need to send special commands to the console, such as ctrl-alt-delete for a server or a domain-joined system, you do it by clicking the arrow between summary and the console, clicking the "A" that represents the keyboard, and then clicking the bottom selection of "Send Ctrl-Alt-Del"
    1. If you're planning on installing Windows 11, note that by default it requires a network connection, but you won't have one until you can install the VirtIO tools in the process listed below. To get around this, on the page asking for networking, press SHIFT-F10 on the keyboard, open a command prompt, and type the following command: OOBE\BYPASSNRO
    2. This will cause the system to reboot. When it comes to the network setup page again, there will be a link that allows you to bypass the configuration and continue the installation

Install VirtIO Drivers on Windows

As long as you followed the previous steps, then instalilng the drivers will be easy.

Gallery: Install VirtIO on Windows

1717362989_installvirtiowindows01.jpg
1717362995_installvirtiowindows02.jpg
1717363001_installvirtiowindows03.jpg
1717363005_installvirtiowindows04.jpg
1717363011_installvirtiowindows05.jpg
  1. Select the drive in Windows that contains the virtio-win drivers you mounted in step 5 above.
  2. Right click on virtio-win-guest-tools
  3. Select Run As Administrator
  4. Click the checkbox next to "I agree to the licensing terms and conditions"
  5. Click Install
  6. Click the checkbox next to "I accept the terms in the License Agreement"
  7. Accept all of the default features and click Next
  8. Click Install
  9. Once done, you'll see devices being added to the server - network connectivity, USB, etc.
  10. Click Finish
  11. Click Close on the "Installation Successfully" screen
  12. Do steps 12-19 in the section, "Install the QEMU agent"

Conclusion

If you've followed all of the steps in this tutorial, you now have both a Linux and a Windows virtual machine running on Proxmox. From here, you can install whatever you want on either system. Perhaps you want to host your own Active Directory domain? Or run your own webserver? Maybe you want to play with Docker on your Linux host and install some tools to run in your home. I'll continue to dig into the options, but if you have anything specific you'd like to see me cover in a future article, let me know in the comments below.

You can read all of the articles in the series by searching for the 'selfhosting-guide' tag.

People are also reading