Skip to content

Commit 5788f1f

Browse files
committed
bump proxmox-backup to 3.3.2-2
1 parent bd6bc14 commit 5788f1f

4 files changed

Lines changed: 61 additions & 18 deletions

File tree

‎packages/proxmox-backup/patches/002-fix-qemu-cmdline.patch‎

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/pbs-buildcfg/src/lib.rs b/pbs-buildcfg/src/lib.rs
2-
index 3d087015b..ba3b5702a 100644
2+
index 3d087015..ba3b5702 100644
33
--- a/pbs-buildcfg/src/lib.rs
44
+++ b/pbs-buildcfg/src/lib.rs
55
@@ -53,8 +53,9 @@ macro_rules! PROXMOX_BACKUP_CACHE_DIR_M {
@@ -34,7 +34,7 @@ index 3d087015b..ba3b5702a 100644
3434
pub const PROXMOX_BACKUP_SUBSCRIPTION_FN: &str = configdir!("/subscription");
3535

3636
diff --git a/proxmox-file-restore/src/qemu_helper.rs b/proxmox-file-restore/src/qemu_helper.rs
37-
index 471010aa1..adea944d2 100644
37+
index e0e16911..b9ae95b5 100644
3838
--- a/proxmox-file-restore/src/qemu_helper.rs
3939
+++ b/proxmox-file-restore/src/qemu_helper.rs
4040
@@ -4,6 +4,7 @@ use std::io::prelude::*;
@@ -54,19 +54,17 @@ index 471010aa1..adea944d2 100644
5454
let initramfs = PathBuf::from(if debug {
5555
pbs_buildcfg::PROXMOX_BACKUP_INITRAMFS_DBG_FN
5656
} else {
57-
@@ -253,9 +254,8 @@ pub async fn start_vm(
58-
"chardev:log",
59-
"-vnc",
57+
@@ -255,7 +256,7 @@ pub async fn start_vm(
6058
"none",
61-
- "-enable-kvm",
59+
"-enable-kvm",
6260
"-kernel",
6361
- pbs_buildcfg::PROXMOX_BACKUP_KERNEL_FN,
6462
+ &pbs_buildcfg::PROXMOX_BACKUP_KERNEL_FN(),
6563
"-initrd",
6664
&ramfs_path,
6765
"-append",
68-
@@ -294,38 +294,56 @@ pub async fn start_vm(
69-
"file=pbs:repository={}{},,snapshot={},,archive={}{},read-only=on,if=none,id=drive{}",
66+
@@ -294,38 +295,64 @@ pub async fn start_vm(
67+
"driver=pbs,repository={}{},snapshot={},archive={}{},read-only=on,node-name=drive{}",
7068
details.repo, namespace, details.snapshot, file, keyfile, id
7169
));
7270
-
@@ -124,6 +122,14 @@ index 471010aa1..adea944d2 100644
124122
+ if arch == "loongarch64" {
125123
+ ram = 1024;
126124
+ }
125+
+
126+
+ let edk2_path = match arch {
127+
+ "loongarch64" => "/usr/share/pve-edk2-firmware/LOONGARCH64_VIRT_CODE.fd",
128+
+ "aarch64" => "/usr/share/pve-edk2-firmware/AAVMF_CODE.fd",
129+
+ "riscv64" => "/usr/share/pve-edk2-firmware/RISCV_VIRT_CODE.fd",
130+
+ _ => "/usr/share/pve-edk2-firmware/bios.fd",
131+
+ };
132+
+
127133
+
128134
// Try starting QEMU in a loop to retry if we fail because of a bad 'cid' value
129135
+ let qemu_bin = format!("qemu-system-{}", arch);
@@ -134,25 +140,20 @@ index 471010aa1..adea944d2 100644
134140
qemu_cmd.args(base_args.iter());
135141
qemu_cmd.arg("-m");
136142
qemu_cmd.arg(format!(
137-
@@ -346,6 +364,21 @@ pub async fn start_vm(
143+
@@ -346,6 +373,16 @@ pub async fn start_vm(
138144
qemu_cmd.arg("-mon");
139145
qemu_cmd.arg("chardev=qmp,mode=control");
140146

141147
+ // Use virt and tcg to start file-restore.
142-
+ // If pve run in neasted env ,this will be ok.
143-
+ // If you make sure that pve run on host, -accel kvm will be better!
144148
+ if arch != "x86_64" {
145149
+ qemu_cmd.arg("-M");
146150
+ qemu_cmd.arg("virt");
147-
+ qemu_cmd.arg("-accel");
148-
+ qemu_cmd.arg("tcg");
149151
+ qemu_cmd.arg("-cpu");
150152
+ qemu_cmd.arg("max");
151-
+ } else {
152-
+ qemu_cmd.arg("-accel");
153-
+ qemu_cmd.arg("kvm");
153+
+ qemu_cmd.arg("-bios");
154+
+ qemu_cmd.arg(format!("{}",edk2_path));
154155
+ }
155-
+
156+
+
156157
if debug {
157158
let debug_args = [
158159
"-chardev",
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
diff --git a/proxmox-file-restore/src/qemu_helper.rs b/proxmox-file-restore/src/qemu_helper.rs
2+
index b9ae95b5..3c6bea60 100644
3+
--- a/proxmox-file-restore/src/qemu_helper.rs
4+
+++ b/proxmox-file-restore/src/qemu_helper.rs
5+
@@ -254,7 +254,6 @@ pub async fn start_vm(
6+
"chardev:log",
7+
"-vnc",
8+
"none",
9+
- "-enable-kvm",
10+
"-kernel",
11+
&pbs_buildcfg::PROXMOX_BACKUP_KERNEL_FN(),
12+
"-initrd",
13+
@@ -308,16 +307,9 @@ pub async fn start_vm(
14+
drives.push("-device".to_owned());
15+
// drive serial is used by VM to map .fidx files to /dev paths
16+
let serial = file.strip_suffix(".img.fidx").unwrap_or(&file);
17+
- if arch == "x86_64" {
18+
- drives.push(format!(
19+
- "virtio-blk-pci,drive=drive{id},serial={serial},bus=bridge{bus}"
20+
- ));
21+
- } else {
22+
- drives.push(format!(
23+
- // We use virtio-blk-device because QEMU will automatically assigns PCI addresses.
24+
- "virtio-blk-device,drive=drive{id},serial={serial}"
25+
- ));
26+
- }
27+
+ drives.push(format!(
28+
+ "virtio-blk-pci,drive=drive{id},serial={serial}"
29+
+ ));
30+
id += 1;
31+
}
32+
33+
@@ -382,6 +374,8 @@ pub async fn start_vm(
34+
qemu_cmd.arg("-bios");
35+
qemu_cmd.arg(format!("{}",edk2_path));
36+
}
37+
+ qemu_cmd.arg("-accel");
38+
+ qemu_cmd.arg("kvm");
39+
40+
if debug {
41+
let debug_args = [
Submodule proxmox-backup updated from 2fab915 to 961c81b

‎packages/proxmox-backup/series‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
patches/002-fix-qemu-cmdline.patch
2+
patches/004-Optimize-the-qemu-command-line.patch

0 commit comments

Comments
 (0)