cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1264
Views
5
Helpful
2
Replies

Tales From The Crypt: Proxmox Chapter 1

npetrele
Cisco Employee
Cisco Employee

To borrow the Proxmox web site's description: "Proxmox VE is a complete open-source platform for enterprise virtualization. With the built-in web interface you can easily manage VMs and containers, software-defined storage and networking, high-availability clustering, and multiple out-of-the-box tools on a single solution." 

I've been a user and promoter of open-source solutions since the '90s, so this seems right up my alley. I can think of a few different ways I could use Proxmox, and Cisco's very own David Nguyen is already using it in his home. He's going to give my team a demo and lesson on Proxmox this Friday. 

In the meantime, I try it out on a couple of dirt cheap mini PCs. I'll chronicle my progress here in the hopes that my failures and successes can help some of you. The ultimate goal is to create a prototype high-availability web site and network attached storage system. And, to just play around with guest operating systems. 

First, I order the two mini PCs for about $85 each on Amazon. One is Intel-based, the other AMD, but they look identical. 

2023-06-20_163802.png

Both have 8GB of RAM and 128GB of storage. They come with WIFI and an Ethernet port. The Intel box arrives first. 

Proxmox installation is very simple. I created a bootable Proxmox thumb drive, boot into the BIOS settings and tell the mini PC to boot from USB. The installer asks a couple questions but it mostly does all the work for you. You have no choice but to allow Proxmox to take over your entire drive, which is cool by me, since that's what I bought these boxes for. 

Tip #1: Don't rely on WIFI. Connect the Ethernet ports of both boxes to your switch or router. Proxmox installation doesn't give you an opportunity to set up your WIFI password. You can do that after it's installed, but it's more trouble than it's worth. And I've seen some discussions about how it creates problems for bridging. 

Once Proxmox is installed, you manage it from a web browser on another PC. So I go to my home PC and browse to the Proxmox URL. Looks great so far. 

I install two guest operating systems on the box. First, I install Lubuntu, a lightweight version of Ubuntu Linux. Then I install Windows 11 Home. This is where I run into my first hangup. One of the applications I install on Windows, 1Password, is set up to use my USB Yubikey for verification. Proxmox has an option where you can add USB hardware to the virtual machine. Proxmox doesn't see the Yubikey plugged into the USB switch I use to share mouse and keyboard with all my PCs.

I plug the Yubikey into the mini PC itself. Now when I add the USB device, Proxmox recognizes the Yubikey. But it doesn't work. I touch the key when 1Password expects me to touch it, and then it rejects the key. I have no idea if Proxmox is at fault here or it's just the cheap-o mini PC. But I shrug it off and move on.

At this point, Proxmox sees Lubuntu as vm:100 and Windopes-11 as vm:101. (Yes, that's what I named the Windows guest.)

My AMD-based mini PC arrives, and I install Proxmox on it. I log into the first box and create a cluster. I log into the second box and join the cluster. I go back to the first box and issue these high-availability commands (I may have left out a few steps, since I'm writing this from memory):

 

ha-manager add vm:100
ha-manager add vm:101
ha-manager migrate vm:100 pve2
ha-manager migrate vm:101 pve2

 

This is how the primary server view looks now:

2023-06-22_092707.png

I expected Lubuntu and Windopes-11 to show up under the other server in the cluster, pve2, but perhaps I don't know how high availability works in Proxmox. Or maybe I just didn't execute the right commands. 

Oh, wait, there's an error message. It says it can't migrate the Lubuntu CD-ROM (which is actually just an ISO attached as a virtual CD-ROM). I remove it from the Lubuntu vm and try the migrate again. This time it seems to be working.

Anyway, that's as much of the story as I'll tell this chapter. David Nguyen is going to teach the team a bit about Proxmox tomorrow. Maybe I'll have a lot more to say afterwards, so stay tuned.

Oh, and why Tales From The Crypt? It's so hot here in Texas that demons are exorcising themselves and going back to hell to cool off. I've closed the blinds and covered my window to keep the sun from adding to the room's heat. While it makes my home office room dark enough to be a crypt, and it does help, it's still hot in here no matter how I set my A/C.

 

2 Replies 2

npetrele
Cisco Employee
Cisco Employee

Here's what the Proxmox panel looks like after I successfully migrated vm:100 to the second PC:

2023-06-22_124155.png

 

npetrele
Cisco Employee
Cisco Employee

Just for kicks, I asked ChatGPT how to set up a high availability web server with Proxmox. Here's the answer:

To create a high availability web server using Proxmox, you can follow these general steps:

  1. Set up a Proxmox Cluster: Install and configure Proxmox Virtual Environment (PVE) on multiple physical servers to create a cluster. This allows you to manage and migrate virtual machines (VMs) across the cluster.

  2. Create Virtual Machines: Set up virtual machines on the Proxmox cluster. For a high availability web server, you typically need at least two VMs—one primary and one backup.

  3. Configure Shared Storage: Use shared storage to ensure data consistency and availability. You can utilize technologies like Network File System (NFS), iSCSI, or a distributed file system (e.g., GlusterFS or Ceph) to provide shared storage to the VMs.

  4. Load Balancing: Implement a load balancer to distribute incoming traffic across multiple web servers. You can use a dedicated load balancer software like HAProxy or Nginx, or employ Proxmox's built-in load balancing feature to distribute requests to your VMs.

  5. Configure Floating IP: Set up a floating IP address that can be assigned to the active web server. This IP address will move between the primary and backup VMs based on their availability.

  6. Monitor and Automate Failover: Implement monitoring tools to regularly check the health of your web servers. If the primary server fails, you should automate the process of detecting the failure and triggering a failover to the backup server. This can be achieved using tools like Proxmox HA Manager or external monitoring solutions.

  7. Database Replication: If your web server relies on a database, set up database replication to ensure data consistency between the primary and backup servers. This typically involves using technologies like master-slave replication or database clustering.

  8. Test and Validate: Regularly test your high availability setup to ensure it functions as expected. Simulate failures and monitor how your system responds to ensure seamless failover and minimal downtime.

It's important to note that these steps provide a general overview, and the specific configuration and tools may vary based on your requirements and preferences. Ensure you refer to Proxmox's documentation and relevant software documentation for detailed instructions and best practices.