I tried the following command, but only an empty file is created on the target and the command stays open
qemu-img convert -f raw -O vmdk /dev/sda1 - | ssh foo@bar "cat > /home/foo/foobar.vmdk"
Note: sshfs
is not available.
I tried the following command, but only an empty file is created on the target and the command stays open
qemu-img convert -f raw -O vmdk /dev/sda1 - | ssh foo@bar "cat > /home/foo/foobar.vmdk"
Note: sshfs
is not available.
You want to use tee
instead of cat
.
tee - read from standard input and write to standard output and files
qemu-img convert -f raw -O vmdk /dev/sda1 - | ssh foo@bar "tee /home/foo/foobar.vmdk > /dev/null"