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
- 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.


- 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.
- To continue the installation, press the Enter key on your keyboard.


- Next, following the instructions 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.


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:
- 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.


- 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.




- On the System Customization page, use the Down arrow key to highlight Management Network, then press Enter to select it.


- Next, highlight IPv4 Configuration and select it. The “() Disable IPv4 Configuration for Management network” will be selected.




- 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


- 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.


- 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.


- Then, press the esc key again, ESXi will ask you to apply the changes, type Y to confirm.


Repeat steps 1 to 3 for the second ESXi host, IPMvESXi2.
3. Assign License to the ESXi Hosts
- 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.
- 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.


- On the menu (left pane of the page), Host will be selected automatically. Click the Manage menu.


- 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 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.
- 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.


- On the VMWare Workstation console, right-click the iSCSI VM and select Settings.


- Then, click the Add button at the bottom.


- On the first page of the “Add Hardware Wizard,” select Hard Disk and click Next.


- Select NMVe (Recommended) as the Virtual Disk type.


- 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!


- 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 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.


Step 4: Install Windows Server 2022 on the iSCSi VM
- Start the iSCSI VM. The Windows Server 2022 installation should start from the ISO image.


- 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.


- 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.


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
- When the OS finishes installing, login to the VM. Then, on the VMWAre Workstation, right-click the VM and select “Install VMWare Tools.”


- Then, pen “This PC”, and install the VMWare tools. Restart the VM when promted.


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 NICGet-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
- Log in to the iSCSI VM, IPMviSCSI, open PowerShell as administrator.
- Then, install the iSCSI role with the command below:
Add-WindowsFeature fs-iscsitarget-server


Once the installation completes, restart the computer, then, follow these steps to create the iSCSI target:
- Open Disk Management, right-click the 600 GB disk and select Format.


- 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
- 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.”


- On the first page of the wizard, select the 600 GB partition and click Next.


- 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.


- Then, assign the entire disk size to the iSCSI LUM, select Fixed space and click Next.


- Next, select Create new iSCSI target and click Next. Then, give the target a name and optional description.




- To specify the ESXi Hosts as the iSCSI Initiators, click Add.


- 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!


Repear steps 6 and 7 to add the second ESXi hot’s IP (192.168.0.152).
- You should now have the IP addresses of the two ESXi hosts (VMs), click Next to continue.


- On the authenticator page, click Next without setting any authentication.
If you’re deploying on a production evironement, you may want to enable CHAP.


- Finally, review your settings and click Create. 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 |
To create a Host A record:
- Open the DNS Manager console, navigate to the forward look zone, right-click it and select New Host A or AAA record.


- 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. #


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
