Skip to content

Instantly share code, notes, and snippets.

@tom-code
Created October 13, 2017 19:39
Show Gist options
  • Save tom-code/1ddb6c4e5bb3ade5a761c073211bca29 to your computer and use it in GitHub Desktop.
Save tom-code/1ddb6c4e5bb3ade5a761c073211bca29 to your computer and use it in GitHub Desktop.
edit qcow
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