Created
October 13, 2017 19:39
-
-
Save tom-code/1ddb6c4e5bb3ade5a761c073211bca29 to your computer and use it in GitHub Desktop.
edit qcow
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-nbd --connect=/dev/nbd1 CentOS-7-x86_64-GenericCloud.qcow2 | |
mount /dev/nbd1p1 /mnt/ | |
sed -i -e 's/root:!!:/root::/g' /mnt/etc/shadow | |
rm /mnt/etc/sysconfig/network-scripts/ifcfg-eth0 | |
umount /mnt/ | |
qemu-nbd -d /dev/nbd1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment