vzdump kvm guest clone with stdout parameter,run error

ebiss

Renowned Member
May 2, 2012
181
0
81
# pveversion -v
pve-manager: 2.1-1 (pve-manager/2.1/f9b0f63a)
running kernel: 2.6.32-11-pve
proxmox-ve-2.6.32: 2.0-66
pve-kernel-2.6.32-11-pve: 2.6.32-66
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.3-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.8-3
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.7-2
pve-cluster: 1.0-26
qemu-server: 2.0-39
pve-firmware: 1.0-15
libpve-common-perl: 1.0-27
libpve-access-control: 1.0-21
libpve-storage-perl: 2.0-18
vncterm: 1.0-2
vzctl: 3.0.30-2pve5
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.0-9
ksm-control-daemon: 1.1-1



# vzdump 20156 --dumpdir /tmp --mode snapshot
INFO: starting new backup job: vzdump 20156 --dumpdir /tmp --mode snapshot
INFO: Starting Backup of VM 20156 (qemu)
INFO: status = running
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: Logical volume "vzsnap-proxmox20151-0" created
INFO: creating archive '/tmp/vzdump-qemu-20156-2012_05_02-16_14_27.tar'
INFO: adding '/tmp/vzdump-qemu-20156-2012_05_02-16_14_27.tmp/qemu-server.conf' to archive ('qemu-server.conf')
INFO: adding '/mnt/vzsnap0/images/20156/vm-20156-disk-1.raw' to archive ('vm-disk-virtio0.raw')
INFO: Total bytes written: 3649743872 (22.45 MiB/s)
INFO: archive file size: 3.40GB
INFO: Finished Backup of VM 20156 (00:02:39)
INFO: Backup job finished successfully

# vzdump 20156 --mode snapshot --stdout | qmrestore - 20158 -unique
no such vzdump option 'stdout'
extracting archive from STDIN
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
starting cleanup
command 'zcat -f|tar xf - '--to-command=/usr/lib/qemu-server/qmextract'' failed: exit code 2

Does it not support kvm vzdump to stdout ?
Proxmox VE is great ,thanks for the works~
 
Thanks response so quick.

# vzdump 20156 --mode snapshot --stdout | qmrestore - 20158 -unique
extracting archive from STDIN
can't use storage for backups - wrong content type
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
starting cleanup
command 'zcat -f|tar xf - '--to-command=/usr/lib/qemu-server/qmextract'' failed: exit code 2

# vzdump 20156 --dumpdir /tmp --mode snapshot --stdout | qmrestore - 20158 -unique
extracting archive from STDIN
INFO: starting new backup job: vzdump 20156 --dumpdir /tmp --mode snapshot
INFO: Starting Backup of VM 20156 (qemu)
INFO: status = running
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: Logical volume "vzsnap-proxmox20151-0" created
INFO: sending archive to stdout
INFO: adding '/tmp/vzdump-qemu-20156-2012_05_02-19_32_22.tmp/qemu-server.conf' to archive ('qemu-server.conf')
INFO: adding '/mnt/vzsnap0/images/20156/vm-20156-disk-1.raw' to archive ('vm-disk-virtio0.raw')
extracting 'qemu-server.conf' from archive
extracting 'vm-disk-virtio0.raw' from archive
Formatting '/var/lib/vz/images/20158/vm-20158-disk-1.raw', fmt=raw size=32768
new volume ID is 'local:20158/vm-20158-disk-1.raw'
restore data to '/var/lib/vz/images/20158/vm-20158-disk-1.raw' (17179869184 bytes)

seem hang at here...

pve2.png
pve.png
 
shutdown guest then use "stop backup mode"

# vzdump 20157 --dumpdir /tmp --mode stop --stdout | qmrestore - 20158 -unique
extracting archive from STDIN
INFO: starting new backup job: vzdump 20157 --dumpdir /tmp --mode stop
INFO: Starting Backup of VM 20157 (qemu)
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: sending archive to stdout
INFO: adding '/tmp/vzdump-qemu-20157-2012_05_02-22_53_03.tmp/qemu-server.conf' to archive ('qemu-server.conf')
INFO: adding '/var/lib/vz/images/20157/vm-20157-disk-1.raw' to archive ('vm-disk-virtio0.raw')
extracting 'qemu-server.conf' from archive
extracting 'vm-disk-virtio0.raw' from archive
Formatting '/var/lib/vz/images/20158/vm-20158-disk-1.raw', fmt=raw size=32768
new volume ID is 'local:20158/vm-20158-disk-1.raw'
restore data to '/var/lib/vz/images/20158/vm-20158-disk-1.raw' (17179869184 bytes)
INFO: Total bytes written: 3650575360 (30.27 MiB/s)
INFO: Finished Backup of VM 20157 (00:01:56)
INFO: Backup job finished successfully
17179869184 bytes copied, 79 s, 207.39 MiB/s




So the title should be "In snapshot mode ,vzdump kvm guest clone with stdout parameter, run error"