mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-04-28 12:50:53 +00:00
file-restore: fix -blockdev regression with namespaces or encryption
QEMU CLI option parsing requires doubling the commas for values, this seems to be also used when a combined option is used to pass down the key=value pairs to the internal options, like for the combined -drive option that was replaced by the slightly lower-level blockdev option in commit668b8383
("file restore: qemu helper: switch to more modern blockdev option for drives"). So there we now could drop the comma duplication as blockdev directly interprets these options, thus no need for escaping the comma. We missed two instances because they were not part of the "main" format string, which broke some use cases. Fixes:668b8383
("file restore: qemu helper: switch to more modern blockdev option for drives") Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Tested-by: Mira Limbeck <m.limbeck@proxmox.com> [ TL: add more context, but it's a bit guesstimation ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
c676439a15
commit
34fbf1a809
@ -281,14 +281,14 @@ pub async fn start_vm(
|
||||
}
|
||||
drives.push("-blockdev".to_owned());
|
||||
let keyfile = if let Some(ref keyfile) = details.keyfile {
|
||||
format!(",,keyfile={keyfile}")
|
||||
format!(",keyfile={keyfile}")
|
||||
} else {
|
||||
"".to_owned()
|
||||
};
|
||||
let namespace = if details.namespace.is_root() {
|
||||
String::new()
|
||||
} else {
|
||||
format!(",,namespace={}", details.namespace)
|
||||
format!(",namespace={}", details.namespace)
|
||||
};
|
||||
drives.push(format!(
|
||||
"driver=pbs,repository={}{},snapshot={},archive={}{},read-only=on,node-name=drive{}",
|
||||
|
Loading…
Reference in New Issue
Block a user