Difference between revisions of "Getting Started with Proxmox"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
 
(updated by API)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Getting Started with OpenMediaVault/zh|查看中文]]
+
[[Getting Started with Proxmox/zh|查看中文]]
==OpenMediaVault version==
+
==Proxmox version==
 
* OS: Debian 12<br />
 
* OS: Debian 12<br />
* OpenMediaVault: 7.0.5-1 (Sandworm)<br />
+
* Proxmox VE: 8.2.7<br />
* Others: built-in OMV-Extras<br />
+
==Earlier version OpenMediaVault==
+
Link to → [[Getting Started with OpenMediaVault6|Getting Started with OpenMediaVault6]]
+
 
==First Look==
 
==First Look==
[[File:Openmediavault7.png|600px]]
+
[[File:Proxmox.png|600px]]
 
==Supported platforms==
 
==Supported platforms==
* RK3328<br />
+
* RK3528 (Single core)<br />
* RK3399<br />
+
* RK3566 (Single core)<br />
 
* RK3568<br />
 
* RK3568<br />
 
* RK3588<br />
 
* RK3588<br />
==Find IP Address==
+
==IP Address==
you can use the "ping" command to obtain the IP address:
+
The default IP address of the system is 192.168.1.200. The method to change the IP address is as follows:
 +
===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:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
ping openmediavault
+
rm -f /etc/firstuse
 +
sed -i 's/new_ip=.*/new_ip=192.168.100.200/' /etc/init.d/friendlyelec_firstuse.sh
 +
reboot
 
</syntaxhighlight>
 
</syntaxhighlight>
==Access the OpenMediaVault web page==
+
The following configuration file will be modified:<br/>
Type the URL [http://openmediavault/ http://openmediavault/] or the IP address to your web browser, the default login account is:
+
/etc/resolv.conf<br/>
 +
/etc/network/interfaces<br/>
 +
/etc/hosts<br/>
 +
Proxmox has strict requirements for hostname configuration. Incorrect settings can prevent services from starting, so please pay special attention.
 +
===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:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Username: admin
+
mount /dev/sdX1 /mnt
Password: openmediavault
+
 
</syntaxhighlight>
 
</syntaxhighlight>
==Change admin password==
+
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:
Click on the profile icon in the upper-right corner of the web page, then select '''"Change Password"'''.
+
==Configure the web page timeout duration==
+
Go to '''System -> Workbench''' and adjust the '''"Auto Logout"''' time setting.
+
==Linux default passwords==
+
Regular Account:<br/>
+
&nbsp;&nbsp;&nbsp;&nbsp;User Name: pi<br/>
+
&nbsp;&nbsp;&nbsp;&nbsp;Password: pi<br/>
+
<br/>
+
Root:<br/>
+
&nbsp;&nbsp;&nbsp;&nbsp;User Name: root<br/>
+
&nbsp;&nbsp;&nbsp;&nbsp;Password: fa<br/>
+
==Root Login via SSH==
+
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
ssh pi@YourIPAddress
+
bootargs-ext=proxmox_ip=192.168.100.200
 
</syntaxhighlight>
 
</syntaxhighlight>
The default password is '''"pi"'''.
+
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.
==Change the passwords==
+
==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.<br />
 +
the default login account is: <br />
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
sudo passwd root
+
UserName: root
sudo passwd pi
+
Password: fa
 
</syntaxhighlight>
 
</syntaxhighlight>
==Configuring the network and time zone==
+
Regular account:
Login to your OMV via SSH as root user:
+
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
ssh root@IPAddress
+
UserName: pi
 +
Password: pi
 
</syntaxhighlight>
 
</syntaxhighlight>
Excute the following command:
+
This article uses the root user for access during testing.
 +
==Root Login via SSH==
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
omv-firstaid
+
ssh root@192.168.1.200
 
</syntaxhighlight>
 
</syntaxhighlight>
Something like this should appear:<br />
+
The initial password for the root user is fa, and the initial password for the pi user is pi.
[[File:Omv-firstaid.png|400px]]
+
==Creating a VM==
==Set up your drives==
+
Only virtual machines that support EFI ACPI are supported.
Note: If the hard drive has already been initialized and RAID has been preserved, you should be able to mount it directly.
+
===Create a virtual machine using an ISO file===
Refre to: [[#How to recover files after reinstalling OpenMediaVault]]
+
This article uses the installation of Debian as an example.<br />
===Step 1: Wipe drives===
+
First, download the live ISO file from the official Debian website: [https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-12.7.0-arm64-netinst.iso], 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:
'''please ensure your data is backed up.'''
+
Go to '''Storage -> Disks''', choose your storage device, and click the "Wipe" icon to initiate disk erasure. Typically, you can opt for a "Quick" erase option.<br />
+
If wiping isn't effective, you should first remove the shared folder and unmount it.
+
===Step 2: Setup file systems===
+
The difference between the following two Raid Profiles:
+
* MD RAID: has better performance, because it does a better job of parallelizing writes and striping reads.<br />
+
* Btrfs RAID: has better data safety, because the checksumming lets it ID which copy of a block is wrong when only one is wrong, and means it can tell if both copies are bad.<br />
+
Note: OMV does not support RAID for USB-connected devices, for more details, please refer to the official guide: [https://docs.openmediavault.org/en/latest/administration/storage/raid.html RAID]
+
====Optional 1: Configure MD RAID====
+
* Go to '''Storage -> Multiple Device''', click the '''"+"''' icon, select the desired RAID level and drives, after saving, the status is shown below:
+
[[File:Omv-raid-resyncing.png|center|400px]]<br/>
+
You need to wait for the status to change from resyncing to clean, and when it's done it will look like this:<br />
+
[[File:Omv-raid-clean.png|center|400px]]<br/>
+
* Go to '''Storage -> File Systems''', click on '''"+"''', it is recommended to choose '''"BTRFS"''' as the '''Type''', select '''"Single"''' as the '''Profile''', and select your storage device in the '''Device''' field. If you created RAID in the previous step, the device name starts with "/dev/md". If your device cannot be listed in the '''"Device"''' field, it may be because there are existing shared folders or other data on the device. Try clicking the '''►''' icon to mount directly. If the data can be discarded, you can consider using the following command to erase the partition first:
+
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
# Note: All data on the drive will be lost
+
scp debian-12.7.0-arm64-netinst.iso root@192.168.1.200:/var/lib/vz/template/iso/
sudo wipefs --all /dev/mdX
+
 
</syntaxhighlight>
 
</syntaxhighlight>
Replace /dev/mdX with the actual device, which can be checked using the "cat /proc/partitions" command.
+
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:
====Optional 2: Configure Btrfs RAID====
+
{| class="wikitable"
* Go to '''Storage -> File Systems''' click the '''"+"''' icon, choose the '''"BTRFS"''', choose the RAID level, select your drives, and then save the settings.
+
! Section !! Content !! Description
After formatting is complete, openmediavault will let you choose which file system to mount, it won't list all the hard drives in the RAID array; just select one of the hard drives within the array.
+
|-
====Optional 3: Not using RAID array====
+
| General || '''Name''': Feel free to fill || Provide the name of the VM
* Go to '''Storage -> File Systems''', click on the '''"+"''' icon, select '''"BTRFS"''', choose the '''Single''' level, select your disk, and then save the settings.<br />
+
|-
After formatting is complete, OpenMediaVault will prompt you to mount the device.
+
| OS || '''EFI Storage''': local<br />'''ISO image''': debian-12.7.0-arm64-netinst.iso || Operating system installation image
===Step 3: Create shared folders===
+
|-
* Go to '''Storage -> Shared Folders''', click the '''"+"''' icon to create two folders named "nfs" and "samba." We will use these folders for testing NFS and Samba sharing in the following steps.<br />
+
| System || '''Machine''': virt<br />'''BIOS''': OVMF (UEFI)<br />'''SCSI Controller''': VirtIO-SCSI ||
(Note: If there were previously created shared folders on the drive, you can recreate them with the same names, and the data will be preserved.)
+
|-
==Create NAS users==
+
| Disks || '''Storage''': local || Disk storage
Debian system users or Linux users created via the command line may lack certain permissions required for services like Samba and NFS. Therefore, it is recommended to use the OpenMediaVault interface to create a user specifically for accessing Samba and NFS shares. Here, I will create a user and group named "nasuser":
+
|-
* Go to '''Users -> Groups''' and then click the '''"+"''' icon to create a user group named "nasuser".<br />
+
| CPU || '''Cores''': 1 || Number of CPU cores allocated to the VM
* Go to '''Users -> "Users''' then click the '''"+"''' icon to create a user named "nasuser", change user's shell to "/usr/sbin/nologin", and select the "nasuser" and "users" groups.
+
|-
==Create a Samba share==
+
| Memory || '''Memory (MiB)''': 512<br />'''Minimum memory (MiB)''': 512 || Memory allocation for the VM
* Go to '''Services -> SMB/CIFS -> Settings''', check the box at the top for "Enabled," select "SMB1" as the minimum protocol version, and then click "Save"
+
|-
* Go to '''Services -> SMB/CIFS -> Shares''', click the '''"+"''' button, and in the "Shared folder" field, select the folder you want to share. as an example, here i select the "samba" folder
+
| Network || '''Bridge''': wan<br />'''Model''': VirtIO (paravirtualized) || Network bridge and adapter model
Testing: <br />
+
|}
On a Mac system, right-click Finder, select '''"Connect to Server"''', and enter "smb://YourIPAddress" (replace with the actual IP address). An authentication dialog will appear; enter the username "nasuser" and the password to access the share.
+
* It is recommended to first configure the system installation using a single-core CPU before attempting to change to a multi-core setup.
==Create an NFS share==
+
* 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.
* Go to '''Services -> NFS -> Settings''', check the box at the top for "Enabled", and in the "Versions" section, select all versions, including "NFSv2", then click "Save" and apply the settings.
+
* 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.
* Go to '''Services -> NFS -> Shares''', click the '''"+"''' button, and in the "Shared folder" field, select the folder you want to share. here i select the "nfs" folder. In the "Client" section, enter the IP range or specific IPs that are allowed to access the share (e.g., 192.168.1.0/24). Set the permissions to "Read/Write", in the "Extra Options" field, Input:
+
==== Start the Virtual Machine ====
 +
In the left navigation pane, select the newly created virtual machine, click on “Console”, and then click “Start Now”
 +
=== 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:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
rw,async,insecure,no_subtree_check,all_squash,anonuid=0,anongid=0
+
# download  
</syntaxhighlight>
+
wget https://github.com/xxx/yyy/releases/download/armv8/example-armv8-efi.qcow2 -O example.qcow2
Then click "Save" and apply the settings.
+
===Testing NFS mounting on a Mac===
+
Viewing OpenMediaVault's NFS Share Information via Command Line:
+
<syntaxhighlight lang="bash">
+
# showmount -e YourIPAddress
+
Exports list on YourIPAddress:
+
/export                             192.168.1.0/24
+
/export/nfs                         192.168.1.0/24
+
</syntaxhighlight>
+
Right-click Finder on your Mac, select "Connect to Server," and input the following in the address bar:
+
<syntaxhighlight lang="bash">
+
nfs://YourIPAddress/export/nfs
+
</syntaxhighlight>
+
===Testing NFS mounting on Linux===
+
Installing the NFS client
+
<syntaxhighlight lang="bash">
+
sudo apt install nfs-common
+
</syntaxhighlight>
+
Start to mount:
+
<syntaxhighlight lang="bash">
+
sudo mount -t nfs YourIPAddress:/export/nfs /mnt/nfs
+
</syntaxhighlight>
+
Checking the Status
+
<syntaxhighlight lang="bash">
+
# df -h | grep nfs
+
YourIPAddress:/export/nfs 7.3G  3.5M  6.8G    1% /mnt/nfs
+
</syntaxhighlight>
+
To configure automatic mounting at boot time, append the following line to the /etc/fstab file:
+
<syntaxhighlight lang="bash">
+
YourIPAddress:/export/nfs /mnt/nfs nfs defaults 0 0
+
</syntaxhighlight>
+
==Docker on OMV==
+
===Install Docker===
+
* Go to '''System -> Plugins''', search for and install the '''openmediavault-compose''' plugin, then refresh the page after installation.
+
* Go to '''Services -> Compose -> Settings''', scroll down to the bottom of the page, and click on '''Reinstall Docker''' to install Docker.
+
<!--
+
===Install Docker===
+
<syntaxhighlight lang="bash">
+
apt update
+
apt -y install apt-transport-https ca-certificates curl gnupg
+
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpg
+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" | \
+
    tee /etc/apt/sources.list.d/docker.list > /dev/null
+
apt update
+
apt -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
+
gpasswd -a pi docker
+
</syntaxhighlight>
+
-->
+
===Moving docker storage===
+
First, install the openmediavault-compose plugin, login via SSH and excute the following command:
+
<syntaxhighlight lang="bash">
+
sudo apt update
+
sudo apt install -y openmediavault-compose
+
</syntaxhighlight>
+
After refreshing the page,go to '''Storage -> Shared Folders''', and click the '''"+"''' icon to create three folders, namely:
+
<syntaxhighlight lang="bash">
+
docker            -> The Docker data directory, defined in /etc/docker/daemon.json
+
docker-compose    -> Location of compose files
+
docker-data      -> Location of persistent container data
+
docker-app        -> For personal use, storing Dockerfiles and data
+
</syntaxhighlight>
+
Go to '''Services -> Compose''' enter the '''"Settings"''' interface, and configure the "Shared folder" for "Compose Files" and "Data":<br />
+
Access the SSH terminal and execute the following command to move Docker data to the shared folder, where "/srv/dev-disk-by-uuid-XXYYZZ/docker" represents the absolute path of the shared folder, which can be obtained from the "Storage" -> "Shared Folders" list on the web interface:
+
<syntaxhighlight lang="bash">
+
su root
+
systemctl stop docker.socket docker.service
+
mv /var/lib/docker/* /srv/dev-disk-by-uuid-XXYYZZ/docker/
+
</syntaxhighlight>
+
On the web interface, set the '''"Docker storage"''' to the absolute path of the "docker" shared folder. save the settings and apply, and then reboot the system.<br />
+
<br />The final value filled on the Gui:<br />
+
<syntaxhighlight lang="text">
+
Compose Files's Shared folder  -> on /dev/md0, docker-compose
+
Data's Shared folder          -> on /dev/md0, docker-data
+
Docker's Docker storage        -> on /srv/dev-disk-by-uuid-XXYYZZ/docker/
+
</syntaxhighlight>
+
===Install Nextcloud with Docker===
+
Run the following command in the terminal:
+
<syntaxhighlight lang="bash">
+
su root
+
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
+
mkdir nextcloud
+
cd nextcloud
+
mkdir data
+
  
docker run -d -p 8888:80  --name nextcloud \
+
# create vm with id(200)
    -v $PWD/data:/var/www/html --restart=always \
+
qm create 200 --name example --memory 1024 --net0 virtio,bridge=wan --bios ovmf --cores 1 --cpu host
    --privileged=true  arm64v8/nextcloud
+
</syntaxhighlight>
+
you can access the Nextcloud web interface by opening a web browser and navigating to http://YourIPAddress:8888/ (replace YourIPAddress with the actual IP address of your device).
+
===Install Jellyfin with Docker===
+
Go to '''Storage -> Shared Folders''', click the '''"+"''' icon to create a "media" folder for storing multimedia resources. Then, in the command-line terminal, you can run the following command to install Jellyfin:
+
<syntaxhighlight lang="bash">
+
su root
+
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
+
mkdir jellyfin
+
cd jellyfin
+
mkdir config cache
+
  
docker run -d --name jellyfin \
+
# create EFI disk for id(200)
-v $PWD/config:/config \
+
qm set 200 --bios ovmf
-v $PWD/cache:/cache \
+
qm set 200 --efidisk0 local:1
-v $(readlink -f /srv/dev-disk-by-uuid-*/media):/media \
+
qm set 200 --boot c --bootdisk scsi0
-p 8096:8096 \
+
qm set 200 --scsihw virtio-scsi-pci
--restart=always \
+
jellyfin/jellyfin
+
</syntaxhighlight>
+
After completing the setup, you can access the Jellyfin web interface by opening a web browser and navigating to http://YourIPAddress:8096/ (replace YourIPAddress with the actual IP address of your device). This will allow you to access and manage your media content using Jellyfin.
+
===Install Portainer with Docker===
+
Run the following command in the terminal:
+
<syntaxhighlight lang="bash">
+
su root
+
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
+
mkdir portainer
+
cd portainer
+
mkdir data
+
  
docker run -d \
+
# import img file into vm
  --name portainer \
+
qm importdisk 200 example.qcow2 local
  --restart=always \
+
  -e TZ=Asia/Shanghai \
+
  -p 8000:8000 \
+
  -p 9000:9000 \
+
  -v /var/run/docker.sock:/var/run/docker.sock \
+
  -v $PWD/data:/data \
+
  portainer/portainer-ce:latest
+
</syntaxhighlight>
+
After completing the setup, you can access the Portainer web interface by opening a web browser and navigating to http://YourIPAddress:9000/ (replace YourIPAddress with the actual IP address of your device). The default administrator account username and password are both "admin".
+
==System Backup and Restore==
+
===Backing up the System in eMMC===
+
Use the tar command to back up the contents of the file system:
+
<syntaxhighlight lang="bash">
+
su root
+
cd /
+
tar --warning=no-file-changed -cvpzf /rootfs.tar.gz \
+
    --exclude=/rootfs.tar.gz --exclude=/var/lib/docker/runtimes \
+
    --exclude=/etc/firstuser --exclude=/etc/friendlyelec-release \
+
    --exclude=/usr/local/first_boot_flag --one-file-system /
+
</syntaxhighlight>
+
=== Restoring the System to eMMC ===
+
Boot from the SD card, start the Linux system (such as Debian or Ubuntu), and use the following command to query the root partition of the system on eMMC:
+
<syntaxhighlight lang="bash">
+
root@openmediavault:~# sudo parted -s /dev/mmcblk2 unit MiB print | grep rootfs
+
8      140MiB  59000MiB  58860MiB  ext4        rootfs
+
</syntaxhighlight>
+
According to the mathematical index 8 mentioned above, the device name for the root partition is /dev/mmcblk2p8. Below, it will be reformatted, mounted, and then the rootfs.tar.gz will be decompressed here:
+
<syntaxhighlight lang="bash">
+
sudo mkfs.ext4 /dev/mmcblk2p8
+
sudo mkdir /mnt/rootfs
+
sudo mount /dev/mmcblk2p8 /mnt/rootfs
+
sudo tar xvzfp /path/to/rootfs.tar.gz -C /mnt/rootfs --numeric-owner --same-owner
+
sudo poweroff
+
</syntaxhighlight>
+
After shutting down, remove the SD card, and then power on again to boot the system from eMMC.
+
==How to recover files after reinstalling OpenMediaVault==
+
* Go to '''Storage -> File System''', click on the '''►''' icon, and select your device in the '''File System''' section, then click Save.
+
* Go to '''Storage -> Shared Folders''', create shared folders with the same names, such as nfs, samba, docker, docker-app, docker-compose, and docker-data, as shown in this document.
+
==Common problems and solutions==
+
===Problem: Some Hard drives cannot be recognised===
+
It is possible that multiple SSDs appear to have the same IDs, check with the following command:
+
<syntaxhighlight lang="bash">
+
sudo dmesg | grep duplicate IDs
+
</syntaxhighlight>
+
If you encounter the message "globally duplicate IDs for nsid", updating the OpenMediaVault firmware to the latest version will resolve the issue. <br />
+
Such hard drives do not support access via /dev/disk/by-id method.
+
===Problem: RAID array appears in the status: "Clean, Resyncing (PENDING)"===
+
Execute following command to switch array to read-write state and begin resync process:
+
<syntaxhighlight lang="bash">
+
mdadm --readwrite /dev/md0
+
 
</syntaxhighlight>
 
</syntaxhighlight>
More details → [https://sleeplessbeastie.eu/2015/03/23/how-to-clear-up-pending-resync-on-raid-array/ How to clear up pending resync on RAID array]
+
Return to the interface, and you will see an additional virtual machine named “example”<br />
===Problem: Can´t create Filesystem - Disk not showing===
+
Select it, click on “Hardware” and double-click “Unused Disk 0” In the pop-up dialog, change the following options:<br />
using the following command to erase the partition first:
+
Bus/Device: '''SCSI'''<br />
 +
SCSI Controller: '''VirtIO SCSI'''<br />
 +
Finally, click “Add”<br />
 +
Return to the management interface, click “Console” and then click “Start Now” to start the virtual machine.<br />
 +
If “Display output is not active” appears, please be patient and wait.<br />
 +
==Other==
 +
===Increase Swap Space===
 +
It is recommended to perform this setting for machines with 2GB of memory or less.
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
# Note: All data on the disk will be lost
+
dd if=/dev/zero of=/swapfile bs=1M count=4096
sudo wipefs --all /dev/mdX
+
chmod 600 /swapfile
 +
mkswap /swapfile
 +
swapon /swapfile
 +
echo "/swapfile none swap sw 0 0" >> /etc/fstab
 
</syntaxhighlight>
 
</syntaxhighlight>
==Update OpenMediaVault==
+
Check the status
There are two commands in the command line that you can use to update the system:
+
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
omv-upgrade        # Update current software packages to new versions
+
swapon --show
omv-release-upgrade # Big version upgrade, like from 5.6.x to 6.x
+
free -h
 
</syntaxhighlight>
 
</syntaxhighlight>
Refre to → [https://docs.openmediavault.org/en/latest/various/apt.html Software & Update Management]
+
===Check if KVM is Enabled in the Kernel===
==OpenMediaVault packages==
+
You can install OpenMediaVault packages using the apt command, for example:
+
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
apt install openmediavault-diskstats
+
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
 
</syntaxhighlight>
 
</syntaxhighlight>
Here is the list of each package with its functionality:<br />
 
openmediavault-diskclone: Tool for cloning disks.<br />
 
openmediavault-diskstats: Tool for displaying disk usage statistics.<br />
 
openmediavault-downloader: Download manager for managing download tasks.<br />
 
openmediavault-fail2ban: Firewall software for preventing brute-force attacks.<br />
 
openmediavault-filebrowser: File browser for browsing and managing files.<br />
 
openmediavault-flashmemory: Tool for storing system logs and temporary files in memory to reduce disk writes.<br />
 
openmediavault-forkeddaapd: DAAP server with iTunes support.<br />
 
openmediavault-ftp: FTP server for file transfer.<br />
 
openmediavault-kernel: Tool for kernel updates.<br />
 
openmediavault-kvm: Virtualization solution for running virtual machines.<br />
 
openmediavault-locate: Tool for file searching.<br />
 
openmediavault-luksencryption: Provides disk encryption functionality.<br />
 
openmediavault-lvm2: Logical Volume Manager.<br />
 
openmediavault-mergerfs: Provides Union file system functionality to merge multiple file systems into one logical file system.<br />
 
openmediavault-minidlna: DLNA server for sharing media files over the network.<br />
 
openmediavault-nut: Network UPS Tools for monitoring UPS (Uninterruptible Power Supply) communication.<br />
 
openmediavault-omvextrasorg: Provides additional plugins and packages.<br />
 
openmediavault-onedrive: Integration with OneDrive cloud storage service.<br />
 
openmediavault-owntone: Configuration tool for UPnP/DLNA media server.<br />
 
openmediavault-photoprism: Photo management software.<br />
 
openmediavault-remotemount: Remote mount manager.<br />
 
openmediavault-resetperms: Tool for resetting file and folder permissions.<br />
 
openmediavault-rsnapshot: Snapshot backup tool.<br />
 
openmediavault-s3: S3 storage service plugin.<br />
 
openmediavault-sftp: SFTP server.<br />
 
openmediavault-shairport: AirPlay audio server.<br />
 
openmediavault-sharerootfs: Tool to allow sharing of the root file system.<br />
 
openmediavault-snapraid: SnapRAID data protection tool.<br />
 
openmediavault-snmp: SNMP (Simple Network Management Protocol) plugin.<br />
 
openmediavault-symlinks: Symbolic link management tool.<br />
 
openmediavault-tftp: TFTP (Trivial File Transfer Protocol) server.<br />
 
openmediavault-tgt: iSCSI target server.<br />
 
openmediavault-usbbackup: USB backup plugin.<br />
 
openmediavault-wakealarm: Tool for waking up the system at scheduled times.<br />
 
openmediavault-webdav: WebDAV server.<br />
 
openmediavault-wetty: Web terminal tool.<br />
 
openmediavault-wireguard: WireGuard VPN plugin.<br />
 
openmediavault-wol: Wake-on-LAN tool.<br />
 
openmediavault-anacron: Task scheduling tool.<br />
 
openmediavault-apttool: APT (Advanced Package Tool) management tool.<br />
 
openmediavault-autoshutdown: Automatic shutdown tool.<br />
 
openmediavault-backup: Backup tool.<br />
 
openmediavault-borgbackup: BorgBackup tool.<br />
 
openmediavault-clamav: Antivirus software using ClamAV to detect malware and viruses.<br />
 
openmediavault-compose: Docker Compose tool.<br />
 
openmediavault-cputemp: Tool for monitoring CPU temperature.<br />
 
openmediavault-zfs: ZFS file system support plugin.<br />
 

Latest revision as of 08:10, 18 October 2024

查看中文

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