From 5ef85a9a27bb3e80fb5b9c40bbaf48f0f74b1d40 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 6 Oct 2011 12:50:36 +0000 Subject: [PATCH] A basic hypervisor template, warrants fleshing out for ipv6 and ssh and other fun toys git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10709 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/install/esxi/hypervisor.tmpl | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 xCAT-server/share/xcat/install/esxi/hypervisor.tmpl diff --git a/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl b/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl new file mode 100644 index 000000000..af907fda0 --- /dev/null +++ b/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl @@ -0,0 +1,44 @@ +# Accept the VMware End User License Agreement +vmaccepteula + +# Set the root password for the DCUI and Tech Support Mode +rootpw --iscrypted #CRYPT:passwd:key=vmware,username=root:password# + +# clear all partitions. +#clearpart --alldrives --overwritevmfs +# Choose the first disk (in channel/target/lun order) to install onto +install --firstdisk --overwritevmfs + +# Set the network to DHCP on the first network adapter +#network --bootproto=dhcp --device=vmnic0 +network --bootproto=dhcp + +# reboot automatically when we're done. +reboot + +%pre --interpreter=busybox +# in post section, resolv.conf is blown away, back it up for now +while ! grep nameserver /etc/resolv.conf; do + sleep 1 +done +cp /etc/resolv.conf /etc/resolv.conf.xcat + +%post --interpreter=busybox --ignorefailure=true + +# tell xCAT management server we are done installing +# have to put in the IP address instead of the hostname because VMware +# ESXi 4.1 can not resolve IP addresses... +cp /etc/resolv.conf.xcat /etc/resolv.conf +localcli network firewall unload +for param in `vsish -e cat /system/bootCmdLine|grep weasel`; do + if [ ${param%=*} = "ks" ]; then + param=${param#*//} + param=${param%%/*} + xcatd=$param + fi +done +echo -e "\nnextdestiny\n" | /bin/openssl s_client -quiet -connect $xcatd:3001 2>&1 | tee /tmp/foo.log + +%firstboot --interpreter=busybox +# enable SSH on next boot.... +