# packages and run commands in the target system.
#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
#d-i preseed/late_command string wget -O/target/tmp/initial_setup http://git.debian.org/?p=pkg-exppsy/neurodebian.git;a=blob_plain;f=vm/d-i/tools/initial_setup;hb=HEAD; \
-d-i preseed/late_command string wget -O/target/tmp/initial_setup http://hydra.dartmouth.edu/d-i/tools/initial_setup ; \
+d-i preseed/late_command string wget -O/target/tmp/initial_setup http://head1.hydra.dartmouth.edu/d-i/tools/initial_setup ; \
in-target /bin/bash /tmp/initial_setup
# XXX here get/call nd_setupguestos ?
#iso=debian-squeeze-di-beta1-amd64-businesscard.iso
iso=debian-6.0.1a-${ARCH:=amd64}-businesscard.iso
di_cd=$(readlink -f $PWD/../../../neurodebian-images/$iso)
-di_host=hydra.dartmouth.edu # where to look for di preseed
+di_host=head1.hydra.dartmouth.edu # where to look for di preseed
build_dir=$PWD/build
dist_dir=$PWD/dist
#vm_disk="$build_dir/nd-${vm_version}_${vm_arch}.vdi"
vm_disk="$build_dir/${vm_fprefix}.vdi"
vm_name="${vendor} ${vm_version} ${vm_arch_name}"
-vm_ovf="${dist_dir}/${vm_fprefix}.ovf"
+# Let's use OVA since 4.x
+# vm_ovf="${dist_dir}/${vm_fprefix}.ovf"
+vm_ova="${dist_dir}/${vm_fprefix}.ova"
product_name="${vendor} VirtualMachine (${vm_arch})"
_info() {
_info Exporting the appliance
-VBoxManage export "${vm_name}" -o "$vm_ovf" \
+VBoxManage export "${vm_name}" -o "$vm_ova" \
--vsys 0 \
--product "${product_name}" \
--producturl "${product_url}" \
clean_buildvm
_info Testing import of the appliance
-VBoxManage import "$vm_ovf" --vsys 0 --eula accept
+VBoxManage import "$vm_ova" --vsys 0 --eula accept
_info Starting imported machine
VBoxManage startvm "${vm_name}"