ARM Support

pittpc

Member
Jul 12, 2020
5
0
21
39
This is fantastic! This is what a lot people have been waiting on from Proxmox, a huge piece of the puzzle, this is really going to put a damper on other closed source hypervisors! Go Proxmox Team!! I wanted to ask are there any plans for ARM support for proxmox backup. I know it doesnt make much sense for PVE but for PBS it seems like a great fit. There are alot of SBCs and low powered ARM devices that would make great PBS Servers. Keep up the great work!!
 
There are alot of SBCs and low powered ARM devices that would make great PBS Servers

Where can someone buy such ARM server with 100 TB+ storage attached?
 
Woah That’s a lot of storage!! I’m thinking small scale though small board computing.
 
I think the Raspberry Pi's use Arm architecture. There have been some people on here who suggest setting up Pi's as an nfs server and do your backups there. I admit, running PVE Backup Server on it would be a great alternative.
 
  • Like
Reactions: MButch
At the current development stage we want to rather concentrate effort into making the amd64/x86_64 experience fully stable and enterprise ready.
We did quite some experimenting with ARM64 a few years ago, and that wasn't too good of an experience, the ecosystem may have only gotten better now but good HW, which one could also use for an enterprise setup, is still not really existing for consumer nor most business outside of some trillion dollar companies. Personally, if, I'd mostly be interested to see how good it works (scales down).. But, currently I'd only pour a bigger chunk of private effort into another architecture if it was free - but the days of glory RISC-V HW isn't yet here and not sure what to think of Openpower, ARM is as good (= as proprietary) as x86 here - but the latter has at least lots of decent HW available.

That doesn't mean that you cannot try it, but it'll be quite a bit of work to only get all dependencies packages built. If you have specific question you could ask them over at the pbs-devel mailing list.
 
I don't really see the usecase for an ARM-based backup server either.

But I would be very happy if the backup client will be released for ARM, too. There are certainly many Raspberry Pis or similar boards out there that could be backed up with it. At least to me it would save a lot of headache.
I already backup my private Proxmox VE servers (Additionally to pve-zsync) and a few vservers with PBS and I am really impressed. Great work, thank you!
 
Yeah, getting the client available on more architectures makes sense, IMO - I want to backup my arm based router, for example.
FYI, @dcsapak packaged the client for the Arch Linux User repository (AUR) and I then made it built on aarch64 (ARM64) last weekend. https://aur.archlinux.org/packages/proxmox-backup-client/
There were some code changes required, currently only available in git, but from there it should be buildable also for a Debian based distro. Doing it cleanly and natively as Debian package may be quite the work, but a simple cargo release build for the proxmox-backup-client bin with the Cargo.toml patch should work just fine already.
 
Oh nice. I did successfully compile it on aarch64 too (raspberry os 64 bit beta)

For anybody who wants to try it out too:

Code:
curl https://sh.rustup.rs -sSf | sh
apt install libclang-dev llvm gcc g++ clang-7 libacl1-dev libpam-dev libfuse3-dev python-docutils python-sphinx libudev-dev libssl-dev
cd /usr/src
git clone git.proxmox.com/git/proxmox-backup.git --branch v0.8.9
cd /usr/src/proxmox-backup
wget "https://aur.archlinux.org/cgit/aur.git/plain/0001-adapt-cargo-toml-and-remove-systemd-linking.patch?h=proxmox-backup-client"
wget "https://aur.archlinux.org/cgit/aur.git/plain/0002-remove-apt-dependency.patch?h=proxmox-backup-client"
patch --forward --strip=1 --input=0001-adapt-cargo-toml-and-remove-systemd-linking.patch\?h=proxmox-backup-client
patch --forward --strip=1 --input=0002-remove-apt-dependency.patch\?h=proxmox-backup-client
cargo build --release --bin proxmox-backup-client --bin pxar --bin dump-catalog-shell-cli
cd docs
BUILD_MODE=release make proxmox-backup-client.1 pxar.1
cd ..

cp target/release/proxmox-backup-client /usr/local/bin/proxmox-backup-client
cp target/release/pxar /usr/local/bin/pxar
cp docs/proxmox-backup-client.1 /usr/local/share/man/proxmox-backup-client.1
cp docs/pxar.1 /usr/local/share/man/pxar.1
cp debian/proxmox-backup-client.bc /usr/share/bash-completion/completions/proxmox-backup-client
cp debian/pxar.bc /usr/share/bash-completion/completions/pxar
cp zsh-completions/_proxmox-backup-client /usr/local/share/zsh/site-functions/_proxmox-backup-client
cp zsh-completions/_pxar /usr/local/share/zsh/site-functions_pxar

Maybe i forgot some dependencies to list here, but I think you will figure it out ;)
 
Last edited:
  • Like
Reactions: mihaii8
Oh nice. I did successfully compile it on aarch64 too (raspberry os 64 bit beta)

For anybody who wants to try it out too:

Code:
curl https://sh.rustup.rs -sSf | sh
apt install libclang-dev llvm gcc g++ clang-7 libacl1-dev libpam-dev libfuse3-dev python-docutils python-sphinx libudev-dev libssl-dev
...


I, thanks for you work, but seems to not working on a pi2 (raspbian x32)

Code:
  Compiling proxmox-fuse v0.1.0 (git://git.proxmox.com/git/proxmox-fuse.git#0066e65e)
error[E0308]: mismatched types
   --> /root/.cargo/git/checkouts/proxmox-fuse-b688e97eb72d189d/0066e65/src/requests.rs:361:20
    |
361 |             inode: stat.st_ino,
    |                    ^^^^^^^^^^^ expected `u64`, found `u32`

error[E0308]: mismatched types
   --> /root/.cargo/git/checkouts/proxmox-fuse-b688e97eb72d189d/0066e65/src/requests.rs:596:54
    |
596 |             Some(SetTime::from_c(self.stat.st_atime, self.stat.st_atime_nsec))
    |                                                      ^^^^^^^^^^^^^^^^^^^^^^^
    |                                                      |
    |                                                      expected `i64`, found `i32`
    |                                                      help: you can convert an `i32` to `i64`: `self.stat.st_atime_nsec.into()`

error[E0308]: mismatched types
   --> /root/.cargo/git/checkouts/proxmox-fuse-b688e97eb72d189d/0066e65/src/requests.rs:607:54
    |
607 |             Some(SetTime::from_c(self.stat.st_mtime, self.stat.st_mtime_nsec))
    |                                                      ^^^^^^^^^^^^^^^^^^^^^^^
    |                                                      |
    |                                                      expected `i64`, found `i32`
    |                                                      help: you can convert an `i32` to `i64`: `self.stat.st_mtime_nsec.into()`

error[E0308]: mismatched types
   --> /root/.cargo/git/checkouts/proxmox-fuse-b688e97eb72d189d/0066e65/src/requests.rs:618:49
    |
618 |             Some(c_duration(self.stat.st_ctime, self.stat.st_ctime_nsec))
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^
    |                                                 |
    |                                                 expected `i64`, found `i32`
    |                                                 help: you can convert an `i32` to `i64`: `self.stat.st_ctime_nsec.into()`

error[E0308]: mismatched types
   --> /root/.cargo/git/checkouts/proxmox-fuse-b688e97eb72d189d/0066e65/src/session.rs:113:17
    |
113 |                 offset,
    |                 ^^^^^^
    |                 |
    |                 expected `i64`, found `i32`
    |                 help: you can convert an `i32` to `i64`: `offset.into()`

error[E0308]: mismatched types
   --> /root/.cargo/git/checkouts/proxmox-fuse-b688e97eb72d189d/0066e65/src/session.rs:132:17
    |
132 |                 offset,
    |                 ^^^^^^
    |                 |
    |                 expected `i64`, found `i32`
    |                 help: you can convert an `i32` to `i64`: `offset.into()`

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0308`.
error: could not compile `proxmox-fuse`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

any idea to fix this ?[/QUOTE]
 
Oh nice. I did successfully compile it on aarch64 too (raspberry os 64 bit beta)

For anybody who wants to try it out too:

Hello, Thanks ! I did successfully compile it too :
raspios lite version :
https://downloads.raspberrypi.org/raspios_lite_arm64/images/
Raspberry Pi Imager :
https://www.raspberrypi.org/downloads/
Code:
sudo -s
apt update && apt upgrade -y
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup toolchain install 1.45.2
rustup default 1.45.2
apt install -y git cmake libuuid1 uuid-dev libclang-dev llvm gcc g++ clang-7 libacl1-dev libpam-dev libfuse3-dev python-docutils python-sphinx libudev-dev libssl-dev
cd /usr/src
git clone git://git.proxmox.com/git/proxmox-backup.git
git clone git://git.proxmox.com/git/proxmox.git
git clone git://git.proxmox.com/git/proxmox-fuse.git
git clone git://git.proxmox.com/git/pxar.git
git clone https://aur.archlinux.org/proxmox-backup-client.git
cp proxmox-backup-client/0002-remove-apt-dependency.patch proxmox-backup
cp proxmox-backup-client/0001-adapt-cargo-toml-and-remove-systemd-linking.patch proxmox-backup
cd /usr/src/proxmox-backup
nano Cargo.toml
// change to this :
// proxmox = { path = "../proxmox/proxmox", features = [ "sortable-macro", "api-ma$" ] }
// proxmox-fuse = { path = "../proxmox-fuse" }
// pxar = { path = "../pxar", features = [ "tokio-io", "futures-io" ] }
patch --forward --strip=1 --input=0001-adapt-cargo-toml-and-remove-systemd-linking.patch
patch --forward --strip=1 --input=0002-remove-apt-dependency.patch
cargo build --release --bin proxmox-backup-client --bin pxar --bin dump-catalog-shell-cli
cd docs
BUILD_MODE=release make proxmox-backup-client.1 pxar.1
cd ..
cp target/release/proxmox-backup-client /usr/local/bin/proxmox-backup-client
cp target/release/pxar /usr/local/bin/pxar
cp docs/proxmox-backup-client.1 /usr/local/share/man/proxmox-backup-client.1
cp docs/pxar.1 /usr/local/share/man/pxar.1
cp debian/proxmox-backup-client.bc /usr/share/bash-completion/completions/proxmox-backup-client
cp debian/pxar.bc /usr/share/bash-completion/completions/pxar
 
Ther is a way to build PVE installer on arm64 ?
I try this :
https://github.com/kosmonavtika/docker-build-pve
Install docker acording to this : https://docs.docker.com/engine/install/debian/
Code:
apt-get update
apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io
shutdown -r now
then :
Code:
sudo -s
cd /usr/src
git clone https://github.com/kosmonavtika/docker-build-pve
cd docker-build-pve
./build.sh
You have to add some dependencies
Code:
nano Dockerfile
and add libtest-mockmodule-perl to # pve-common

But there is probleme with some dependencies
# pve-common : libproxmox-acme-perl
# libpve-http-server-perl : libpve-common-perl
# pve-qemu : libproxmox-backup-qemu0-dev
# pve-cluster : libpve-access-control libpve-common-perl pve-doc-generator
# pve-access-control (2/2) : libpve-common-perl libpve-cluster-perl pve-cluster pve-doc-generator
# librados2-perl : libpve-access-control
# pve-storage : libpve-common-perl librados2-perl pve-cluster
# pve-guest-common : libpve-cluster-perl libpve-common-perl libpve-storage-perl pve-cluster
# pve-ha-manager : libpve-access-control libpve-cluster-perl libpve-common-perl pve-cluster pve-doc-generator
# lxc : pve-libseccomp2.4-dev
# pve-container : libpve-cluster-perl libpve-common-perl libpve-guest-common-perl libpve-storage-perl lxc lxc-pve pve-cluster pve-doc-generator pve-firewall
# qemu-server : libpve-cluster-perl libpve-common-perl libpve-guest-common-perl libpve-storage-perl pve-cluster pve-doc-generator pve-firewall pve-qemu-kvm
# pve-manager : libproxmox-acme-perl libpve-access-control libpve-cluster-api-perl libpve-cluster-perl libpve-common-perl libpve-guest-common-perl libpve-http-server-perl libpve-storage-perl pve-cluster pve-container pve-doc-generator qemu-server
# pve-kernel : libpve-common-perl
# pve-installer : libpve-common-perl
 
cargo build --release --bin proxmox-backup-client --bin pxar --bin dump-catalog-shell-cli

Trying to build on arm64 (in lxd container, with debian/10 image).
The above step fails:

Code:
error: failed to run custom build command for `libudev-sys v0.1.4`

Caused by:
  process didn't exit successfully: `/usr/src/proxmox-backup/target/release/build/libudev-sys-3d2ad5a4e37df7ac/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=LIBUDEV_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=LIBUDEV_STATIC
cargo:rerun-if-env-changed=LIBUDEV_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"libudev\"`: No such file or directory (os error 2)"', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/libudev-sys-0.1.4/build.rs:38:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


Any ideas? :)
 
install the dev package for that library (libudev-dev)
 
ah, misread the error. you also need to have pkg-config installed
 
ah, misread the error. you also need to have pkg-config installed

Thank you. It went further but... there are now plenty of errors with proxmox-backup compilation... :-(

Code:
   Compiling proxmox-backup v1.0.6 (/usr/src/proxmox-backup)
error: additional properties not allowed on external type
   --> src/api2/tape/media.rs:239:17
    |
239 |                 flatten: true,
    |                 ^^^^^^^

error[E0432]: unresolved import `proxmox::api::ParameterSchema`
  --> src/server/rest.rs:29:5
   |
29 |     ParameterSchema,
   |     ^^^^^^^^^^^^^^^ no `ParameterSchema` in `api`

error[E0432]: unresolved import `proxmox::api::schema::ObjectSchemaType`
  --> src/server/rest.rs:36:5
   |
36 |     ObjectSchemaType,
   |     ^^^^^^^^^^^^^^^^
   |     |
   |     no `ObjectSchemaType` in `api::schema`
   |     help: a similar name exists in the module: `ObjectSchema`

error[E0432]: unresolved import `proxmox::tools::fd::BorrowedFd`
  --> src/pxar/dir_stack.rs:11:5
   |
11 | use proxmox::tools::fd::BorrowedFd;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `BorrowedFd` in `tools::fd`

error[E0432]: unresolved import `proxmox::api::router::ReturnType`
  --> src/api2/admin/datastore.rs:18:28
   |
18 | use proxmox::api::router::{ReturnType, SubdirMap};
   |                            ^^^^^^^^^^ no `ReturnType` in `api::router`

error[E0432]: unresolved import `proxmox::tools::future`
  --> src/client/http_client.rs:21:12
   |
21 |     tools::future::TimeoutFutureExt,
   |            ^^^^^^ could not find `future` in `tools`

error[E0425]: cannot find value `API_METHOD_LIST_CONTENT` in this scope
   --> src/api2/tape/media.rs:333:19
    |
56  | pub async fn list_media(pool: Option<String>) -> Result<Vec<MediaListEntry>, Error> {
    | --------- similarly named constant `API_METHOD_LIST_MEDIA` defined here
...
333 |             .get(&API_METHOD_LIST_CONTENT)
    |                   ^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `API_METHOD_LIST_MEDIA`

error[E0599]: no method named `or_timeout_err` found for struct `hyper::client::ResponseFuture` in the current scope
   --> src/client/http_client.rs:719:14
    |
719 |             .or_timeout_err(HTTP_TIMEOUT, format_err!("http request timed out"))
    |              ^^^^^^^^^^^^^^ method not found in `hyper::client::ResponseFuture`

error[E0599]: no method named `or_timeout_err` found for struct `hyper::client::ResponseFuture` in the current scope
   --> src/client/http_client.rs:637:14
    |
637 |             .or_timeout_err(HTTP_TIMEOUT, format_err!("http upgrade request timed out"))
    |              ^^^^^^^^^^^^^^ method not found in `hyper::client::ResponseFuture`

error[E0599]: no method named `or_timeout_err` found for struct `hyper::client::ResponseFuture` in the current scope
   --> src/client/http_client.rs:567:14
    |
567 |             .or_timeout_err(HTTP_TIMEOUT, format_err!("http download request timed out"))
    |              ^^^^^^^^^^^^^^ method not found in `hyper::client::ResponseFuture`

error[E0599]: no method named `into_raw_fd` found for type `i32` in the current scope
  --> src/tools/logrotate.rs:52:52
   |
52 |         let target = unsafe { File::from_raw_fd(fd.into_raw_fd()) };
   |                                                    ^^^^^^^^^^^ method not found in `i32`

error[E0599]: no method named `skip_to_end` found for struct `std::boxed::Box<dyn tape::tape_read::TapeRead>` in the current scope
   --> src/tape/drive/mod.rs:112:23
    |
112 |             if reader.skip_to_end()? != 0 {
    |                       ^^^^^^^^^^^ method not found in `std::boxed::Box<dyn tape::tape_read::TapeRead>`

error[E0599]: no method named `skip_to_end` found for struct `std::boxed::Box<dyn tape::tape_read::TapeRead>` in the current scope
   --> src/tape/drive/mod.rs:135:19
    |
135 |         if reader.skip_to_end()? != 0 {
    |                   ^^^^^^^^^^^ method not found in `std::boxed::Box<dyn tape::tape_read::TapeRead>`

error[E0599]: no method named `read_exact_or_eof` found for struct `std::io::BufReader<&mut std::fs::File>` in the current scope
   --> src/tape/media_catalog.rs:560:28
    |
560 |                 match file.read_exact_or_eof(&mut magic) {
    |                            ^^^^^^^^^^^^^^^^^ method not found in `std::io::BufReader<&mut std::fs::File>`

error[E0599]: no method named `read_exact_or_eof` found for struct `std::io::BufReader<&mut std::fs::File>` in the current scope
   --> src/tape/media_catalog.rs:573:24
    |
573 |             match file.read_exact_or_eof(&mut entry_type) {
    |                        ^^^^^^^^^^^^^^^^^ method not found in `std::io::BufReader<&mut std::fs::File>`

error[E0599]: no method named `read_exact_or_eof` found for type parameter `R` in the current scope
   --> src/tape/chunk_archive.rs:179:27
    |
179 |         match self.reader.read_exact_or_eof(data) {
    |                           ^^^^^^^^^^^^^^^^^ method not found in `R`

warning: unused import: `IntoRawFd`
 --> src/tools/logrotate.rs:3:36
  |
3 | use std::os::unix::io::{FromRawFd, IntoRawFd};
  |                                    ^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `AsRawFd`
 --> src/pxar/dir_stack.rs:2:25
  |
2 | use std::os::unix::io::{AsRawFd, RawFd};
  |                         ^^^^^^^

error: aborting due to 16 previous errors; 2 warnings emitted

Some errors have detailed explanations: E0425, E0432, E0599.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `proxmox-backup`.

To learn more, run the command again with --verbose.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!