VMware Cloud Community
xooops
Contributor
Contributor

create partitions by ks.cfg

Hello community

I try to install ESX 4 with option “Installing ESX Using Scripted Mode”.

I would like separate the esxconsole data store from the virtual machine data store. This my current configurations ks.cfg file.

Part section

part 'none' --fstype=vmkcore --size=110 --onfirstdisk

part 'Datastore1' --fstype=vmfs3 --size=30720 --onfirstdisk

virtualdisk 'esxconsole' --size=16967 --onvmfs='Datastore1' --path=esxconsole/esxconsole-#servername#.vmdk

part 'swap' --fstype=swap --size=1600 --onvirtualdisk='esxconsole'

part '/' --fstype=ext3 --size=5120 --onvirtualdisk='esxconsole'

part '/var' --fstype=ext3 --size=4096 --onvirtualdisk='esxconsole'

part '/home' --fstype=ext3 --size=2048 --onvirtualdisk='esxconsole'

part '/opt' --fstype=ext3 --size=2048 --onvirtualdisk='esxconsole'

part '/tmp' --fstype=ext3 --size=2048 --onvirtualdisk='esxconsole'

After the installation I can’t create a second data store by the VI Client.

Does anybody know why?

Best regards, Sven

Reply
0 Kudos
6 Replies
xooops
Contributor
Contributor

I added an additional command to the ks.cfg

part 'DS2' --fstype=vmfs3 --size=43008 --grow –onfirstdisk

Now I have 2 data stores. But I’m still doesn’t understand why I can’t add the second one by VI Client.

My current script looks like this.

#Parts section

part '/boot' --fstype=ext3 --size=1100 --onfirstdisk

part 'none' --fstype=vmkcore --size=110 --onfirstdisk

part 'DS1' --fstype=vmfs3 --size=30720 --onfirstdisk

part 'DS2' --fstype=vmfs3 --size=43008 --grow --onfirstdisk

virtualdisk 'esxconsole' --size=16967 --onvmfs='DS1' --path=esxconsole/esxconsole-%servername%.vmdk

part 'swap' --fstype=swap --size=1600 --onvirtualdisk='esxconsole'

part '/' --fstype=ext3 --size=5120 --onvirtualdisk='esxconsole'

part '/var' --fstype=ext3 --size=4096 --onvirtualdisk='esxconsole'

part '/home' --fstype=ext3 --size=2048 --onvirtualdisk='esxconsole'

part '/opt' --fstype=ext3 --size=2048 --onvirtualdisk='esxconsole'

part '/tmp' --fstype=ext3 --size=2048 --onvirtualdisk='esxconsole'

Best regards, Sven

Reply
0 Kudos
xooops
Contributor
Contributor

It’s me again Smiley Happy

After the successful installation I delete the second data store and tried to recreate by VI client. But doesn’t work.

Best regards, Sven

Reply
0 Kudos
admin
Immortal
Immortal

I believe VI Client wants to only have one datastore on a single disk, which is why it's not behaving the way you're expecting it. Why do you want to put two datastores on the same disk?

Reply
0 Kudos
xooops
Contributor
Contributor

On this setup we have 4 x 146 RAID 10. I can’t really explain why. I just want to make sure that no snapshots or administrative failures can fill up my data store which contains the service console vmdk.

May be it doesn’t make sense to separate?!

Or it’s really not necessary!?

Thank’s Sven

Reply
0 Kudos
vishy123
Enthusiast
Enthusiast

here's my script to create two datastores

  1. Create the disk config

cat << EOFdisk >> /tmp/diskconfig

clearpart --alldrives --overwritevmfs

part /boot --fstype=ext3 --size=1100 --onfirstdisk

part none --fstype=vmkcore --size=110 --onfirstdisk

part $:esxconsole --fstype=vmfs3 --size=40000 --maxsize=40000 --onfirstdisk part $:local --fstype=vmfs3 --size=40000 --grow --onfirstdisk

virtualdisk esxconsole --size=16607 --onvmfs=$:esxconsole

part swap --fstype=swap --size=1600 --maxsize=1600 --onvirtualdisk='esxconsole'

part /var --fstype=ext3 --size=4000 --maxsize=4000 --onvirtualdisk='esxconsole'

part /home --fstype=ext3 --size=2000 --maxsize=2000 --onvirtualdisk='esxconsole'

part /opt --fstype=ext3 --size=2000 --maxsize=2000 --onvirtualdisk='esxconsole'

part /tmp --fstype=ext3 --size=2000 --maxsize=2000 --onvirtualdisk='esxconsole'

part / --fstype=ext3 --size=5000 --grow --onvirtualdisk='esxconsole'

EOFdisk

xooops
Contributor
Contributor

Hi vishy123,

What is the reason for you to split the data stores?

Thanks, Sven

Reply
0 Kudos