Hi,
I'm currently converting my kickstart scripts from 3.5U4 to 4.0.
I installed the first server with only one LUN visible by the installer, our ESX hosts being booted from SAN. So far so good, I was able to install that server just fine.
Here's my KS file :
VMware ESX4 template Kickstart file
VMware Specific Commands
vmaccepteula
install url ftp://XX.XX.XX.XX/VMware/ESX40/Source/164009/
Timezone
timezone --utc 'Canada/Eastern'
Keyboard
keyboard us
Unencrypted root password: password
auth --enableshadow --enablemd5
rootpw iscrypted---
Reboot after install
reboot
Network install type
network --device=vmnic0 --bootproto=static --ip=XX.XX.XX.XX --netmask=255.255.255.0 --gateway=XX.XX.XX.XX --nameserver=XX.XX.XX.XX --hostname=XXXXXXXX --addvmportgroup=0
Firewall settings
firewall --disabled
BootLoader ( The user has to use grub by default )
#bootloader --location=mbr --driveorder=sda
Clear Partitions
clearpart --overwritevmfs --drives=sda
Manual Paritioning
part /boot --fstype=ext3 --size=260 --ondisk=sda
part swap --fstype=swap --size=1600 --ondisk=sda
part None --fstype=vmkcore --size=100 --ondisk=sda
part LocalStorage --fstype=vmfs3 --size=15360 --grow --ondisk=sda
virtualdisk 'ESXConsole' --size=10240 --onvmfs=LocalStorage
part / --fstype=ext3 --size=5120 --onvirtualdisk=ESXConsole
part /tmp --fstype=ext3 --size=1024 --onvirtualdisk=ESXConsole
part /var --fstype=ext3 --size=2048 --onvirtualdisk=ESXConsole
--
This script works fine with a new disk, that is, a fresh LUN with no previous ESX installation. When I try to reinstall a server, I'm getting this error message prior to the partitionning : error:[ftp://XX.XX.XX.XX/VMware/smvirt42.cfg:line|ftp://xx.xx.xx.xx/VMware/smvirt42.cfg:line] 37: vmfs volume already exist. Installation aborded
If I remove the overwritevmfs option from clearpart, the installer says that the partition 1 is vmfs so it can't remove that partition. The added --overwritevmfs should do the trick but clearly it doesn't.
Anyone have an idea why this isn't working?
Thanks in advance!
Mario
Anyone have an idea, or should I call VMware support?
Thanks!
Mario
yes I wish someone would answer this question as well. As I am having the same problem with disk partitioning and Kickstart. It states in the manual we can use /dev/sda when I try it kickstart says no so what is the proper setting for this
clearpart --overwritevmfs --drives=/dev/sda,/dev/sdb
or
clearpart --overwritevmfs --drives=sda,sdb
if neither is right then please tell us how to do this.... !!!!!!!!!!
Have you tried with the partition number included sda1?
No I have not tried that but I would assume when formating you would do the entire partition as we are not defining a specfic partition number as you state sda1 I will give it a try my question still stands is how should it be written /dev/sda or just sda
thanks for the feed back I would have thought this would be a hot topic but there is not a lot of info out there and of course the manual only gives very open statements not very help full. I wish I understood it more I would create a post with examples of each type of Drive so it would help everyone...
Thanks..
We have HP servers and this part of the script is written like this:
clearpart --all --initlabel --drives=cciss/c0d0
Hi thanks for that info we also have HP Servers,
Oh just to confirm using /dev/sda1 is no good either as I thought the partition was not created.
Your idea sounds good let me give that a try.
Let me also explain and maybe you might have to decent feedback on this...
We have over 300 hosts throught out the enterprise running 3.5.u4 and need to upgrade them all to vSphere at present we have a configuration of
4 x 72GB drives 2 in one array and 2 in another array
On the first array sda we are loading /boot and vmkcore the rest ends up being a VMFS storage for templates
on the second array sdb we have it configured as a vmfs store for the esxconsole configured the following way.
/ 10GB
swap 1.6gb
var 10Gb
home 4gb
opt 4gb
tmp 4gb
public 20 gb this is where we house our scripts and anything else we need to move around our hosts. tried to make it bigger but once in the VC it set an alarm as I had used up over 75% of the disk so backed off to 20gb
Just trying to get this configured as we will not be upgrading our hosts we will do a clean install and perserve the datastores. Have done the upgrade already and found it very upsetting easier to just do a fresh install.
I would like to hear yours or anyone else feed back on my above configurations or any other ideas.
Thanks very much ...
We put our templates and scripts on shared storage so that the are accessible to all of the hosts. For scripts that we run (vSwitch configs) after the ks install and a reboot the scripts are copied down from the shared storage change the permissions on them and then run. There are other (probably better) ways but this is what we are doing for now.
For the upgrades there is a host upgrade utility in vSphere that you can also use. It can automate the upgrades of the hosts in your cluster for you. Just make sure everything is ready on the VMs first so that they can be moved off of the hosts when VC tries to put the host in maintenance mode.
As with everything test it first.
Hey thanks for the feedback. I have done the vSphere upgrade on my dev boxes and found it was a very crude way to upgrade the servers plus it left a lot of junk behind even after we ran the clean up script.
Wel my problem still stands you idea about urnning clearpart --all --initlabel --drives-cciss/c0d0,cciss/c0d1
came back with they do not exist.
Now we are running a HP 370 G6 with Iscsi drives so my next move is to find what HP calls there drives fun fun fun.
I am about to call VMware and find out what is going on here.
Thanks again
Looking for the iscsi? Are you using the software initiator? If so go to the storage adapters tab and highlight the iscsi then go to properties down below click the configuration button and check the enabled box. then rescan the iscsi hba
Sorry I am trying to configure this in the kickstart file so when the server boots and I point the install to the usb ks.cfg that will first clear all the partitions then create the partitions I have listed before.
According to the manual and the suggested examples for disk device names I have not found one that works yet just tried /dev/cciss/c0d0,/dev/cciss/c0d1 and it comes back that neither exist so I am going to have to call vmware and find out what they are talking about once I do I will post it back here.
Thanks for your feedback...
Ours don't use the /dev
On Nov 4, 2009, at 11:59 AM, richG <communities-emailer@vmware.com
richG,
Did you find a solution and/or hear back from VMware? I'm running into the same issue but on Dell. Not able to find "/dev/sda" or just "sda" during the ks install.
Thanks!
Hi PTO,
No the problem is still there for me, I was able to get it to work with a Hp G5 and G4 but not a G6. Vmware was not very helpful either and when I tried HP I was told they do not support Kickstart. I do have a request into HP directly, but I am not expecting much back. I have spoken to a contact in the UK and he was able to help with some of it. Sorry I do not have the info right in front of me but in the manual look at the table and use the mpx/dev/sda
that worked for me just not sure if I typed it right for you..
let me know how u go and if typed wrong I will go back through my kickstart file and find it for you..
good luck
Hi PTO,
I did mange to pull up my script here is the way I got it to work on my G4-G5 granted they are HP servers but this should work with Dell
clearpart --drives=mpx.vmhba0:C0:T0:L0
This worked fine for me..
richG,
Thanks for the info! Are you booting from SAN?
I'm testing using:
clearpart overwritevmfs *firstdisk*
part '/boot' --fstype=ext3 size=1100 *onfirstdisk*
It appears to have gotten past the partitioning now. I'm just waiting on the install to finish to verify. It seems to take awhile to transfer all of the packages. Maybe just a DRAC/Virtual Media issue but seems to take longer than my 3.5 build.
Thanks again richG!
Hi PTO,
No we are booting directly off the main drives. From start to finish mine took about 15-20mins to complete. I was using a DVD and my KS script was on a usb thumb drive. Let me know how you go I gotten my nics, vswitches working and a few other things all done through the script. Like I said earlier Mike L from RTFM in the UK helped me a lot..
Thanks...