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:

  • POD04-WEB-SRV-01
  • POD04-WEB-SRV-02
  • POD04-APP-SRV
  • POD04-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: pod4u1 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 [pod4] ***********************************************************************************
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 ******************************************************
POD4-APP-SRV              : ok=5    changed=2    unreachable=0     
POD4-DB-SRV               : ok=5    changed=2    unreachable=0     
POD4-WEB-SRV-01           : ok=5    changed=2    unreachable=0     
POD4-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:pod4u1 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 POD04-WEB-SRV-01

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

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

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

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

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

Step 5 - Console to POD04-APP-SRV

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

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

Step 6 - Console to POD04-DB-SRV

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

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

Step 7 - Finish the Hosts Network Configuration

It is important for the hosts to finish their bootup process before continuing.

Click on the browser tab where you have the session to pod4u1@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 [pod4] ***********************************************************************************
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 *************************************************************************************
POD4-APP-SRV              : ok=6    changed=6    unreachable=0    failed=0    skipped=1    
POD4-DB-SRV               : ok=6    changed=6    unreachable=0    failed=0    skipped=1    
POD4-WEB-SRV-01           : ok=7    changed=7    unreachable=0    failed=0    skipped=0    
POD4-WEB-SRV-02           : ok=6    changed=6    unreachable=0    failed=0    skipped=1