Showing posts with label ova. Show all posts
Showing posts with label ova. Show all posts

Wednesday, January 2, 2019

Build a VM using an OVA Template

On a previous post we have gone through a basic Windows 10 VM setup. A lot of steps involved, where we had to specify the RAM, CPU, Disk space etc. It would be nice if there was a template that can do that for us. Actualy there is.We can use OVA or OVF templates and actually extract that information to our Virtual Box. 

We can use 7zip and open any OVA file. For example the VyOS OVA was mentioned on another post



We can see that this file contains:
- OVF: An XML file that has various settings/options, for example CPU, RAM, HDD etc. 


We can see that this specific VM will use Linux - Debian x64 OS. 

  <OperatingSystemSection ovf:id="96" ovf:version="6" vmw:osType="debian6_64Guest">
      <Info>The operating system installed</Info>
      <Description>Debian GNU/Linux 6 (64-bit)</Description>
  </OperatingSystemSection>

- VMDK (Virtual Machine Disk) file
- Cert - A certificate that the OVA file is signed and needs to be trusted by our HyperVisor. 
- MF - Manifest file used for integrity checks. The MF file contains the SHA-1 hash of all files except the .mf (itself) and the .cert file, ovf and vmdk in our example. 

SHA1(VyOS-1.1.8-amd64.ovf)= 89cac831437d96ca728917e73227e895fd70e9eb
SHA1(VyOS-1.1.8-amd64-disk1.vmdk)= 21a7cdf0f47fa32ca148017f459c6d1ea59d777b 

As we can see the disk size is around 250MB and actually it does contain the installed OS. 



In other OVA files, for example the Cisco CSR 1000V we can see that the disk is a few kb (almost empty), so there is no OS installed. But we can also see that this OVA file includes the ISO image that we can use to install the Cisco Virtual Router. 



The manifest file is shown 

SHA1(csr1000v-universalk9.16.09.02-vga.ovf)= c7c2e4c299f055c841e061550392b0a43e1ecfc1
SHA1(csr1000v_harddisk.vmdk)= 94bdfb796ae9635b188e75efb52f5b895eca8340
SHA1(bdeo.sh)= aac24513098ec6c2f0be5d595cd585f6a3bd9868
SHA1(README-OVF.txt)= c5bb6a9c5e8455b8698f49a489af3082c1d9e0a9
SHA1(README-BDEO.txt)= 39bcf8ed259e5a9c9f1b5671f738fb904d73f635
SHA1(cot.tgz)= a305b8a9bc67e1f00d5b6ab8ac0c076f2af9f495
SHA1(csr1000v-universalk9.16.09.02-vga.iso)= 86400b573a6bcab7509aef22008b21db2d39c3f0



Cisco (CUCM) Call Manager 12.0.(1) OVA file: The last example doesn't contain any ISO files and the disks do not have an OS installed. Why should we use it? Some vendors, like Cisco have strict specifications when you create VMs. If you ignore the specific VM Requirements that are contained on the OVA file, then Cisco may not be able to offer you technical support, until you adjust your system to the correct settings. So we can use the OVA file to create the VM Settings and then download the ISO file and install the OS. 


Let's see how we can create a new VM using the OVA file

File > Import Appliance...



Load the OVA file

 
We are getting a Certificate warning (expired) but we can skip that, press Yes




Below we can see all the settings that the OVA file will select for us - we will only change the location Folder and press Import



Our VM has been automagically created and we can Power it on.


Or we can further Edit the VM. 





Sunday, December 30, 2018

Troubleshooting - VyOS - Failed to Start VM - VirtualBox

I exported the VyOS Application from the (VMWare) OVA Template provided on their Website
The installation was successful, I was able to login to the console and run the basic commands. The problem was that when I was putting the VM on pause state , I was not able to Start it again. 




Failed to open a session for the virtual machine VyOS-1.1.8.

Failed to load unit 'lsilogicscsi' (VERR_SSM_LOADED_TOO_LITTLE).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

I believe this was because I used the OVA Template that was provided by VyOS, instead of the ISO image. The OVA Template was optimised for a VMWare machine and I am using VirtualBox.

Let's see what the OVA file contains. We will open the file with 7zip 





The zip file contains a Disk (*.vmdk file). We will create a new VM from scratch and mount that extracted file.  

We will also extract (7zip) and then open the VyOS-1.1.8-amd64.ovf file using Notepad++ 

From there we can find all the necessary settings required, in order to create the VM, for example x1 vCPU, 512MB RAM etc.  






OS = Debian x64

 <OperatingSystemSection ovf:id="96" ovf:version="6" vmw:osType="debian6_64Guest">
      <Info>The operating system installed</Info>
      <Description>Debian GNU/Linux 6 (64-bit)</Description>

    </OperatingSystemSection>









Select "Use an existing Virtual Disk" and add the VyOS-1.1.8-amd64-disk1.vmdk file we extracted from the OVA file earlier. After that we can press create. The VM is now ready, so we can start it. 


We can now put the VM on pause state.


Okta Workflows - Send Customised Email

Simiar to the previous flows, where we sent a Slack message to users assigned to a new app, we can send a Welcome Email message. This mess...