Getting Started with Proxmox

From FriendlyELEC WiKi
Revision as of 08:10, 18 October 2024 by Tzs (Talk | contribs) (updated by API)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

查看中文

1 Proxmox version

  • OS: Debian 12
  • Proxmox VE: 8.2.7

2 First Look

Proxmox.png

3 Supported platforms

  • RK3528 (Single core)
  • RK3566 (Single core)
  • RK3568
  • RK3588

4 IP Address

The default IP address of the system is 192.168.1.200. The method to change the IP address is as follows:

4.1 Change the IP address after the system starts

For example, if your network segment is 192.168.100 and you want to set the IP address to 192.168.100.200, you can use the following command:

rm -f /etc/firstuse
sed -i 's/new_ip=.*/new_ip=192.168.100.200/' /etc/init.d/friendlyelec_firstuse.sh
reboot

The following configuration file will be modified:
/etc/resolv.conf
/etc/network/interfaces
/etc/hosts
Proxmox has strict requirements for hostname configuration. Incorrect settings can prevent services from starting, so please pay special attention.

4.2 Change the IP address before installing the system

Insert the SD card that has been flashed with the eflasher firmware into the computer, mount the first partition of the SD card (assuming the SD card device is /dev/sdX) to /mnt using the following command:

mount /dev/sdX1 /mnt

Use vi or another text editor to open the file /mnt/proxmox-arm64/info.conf, append the following line, and then use this SD card to flash the Proxmox system to eMMC:

bootargs-ext=proxmox_ip=192.168.100.200

The above setting saves proxmox_ip=192.168.100.200 to the kernel boot parameters, which will be read by the /etc/init.d/friendlyelec_firstuse.sh script to initialize the network settings.

5 Access the Proxmox web page

In the web browser, enter https://192.168.1.200:8006. The browser may display a privacy error message; click “Advanced” and select “Proceed to site” to continue.
the default login account is:

UserName: root
Password: fa

Regular account:

UserName: pi
Password: pi

This article uses the root user for access during testing.

6 Root Login via SSH

ssh root@192.168.1.200

The initial password for the root user is fa, and the initial password for the pi user is pi.

7 Creating a VM

Only virtual machines that support EFI ACPI are supported.

7.1 Create a virtual machine using an ISO file

This article uses the installation of Debian as an example.
First, download the live ISO file from the official Debian website: [1], then use the scp command to upload it to the corresponding directory on the development board, windows users can use WinSCP software to upload the file:

scp debian-12.7.0-arm64-netinst.iso root@192.168.1.200:/var/lib/vz/template/iso/

Click Create VM at the top of the screen,then configure the virtual machine in the wizard interface. The important settings are as follows, and you can leave the rest at their default values:

Section Content Description
General Name: Feel free to fill Provide the name of the VM
OS EFI Storage: local
ISO image: debian-12.7.0-arm64-netinst.iso
Operating system installation image
System Machine: virt
BIOS: OVMF (UEFI)
SCSI Controller: VirtIO-SCSI
Disks Storage: local Disk storage
CPU Cores: 1 Number of CPU cores allocated to the VM
Memory Memory (MiB): 512
Minimum memory (MiB): 512
Memory allocation for the VM
Network Bridge: wan
Model: VirtIO (paravirtualized)
Network bridge and adapter model
  • It is recommended to first configure the system installation using a single-core CPU before attempting to change to a multi-core setup.
  • Note that due to the lack of support for heterogeneous architectures, CPU big and little cores cannot be mixed. You should either use all big cores or all little cores. Specifically, you need to explicitly specify the cores used by the virtual machine, with numbering starting from 0. For example, if certain CPUs are numbered 0-3 as big cores and you want the virtual machine to use four cores, you would enter 0,1,2,3.
  • By default, the system has already created two bridges: wan and br-lan. If the virtual machine is bound to wan, it will be on the same subnet as the development board and will receive an IP address from the upstream router (in this example, it will receive an address from the 192.168.1.0/24 subnet). If the virtual machine is bound to the lan network, it will receive an IP address from the local DHCP server in the 192.168.2 subnet.

7.1.1 Start the Virtual Machine

In the left navigation pane, select the newly created virtual machine, click on “Console”, and then click “Start Now”

7.2 Create a Virtual Machine Using QCOW2 Disk Image File

The following demonstrates how to create a virtual machine using the command line and import the QCOW2 disk image file into the virtual machine. Please replace example.qcow2 with the actual file name. When downloading QCOW2 files online, make sure to choose versions with file names that contain the terms armv8, aarch64 and efi:

# download  
wget https://github.com/xxx/yyy/releases/download/armv8/example-armv8-efi.qcow2 -O example.qcow2
 
# create vm with id(200)
qm create 200 --name example --memory 1024 --net0 virtio,bridge=wan --bios ovmf --cores 1 --cpu host
 
# create EFI disk for id(200)
qm set 200 --bios ovmf
qm set 200 --efidisk0 local:1
qm set 200 --boot c --bootdisk scsi0
qm set 200 --scsihw virtio-scsi-pci
 
# import img file into vm
qm importdisk 200 example.qcow2 local

Return to the interface, and you will see an additional virtual machine named “example”
Select it, click on “Hardware” and double-click “Unused Disk 0” In the pop-up dialog, change the following options:
Bus/Device: SCSI
SCSI Controller: VirtIO SCSI
Finally, click “Add”
Return to the management interface, click “Console” and then click “Start Now” to start the virtual machine.
If “Display output is not active” appears, please be patient and wait.

8 Other

8.1 Increase Swap Space

It is recommended to perform this setting for machines with 2GB of memory or less.

dd if=/dev/zero of=/swapfile bs=1M count=4096
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile none swap sw 0 0" >> /etc/fstab

Check the status

swapon --show
free -h

8.2 Check if KVM is Enabled in the Kernel

root@prox4nanopi:~# ls -l /dev/kvm
crw-rw---- 1 root kvm 10, 232 Oct 11 04:23 /dev/kvm
root@prox4nanopi:~# dmesg | grep kvm
[    7.796613] kvm [1]: IPA Size Limit: 40 bits
[    7.796627] kvm [1]: GICv3: no GICV resource entry
[    7.796631] kvm [1]: disabling GICv2 emulation
[    7.796642] kvm [1]: GIC system register CPU interface enabled
[    7.796755] kvm [1]: vgic interrupt IRQ9
[    7.796959] kvm [1]: VHE mode initialized successfully