← Back to Course Index

Week 7 Lab: Preparing for the Cloud (Importing the Appliance)

Module: Operating Systems 3 (Virtualisation & Cloud Technologies)

Estimated Time: 45 Minutes
Lab Type: Deployment / Verification


Lab Overview

Installing OpenStack from scratch ("The Hard Way") takes hours and requires complex networking capable of failing easily. To allow us to focus on Using the cloud rather than debugging installations, the instructor has prepared a "Golden Image" (Appliance).

In this lab, you will import this pre-configured OpenStack Virtual Machine into VirtualBox and verify it is ready for next week.

Objectives:

  1. Import Appliance: Deploy the OpenStack .ova file into VirtualBox.
  2. Verify Resources: Ensure the VM has the required 16GB RAM and 4 vCPUs.
  3. Network Check: Verify connectivity between your Host (Ubuntu) and the Guest (OpenStack).

Prerequisites: 1. Host OS: Ubuntu Desktop (Physical Lab Machine). 2. Hypervisor: Oracle VirtualBox 7.x installed. 3. Source File: OpenStack_Lab_Appliance_v1.ova (Located on the Shared Drive / USB).


Part 1: Importing the Appliance

  1. Open VirtualBox:

    • Launch Oracle VM VirtualBox from the applications menu.
  2. Start Import Wizard:

    • Click File > Import Appliance... (or Ctrl+I).
    • Browse to the location of OpenStack_Lab_Appliance_v1.ova.
    • Click Next.
  3. Review Settings (Critical):

    • Name: Change to OpenStack-Lab-StudentName (e.g., OpenStack-Lab-Carlos).
    • RAM: Ensure it is set to 16384 MB (16 GB).
    • CPU: Ensure it is set to 4 (or more).
    • MAC Address Policy: Select "Generate new MAC addresses for all network adapters".
    • Click Finish/Import.
  4. Wait:

    • The import process may take 5-10 minutes depending on disk speed.

Part 2: Network Configuration

The appliance expects specific network settings to allow you to access the Dashboard (Horizon) from your browser.

  1. Settings Check:

    • Right-click your new OpenStack-Lab VM and select Settings.
    • Go to Network.
  2. Adapter 1 (Management/NAT):

    • Attached to: NAT.
    • Purpose: Allows the VM to access the internet to download packages.
  3. Adapter 2 (Host-Only / Expose):

    • Attached to: Host-Only Adapter.
    • Name: vboxnet0 (or similar).
    • Purpose: This is the "Data Cable" connecting your web browser to the OpenStack Dashboard.
  4. Start the VM:

    • Click Start.
    • Do not Login yet. Just wait for the login prompt: openstack login:

Part 3: Connectivity Verification

  1. Find the IP:

    • On the VM console (the black window), log in with:
      • User: student
      • Pass: password
    • Type ip a.
    • Look for the IP address on the second interface (usually enp0s8 or eth1). It should be something like 192.168.56.101.
  2. Ping from Host:

    • Open a Terminal on your physical Ubuntu computer.
    • Ping the guest: bash ping -c 4 192.168.56.101

    • Success: You receive replies.

    • Failure: Check VirtualBox "Host Network Manager" settings.
  3. SSH Access:

    • From your host terminal: bash ssh student@192.168.56.101

    • Say "yes" to the fingerprint.


Part 4: The Ultimate Test (Horizon Login)

If you can see the web dashboard, your cloud is ready for next week.

  1. Open Firefox:

    • On your physical host machine.
  2. Navigate to the URL:

    • http://<IP_ADDRESS_FROM_PART_3>/dashboard
    • Example: http://192.168.56.101/dashboard
  3. Login:

    • Domain: Default
    • User: admin
    • Password: password (or as provided by instructor).
  4. Verification:

    • You should see the OpenStack Overview page showing Compute limits (VCPUs, RAM).
    • If you see this, Success! You have a private cloud in your pocket.

Part 5: Hello, CLI (Command Line Interface)

Real cloud engineers use the terminal. Let's verify our cloud's "Heartbeat" using the OpenStack Client.

  1. Back to Terminal:

    • Return to your SSH session (ssh student@...).
  2. Source the Credentials:

    • OpenStack requires authentication. We use a "RC" file to load our passwords into environment variables. bash source admin-openrc

    • Note: If you don't do this, every command will say "Missing credentials".

  3. Check Compute Services (Nova):

    • Ask Nova: "Are all your agents alive?" bash openstack compute service list

    • Goal: Look for the State column. It should say up :-)

    • Record Status: [ _____________________________ ] (e.g., up)
  4. Check Network Agents (Neutron):

    • Ask Neutron: "Is the virtual switch running?" bash openstack network agent list

    • Goal: Verify Metadata agent, DHCP agent, and L3 agent are all :-).

    • How many agents are listed?: [ ________ ]
  5. Check Service Catalog (Keystone):

    • Ask the Cloud: "What APIs do you have?" bash openstack endpoint list

    • Goal: You should see a long list of URLs (Keystone, Nova, Glance, Neutron, Placement). This proves the Identity Service is healthy.

    • Field Check: Write down the Public URL for Keystone:
    • [ _________________________________________________________________ ]
  6. Check Hypervisor Status:

    • Ask Nova: "Do you have any CPU power?" bash openstack hypervisor list

    • Goal: You should see your node listed with State: up.

    • Record Hypervisor Hostname: [ _____________________________ ]

Lab Checkpoint

Reflection:


Instructor Signature: ___ Date: ___

← Back to Course Index