]> git.proxmox.com Git - qemu-server.git/commitdiff
vzdump: fix template backup to stdout
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 6 May 2020 09:56:33 +0000 (11:56 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 6 May 2020 12:23:04 +0000 (14:23 +0200)
redirecting to the saved STDOUT in case of a template backup or a VM
without any disks failed because of the erroneous '=':

Backup of VM 123123 failed - command '/usr/bin/vma create -v -c [...]' failed:
Bad filehandle: =5 at /usr/share/perl/5.28/IPC/Open3.pm line 58.

https://forum.proxmox.com/threads/vzdump-to-stdout.69364

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/VZDump/QemuServer.pm

index f122539fa90a1a949f4aa86f0a902143ce8bf8f8..3a990cfb7c02af949f1cb4358c77b8ac929440a5 100644 (file)
@@ -518,7 +518,7 @@ sub archive_vma {
        $self->loginfo(join(' ', @$cmd));
 
        if ($opts->{stdout}) {
-           $self->cmd($cmd, output => ">&=" . fileno($opts->{stdout}));
+           $self->cmd($cmd, output => ">&" . fileno($opts->{stdout}));
        } else {
            $self->cmd($cmd);
        }