diff --git a/createhdds.sh b/createhdds.sh index b17f36b..1b8b4ee 100755 --- a/createhdds.sh +++ b/createhdds.sh @@ -28,13 +28,24 @@ write /testfile "Hello, world!" _EOF_ echo "Creating disk_f21_minimal.img..." -# TODO: it should be possible to create updated image, but there is a bug, see https://bugzilla.redhat.com/show_bug.cgi?id=1084221 -# so you are required to manually boot this image and run 'yum -y update' -#virt-builder fedora-21 -o disk_f21_minimal.img --update --selinux-relabel --root-password password:weakpassword -virt-builder fedora-21 -o disk_f21_minimal.img --root-password password:weakpassword +virt-builder fedora-21 -o disk_f21_minimal.img --update --selinux-relabel --root-password password:weakpassword > /dev/null +expect <<_EOF_ +log_user 0 +set timeout -1 + +spawn qemu-kvm -m 2G -nographic disk_f21_minimal.img + +expect "localhost login:" +send "root\r" +expect "Password:" +send "weakpassword\r" +expect "~]#" +send "poweroff\r" +expect "reboot: Power down" +_EOF_ echo "Creating disk_ks.img..." -curl -o "/tmp/root-user-crypted-net.ks" "https://jskladan.fedorapeople.org/kickstarts/root-user-crypted-net.ks" +curl --silent -o "/tmp/root-user-crypted-net.ks" "https://jskladan.fedorapeople.org/kickstarts/root-user-crypted-net.ks" > /dev/null guestfish <<_EOF_ sparse disk_ks.img 100MB run