Diskless ESXi (vSphere 5)

Deploying ESXi with the VMware vCenter Server Appliance

The VMware vCenter Server Appliance is a preconfigured Linux-based virtual machine optimized for running vCenter Server and associated services. The appliance includes an Auto Deploy server that is disabled by default.

You can use the vCenter Server system on the appliance in conjunction with the Auto Deploy server on the appliance:

Also, it’s not required to use a separate DHCPD and TFTPD server. The AutoDeploy appliance includes the software required:

Set up DHCP service

# cat /etc/dhcpd.conf

ddns-update-style interim;
ignore client-updates;

subnet 192.168.101.0 netmask 255.255.255.0 {
pool {
  option routers                  192.168.101.1;
  option subnet-mask              255.255.255.0;
  option domain-name-servers      192.168.101.10;
  option nis-domain               "example.com";
  option domain-name              "example.com";
  option time-offset              -18000; # Eastern Standard Time
  default-lease-time              21600;
  max-lease-time                  43200;
  range                           192.168.101.128 192.168.101.253;
  filename        "undionly.kpxe.vmw-hardwired";
  allow unknown-clients;
}

Edit /etc/sysconfig/dhcpd to have:

DHCPD_INTERFACE="eth0"

Start DHCP:

# chkconfig dhcpd on
# service dhcpd start

Enable TFTP service

# chkconfig atftpd on
# service atftpd start

Now we can check that the files are already present:

# ls -al /tftpboot
total 584
drwxr-xr-x   2 root root  4096 Sep 19 13:09 .
drwxr-xr-x  26 root root  4096 Sep 19 13:06 ..
-rw-r--r--   1 root root 91840 Sep 19 12:52 snponly64.efi
-rw-r--r--   1 root root 91840 Sep 19 12:52 snponly64.efi.vmw-hardwired
-rw-r--r--   1 root root   112 Sep 19 12:52 tramp
-rw-r--r--   1 root root 68335 Sep 19 12:52 undionly.0
-rw-r--r--   1 root root 68335 Sep 19 12:52 undionly.kpxe
-rw-r--r--   1 root root 75591 Sep 19 12:52 undionly.kpxe.debug
-rw-r--r--   1 root root 79557 Sep 19 12:52 undionly.kpxe.debugmore
-rw-r--r--   1 root root 68365 Sep 19 12:52 undionly.kpxe.vmw-hardwired

Now you can set up the repository

Launch Powershell CLI, and connect the the appliance:

PowerCLI C:\> Connect-VIServer -server 192.168.101.100

Name                           Port  User
----                           ----  ----
192.168.101.100                443   root

PowerCLI C:\> Add-EsxSoftwareDepot VMware-ESXi-5.0.0-469512-depot.zip

Depot Url
---------
zip:VMware-ESXi-5.0.0-469512-depot.zip?index.xml

PowerCLI C:\> Get-EsxImageProfile

Name                           Vendor          Last Modified   Acceptance Level
----                           ------          -------------   ----------------
ESXi-5.0.0-469512-no-tools     VMware, Inc.    19/08/2011 1... PartnerSupported
ESXi-5.0.0-469512-standard     VMware, Inc.    19/08/2011 1... PartnerSupported

PowerCLI C:\> New-DeployRule -Name "Initial ESXi5" -Item \ "ESXi-5.0.0-469512-standard" -AllHosts

Downloading net-ixgbe 2.0.84.8.2-10vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ata-pata-hpt3x2n 0.3.4-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ehci-ehci-hcd 1.0-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ata-pata-atiixp 0.4.6-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-megaraid2 2.00.4-9vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading uhci-usb-uhci 1.0-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-r8168 8.013.00-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ohci-usb-ohci 1.0-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-qla4xxx 5.01.03.2-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ata-pata-sil680 0.4.8-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-megaraid-sas 4.32-1vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-aic79xx 3.1-5vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ata-pata-amd 0.3.10-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-bnx2 2.0.15g.v50.11-5vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading misc-drivers 5.0.0-0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading sata-ahci 3.0-6vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-fnic 1.5.0.3-1vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ata-pata-pdc2027x 1.0-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-cnic 1.10.2j.v50.7-2vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-hpsa 5.0.0-17vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading sata-sata-sil 2.3-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-igb 2.1.11.1-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-e1000e 1.1.2-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-forcedeth 0.61-2vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading sata-ata-piix 2.12-4vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-qla2xxx 901.k1.1-14vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-adp94xx 1.0.8.12-6vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-sky2 1.20-2vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ipmi-ipmi-msghandler 39.1-4vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-be2net 4.0.88.0-1vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading esx-base 5.0.0-0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ipmi-ipmi-si-drv 39.1-4vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-megaraid-mbox 2.20.5.1-6vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-nx-nic 4.0.557-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading sata-sata-promise 2.12-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-ips 7.12.05-4vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-lpfc820 8.2.2.1-18vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ata-pata-cmd64x 0.2.5-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading sata-sata-svw 2.3-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ata-pata-via 0.3.3-2vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading esx-tboot 5.0.0-0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading misc-cnic-register 1.1-1vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-s2io 2.1.4.13427-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-e1000 8.0.3.1-2vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-enic 1.4.2.15a-1vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-bnx2x 1.61.15.v50.1-1vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-mpt2sas 06.00.00.00-5vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading block-cciss 3.6.14-10vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ata-pata-serverworks 0.4.3-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading sata-sata-nv 3.5-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-mptsas 4.23.01.00-5vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-aacraid 1.1.5.1-9vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading tools-light 5.0.0-0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ima-qla4xxx 2.01.07-1vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading ipmi-ipmi-devintf 39.1-4vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-tg3 3.110h.v50.4-4vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-bnx2i 1.9.1d.v50.1-3vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading net-r8169 6.011.00-2vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.
Downloading scsi-mptspi 4.23.01.00-5vmw.500.0.0.469512
Download finished, uploading to AutoDeploy...
Upload finished.

Name        : Initial ESXi5
PatternList :
ItemList    : {ESXi-5.0.0-469512-standard}

PowerCLI C:\> Add-DeployRule -DeployRule "Initial ESXi5"

Name        : Initial ESXi5
PatternList :
ItemList    : {ESXi-5.0.0-469512-standard}

The Results

At this stage, the installation should complete, and the box should join into the vCenter. You can then enable SSH and look around.

For instance, you can see that no disks are present, and that all the files retrieved over https are in memory:

 

~ # df
Filesystem Bytes Used Available Use% Mounted on
~ # vdf
Tardisk              1k-blocks      Used
ata-pata.de670812b0d8072121a4fae955f48cb1        44        42
ata-pata.086eb2d336e38516c245bd08e6cf3548        32        28
ata-pata.d8cae6a404417a6f0847545ec8d68b6d        32        30
ata-pata.f2ba296ac3e713f54f1a48c6d1ac2e59        32        31
ata-pata.0657f310ebed9ba1a06e396d15202e34        40        36
ata-pata.37e0fea17cf42b20256c23106f412eed        36        32
ata-pata.8767c9ea8b2e2e7b08529ee0efae4252        32        28
ata-pata.7d0d7d628e62493242e18ddf90673eeb        40        36
block-cc.504dc728ef63b74c46a02d0558d37207        84        81
ehci-ehc.847a552cca64366b2fa18ac581f65740        88        85
s.ed61b24c399ff9d9d4682ef44ced5bca    359652    359649
ima-qla4.fb67647f917a072d0e26431785712a11      1368      1364
ipmi-ipm.72ac409f5a536f5ff6a57e6a0a0c296d        40        39
ipmi-ipm.6d3a2c85963a59ae79607e439246b7b9       108       105
ipmi-ipm.90487b4e364255de072a812427e0e4a1       100        98
misc-cni.a5fc8c563fcf9b984678f8bd0f7ac2a6        28        25
misc-dri.f4e3582b1198f71758592d198fdf2326      3504      3501
net-be2n.531895f2db8375318f9c2cdd345d11e9       300       298
net-bnx2.e412e2d7e6ea24f95933eb9466477ba6       288       285
net-bnx2.2ee4aac16e18d9e4fc1bf3c67fa0bffd      1400      1398
net-cnic.6accbdc0cb43dca3b500778611db7196       120       116
net-e100.389e7baafb8b128b2076f04be562ffa8       300       296
net-e100.ef64af26db9b5604db289d84c99bbdd0       248       246
net-enic.bc38bb8cd9f8c9389c145cde358d220f       148       144
net-forc.2ac8118e5cff7fc95b1acbe24ead22e7       128       124
net-igb.9933c6aa358f825d2a498618b5370161       244       240
net-ixgb.8f6b94725f97e28f8bd481b6f15f07f4       324       321
net-nx-n.be65575687cbdfd52102dc93f5e12c96      2576      2574
net-r816.8d1495576d023e4a029df8366de1b8ab       136       134
net-r816.065c30972de9b02bf54e41ffb41d4fcd        84        80
net-s2io.18de41a13924aefa762d3093d3b36182       244       241
net-sky2.3dec010d4021497b3c7bfc9fff9a17ea       112       111
net-tg3.a8bb56bac39e4352d3a2befa1e97016c       284       280
ohci-usb.a2728ce2041891f947b042a9d516ed11        56        55
sata-ahc.e3545d2067a60645ad67bb91400c8c02        96        95
sata-ata.d4733a7b817cec11846fb292a18225fe        60        57
sata-sat.1425f865d0168e160ae9b9ac61848fb8        88        85
sata-sat.f256b5fcbe9db2955b62c6e7a2651b88        44        41
sata-sat.df70b5cae0b8dc0b1825a2a847e0332e        44        40
sata-sat.33beef4656a6b08dd15f277172e520f5        36        32
scsi-aac.7d836a2908c0b1b6048c2a1544e609d7       168       167
scsi-adp.1426e069e57219db73f24a0e18fe823b       424       423
scsi-aic.b13ccdac413919cb60704cd46de4daf8       296       292
scsi-bnx.6a43dd5b4e555a98312ac9e9c7e2b54d       196       195
scsi-fni.11ce329227575c32b9ad5cf6776f8b8a       152       151
scsi-hps.64249ad102d50c4bfcf68ab74eea3d24       188       187
scsi-ips.06ca927b13cbcf861b5a21de2ecf075f       132       130
scsi-lpf.07f8f2635938dc247dd71cf757947ad6      1372      1369
scsi-meg.6717a7a3865d8a3775691dcc5b434a03        96        93
scsi-meg.1d937e324922bc400dafc7fab9208172       112       109
scsi-meg.0b6be8720b2a74501d87e518f1748ef5        92        91
scsi-mpt.4ff94b1c3e616ed5bbe650ce00590eba       372       369
scsi-mpt.c08f2ca828a18d0c2fdde8fd88c51e57       516       512
scsi-mpt.ce11bb592baf69cb81c5f43b3ccbf9c1       436       433
scsi-qla.16e0ad78ea9ad04d0e983169e1b39a23      1432      1431
scsi-qla.4b8f393770b4edf35919f5803493e024       280       279
uhci-usb.0d724a1f42bd04b1b8bfbc254f2dc490        60        56
tools.09cde3bad0f368d101b8083ead428d5b    180112    180110
imgdb.tgz                  220       220
waiter.tgz                 352       350
-----
Ramdisk              1k-blocks      Used Available Use% Mounted on
root                     32768      2016     30752   6% --
etc                      28672       120     28552   0% --
tmp                     196608        16    196592   0% --
hostdstats               66560      1192     65368   1% --
~ #

The next step would be to configure the ESXi system to avoid having to configure it now.
The question is, what is the best way to do this? Via a host profile that is set up via PowerShell, or via Host Profiles?

2 Responses to Diskless ESXi (vSphere 5)

  1. Pingback: Auto-Deploy in vSphere 5.0 | The Fallen Tree

  2. >>The question is, what is the best way to do this? Via a host profile that is set up via PowerShell, or via Host Profiles?

    What is the answer? 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: