mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-21 18:03:56 +03:00
vzdump: tpmstate: escape drive string
the volume path could contain escaped ":" or ",", which means their '\' needs to be escaped another time for passing to HMP. the same approach is used for hotplugging regular drives in PVE::QemuServer, and is needed (at least) for RBD storages with IPv6 monhosts or an explicit monhost port. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
39b56b169a
commit
93e3f756c4
@ -442,6 +442,7 @@ my $attach_tpmstate_drive = sub {
|
||||
$self->loginfo('attaching TPM drive to QEMU for backup');
|
||||
|
||||
my $drive = "file=$task->{tpmpath},if=none,read-only=on,id=drive-tpmstate0-backup";
|
||||
$drive =~ s/\\/\\\\/g;
|
||||
my $ret = PVE::QemuServer::Monitor::hmp_cmd($vmid, "drive_add auto \"$drive\"");
|
||||
die "attaching TPM drive failed\n" if $ret !~ m/OK/s;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user