Create a Ubuntu Virtual Machine Using ISO Image

This guide outlines deploying a Ubuntu linux virtual machine using an ISO image in Private Cloud Director environment. The procedure involves uploading an ISO, creating a VM, attaching storage, installing OS, and converting the result into a reusable image.

Prerequisites

Before beginning the deployment process, ensure your environment meets the following requirements:

  1. A fully operational PCD environment with:

    1. A configured Image Library node

    2. A Block storage node for storage management

  2. Local access to the desired ISO image on a machine with network connectivity to the Image Library node

Deployment Process

Upload ISO Image to Image Library

Upload the ISO image to the image library service using the OpenStack CLI:

# Create a new image entry
openstack image create \
    --insecure \
    --container-format bare \
    --disk-format iso \
    --public \
    --file ubuntu-20.04.6-live-server-amd64.iso \
    ubuntu-iso

Verify image status

openstack image show IMAGE_ID --insecure --fit-width

Deploy Virtual Machine

Deploy a VM using either the UI or CLI:

Using CLI:

openstack server create \
    --image ubuntu-iso \
    --nic net-id=NETWORKUUID \
    --flavor FLAVOR_ID \
    INSTANCE_NAME

Using UI:

  1. Navigate to "Deploy Virtual Machine"

  2. Select "Boot VM from image"

  3. Choose the uploaded ISO image

  4. Configure flavor and network settings

  5. Specify VM name

  6. Initiate deployment

Configure Bootable Volume

Create and attach a bootable volume to store the operating system installation:

Creating volume via CLI:

openstack volume create \
    --size SIZE_IN_GB \
    --bootable \
    VOLUME_NAME

Attach volume via CLI:

openstack server add volume \
    INSTANCE_NAME \
    VOLUME_NAME \
    --device /dev/vda

Using UI:

  1. Navigate to Volumes → Create New Volume

  2. Select "Empty Volume"

  3. Configure volume parameters:

    1. Name

    2. Size

    3. Volume type

    4. Enable bootable flag

  4. Attach volume through VM management interface:

    1. Virtual Machines → Select VM

    2. Select 'Manage Volumes' action.

    3. Attach the newly created volume

Install Ubuntu

You can access the virtual machine console through PCD UI by navigating to Virtual Machines menu option, then identifying the VM in the grid view, then selecting 'console' action for the VM. Use the console to complete the OS installation process according to your requirements.

Create Image from Volume

After you've successfully installed Ubuntu, remove the temporary virtual machine instance:

openstack server delete INSTANCE_NAME

Convert volume to image:

openstack image create \
    --volume SOURCE_VOLUME \
    IMAGE_NAME

Deploy VM from Image

Deploy the final virtual machine using the newly created image through either:

  • Virtual Machines menu option in Private Cloud Director UI, selecting the image created in step 5

  • CLI using the standard OpenStack server create command with the new image

Last updated

Was this helpful?