-Make basic modifications for ESX4
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3589 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
85d25c6549
commit
17546f5bca
27
xCAT-server/esx.esx4.tmpl
Normal file
27
xCAT-server/esx.esx4.tmpl
Normal file
@ -0,0 +1,27 @@
|
||||
install url http://#TABLE:noderes:$NODE:nfsserver#/install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch#
|
||||
timezone --utc "#TABLE:site:key=timezone:value#"
|
||||
#vmserialnum --esx=todo-prod-key-here
|
||||
keyboard us
|
||||
#firewall --disable
|
||||
rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#
|
||||
auth --enableshadow --enablemd5
|
||||
clearpart --firstdisk --overwritevmfs yes
|
||||
autopart --firstdisk
|
||||
network --addvmportgroup=true --device=#TABLE:noderes:$NODE:primarynic# --bootproto=dhcp
|
||||
|
||||
#VMware specific
|
||||
accepteula
|
||||
#Server Based:
|
||||
#Standard License Type
|
||||
#vmlicense --mode=server --server=27000@192.168.0.25 -edition=esxFull
|
||||
#Starter License Type
|
||||
#vmlicense --mode=server --server=27000@192.168.0.25 -edition=esxExpress
|
||||
#File Based:
|
||||
#Place the content of the lincese file
|
||||
#in a single line in the %vmlicense_text section
|
||||
#vmlicense --mode=file
|
||||
|
||||
%pre
|
||||
#INCLUDE:../scripts/pre.rh#
|
||||
%post
|
||||
#INCLUDE:../scripts/post.esx4#
|
@ -509,20 +509,40 @@ sub mkinstall
|
||||
);
|
||||
next;
|
||||
}
|
||||
my $installdir="/install"; #TODO: not hardcode installdir
|
||||
my $tftpdir = "/tftpboot";
|
||||
|
||||
# create the node-specific post scripts
|
||||
#mkpath "/install/postscripts/";
|
||||
#xCAT::Postage->writescript($node,"/install/postscripts/".$node, "install", $callback);
|
||||
my $kernpath;
|
||||
my $initrdpath;
|
||||
my $maxmem;
|
||||
|
||||
if (
|
||||
(
|
||||
$arch =~ /x86/
|
||||
and -r "/install/$os/$arch/images/pxeboot/vmlinuz"
|
||||
and -r "/install/$os/$arch/images/pxeboot/initrd.img"
|
||||
)
|
||||
or ( $arch =~ /ppc/
|
||||
and -r "/install/$os/$arch/ppc/ppc64/vmlinuz"
|
||||
and -r "/install/$os/$arch/ppc/ppc64/ramdisk.image.gz")
|
||||
$arch =~ /x86/ and
|
||||
(
|
||||
-r "$installdir/$os/$arch/images/pxeboot/vmlinuz"
|
||||
and $kernpath = "$installdir/$os/$arch/images/pxeboot/vmlinuz"
|
||||
and -r "$installdir/$os/$arch/images/pxeboot/initrd.img"
|
||||
and $initrdpath = "$installdir/$os/$arch/images/pxeboot/initrd.img"
|
||||
) or ( #Handle the case seen in VMWare 4.0 ESX media
|
||||
#In VMWare 4.0 they dropped the pxe-optimized initrd
|
||||
#leaving us no recourse but the rather large optical disk
|
||||
#initrd, but perhaps we can mitigate with gPXE
|
||||
-d "$installdir/$os/$arch/VMware"
|
||||
and -r "$installdir/$os/$arch/isolinux/vmlinuz"
|
||||
and $kernpath ="$installdir/$os/$arch/isolinux/vmlinuz"
|
||||
and -r "$installdir/$os/$arch/isolinux/initrd.img"
|
||||
and $initrdpath = "$installdir/$os/$arch/isolinux/initrd.img"
|
||||
and $maxmem="512M" #Have to give up linux room to make room for vmware hypervisor evidently
|
||||
)
|
||||
) or ( $arch =~ /ppc/
|
||||
and -r "$installdir/$os/$arch/ppc/ppc64/vmlinuz"
|
||||
and $kernpath = "$installdir/$os/$arch/ppc/ppc64/vmlinuz"
|
||||
and -r "$installdir/$os/$arch/ppc/ppc64/ramdisk.image.gz"
|
||||
and $initrdpath = "$installdir/$os/$arch/ppc/ppc64/ramdisk.image.gz")
|
||||
)
|
||||
{
|
||||
|
||||
@ -530,30 +550,8 @@ sub mkinstall
|
||||
unless ($doneimgs{"$os|$arch"})
|
||||
{
|
||||
mkpath("/tftpboot/xcat/$os/$arch");
|
||||
if ($arch =~ /x86/)
|
||||
{
|
||||
copy("/install/$os/$arch/images/pxeboot/vmlinuz",
|
||||
"/tftpboot/xcat/$os/$arch/");
|
||||
copy("/install/$os/$arch/images/pxeboot/initrd.img",
|
||||
"/tftpboot/xcat/$os/$arch/");
|
||||
}
|
||||
elsif ($arch =~ /ppc/)
|
||||
{
|
||||
copy("/install/$os/$arch/ppc/ppc64/vmlinuz",
|
||||
"/tftpboot/xcat/$os/$arch/");
|
||||
copy("/install/$os/$arch/ppc/ppc64/ramdisk.image.gz",
|
||||
"/tftpboot/xcat/$os/$arch/initrd.img");
|
||||
}
|
||||
else
|
||||
{
|
||||
$callback->(
|
||||
{
|
||||
error => ["Can not handle architecture $arch"],
|
||||
errorcode => [1]
|
||||
}
|
||||
);
|
||||
next;
|
||||
}
|
||||
copy($kernpath,"$tftpdir/xcat/$os/$arch");
|
||||
copy($initrdpath,"$tftpdir/xcat/$os/$arch/initrd.img");
|
||||
$doneimgs{"$os|$arch"} = 1;
|
||||
}
|
||||
|
||||
@ -583,6 +581,9 @@ sub mkinstall
|
||||
. $ent->{nfsserver}
|
||||
. "/install/autoinst/"
|
||||
. $node;
|
||||
if ($maxmem) {
|
||||
$kcmdline.=" mem=$maxmem";
|
||||
}
|
||||
if ($ent->{installnic})
|
||||
{
|
||||
$kcmdline .= " ksdevice=" . $ent->{installnic};
|
||||
|
Loading…
Reference in New Issue
Block a user