Created
April 26, 2018 15:03
-
-
Save bjgill/cb83a4e872d1ddb3a1bf532a5858bc9e to your computer and use it in GitHub Desktop.
Patching a qcow2
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
qemu-img convert image.qcow2 image.raw | |
sudo kpartx -av image.raw | |
mkdir temp | |
sudo mount /dev/mapper/loop0p2 temp | |
... | |
sudo umount temp | |
sudo kpartx -dv /dev/loop0 | |
qemu-img convert -c -f raw -O qcow2 image.raw image-patched.qcow2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment