Incapio - Blog Posts © 2022 by Incapio is licensed under CC BY-SA 4.0 

Install Proxmox VE on Compute Engine - Google Cloud(GCP)

Updated: Jan 28

Prerequisites:

You will need the following items to complete this tutorial


Introduction
  • Proxmox Virtual Environment (Proxmox VE or PVE) is an open-source virtualization management software server.

  • It's a Debian-based Linux distribution with a modified Ubuntu LTS kernel that enables virtual machine and container deployment and management.

  • Proxmox VE comes with a web console and command-line tools, as well as a REST API for third-party applications.

  • There are two forms of virtualization supported: container-based and LXC-based virtualization (starting from version 4.0 replacing OpenVZ used in version up to 3.4, included),

  • KVM provides full virtualization. It has a web-based administration interface.

  • The GNU Affero General Public License, version 3 applies to Proxmox VE.

Characteristics
  • Proxmox VE is an open-source server virtualization software that uses a single web-based interface to handle two virtualization technologies: KVM for virtual machines and LXC for containers. The source code is available under the GNU AGPL v3 licence. Optional subscription-based customer support is sold by the company. Users who pay for a subscription gain access to a business software repository.

Model of storage
  • Proxmox VE supports LVM group, directory, and ZFS for local storage, as well as iSCSI, Fibre Channel, NFS, GlusterFS, and CEPH for network storage.

Step - 1. Enabling Nested Virtualization on Compute Engine VM Instance Image.

Nested virtualization allows you to run virtual machine (VM) instances inside of other virtual machines (VMs), allowing you to build your own virtualization environments. Compute Engine adds Intel VT-x instructions to VMs to support nested virtualization, so when you build a VM, the hypervisor that already exists on that VM can run more VMs.

  • Select the project you prefer to enable nested virtualization in the cloud console and activate the cloud shell terminal.

google cloud shell, google cloud shell editor, google cloud shell commands, google cloud shell ssh, provisioning your google cloud shell machine, google cloud sdk shell, cloud shell google, google cloud sdk shell commands, google cloud shell scheduled, google cloud sdk shell interactive mode, google cloud shell used ports, donwlaod git to google cloud shell, cloud sdk vs google shell, mantain shell google cloud, google cloud shell not opening, google cloud shell commands disk space, how to access files within files in google cloud shell, google cloud sdk shell git bash, google cloud shell wrong account,
Google Cloud Shell
  • In the terminal, you need to find the available Debian images.Copy-paste the below code in the cloud shell to see the available Debian images.

$ gcloud compute images list --filter=debian
  • Output

NAME: debian-10-buster-v20211209
PROJECT: debian-cloud
FAMILY: debian-10
DEPRECATED:
STATUS: READY

NAME: debian-11-bullseye-v20211209
PROJECT: debian-cloud
FAMILY: debian-11
DEPRECATED:
STATUS: READY

NAME: debian-9-stretch-v20211209
PROJECT: debian-cloud
FAMILY: debian-9
DEPRECATED:
STATUS: READY
  • To enable nested virtualization on Debian buster, you must create a Debian image that supports nested virtualization.

  • To enable nested virtualization, run the below command in the cloud shell.

  • Syntax

gcloud compute images create image-name \
--source-image-family=debian-10 \
--source-image-project=debian-cloud \
--licenses=https://compute.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx
  • Example

gcloud compute images create debian-proxmox \
--source-image-family=debian-10 \
--source-image-project=debian-cloud \
--licenses=https://compute.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx
  • Output

$ gcloud compute images create debian-proxmox \
> --source-image-family=debian-10 \
> --source-image-project=debian-cloud \
> --licenses=https://compute.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx
Created [https://www.googleapis.com/compute/v1/projects/elegant-canto-331917/global/images/debian-proxmox].
NAME: debian-proxmox
PROJECT: elegant-canto-331917
FAMILY:
DEPRECATED:
STATUS: READY
  • In the cloud console, navigate to compute engine and images interface to verify the image deployment process.

google cloud compute engine custom image tar disk1, google compute engine custom image, google compute engine custom image windows server, google compute engine build custom image tar, make custom image google compute engine, google cloud compute engine custom image, windows server custom image google compute engine, google compute engine build custom image tar "disk1", google compute engine build custom image tar "disk.raw", google compute engine custom image windows, google compute engine custom image from vm,
Google Compute Engine Images Interface

Step - 2. Create VPC Firewall Rules for Proxmox.


Add Ingress firewall rules.
  1. Go to the Firewall rules page in the VPC network section in the Cloud Console.

  2. Click Create a firewall rule.

  3. On the Create a firewall rule page, enter a name and description.

  4. In the Targets menu, select Specified target tags.

  5. In the Target tags field, enter prox-firewall.

  6. In the Source IP ranges field, enter 0.0.0.0/0.

  7. In the Protocols and ports section, select Specified protocols and ports.

  8. Select TCP and enter the port: 8006

  9. Click Create.

Add Egress firewall rules
  1. Go to the Firewall rules page in the VPC network section in the Cloud Console.

  2. Click Create a firewall rule.

  3. On the Create a firewall rule page, enter a name and description.

  4. In the Direction of Traffic, choose Egress.

  5. In the Targets menu, select Specified target tags.

  6. In the Target tags field, enter prox-firewall.

  7. In the Destination IP ranges field, enter 0.0.0.0/0.

  8. In the Protocols and ports section, select Allow all.

  9. Click Create.

Step - 3. Create a Compute Engine VM Instance from the Custom Images

Limitations:

The following limitations apply to virtual machines:

  • You must utilise Linux-based operating systems; Windows Server images will not work.

  • E2 and N2D machine types are not supported.

  • Intel Haswell or later CPUs are required; AMD processors are not supported. Change the minimum CPU selection for the VMs in that zone to Intel Haswell or later if the default processor for that zone is Sandy Bridge or Ivy Bridge.

Operating systems that have been thoroughly tested

The list below displays the Primary combinations on which Google runs basic boot and integration tests. If you're having difficulties with a VM combination that isn't listed in the talistble, try reproducing the problem using one of the tested OS combinations before contacting Cloud Customer Care.

  • Debian 9, kernel version 4.9

  • SLES 12 SP3, kernel version 4.4

  • Ubuntu 16.04 LTS, kernel version 4.15

Create a Custom VM Instance
  • In the cloud console, Navigate to the VM instances interface.

  • In the VM instance interface, Click on "Create Instance."

  • In the create instance interface, type the instance name, for instance, proxmox-on-compute-engine.

  • In the create instance interface, choose the region and zone. (Please Note: AMD processors are not supported; you must use Intel Haswell or later processors. Change the minimum CPU selection for the VMs in that zone to Intel Haswell or later if the zone's default processor is Sandy Bridge or Ivy Bridge. See Available regions and zones for details on the processors supported in each zone.)

  • Switch back to cloud shell, and type the below command to verify if the zone supports Intel Haswell or Later.

  • Syntax:

$ gcloud compute zones describe zone
  • Example:

gcloud compute zones describe us-central1-a
  • Output:

info@cloudshell:~ (elegant-canto-331917)$ gcloud compute zones describe us-central1-a
availableCpuPlatforms:
- Intel Ice Lake
- Intel Cascade Lake
- Intel Skylake
- Intel Broadwell
- Intel Haswell
- Intel Ivy Bridge
- Intel Sandy Bridge
- AMD Milan
- AMD Rome
creationTimestamp: '1969-12-31T16:00:00.000-08:00'
description: us-central1-a
id: '2000'
kind: compute#zone
name: us-central1-a
region: https://www.googleapis.com/compute/v1/projects/elegant-canto-331917/regions/us-central1
selfLink: https://www.googleapis.com/compute/v1/projects/elegant-canto-331917/zones/us-central1-a
status: UP
supportsPzs: false

  • You must select a zone that supports Intel Haswell or Later, otherwise, nested virtualization won't work properly.

  • In the machine configuration section, choose the series to N1 and machine type to n1-standard-4(4v CPU, 15GB Memory). (Please Note: E2 and N2D machine types are not supported)

google compute engine machine types kvm, google compute engine machine types, machine instance on google compute engine, google cloud sql works on local machine but not compute engine, local machine to google compute engine scp, google compute engine virtual machine, google compute engine virtual machine pricing, scp google compute engine from ssh to local machine, google compute engine change machine name change ip?, virtual machine instances in google compute engine, copy files from google bucket to compute engine virtual machine, google compute engine change machine type, google compute engine describe machine
Google Compute Engine VM instance Machine Configuration
  • In the Machine configuration section, choose the CPU Platform to Intel Haswell or Later.

Add a Boot Disk
  • In the create instance interface, scroll down to the boot disk section.

  • In the boot disk section, click on Change.

  • In the boot disk interface, click on custom images tab.

  • In the custom image interface, click select a project and choose your project.

  • In the custom image interface and image section, choose the image to debian-proxmox. (Please Note: Choose the custom image that you created earlier with nested virtualization)

  • In the custom image interface and boot disk type, select the boot disk type to "balanced persistent disk."

  • In the custom image interface and size(GB), increase to 20GB.

google cloud compute engine custom image tar disk1, google compute engine custom image, google compute engine custom image windows server, google compute engine build custom image tar, make custom image google compute engine, google cloud compute engine custom image, windows server custom image google compute engine, google compute engine build custom image tar "disk1", google compute engine build custom image tar "disk.raw", google compute engine custom image windows, google compute engine custom image from vm,
Google Compute Engine VM Instance Boot Disk with Custom Image
  • In the custom image interface, click on select to finalize the boot disk.

Add a Network tag, hostname and assign a static IP address.
  • In the create instance interface, scroll down to the Networking section.

  • In the Networking section, type the prox-firewall(network tag) in the network tags field.

  • In the Networking section, type the hostname for the proxmox server, for instance, "uscentral.incapio.org.in."

google compute engine simulate bridged networking, google compute engine networking public access, google compute engine networking
Google Compute Engine VM Instance Networking
  • In the Networking section, enable IP forwarding.

  • In the create instance interface, scroll down to the network interfaces section and expand the default field.

  • In the edit network interface, choose the Ephemeral IP field.

  • In the Ephemeral IP section, click on create IP address.

  • In the "reserve a new static IP address interface," type name proxmox-static-IP-address.

google compute engine simulate bridged networking, google compute engine networking public access, google compute engine networking
Google Compute Engine VM Instance Network Interface
  • In the "reserve a new static IP address interface," click on the reserve option to assign a new static IP to the proxmox VM instance

Deploy a new Compute Engine VM instance
Google Compute Engine Running Instances
  • In the create instance interface, scroll down to the bottom of the page and click on the "create" option to deploy a new proxmox compute engine VM instance.

Step - 4. Installing Proxmox VE on Compute Engine


How to verify if the nested virtualization is enabled on the Compute Engine VM instance?.
  • Next, click on the SSH option to open the secure shell window on the Proxmox instance in the VM instance interface.

  • Make sure that nested virtualization is turned on. The presence of a nonzero answer indicates that nested virtualization is active.

  • In the secure shell window, run the below command to verify if the VM instance enabled the nested virtualization.

grep -cw vmx /proc/cpuinfo
  • Output:

info@uscentral:~$ grep -cw vmx /proc/cpuinfo
4
info@uscentral:~$
Install Proxmox on Debian
  • Add an /etc/hosts entry for your IP address

  • Please ensure that your machine's hostname can be resolved using /etc/hosts, i.e., an entry in /etc/hosts that assigns an address to its hostname exists.

  • Make sure your hostname is configured in /etc/hosts with one of the following addresses:

  • 1 IPv4 or

  • 1 IPv6 address, or

  • 1 IPv4 and 1 IPv6 address

  • Note that this also entails eliminating any default addresses, such as 127.0.1.1.

  • If your IP address is 192.168.32.58 and your hostname is prox4m1, for example, your /etc/hosts file would look like this:

127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

10.128.0.35 uscentral.incapio.org.in uscentral  # Added by Google
169.254.169.254 metadata.google.internal  # Added by Google
  • You can use the hostname command to see if your setup is correct:

  • Syntax:

hostname --ip-address
192.168.15.77 # should return your IP address here
hostname -f
prox4m1.proxmox.com prox4m1 # should return your hostname here
  • Output:

info@uscentral:~$ hostname --ip-address
10.128.0.35
info@uscentral:~$ hostname -f
uscentral.incapio.org.in 
info@uscentral:~$ 

Install Proxmox VE from command line
  • At first, switch to root user using the below command.

  • Syntax:

sudo su -
  • Output:

info@uscentral:~$ sudo su -
root@uscentral:~# 
  • Add the Proxmox VE repository:

echo "deb [arch=amd64] http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
  • Add the following key to the Proxmox VE repository: (Please Note: If the wget command is not found, install the wget using the following command apt install -y wget)

wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
chmod +r /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg  
# optional, if you have a non-default umask
  • Run the following commands to update your repository and system:

apt update && apt full-upgrade
  • Install the packages for Proxmox VE.

apt install proxmox-ve postfix open-iscsi
  • Configure programmes that require user input during installation to meet your needs (for example, Samba requesting WINS/DHCP support). If your network already has a mail server, install postfix as a satellite system; your current mail server will then act as a relay host, routing emails delivered by the Proxmox server to their intended recipients.

  • If you're unsure what to put in this box, select local only and leave the system name blank.

  • Finally, reboot your system; the new Proxmox VE kernel should appear in the GRUB menu automatically.

Remove the os-prober package if possible:

  • To build dual-boot GRUB entries, the os-prober software analyses all of your host's partitions, including those assigned to guest VMs. You can safely uninstall the os-prober package if you did not install Proxmox VE as a dual boot with another operating system.

apt remove os-prober
Access the web interface for Proxmox VE:
  • Go to https://youripaddress:8006 to access the admin web interface. If you're starting from scratch and haven't yet added any users, log in using the root account and your linux root password, selecting "PAM Authentication."

  • Syntax:

https://vm-instance-external-ip:8006 
  • Example:

https://34.136.10.31:8006
  • Skip the security warning in the browser and navigate to log in.

  • To log in as a root user, you need the root password; run the below command to update the root password.

  • Syntax:

root@uscentral:~# passwd root
  • Output:

root@uscentral:~# passwd root
New password: 
Retype new password: 
passwd: password updated successfully
root@uscentral:~# 
proxmox default login, proxmox login, proxmox login failed, login proxmox remotely, proxmox 5 http login, proxmox sddm login root, proxmox first login failed, proxmox defalt login, proxmox login screen text, proxmox how do i login
Proxmox VE Login Interface
  • Finally, type the username "root" also the root password, and click on login to access the Proxmox server.

Compute Engine VM Instance, Proxmox VE, Summary
Compute Engine VM Instance - Proxmox VE - Summary

Conclusion

Here are some recommended tips and tricks.

How much RAM does Proxmox require?.

The following is the minimum RAM need for evaluation:

1 GB RAM, plus any additional RAM required by guests

RAM Requirement: A minimum of 2 GB for the OS and Proxmox VE services, including guest memory.

Minimum Evaluation Requirements

System Requirements that are Recommended

Web Browsers Supported for Using the Web Interface

Proxmox VE uses the following ports.




893 views1 comment

Do you need assistance? Visit Forum to join the conversation.