Created
May 29, 2013 18:07
-
-
Save d6e/5672381 to your computer and use it in GitHub Desktop.
For modifying VMs
This file contains hidden or 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
#!/bin/bash | |
set -x | |
ls /etc/libvirt/qemu/ | grep ".xml" | sed s/.xml// > vm-names.txt | |
for name in $(cat vm-names.txt); do | |
# dumping xml files | |
virsh dumpxml $name > ${name}.xml | |
# editing | |
cat ${name}.xml | sed s/2097152/1097152/ | |
# importing xml files | |
virsh define ${name}.xml | |
virsh start $name | |
rm ${name}.xml | |
done | |
rm vm-names.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment