#!/bin/bash set -x # Create a minimal kickstart file cat << EOF > fed.ks install text reboot lang en_US.UTF-8 keyboard us network --bootproto dhcp rootpw testpwd firewall --enabled --ssh selinux --enforcing timezone --utc America/New_York bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH" zerombr clearpart --all --initlabel autopart %packages @core %end EOF # Create a qcow2 disk image $ /usr/bin/qemu-img create -f qcow2 -o preallocation=metadata $diskimage 20G # Run the guest /usr/bin/virt-install --connect=qemu:///system \ --network=bridge:virbr0 \ --initrd-inject=./fed.ks \ --extra-args="ks=file:/fed.ks console=tty0 console=ttyS0,115200 serial rd_NO_PLYMOUTH root=live:http://dl.fedoraproject.org/pub/alt/stage/17-Alpha.RC4/Fedora/x86_64/os/LiveOS/squashfs.img" \ --name=f17test \ --disk path=/var/lib/libvirt/images/f17tst.cow2,format=qcow2 \ --ram 2048 \ --vcpus=2 \ --check-cpu \ --hvm \ --location=http://dl.fedoraproject.org/pub/alt/stage/17-Alpha.RC4/Fedora/x86_64/os/ \ --nographics