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:
A fully operational PCD environment with:
- A configured Image Library node
- A Block storage node for storage management
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:
- Navigate to "Deploy Virtual Machine"
- Select "Boot VM from image"
- Choose the uploaded ISO image
- Configure flavor and network settings
- Specify VM name
- 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:
Navigate to Volumes → Create New Volume
Select "Empty Volume"
Configure volume parameters:
- Name
- Size
- Volume type
- Enable bootable flag
Attach volume through VM management interface:
- Virtual Machines → Select VM
- Select 'Manage Volumes' action.
- 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