Last active
November 19, 2019 16:59
-
-
Save riblo/3001369c81739f31af856a612e9de01a to your computer and use it in GitHub Desktop.
Proxmox/KVM images conversions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# qcow2 -> qcow2compress | |
qemu-img convert -O qcow2 -c vm-103-disk-0.qcow2 vm-103-disk-0-comp.qcow2 | |
# lvm-thin -> qcow2 | |
qemu-img convert -O qcow2 /dev/lvm-thin/vm-103-disk-1 vm-103-disk-1.qcow2 | |
# lvm-thin -> qcow2compress oneline | |
qemu-img convert -O qcow2 -c $(pvesm path lvm-thin:vm-103-disk-1) vm-103-disk-1.qcow2 | |
# qcow2 -> raw | |
qemu-img convert -f qcow2 -O raw vm-103-disk-0.qcow2 vm-103-disk-0.raw | |
# raw -> ceph RBD storage | |
rbd --image-format 2 import vm-103-disk-0.raw cephrbd/vm-103-disk-0 | |
# raw/qcow2 -> local-lvm storage | |
qm importdisk 201 vm-201-disk-0.raw local-lvm | |
# ceph RBD -> raw | |
rbd export cephrbd/vm-100-disk-0 /tmp/vm-100-disk-0.raw | |
# raw -> local-lvm | |
qm importdisk 100 /tmp/vm-100-disk-0.raw local-lvm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment