k3s.live

Based on the IT journey of Michael Rickert

Installing VMWare ESXi and VSphere 5.0


This is a step-by-step guide to installing VMWare ESXi 5 and vSphere server, including vlan configuration


Getting Started — what you’ll need You will need:

  • a copy of VMWare ESXi 5
  • a copy of VSphere Server 5
  • at least one physical managed switch (Cisco preferred)
  • at least two ESXi capable hosts (x64, with VT enabled)
  • at least one storage device capable of iSCSI (Synology or Equallogic preferred)

Create the VLAN setup on a Cisco switch (if desired)

First, console into the Cisco switch, go into global configuration mode, and give it a hostname:

  • Commands: ‘configure terminal’ and ‘hostname vmwareswitch’

Cisco1.png


Next, create the vlans required for vmware. It is considered best practices to place vmotion, iscsi, management, fault tolerance, and server traffic into their own vlans so that’s what will be done here. Create the required five vlans and give them IP address ranges:
Commands, in order:

  • ‘interface vlan 501′
  • ‘description iSCSI traffic’
  • ‘ip address 10.114.112.1 255.255.255.192′
  • ‘interface vlan 510′
  • ‘description vMotion traffic’
  • ‘ip address 10.114.112.65 255.255.255.192′
  • ‘interface vlan 520′
  • ‘description Fault tolerance traffic’
  • ‘ip address 10.114.112.129 255.255.255.192′
  • ‘interface vlan 530′
  • ‘description Management traffic’
  • ‘ip address 10.114.112.193 255.255.255.192′
  • ‘interface vlan 540′
  • ‘description Virtual Server traffic’
  • ‘ip address 10.114.113.1 255.255.255.0′

Cisco2.png


After all of the vlans have been created, they need to be assigned interfaces, you can do this by entering the following commands (for a 48 port switch)

  • ‘interface range gig0/1-12′
  • ‘description iSCSI and iLo’
  • ’switchport access vlan 501′
  • ’switchport mode access’
  • ‘interface range gig0/13-18′
  • ‘description Server Traffic’
  • ’switchport access vlan 540′
  • ’switchport mode access’
  • ‘interface range gig0/19-29′
  • ‘description Management and Fault Tolerance traffic’
  • ’switchport trunk encap dot1q’
  • ’switchport trunk allowed vlan 520,530
  • ‘interface range gig0/30-35′
  • ‘description vMotion’
  • ’switchport access vlan 510′
  • ’switchport mode access’

Cisco3.png


Next, create the ports that will allow your switch to connect to another switch on the network. In this configuration, we’ll be using port-channel to allow multiple interfaces to pass traffic as if they were one large port:

  • !!!WARNING!!!: Port-channeling must be enabled on the receiving end switch as well or traffic will not be passed.

Commands:

  • ‘interface port-channel 1′
  • ’switchport access vlan 76′
  • ’switchport trunk encap dot1q’
  • ’switchport trunk allowed vlan 76′
  • ’switchport mode trunk’
  • ’switchport nonegotiate’
  • ‘interface range gig0/44-48′
  • ‘description to CORE switch’
  • ’switchport access vlan 76′
  • ’switchport trunk encap dot1q’
  • ’swithcport trunk allowed vlan 76′
  • ’switchport mode trunk’
  • ’switchport nonegotiate’
  • ‘channel-group 1 mode on’
  • ‘interface vlan 76′
  • ‘ip address 10.x.x.x 255.255.255.0′
  • ‘description CORE switch traffic’


Finally, we’ll have to add a gateway of last resort so the traffic from the vmware servers can reach the rest of the network. This ip address should be the address of the next hop for IP traffic, aka, the switch/router your connecting to on your port-channel interface:

  • Note: After your done entering all of the commands above, don’t forget to ‘copy run start’ to save your work!

commands:

  • ‘ip route 0.0.0.0 0.0.0.0 10.x.x.x′
  • ‘copy run start’

Install ESXi

Install ESXi on all host servers… First, place the ESXi setup cd in the servers cd tray, boot from cd and wait for the setup program to boot up:

Still waiting…:

After boot completes, press ‘Enter’ on the welcome screen:

Press ‘F11’ and accept the license agreement:

Select the disk you’d like to install VMWare 5 on… REMEMBER: this is for ESXi only and not for actual VMs:

Select your language:

Enter a password for ESXi management:

Press ‘F11’ to confirm install and wipe the drive:

Wait for ESXi install to complete:

After ESXi installs, it will ask for a reboot… press ‘Enter’:

If the install completed successfully, you should boot back up into VMWare ESXi 5, once you see the screen below, press ‘F2’ to start configuring your new ESXi host:

When prompted for a username/password, enter ‘root’ for the username and whatever password you had set during install:

Once in the configuration screen, go to ‘Configure Management Network’:

Inside ‘Configure management network’ first go to ‘network adapters’:

And then  select the NIC card you’ve connected to your management port on your switch, you can also select multiple NICs if need be:


After selecting the correct NIC cards with ‘space’ and pressing ‘enter’ to accept your selections, go to ‘IP Configuration’ under ‘configure management network’:

Select ‘Set static IP address’ and enter in your IP address, subnet mask, and gateway information… remember, this is for the range you’ve set aside for your management network:

After accepting the IP setings, if necessary… go to ‘VLAN’ and enter in your vlan ID for the management network:

Finally, ‘esc’ out of the configuration screen, and when prompted to, press ‘Y’ to apply changes and restart the management network for that ESXi host:

If you successfully configured your management network, you should now be able to reach the VMWare webpage for your ESXi host at the management ip address in a web browser… once there, download and install the vSphere client to continue:

Once the vSphere client finishes installing, open it and enter in your management network information:

If you see a prompt similar to the one below, just press ‘run the installer’ to continue:

At the home screen, click on ‘Inventory’:

First thing we’ll have to do is set up networking on the ESXi host, so click on ‘Configuration’ and then ‘Networking’


Next, Create your iSCSI network adapter by clicking on ‘Add Networking…’:

Select VMkernel:

And then selecting the NIC card you’ll be using for your iSCSI SAN connection:

Give the new port a name:

And an IP address:

And finally, press ‘finish’:

Now that networking is set up for iSCSI, lets get storage configured… click on the ‘configuration’ tab and ‘storage adapters’ on the left hand side, and then click ‘Add…’:

And then click ‘ok’ for ‘Add Software iSCSI Adapter:

If you see a warning about adding a new iSCSI adapter, click ‘ok’ to continue:

Once the new iSCSI adapter has been added, select it and then right click on it and select ‘Properties’ from the menu:

Then, click ‘Configure’:

And under configuration, enter the iSCSI properties for your connection:

Next, under the ‘Dynamic Discovery’ tab, click ‘add…’:

And then enter the IP Address of your ISCSI SAN:

‘Ok’ out of all the boxes and if you see a warning about rescanning the datastore, click ‘OK’ to that as well…

And you should now be connected via iSCSI to your SAN! You can verify this by seeing ‘Connected Targets:’ showing as ‘1’:

Next, click on ‘Storage’  and then ‘Add Storage’:

Accept the default of ‘Disk/LUN’ and click ‘next’

Select your iSCSI target and click ‘next’:

Select ‘VMFS-5’ and click ‘next’:

Click ‘next’

Enter a name and click ‘next’:

accept defaults for maximum space and press ‘next’:

Verify settings and press ‘finish’:

You should now see the datastore under storage:


 Installing Microsoft SQL Server 2008 for vSphere

  • Note: This is optional and is not required for vSphere functionality, but is recommended

Console or RDP into the vSphere server and then mount the SQL Server 2008 .ISO into the virtual drive. When ‘AutoPlay’ appears, click ‘Run SETUP.EXE’:

sql2008install1.png


At the .Net install prompt, click ‘OK’:sql2008install2.png


Go to ’start -> my computer’ and launch the setup again from the cd-rom drive. Then click on ‘installation’ on the left and then ‘new installation or add features to an existing installation’ at the top:sql2008install3.png


Click ‘OK’ at the checks approved dialog screen and then click ‘next’ at the cd-key window:sql2008install4.png


Accept the license terms, click ‘next’ and then click ‘finish’ at the install setup support files screen.
sql2008install5.png


Click ‘Next’ through the setup support rules window screen, and then verify ‘SQL Server Feature Installation’ is selected and click ‘next’:
sql2008install6.png


Check the boxes for ‘Database Engine Services’ ‘Business Intelligence Development Studio’ and ‘Management Tools – Basic’ and then click ‘next’:
Sql2008install7.png


Click ‘next’ through install rules and then accept all defaults for the ‘Instance Configuration’ screen:
Sql2008install8.png


Click ‘next’ through the disk usage option. Then, under the ‘Account Name’ options, use the dropdown arrow and select ‘NT AUTHORITY\NETWORK SERVICE’ for both the ‘SQL Server agent’ and ‘SQL Server Database Engine’ options. Also, change the startup type for the ‘SQL Server Agent’ to ‘automatic’ and then click ‘next’:
sql2008install9.png


Select ‘Mixed mode’ and enter a password for the ’sa’ account. Also, click the ‘Add Current User’ button and then click ‘next’:
Sql2008install10.png


Click ‘next’ through the error reporting screen and then ‘next’ again through installation configuration rules. Finally, click ‘Install’ and install SQL Server 2008:
Sql2008install11.png


When the installation completes, launch ‘SQL Server Management Studio’ and login using a server name of “.” without the “s and windows authentication :
Sql2008install12.png


Right click on the ‘Databases’ folder and then select ‘New Database…’:
Sql2008install13.png


In the new database window, name the new database “vSphere” and click ‘ok’Sql2008install14.png


Close management studio and then under ’start -> administrative tools’ click on ‘Data Sources (ODBC)’:
Sql2008install15.png


Click on the ‘System DSN’ tab and then click ‘Add…’:Sql2008install16.png


Select ‘SQL Server Native client 10.0′ and click ‘finish’:sql2008install17.png


under the ‘create new datasource’ window, use the name ‘vsphere’ and use the server ‘.’ then click ‘next’
Sql2008install18.png


On the next window, select the ‘With SQL Server authentication’ radial button and enter your ’sa’ account information, then click ‘next’
Sql2008install19.png


Check the box labeled ‘Change the default database to’ and then, from the dropdown, select ‘vSphere’ and click ‘next’:
Sql2008install20.png


Accept defaults on the next screen and click ‘Finish’:Sql2008install21.png


Microsoft SQL Server 2008 is now ready for a vSphere installation.Install VSphere First, create a new virtual machine and install Windows Server 2008 R2. After Windows setup completes, install vmware tools, run windows update, and then install windows SQL server 2008 if you would like to use a seperate SQL server for vsphere.


After SQL Server 2008 is installed, or if you choose to allow vmware to create the SQL instance, mount the vSphere ISO to the Windows 2008 server and then run ’setup.exe’.Vpshereinstall1.png


Click ‘install’ when ‘vCenter Server’ is selected: Select your language and continue:click ‘next’ and continue…

Accept the license agreement, fill out your username/organization and continue…

If you’ve followed this guides SQL server 2008 setup, select ‘use an exisiting database’ Enter ‘vsphere’ for the DSN and continue… if you see the error below, download the driver here: go.microsoft.com/fwlink/?LinkId=123718&clcid=0x409 and recreate your obdc connection to continue::

Enter your sa account info from earlier and continue:

accept defaults for use system account:

accept defaults for vCenter Server location:

accept defaults for ‘create standalone VMware server instance’:

accept defaults for port settings:

and again, accept defaults for port settings:

select your inventory size, if your not sure, accept defaults here:

leave the final box unchecked and click ‘install’:

Install completed successfully!


You should now be able to reach your vmware vCenter server from the vSphere client:

If you see a certificate security warning at this time, just press ignore and continue:

The next step is to create your datacenter, you can do so by going to the ‘getting started’ tab and clicking on ‘create a datacenter’

Name your datacenter:

click on your newly created datacenter and then click ‘add a host’

on the ‘add host wizard’ window, enter the ip address of your ESXi servers management interface and the login information you used earlier to access said management interface using the vsphere client:

If you see a warning similar to the one below, just press yes to continue:

‘Next’ through the summary:

enter a license key if you have one… you can always change this later:

leave lockdown mode unchecked and continue:

verify your newly created datacenter is selected and click ‘next’

click ‘finish’ and add the new host:

You should now see your host ESXi server listed under your datacenter! (this may take a minute or two to complete)

Next, we’ll create a cluster for High Availability (HA) and failover purposes,  under the ‘getting started’ tab on your datacenter, click ‘create a cluster’ (if you dont see the option, try right clicking on your datacenter)

Name your cluster and enable HA and DRS before clicking ‘next’:

Accept the defaults for the DRS settings screen and click ‘next’

Accept the default of ‘off’ for power management on DRS and click ‘next’

On the HA page, ‘disable’ admission control and click ‘next’

accept the defaults on the next page and continue:

leave vm monitoring disabled and click ‘next’

leave EVC disabled and continue:

leave the swapfile as is and click ‘next’

click ‘finish’ and create your cluster!

drag your host you added earlier into your newly created cluster using drag and drop:

accept the defaults  for the resource pool settings:

and click ‘finish’

Add any other ESXi server hosts you have to the new cluster at this time. Your VMware Cluster with vSphere Server and ESXi 5 is ready to go! Start adding virtual machines and creating your new server environment.

NOTE: you may have to configure the networking settings on each new host you add to the cluster if you haven’t done so already, just perform the steps provided earlier for setting up the first ESXi host.


Leave a Reply