In this part of the series we’re going to work through complete process of Adding images used to soin virtual machines on Openstack Cloud platorm.I will show you how to use virt-install tool to install OS from an ISO image and export it.
I assume you’ve already covered all other Parts of the series. They include:
Let’s dive into process of creating and uploading virtual machine images.We’ll do all installations using virt-install command.
In order to use virt-install command, you should have install all KVM packages from Part 1 and 2 of the series. If you didn’t do it, you can do it here:
For Ubuntu/Debian systems do:
For RHEL/CentOS 7:
For Arch Linux read:
You can now create virtual Machine image for glance. I will demonstrate installation of Ubuntu 14.04 server and CentOS 7.2 server image files.
First copy CentOS 7 iso image to /var/lib/libvirt/images/. You can download it from official CentOS page:
- Create qcow2 image disk:
- Installing CentOS 7 using virt-install command.
You can use ISO image obtained online while doing installation. Just point –location option to its url .
Installing Ubuntu/Debian using virt-install command.
- Launch install process:
- You can Check os variant using:
Next step is adding images created to , steps are:
- Make VM ready for export.
- Start guest machine, then:
For an instance to access the metadata service, you must disable the default zeroconf route:
- Shutdown the instance, then clean up MAC address details:
We can now upload virtual machines images to the Image service.
- Make sure network boot protocol is set to DHCP on th virtual machine.
- Uncomment or remove UUID set in network configuration file.
Add CentOS server image:
Add Ubuntu Server image:
- Check list of images added:
You’re ready to launch a virtual machine off the images you just added.We’ll do so in the next part of the series.
Glance images can be deleted using glance image-delete command as shown below:
You can delete present image using the command glance image-delete: