diff --git a/compute_create b/compute_create index 021a14bb9377c76fbd4b5008e2d484c0a0ce2036..644b75f2107121b32d8e00b143322aef11beb89a 100755 --- a/compute_create +++ b/compute_create @@ -9,8 +9,18 @@ nodename="$1" -VBoxManage createvm --name "$nodename" --register +# Ensure that the $HOME/iso directory exists +if [[ ! -d "$HOME/iso" ]]; then + mkdir ~/iso +fi + +# Download the ipxe.iso boot image if it doesn't already exist +if [[ ! -f "$HOME/iso/ipxe.iso" ]]; then + echo "Downloading the network boot ipxe.iso file" + wget -O ~/iso/ipxe.iso http://boot.ipxe.org/ipxe.iso +fi +VBoxManage createvm --name "$nodename" --register VBoxManage modifyvm "$nodename" --memory 4096 --nic1 intnet --intnet1 compute --nictype1=82540EM --rtcuseutc on