PortGroup
Add MGMT PortGroup to VM

During this step of the lab, you will be adding the appropiate Management EPG to the Virtual Machines (VMs) in order for the VMs to be able to obtain their management IP address. To simplify the lab, the DCHP server is already configured and operating to provide the addresses for your POD.

The VM's will be using Network Adapter 1 (eth0) for their management connection. We have created 4 VM's for this exercise:

  • POD03-WEB-SRV-01
  • POD03-WEB-SRV-02
  • POD03-APP-SRV
  • POD03-DB-SRV

Step 1 - Set Management port group to Network Adapter 1

Click the terminal icon on the left to open the lab ansible host cl-srv1 Username: pod3u1 Password: cisco.123

Log to the lab ansible host and run the playbook bellow


    cd cl-vm


    ansible-playbook -i inventories/cl-vm/cl-vm.yml cl-vm.yml -t eth0,power_on

PLAY [pod3] ***********************************************************************************
The following task would be run:
    1. [cl-vm/set_portgroup : get VM info] 
    2. [cl-vm/set_portgroup : Set port group for Network Adapter 1]
    3. [cl-vm/power : Gather VM Runtime State]
    4. [cl-vm/power : Set VM Properties] 
    5. [cl-vm/power : Power On VM]

PLAY RECAP ******************************************************
POD3-APP-SRV              : ok=5    changed=2    unreachable=0     
POD3-DB-SRV               : ok=5    changed=2    unreachable=0     
POD3-WEB-SRV-01           : ok=5    changed=2    unreachable=0     
POD3-WEB-SRV-02           : ok=5    changed=2    unreachable=0   

Step 2 - Connect to VMware vSphere

You should still have the browser window open towards the vSphere client, but if you don't then click here with the credentials of username:pod3u1 and password:cisco.123

Once you logged to VMware vSphere Webb Client, you should see the following screen which includes your DC, hosts and the 4 VMs that we will be leveraging during this section.

Step 3 - Console to POD03-WEB-SRV-01

Navigate to POD03-WEB-SRV-01 and console to the VM:

  1. Click on POD03-WEB-SRV-01
  2. Click on Launch Web Console

Step 4 - Console to POD03-WEB-SRV-02

Navigate to POD03-WEB-SRV-02 and console to the VM:

  1. Click on POD03-WEB-SRV-02
  2. Click on Launch Web Console

Step 5 - Console to POD03-APP-SRV

Navigate to POD03-APP-SRV and console to the VM:

  1. Right click on POD03-APP-SRV
  2. Click on Launch Web Console

Step 6 - Console to POD03-DB-SRV

Navigate to POD03-DB-SRV and console to the VM:

  1. Right click on POD03-DB-SRV
  2. Click on Launch Web Console

Step 7 - Finish the Hosts Network Configuration

Click on the browser tab where you have the session to pod3u1@cl-srv1 ansible host and execute the playbook below:


    ansible-playbook -i inventories/cl-vm/cl-vm.yml cl-vm.yml -t host_cfg

PLAY [pod3] ***********************************************************************************
The following task would be run:
    1. [cl-vm/set_hostname : Set hostname] 
    2. [cl-vm/set_hostname : Update /etc/hosts file] 
    3. [cl-vm/set_hostname : Set hostname FQDN]
    4. [cl-vm/set_network : Configure network interfaces]
    5. [cl-vm/set_network : Restart networking service]
    6. [cl-vm/set_routes : Add IP route] 
    7 [cl-vm/set_routes : Update Route Table On WEB-SRV] 

PLAY RECAP *************************************************************************************
POD3-APP-SRV              : ok=6    changed=6    unreachable=0    failed=0    skipped=1    
POD3-DB-SRV               : ok=6    changed=6    unreachable=0    failed=0    skipped=1    
POD3-WEB-SRV-01           : ok=7    changed=7    unreachable=0    failed=0    skipped=0    
POD3-WEB-SRV-02           : ok=6    changed=6    unreachable=0    failed=0    skipped=1     
Need to check if direc url to console is posible: https://vcenter-cl.ecatsrtpdmz.cisco.com/ui/webconsole.html?vmId=vm-28351&vmName=POD32-WEB-SRV-01&numMksConnections=1&serverGuid=538806b5-a79c-45ab-9640-f6a87eda9491&locale=en-US