subcollection | copyright | lastupdated | lasttested | content-type | services | account-plan | completion-time | use-case | ||
---|---|---|---|---|---|---|---|---|---|---|
solution-tutorials |
|
2024-01-05 |
tutorial |
vmwaresolutions, vpc |
paid |
2h |
ApplicationModernization, Vmware |
{{site.data.keyword.attribute-definition-list}}
{: #vpc-bm-vmware-vcenter} {: toc-content-type="tutorial"} {: toc-services="vmwaresolutions, vpc"} {: toc-completion-time="2h"}
This tutorial may incur costs. Use the Cost Estimator to generate a cost estimate based on your projected usage. {: tip}
This tutorial is part of series, and requires that you have completed the related tutorials in the presented order. {: important}
In this tutorial, you will deploy a vCenter for a VMware Deployment in {{site.data.keyword.vpc_short}} and a floating
VLAN interface for it.
{: shortdesc}
{: #vpc-bm-vmware-vcenter-objectives}
In this tutorial you will provision a vCenter appliance to the ESXi hosts and create the first compute cluster. vCenter will use {{site.data.keyword.bm_is_short}} VLAN NIC with an IP address allocated from a {{site.data.keyword.vpc_short}} subnet as shown in the following diagram.
{: caption="Figure 1. Provisioning vCenter into a bare metal server" caption-side="bottom"}
{: #vpc-bm-vmware-vcenter-prereqs}
This tutorial requires:
- Common prereqs for VMware Deployment tutorials in {{site.data.keyword.vpc_short}}
This tutorial is part of series, and requires that you have completed the related tutorials. Make sure you have successfully completed the required previous steps:
- Provision a {{site.data.keyword.vpc_short}} for VMware deployment
- Provision IBM Cloud DNS service for VMware deployment
- Provision bare metal servers for VMware deployment
Login with IBM Cloud CLI with username and password, or use the API key. Select your target region and your preferred resource group.
When advised to use Web browser, use the Jump machine provisioned in the {{site.data.keyword.vpc_short}} provisioning tutorial. This Jump machine has network access to the hosts, the private DNS service and vCenter IP to be provisioned. Use url with FQDN, e.g. https://vcenter.vmware.ibmcloud.local
as used in this example.
{: note}
The used variables e.g. $VMWARE_SUBNET_MGMT, $VMWARE_BMS001 and $VMWARE_DNS_ZONE are defined in the previous steps of this tutorial. {: note}
{: #vpc-bm-vmware-vcenter-vlannic} {: step}
In this step, you will provision a VLAN NIC for vCenter into Instance Management Subnet
using VLAN 100
as the matching VLAN ID. Use server BMS001 / esx-001 here. When creating the VLAN NIC, allow it to float between the hosts.
NIC | Subnet | VLAN ID | Allow float | IP | MAC |
---|---|---|---|---|---|
vlan-nic-vcenter | $VMWARE_SUBNET_MGMT | 100 | yes | provided by VPC | provided by VPC |
{: caption="NIC Parameters" caption-side="bottom"} |
While {{site.data.keyword.vpc_short}} provides both IP and MAC addresses, you only need to use the IP address here when configuring the vCenter to use a static IP. {: note}
-
Create VLAN NIC for vCenter and record its IP address:
VMWARE_VNIC_VCENTER=$(ibmcloud is bm-nicc $VMWARE_BMS001 --subnet $VMWARE_SUBNET_MGMT --interface-type vlan --vlan 100 --allow-interface-to-float true --name vlan-nic-vcenter --output json | jq -r .id)
{: codeblock}
VMWARE_VCENTER_IP=$(ibmcloud is bm-nic $VMWARE_BMS001 $VMWARE_VNIC_VCENTER --output json | jq -r .primary_ip.address)
{: codeblock}
echo "vCenter IP : "$VMWARE_VCENTER_IP
{: codeblock}
-
Add vCenter IP to DNS Zone as A record:
ibmcloud dns resource-record-create $VMWARE_DNS_ZONE --type A --name vcenter --ipv4 $VMWARE_VCENTER_IP
{: codeblock}
-
Add vCenter PTR record to DNS Zone
ibmcloud dns resource-record-create $VMWARE_DNS_ZONE --type PTR --name $VMWARE_VCENTER_IP --ptrdname vcenter.$VMWARE_DNS_ZONE_NAME
{: codeblock}
-
Verification of vCenter DNS reverse lookup
nslookup -type=PTR $VMWARE_VCENTER_IP
{: codeblock}
{: #vpc-bm-vmware-vcenter-portgroup} {: step}
You need to create a temporary port group for vCenter's networking for the Standard Switch, i.e. add a Port Group for VLAN ID 100
.
- Login to host BMS001 / esx-001 as user
root
with a Web browser (https://<ip address>
){: external} using the hosts PCI interface IP address (echo $VMWARE_BMS001_MGMT_IP
). - Select Networking.
- On Port Groups tab, click
Add port group
. - For Virtual switch 0, add a Name pg-mgmt and select VLAN ID 100.
- Click Add.
{: #vpc-bm-vmware-vcenter-deployappliance} {: step}
The vCenter appliance will be deployed next. You can do this via the Jump host's Web browser.
- Download the latest VMware vCenter Server 7.0 (e.g. VMware-VCSA-all-7.0.3-20990077.iso{: external}) into your Windows Jump Machine.
- Order vCenter 7.0 license through IBM Cloud Classic portal.
- Mount the iso into the Operating System and note the location (e.g. <drive_letter>:).
If you do not have access to VMware customer connect, please contact IBM Cloud Support. {: note}
{: #vpc-bm-vmware-vcenter-deployappliance-1}
vCenter installation is split into two phases. In the first phase, the appliance is installed into the ESXi host.
Verify that vcenter.vmware.ibmcloud.local
resolves to the correct IP address prior continuing.
{: important}
-
Before continuing further with vCenter deployment, verify that
vcenter.vmware.ibmcloud.local
resolves to the correct IP address. List information about configured records in your DNS instancedns-vmware
and zonevmware.ibmcloud.local
, use the following command.ibmcloud dns resource-records $VMWARE_DNS_ZONE -i dns-vmware
{: codeblock}
-
Validate that you get correct responses for each entry (including the listed esx hosts) from your Windows Jump host, for example using
nslookup
via Windows command line.nslookup vcenter.vmware.ibmcloud.local
{: codeblock}
nslookup esx-001.vmware.ibmcloud.local
{: codeblock}
-
Start the VCSA UI installer (e.g. <drive_letter>:\vcsa-ui-installer\win32\installer.exe).
-
Click Install a new vCenter Server.
-
Deploy vcenter into BMS001 / esx-001 using the following parameters (match with your IP address plan and host names).
Parameter Value Target ESXi host esx-001.vmware.ibmcloud.local VM name vcenter Deployment size Small Storage size Default Datastore datastore1, thin Network pg-mgmt (VLAN ID 100) IPv4 static IP address 10.97.0.132 Host name vcenter.vmware.ibmcloud.local Subnet mask or prefix length 25 Default gateway 10.97.0.129 DNS servers 161.26.0.7, 161.26.0.8 HTTP Port 80 HTTPS Port 443 {: caption="vCenter Parameters" caption-side="bottom"}
{: #vpc-bm-vmware-vcenter-deployappliance-2}
After the previous step, vCenter installation continues with Phase 2.
-
Login to VMware vCenter Server Management as advised by the VCSA UI installer.
-
Use the following settings (match with your IP address plan and host names). Review the settings before finishing the wizard.
Parameter Value Network configuration Assign static IP address IP version IPv4 IP address 10.97.0.132 Subnet mask 25 Host name vcenter.vmware.ibmcloud.local Gateway 10.97.0.129 DNS servers 161.26.0.7, 161.26.0.8 Time synchronization mode Synchronize time with the NTP servers NTP Servers 161.26.0.6 SSH access Disabled SSO Details vmware.ibmcloud.local Username administrator CEIP setting Opted out {: caption="vCenter Parameters for Phase 2" caption-side="bottom"}
{: #vpc-bm-vmware-vcenter-dccluster} {: step}
{: #vpc-bm-vmware-vcenter-dccluster-dc}
In this step, a new Datacenter is created.
- Log into the vCenter Server using vSphere Client via Web Browser on the Jump machine.
- In the vSphere Client Host and Clusters view, right-click and select New data center.
- Enter a name, e.g.
VMware-On-IBM-Cloud-VPC
. - Finish the configuration.
{: #vpc-bm-vmware-vcenter-dccluster-cluster}
In this step, you will create a new Cluster.
- Log into the vCenter Server using vSphere Client via Web Browser on the Jump machine.
- In the vSphere Client Host and Clusters view, right-click and select New cluster.
- Enter a name, e.g.
Cluster-eu-de-1
. - Do not enable DRS or vSphere HA at this point.
- Review the details.
- Finish the configuration.
{: #vpc-bm-vmware-vcenter-dccluster-hosts}
Next, you need to add the deployed {{site.data.keyword.bm_is_short}} as hosts to the Cluster.
- Log into the vCenter Server using vSphere Client via Web Browser on the Jump machine.
- In the vSphere Client Host and Clusters view, right-click the created Cluster and select Add hosts.
- Enter the hostnames and credentials for each host, and Click Next.
- On Security Alert, manually verify these certificates and accept the thumbprints.
- On Host summary, validate configurations and Click Next.
- Review and finish the configuration.
Disable Maintenance mode, if needed.
{: #vpc-bm-vmware-vcenter-dvs} {: step}
Next, create a new distributed vSwitch.
- Log into the vCenter Server using vSphere Client via Web Browser on the Jump machine.
- In the vSphere Client Host and Clusters view, right-click a data center and select menu New Distributed Switch.
- Enter a name, e.g.
vds-vpc
. - Select the version of the vSphere Distributed Switch. In this example,
version 7.0.0
is used. - Add the settings. Set the number of uplinks to 1.
- You can create a default port group at this point (e.g.
dpg-management
), but additional port groups are needed e.g. for vMotion, vSAN, NSX-T TEPs, NFS etc. - Finish the configuration of the distributed vSwitch.
{: #vpc-bm-vmware-vcenter-dvs-mtu}
Modify distributed vSwitch MTU to 9000.
- Log into the vCenter Server using vSphere Client via Web Browser on the Jump machine.
- In the vSphere Client Networking view, right-click the
vds-vpc
. - Select Setting > Edit Settings.
- Click Advanced Tab, and modify MTU (Bytes) to 9000.
- Click OK.
{: #vpc-bm-vmware-vcenter-dvs-dpgs}
A single default port group was created for the management network. Edit this port group to make sure it has all the characteristics of the management port group on the standard vSwitch, such as VLAN id, NIC teaming, and failover settings.
In this example the VLAN ID
will be changed to be 100
, as this is where the vCenter is configured.
Create the additional Port Groups for the other VMKs:
- Hosts: dpg-vmk; no VLAN
- vMotion: dpg-vmotion; VLAN 200
- vSAN: dpg-vsan; VLAN 300
To create a Port Group in distributed switch:
- Log into the vCenter Server using vSphere Client via Web Browser on the Jump machine.
- On the vSphere Client Home page, click Networking and navigate to the distributed switch.
- Right-click the distributed switch and select Distributed port group > New distributed port group.
- On the Name and location page, enter the name of the new distributed port group, or accept the generated name, and click Next.
- On the Configure settings page, set the general properties for the new distributed port group and click Next.
- Use the VLAN type drop-down menu to specify the type of VLAN traffic filtering and marking. Select VLAN and in the VLAN ID text box, enter the VLAN number.
- (Optional) On the Security page, edit the security exceptions and click Next. No changes needed here for this example.
- (Optional) On the Traffic shaping page, enable or disable Ingress or Egress traffic shaping and click Next. No changes needed here for this example.
- (Optional) On the Teaming and failover page, edit the settings and click Next. No changes needed here for this example.
- (Optional) On the Monitoring page, enable or disable NetFlow and click Next. No changes needed here for this example.
- (Optional) On the Miscellaneous page, select Yes or No and click Next. No changes needed here for this example.
- On the Ready to complete page, review your settings and click Finish.
{: #vpc-bm-vmware-vcenter-vmotvmk} {: step}
Next, you need to configure a vMotion interface for the host using vCenter.
Configure a vMotion Interface as follows:
- Log into the vCenter Server using vSphere Client via Web Browser on the Jump machine.
- Click to select the host.
- Click the Configuration tab.
- Click Networking.
- Click Add Networking.
- Select VMkernel Network Adapter and click Next.
- Select the existing standard vSwitch and click Next.
- Enter a name in the Network Label to identify the network that vMotion uses.
- Select a VLAN ID from the VLAN ID dropdown, use VLAN ID
200
. Inherit or set the vSwitch MTU (9000) and click Next. - Select TCP/IP stack vMotion and select vMotion on Enabled services and click Next.
- Select Use static IPv4 settings.
- Enter the IP address and Subnet Mask of the host's vMotion Interface. Use the provisioned server's vMotion VLAN NIC's IP.
- Click Next, then click Finish.
Repeat this for each host.
{: #vpc-bm-vmware-vcenter-migratevmks} {: step}
With {{site.data.keyword.bm_is_short}}, a single uplink (PCI NIC) is used. To be able to migrate vmk interfaces smoothly, you need to follow the following procedure:
- Configure
VMWARE_BMS002
/ esx-002 andVMWARE_BMS003
/ esx-003 to use the distributed switch first. - Migrate vCenter to
VMWARE_BMS002
/ esx-002. - Configure
VMWARE_BMS001
/ esx-001 to use the distributed switch.
{: #vpc-bm-vmware-vcenter-migratevmks-vmk0-1}
In this step, you need to migrate the management network (vmk0) and its associated uplink (vmnic0) from the standard vSwitch to the distributed vSwitch (vDS) for VMWARE_BMS002
and VMWARE_BMS003
.
Perform this only for VMWARE_BMS002
/ esx-002 and VMWARE_BMS003
/ esx-003 at this point.
{: note}
Configure the distributed vSwitch as follows:
- Log into the vCenter Server using vSphere Client via Web Browser on the Jump machine.
- Right-click the vDS and select menu Add and Manage Hosts.
- Add hosts to the vDS. Click the
green Add icon (+)
, and add esx-002/esx-003 from the cluster. - Configure the physical adapters (
assign uplink-1
) and VMkernel adapters (assign to dpg-vmk
). - Click Manage physical adapters to migrate the physical adapters and VMkernel adapters, vmnic0 and vmk0 to the vDS.
- Select an appropriate uplink on the vDS for physical adapter
vmnic0
. For this example, useUplink1
. The physical adapter is selected and an uplink is chosen. - Select to migrate the management network on vmk0 from the standard vSwitch to the distributed vSwitch as follows. Select these steps on host
VMWARE_BMS002
/ esx-002 andVMWARE_BMS003
/ esx-003. - Select
vmk0
, and click Assign port groupdpg-vmk
. - Finish the configuration.
- Review the changes to ensure that you are adding two hosts, two uplinks (vmnic0 from each host), and two VMkernel adapters (vmk0 from each host).
- Click Finish.
- Check connectivity to the host, and clear alarms if needed.
{: #vpc-bm-vmware-vcenter-migratevmks-vc}
Next, you need to migrate the vCenter:
- Log into the vCenter Server using vSphere Client via Web Browser on the Jump machine.
- Click to select the vCenter Virtual Machine.
- Right Click, and select Migrate.
- Click Change both compute resource and storage, click Next.
- Select
VMWARE_BMS002
/ esx-002, click Next - Select
DataStore1
, click Next. - Change Port group to be
dpg-management
. - Click Next, then click Finish.
After the vCenter migration, you may execute the following IBM Cloud CLO command to validate that the vCenter's VLAN NIC has been moved to VMWARE_BMS002
/ esx-002.
ibmcloud is bm-nics $VMWARE_BMS002
{: codeblock}
{: #vpc-bm-vmware-vcenter-migratevmks-vmk0-2}
In this step, you need to migrate the management network (vmk0) and its associated uplink (vmnic0) from the standard vSwitch to the distributed vSwitch (vDS) for VMWARE_BMS001
.
Perform this only for VMWARE_BMS001
/ esx-001 at this point.
{: note}
Configure the distributed vSwitch as follows:
- Log into the vCenter Server using vSphere Client via Web Browser on the Jump machine.
- Right-click the vDS and select menu Add and Manage Hosts.
- Add hosts to the vDS. Click the
green Add icon (+)
, and add esx-002/esx-003 from the cluster. - Configure the physical adapters (
assign uplink-1
) and VMkernel adapters (assign to dpg-vmk
). - Click Manage physical adapters to migrate the physical adapters and VMkernel adapters, vmnic0 and vmk0 to the vDS.
- Select an appropriate uplink on the vDS for physical adapter
vmnic0
. For this example, useUplink1
. The physical adapter is selected and an uplink is chosen. - Select to migrate the management network on vmk0 from the standard vSwitch to the distributed vSwitch as follows. Select these steps on host
VMWARE_BMS002
/ esx-002 andVMWARE_BMS003
/ esx-003. - Select
vmk0
, and click Assign port groupdpg-vmk
. - Finish the configuration.
- Review the changes to ensure that you are adding two hosts, two uplinks (vmnic0 from each host), and two VMkernel adapters (vmk0 from each host).
- Click Finish.
- Check connectivity to the host, and clear alarms if needed.
{: #vpc-bm-vmware-vcenter-delvswitch} {: step}
Delete vSwitch0
on all hosts using the following method
- Log into the vCenter Server using vSphere Client via Web Browser on the Jump machine.
- Click on a host.
- Click on the Configure Tab.
- Click Networking, Virtual Switches.
- Expand the standard switch.
- Click the '...' and select Remove.
{: #vpc-bm-vmware-vcenter-next-steps}
The next step in the tutorial series is:
- OPTIONAL: Provision vSAN storage cluster
- OPTIONAL: Provision NFS storage and attach to cluster
- Provision {{site.data.keyword.vpc_short}} Subnets and configure Distributed Virtual Switch Portgroups for VMs
- Provision {{site.data.keyword.vpc_short}} Public Gateways and Floating IPs for VMware Virtual Machines