oVirt: Creating a VM
Simple guide for creating a VM using oVIRT
In this step by step guide we will create a VM using oVirt and highlight the differences between oVirt and vCenter as necessary to help admins migrate vSphere skills to oVirt with ease
Here is discussed the whole process from transferring files to running a VM for the first time. On each step we elaborate below:
STEP1: Downloading and uploading your ISO.
First we make a decision on what VM we want to install. In this scenario we will grab Server 2012 as we already have license for one.Once the ISO is downloaded from Microsoft or elsewhere we need to upload the ISO to oVirt. This is plain file transfer between two machines, feel free to use SFTP, SCP, FTP as suitable. In our scenario SCP is used as the transfer is between to Linux client and SCP is built in CLI package to move files across.-
- Check we have the ISO in our Documents directory
- Upload the file to the ovirt server in then ISOs directory
- Login to the ovirt server and upload the files to the corresponding iso domain already created there. If you require instructions on how to setup an iso domain in ovirt, please see instructions from our previous post
Just a reminder however, compared to vSphere where you can out your ISO files on any available Datastore; in ovirt there is a separate storage domain only for ISO images also referred as an ISO Domain and separate domain where the VM files are stored also referred as an DATA Domain.
vSphere Datastore = oVirt ISO+DATA Storage Domain
To upload the files in oVirt, you need to use a CLI tool called engine-iso-uploader tools.
We use this tool to upload the previously transferred ISO to an ovirt ISO storage domain defined is iso1:

Once the file is uploaded it will become visible in ovirt:

STEP2: Preparing the VM environment
In oVirt, for optimal performance the VM needs to run VirtlO-SCSI disk. This is fine for Linux guest as linux comes with native support for VirtlO, however that is not the case for Windows.This drivers are found in an prepackaged iso available from different sources. As we use CentOS we will download them from Fedora distro as described here
Once downloaded we use the engine-iso-uploader to upload the files to our iso domain (I uploaded the iso image and the floppy image for x64 bit systems only):


Before Windows guest can see its VirtlO-SCSI HDD we created, need to install the drivers from this ISO/Floppy. In the example below, I used the Floppy Drive to install the drivers for our HDD
STEP3: Creating the VM
First we create the VM, specifying Name, Size, Optimisation etc..:
Second we create a VirtIO-SCSI disk stored on one of the available Data Storage Domains:

Third, we than mount installation ISO:

Fourth, we run the VM and boot of the installation ISO. Here we make sure we also attach the Floppy with the drivers:






Fifth, we cannot see the VirtIO HDD created before and cannot install Windows. At this point we need to install the custom drivers from the Floppy drive we attached on boot.



Sixth, voila! - The HDD can be seen and we can proceed with standard Windows installation steps:


STEP4: Adding network interface
The VM we just created does not have a network interface. We need to add new interface now


Same as with vSphere and VMXNET3, the Interface is not immediately available in the Windows guest as the VirtIO drivers are missing.

Same as with vSphere vmware-tools, the VirtIO driver are installed using ovirt-tools.
Installation instructions here. Scroll to the end of the page.
Same as before, once installed use the engine-iso-uploader tool to upload them to your ISO Storage Domain.
Once the ovirt-tools-setup.iso is uploaded in the ISO Storage Domain, mount the ISO to the VM <right click> + <Change CD>:


Browse the CDROM and run the installer which will install all the VirtIO drivers.


The newly assigned NIC is now visible in Control Panel.

PS: This is the first heavy GUI oVirt post. Usually oVirt posts are heavy on CLI. Hope you enjoyed it. Please feel free to post any questions below
Comments
Post a Comment
Feel free to engage in conversation.
New problems are solved by new thinking.