Connect with us

Gadgets

Create vCenter Cluster with VMWare Workstation (4): Setup VMs

[ad_1]

In this part of the 5-part guide, we will install ESXi 7 on the two VMs, and configure their networks. Then, install Windows Server 2022 on the iSCSI VM, configure it as an iSCSI target, and connect the ESXi hosts to the iSCSI LUMs.

Step 1: Install ESXi on the VMs

  1. Select the first ESXi VM, IPMvESXi2 and click “Power on this virtual machine.”

ESXi 7 will start installing. Wait for the installer to display the page shown below, then proceed to step 2.

  1. Click your mouse on the VM. When you do this, the mouse will no longer be available to your Windows 11 PC – I will tell you how to get the mouse back later.
  2. To continue the installation, press the Enter key on your keyboard.
To continue the installation, press the Enter key on your keyboard. To continue the installation, press the Enter key on your keyboard.
  1. Next, following the instructions on the ESXi installation screen, press F11 on your keyboard to accept the license agreement.
Next, following the instruction on the ESXi installation screen, press F11 on your keyboard to accept the license agreement. Next, following the instruction on the ESXi installation screen, press F11 on your keyboard to accept the license agreement.

Follow the instructions on the screen to complete the installation. Note the root password you use for the installation as you will need it later.

Before you proceed, install ESXi 7 on the second VM, IPMvESXi2.

When you finish installing VMWare ESXi on a VM, press Ctrl + Alt to release the mouse to Windows.

When the ESXi finishes installing, it should display a screen similar to my screenshot below. If there is a DHCP server on the network its vNIC is connected, it will receive an IP address.

When the ESXi finishes installing, it should display a screen similar to my screenshot below. When the ESXi finishes installing, it should display a screen similar to my screenshot below.

Step 2: Configure Static IP, DNS and License for the ESXi Hosts

In this section, we will assign the ESXi hosts a static IP address and configure DNS settings, and assign the Hosts a license.

Assigning licenses to the ESXi hosts is optional. VMWare offers a 60-day trial period so you can continue using the ERSXi hosts for 60 days if you do not have a license.

1. Set a Static IP Address for the ESXi Host.

Perform these steps on the two ESXi hosts, IPMvESXi1 and IPMvESXi2. According to our lab plan in part 1 (Table 2), IPMvESXi1 should be assigned 192.168.0.151 and IPMvESXi2, 192.168.0.152.

If you need to view the table with the IP configurations, click Plan the Lab Network Configuration (the link opens in a new browser tab).

When you’re ready, follow these steps to configure static IP for the ESXi hosts:

  1. Open IPMvESXi1 in VMWare Workstation and click on the VM’s screen. If the VM is in “sleep” mode, click Enter key to wake it up.
Open IPMvESXi1 in VMWare Workstation and click on the VM's screen. If the VM is in "sleep" mode, click Enter key to wake it up.Open IPMvESXi1 in VMWare Workstation and click on the VM's screen. If the VM is in "sleep" mode, click Enter key to wake it up.
  1. Next, click F2 to customize the VM. ESXi will request to login, use the tab key to select the password field and enter the root’s password.

    When you finish, press Enter to log in to ESXi console.

Next, click F2 to customize the VMNext, click F2 to customize the VM
ESXi will request to login, use the tab key to select the password field and enter the root's password. ESXi will request to login, use the tab key to select the password field and enter the root's password.
  1. On the System Customization page, use the Down arrow key to highlight Management Network, then press Enter to select it.
On the System Customization page, use the Down arrow key to highlight Management Network, then press Enter to select it. On the System Customization page, use the Down arrow key to highlight Management Network, then press Enter to select it.
  1. Next, highlight IPv4 Configuration and select it. The “() Disable IPv4 Configuration for Management network” will be selected.
Next, highlight IPv4 Configuration and select it. Next, highlight IPv4 Configuration and select it.
  1. Scroll to “() Set static IPv4 address and network configuration,” Press the Space bar on your keyboard to select this option. After that, press the Enter key to open the option
Scroll to "() Set static IPv4 address and network configuration," Press the Space bar on your keyboard to select this option. Scroll to "() Set static IPv4 address and network configuration," Press the Space bar on your keyboard to select this option.
  1. Finally, scroll to the IPv4 Address, and enter the IP address. If you need to modify the Subnet mask and Defauly gateways, use the Down arrow key to select each, then modify the values.

When you finhs, press the Enter key to save your changes. Stay logged on to the ESXi host.

Repeat steps 1 to 6 for IPMvESXi2.

2. Configure DNS Settings for the ESXi Hosts

Press the esc key to return to the previous menu.

1. Then, scroll to DNS Configuration, press Enter to select it.

  1. On the DNS Configuration page, scroll to “() Use the following DNS Server and host name” option – then press the Space bar to select it

After that, scroll (using the Down arrow key) to the Primary DNS Server, and enter the value from our plan table (if you’re using the same network). Leave the Alternate DNS Server field blank.

Then, scroll to the hostname and change it to IPMvESXi1 (the name of this ESXi host). When you finish, press the Enter key to save your changes.

Finally, press the esc key to return to the “Configure Management network” menu.

After that, scroll (using the Down arrow key) to the Primary DNS Server, and enter the value from our plan table (if you're using the same network). Leave the Alternate DNS Server field blank.After that, scroll (using the Down arrow key) to the Primary DNS Server, and enter the value from our plan table (if you're using the same network). Leave the Alternate DNS Server field blank.
  1. Then, press the esc key again, ESXi will ask you to apply the changes, type Y to confirm.
Then, press the esc key again, ESXi will ask you to apply the changhes, type Y to confirmThen, press the esc key again, ESXi will ask you to apply the changhes, type Y to confirm

Repeat steps 1 to 3 for the second ESXi host, IPMvESXi2.

3. Assign License to the ESXi Hosts

  1. Enter the IP address of the ESXi host on a browser and press enter to load the page. You will be receive and unsecure warning, ignore it and proceed.
  2. Then, on the sign in page, enter root as the User name. Also, enter the root’s password you set when you installed the ESXi hypervisor – when you finish, click the Login button.
Then, on the sign in page, enter root as the User name. Also, enter the root's password you set when you installed the ESXi hypervisor - when you finish, click the Login button. Then, on the sign in page, enter root as the User name. Also, enter the root's password you set when you installed the ESXi hypervisor - when you finish, click the Login button.
  1. On the menu (left pane of the page), Host will be selected automatically. Click the Manage menu.
On the menu (left pane of the page), Host will be selected automatically. Click the Manage menu. On the menu (left pane of the page), Host will be selected automatically. Click the Manage menu.
  1. Then, on the details pane of the Manage menu, click the Licensing tab. On the Licensing tab, click Assign license, enter the license and clcik “Check license.”

If the license is valid, assign it to the host.

If the license is valid, assign it to the host. If the license is valid, assign it to the host.

If you need to assign a license to the second ESXi host, repeat steps 1 to 4.

Step 3: Attach the Datastore Disk to the iSCSi VM

In this section, you’ll attach the 600 GB partition you created in part 1 to the iSCSI VM.

  1. Open Disk Management on the Computer VMWare Workstation is installed. Note the disk number of the Disk as you will need it later. For my environment, I have 3 disks on the computer but Disk 1 is the 1 TB drive I want to use.

Also, note that the 600 GB is the first partition.

Important note!
Before proceeding to step 2, if you had the VMWare Workstation Pro console open, close it and select Run in Background. Then, search for VMWare Workstation Pro, right-click it and select Run as administrator. If you do not open VMWare Workstation Pro as administrator, it will not display Disk partitions on the host when you add a physical disk to the VM.

Alternatively, you can press and hold the Shift key, right-click the VMWare Workstation icon on your desktop and select Run as Administrator.

Alternatively, you can press and hold the Shift key, right-click the VMWare Workstation icon on your desktop and select Run as Administrator. Alternatively, you can press and hold the Shift key, right-click the VMWare Workstation icon on your desktop and select Run as Administrator.
  1. On the VMWare Workstation console, right-click the iSCSI VM and select Settings.
On the VMWare Workstation console, right-click the iSCSI VM and select SettingsOn the VMWare Workstation console, right-click the iSCSI VM and select Settings
  1. Then, click the Add button at the bottom.
Then, click the Add button at the bottom.Then, click the Add button at the bottom.
  1. On the first page of the “Add Hardware Wizard,” select Hard Disk and click Next.
  1. Select NMVe (Recommended) as the Virtual Disk type.
Select NMVe (Recommended) as the Virtual Disk type.Select NMVe (Recommended) as the Virtual Disk type.
  1. Select Use a Physical disk (for advanced users), click Next, and click Yes to grant admin permission.
Select Use a Physical disk (for advanced users), click Next, and click Yes to grant admin permission.Select Use a Physical disk (for advanced users), click Next, and click Yes to grant admin permission.

Here select the Physical disk and use individual partition. Use the Disk Number you noted earlier in this section – mine is PhysicalDisk1. When you click Next, Workstation will request for admin permission, accept Yes.

If you select the wrong disk, you will lose the data!

  1. On the select Physical Disk Partitions page, check the checkbox next to the 600 GB partition.

Ensure you select the right partition as choosing the incorrect one may lead to unexpected data loss.

On the select Physical Disk Partitions page, check the checkbox next to the 600 GB partition. On the select Physical Disk Partitions page, check the checkbox next to the 600 GB partition.
  1. On the review page, accept the suggested name of the vmdk file and click Finish to attach the disk.
On the review page, accept the suggested name of the vmdk file and click Finish to attach the disk. On the review page, accept the suggested name of the vmdk file and click Finish to attach the disk.

When you select the new disk in the VM’s settings, it will show that it is connect to a partition on a Physical disk! Click OK to save the changes.

When you select the new disk in the VM's settings, it will show that it is connect to a partition on a Physical disk!When you select the new disk in the VM's settings, it will show that it is connect to a partition on a Physical disk!

Step 4: Install Windows Server 2022 on the iSCSi VM

  1. Start the iSCSI VM. The Windows Server 2022 installation should start from the ISO image.
Start the iSCSI VMStart the iSCSI VM
  1. If the install does not auto-start, right-click the VM, point to Removable Devices > CD/DVD (SATA) > Connect. The VM will load the BIOS boot menu.
If the install does not auto-start, right-click the VM, point to Removable Devices - CDDVD SATA - Connect. The VM will load the BIOS boot menuIf the install does not auto-start, right-click the VM, point to Removable Devices - CDDVD SATA - Connect. The VM will load the BIOS boot menu
  1. Then, use the Up/Down arrow key to select the CD/DVD drive and press Enter to boot from the ISO image. As usual, you’ll be promoted to press any key to start Windows installation.
Boot a VMWare Workstation pro VM from BIOS Boot menuBoot a VMWare Workstation pro VM from BIOS Boot menu

Install Windows Server 2022 Standard edition. Ensure that you install the OS on the 60 GB disk, NOT the 600 GB partition.

Complete the Windows Installation and proceed to step 5.

Step 5: Complete Post-OS Install Tasks

1. Install VMWare Tools

  1. When the OS finishes installing, login to the VM. Then, on the VMWAre Workstation, right-click the VM and select “Install VMWare Tools.”
  1. Then, pen “This PC”, and install the VMWare tools. Restart the VM when promted.
Then, pen This PC, and install the VMWare toolsThen, pen This PC, and install the VMWare tools

2. Rename the VM and Assign a Static IP, Configure DNS

Start the VM and sign in, then, run the following commands to assign the VM an IP address, rename it, and then restart the VM:

#Assign a static IP address to the VM's NIC

Get-NetAdapter | New-NetIPAddress -IPAddress 192.168.0.154 -PrefixLength 24 -DefaultGateway 192.168.0.1

#Assign the DNS server to the NIC

Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses 192.168.0.80

#Change the computer name of the VM and restart it

Rename-Computer -NewName IPMviSCSI -Restart

When the VM restarts, it may be a good idea to check for updates via the Windows Update Settings. Also, remember to enable Remote Desktop so you can manage the VM remotely.

Step 6: Install and Configure iSCSI Taget

  1. Log in to the iSCSI VM, IPMviSCSI, open PowerShell as administrator.
  2. Then, install the iSCSI role with the command below:
Add-WindowsFeature fs-iscsitarget-server
Install and Configure iSCSI Taget with PowerShellInstall and Configure iSCSI Taget with PowerShell

Once the installation completes, restart the computer, then, follow these steps to create the iSCSI target:

  1. Open Disk Management, right-click the 600 GB disk and select Format.
  1. Then, on the Format disk popup, select the options shown in the screenshot below and click OK.

If Server Manager was open while you performed steps 1 and 2 above, close it

  1. Open Server Manager and click on File and Storage Services > iSCSI, then click “To create an iSCSI virtual disk, start the New iSCSI Virtual Disk Wizard.”
Once the disk is online, follow these steps to configure IPMviSCSI as an iSCSI target serverOnce the disk is online, follow these steps to configure IPMviSCSI as an iSCSI target server
  1. On the first page of the wizard, select the 600 GB partition and click Next.
On the first page of the wizard, select the 600 GB partition and click NextOn the first page of the wizard, select the 600 GB partition and click Next
  1. On the next page, give the iSCSI volume a name (I use the server’s name) and description (optional), then, click Next.

Note the path the virtual disk is created – D:iSCSIVirtualDisksIPMviSCSI.vhdx. The iSCSIVirtualDisks folder is created by default.

On the next page, give the iSCSI volume a name (I use the server's name) and description (optional), then, click Next.On the next page, give the iSCSI volume a name (I use the server's name) and description (optional), then, click Next.
  1. Then, assign the entire disk size to the iSCSI LUM, select Fixed space and click Next.
Then, assign the entire disk size to the iSCSI LUM, select Fixed space and click NextThen, assign the entire disk size to the iSCSI LUM, select Fixed space and click Next
  1. Next, select Create new iSCSI target and click Next. Then, give the target a name and optional description.
Then, give the target a name and optional descriptionThen, give the target a name and optional description
  1. To specify the ESXi Hosts as the iSCSI Initiators, click Add.
To specify the ESXi Hosts as the iSCSI Initiators, click AddTo specify the ESXi Hosts as the iSCSI Initiators, click Add
  1. Then, on the “Add Initiator” sub-wizard, select “Enter a Value for the selected type”, then, on the Type drop-down, select IP address, finally, enter the IP addresses of the first ESXi VM (192.168.0.151), click OK to add the iSCSI Initiator.

When I tried accessing this iSCSI target from the ESXi host with IP 192.168.0.151, it was not working. After a while of troubleshooting, I realised that I entered 92.168.0.151 (see the screenshot below) instead of 192.168.0.151. Anyway, after removing the wrong IP and adding the correct one, the ESXi host displayed the iSCSI storage!

Then, on the "Add Initiator" sub-wizard, select "Enter a Value for the selected type", then, on the Type drop-down, select IP address, finally, enter the IP addresses of the first ESXi VM (192.168.0.151), click OK to add the iSCSI Initiator.Then, on the "Add Initiator" sub-wizard, select "Enter a Value for the selected type", then, on the Type drop-down, select IP address, finally, enter the IP addresses of the first ESXi VM (192.168.0.151), click OK to add the iSCSI Initiator.

Repear steps 6 and 7 to add the second ESXi hot’s IP (192.168.0.152).

  1. You should now have the IP addresses of the two ESXi hosts (VMs), click Next to continue.
You should now have the IP addresses of the two ESXi hosts (VMs), click Next to continueYou should now have the IP addresses of the two ESXi hosts (VMs), click Next to continue
  1. On the authenticator page, click Next without setting any authentication.

If you’re deploying on a production evironement, you may want to enable CHAP.

On the authenticator page, click Next without setting any authentication.On the authenticator page, click Next without setting any authentication.
  1. Finally, review your settings and click Create. Wait for the iSCSI LUM to be created, then close the wizard.
Finally, review your settings and click Create. Wait for the iSCSI LUM to be created, then close the wizard.Finally, review your settings and click Create. Wait for the iSCSI LUM to be created, then close the wizard.
Wait for the iSCSI LUM to be created, then close the wizard.Wait for the iSCSI LUM to be created, then close the wizard.

Step 6: Create DNS Host A Records for the VMs

To allow you connect to the ESXi and the iSCSI hosts, create a Host A record on your DNS server. I also included the vCenter host name, IPMvCSA as creating a Host A record for vCenter host name is a prerequisite for installing vCenter.

Use the table below to create the A records.

Host Name IP Address
IPMvESXi1 192.168.0.151
IPMvESXi2 192.168.0.152
IPMvCSA 192.168.0.153
IPMviSCSI 192.168.0.154
Table 1

To create a Host A record:

  1. Open the DNS Manager console, navigate to the forward look zone, right-click it and select New Host A or AAA record.
Open the DNS Manager console, navigate to the forward look zone, right-click it and select New Host A or AAA record. Open the DNS Manager console, navigate to the forward look zone, right-click it and select New Host A or AAA record.
  1. Then, on the pop up window, enter the name and IP address of the server. The Create associated pointer (PTR) record os checked by default.

Once you confirm that all entries are accurate, click Add Host. #

Then, on the pop up window, enter the name and IP address of the server. The Create associated pointer (PTR) record os checked by default.Then, on the pop up window, enter the name and IP address of the server. The Create associated pointer (PTR) record os checked by default.

Repeat steps 1 and 2 for all records in Table 1 above. From this point, you can access these VMs with their hostname, instead of IP addresses.

Step 7: Connect ESXi Hosts to the iSCSI Storage

Use the steps in my guide, Configure VMware ESXi Servers to Share an iSCSI Storage to connect the two ESXi servers – IPMvESXi1 and IPMvESXi2 to the iSCSI target you created earlier.

Read part 5: Configure vCenter (link opens in a new browser tab).

[ad_2]

Victor Ashiedu

Source link