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
yum install -y libguestfs-tools | |
virt-filesystems --long -h --all -a rhev-m.init.qcow2 | |
truncate -r rhev-m.init.qcow2 rhev-m.qcow2 | |
truncate -s +100G rhev-m.qcow2 | |
virt-resize --expand /dev/sda1 rhev-m.init.qcow2 rhev-m.qcow2 | |
virt-customize -a rhev-m.qcow2 --root-password password:<pass> | |
virt-customize -a rhev-m.qcow2 --run-command 'yum remove -y cloud-init' | |
virt-customize -a rhev-m.qcow2 --run-command 'sed -i s/^PasswordAuthentication.*/PasswordAuthentication\ yes/ /etc/ssh/sshd_config' | |
virt-customize -a rhev-m.qcow2 --run-command 'sed -i s/^PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config' |