Skip to end of metadata
Go to start of metadata

this video tutorialThis page describe how to run electra.ova/electra.ovf virtual machine file on Windows, change it and save as OVF to import back to VMWare ESX infrastructure.

VMware Player version

How to start virtual machine in localhost from *.ova/*.ovf file in VMware Player:

  1. download electra.ova (TODO public location?)
  2. download VMware player for Windows 32-bit and 64-bit - in this example for backward compatibility with Virtual Hardware Version 8 we use Player 4.x
  3. install VMware-player-4.0.6-1035888.exe
  4. run VMWare Player from Start --> All Programs --> VMware
  5. click 'Open a Virtual Machine', change 'File of type' to 'All image files', browse electra.ova and Open
  6. set name of the new virtual machine (default electra) and browse a Storage where you convert *.ova (Open Virtual Machine Format Image) to *.vmx (VMWare Configuration File) - required approx. 12GB free space
  7. when you see an alert message about OVF specification conformance click 'Retry', importing takes a few minutes
  8. before you start new Virtual machine, check if you have correctly configured VMnet0 Network Connection for bridged networking
    1. see this video tutorial or:
    2. go to download folder
    3. run command 'VMware-player-4.0.6-1035888.exe /e extract' to extract *.exe content
    4. open/extract network.cab, copy vmnetcfg.exe to VMware Player instalation location
    5. run vmnetcfg.exe, choose VMnet0, change Bridged to: 'automatic' to your physical network connection (in my case 'Intel(R) 82579LM Gigabit Network Connection'), click 'Apply', (wait) and 'Ok'
  9. select your virtual machine, click 'Edit virtual machine settings'
  10. click 'Add' to add second network adapter (primary eth0 in ubuntu is configured to static IP adress 46.29.2.140 - don't change and don't USE IT!!!), select 'Network Adapter', click 'Next >', choose 'Bridge' and click 'Finish' and 'OK'
  11. Play virtual machine, when Software Update dialog opened, click 'Remind Me Later'
  12. log in as ubuntu, password (TODO, is public?)
  13. to start network communication between your computer and virtual machine run these commands:
    1. sudo dhclient -r
    2. sudo dhclient eth1
    3. ifconfig eth1 --> in section 'inet addr' see IP adress (in my case 192.168.0.109)
  14. in VMplayer window pres CTRL+ALT to go out, open in browser ip adress (in my cases http://192.168.0.109/ --> will redirected to midpoint login page) to start midpoint login page
  15. for more info see Live Demo
  16. to shut down virtual machine run 'sudo poweroff', VMware Player windows is closed

How to export to ESX from VMWare player (converting *.vmx to *.ovf/*.ova)

  1. download ovftool from VMWare. Install the software and after the installation:
  2. find your virtual machine working directory:
    1. run VMware Player
    2. select virtual machine
    3. click 'Edit virtual machine settings'
    4. click to tab 'Options', see 'Working directory'
  3. find your ovftool directory and run 'cmd'
  4. latest version of ovftool use SHA256 hash algorithm so you need to override the default hashing algorithm when exporting
    1. --shaAlgorithm=sha1
  5. type ovftool --shaAlgorithm=sha1 "C:\the path to your VM\your VMname.vmx"  "c:\new directory\name.ovf"  (or name.ova)
  6. at the end you see 'completed successfully'
  7. it created also *.vmdk - VMware virtual disk file and *.mf checksums
  8. to import in ESX infrastructure you need to send/transfer *.vmdk and *.ovf files  (or *.ova)

Oracle VM VirtualBox version

When you develop and change a lot of configuration in demo virtual machine, the easiest way to backup and rollback to last valid state is using snapshots (saved virtual machine states).

VMware Player not support snapshots, but VirtualBox has this nice feature in runtime.

How to start virtual machine in localhost from *.ova/*.ovf file in Virtualbox:

  1. download Oracle VM Virtualbox, install and run it.
  2. click File --> Import Appliance, browse electra.ova and click 'Next', and 'Import'.
  3. after finished, select new virtual machine and click to 'Settings' --> Network --> Adapter 2, check 'Enable Network Adapter', attached to 'Bridged Adapter' and click 'OK'
  4. see the 'Snapshots' button where you can Take, Restore or Delete a snapshot
  5. click on 'Start' to run the virtual machine
  6. Play virtual machine, when Software Update dialog opened, click 'Remind Me Later'
  7. log in as ubuntu, password (TODO, is public?)
  8. to start network communication between your computer and virtual machine run these commands:
    1. sudo dhclient -r
    2. sudo dhclient -eth1
    3. ifconfig eth1 --> in section 'inet addr' see IP adress (in my case 192.168.0.109)
  9. set IP address and netmask for eth1 (if your IP is 192.168.0.109 you have to set 192.168.0.110: 

    1. sudo ifconfig eth1 192.168.0.110 netmask 255.255.255.0 up

  10. in VMplayer window pres left CTRL to go out, open in browser ip adress (in my cases http://192.168.0.110/ --> will redirected to midpoint login page) to start midpoint login page
  11. for more info see Live Demo
  12. to shut down virtual machine run 'sudo poweroff', VMware Player windows is closed

How to export to ESX from VirtualBox (*.ova)

In VirtualBox You can export Oracle virtual machine to *.ova/*.ovf format with snapshots. But in some cases VMWare ESX infrastructure not support correctly this feature. The solution is to clone the required snapshot state to a new virtual machine without snapshots and export this new virtual machine.

  1. run Oracle VM Virtualbox, select required virtual machine if you have more then one
  2. click to 'Snapshots' (right up corner)
  3. select the right snapshot to clone (for example 'Current State')
  4. right click and select 'clone...', enter new machine name (for example  'electra new'), click 'Next', select 'Full clone', click 'Next', select 'Current machine state' and click 'Clone'.
  5. select 'electra new',  run File --> Export Appliance and save as *.ova.
  6. you need to import this to VMware Player, run it, check it and export it (see section 'VMware Player version') as *.ovf
    1. this workaround is tested with demo electra virtual machine and working well

How to downgrade VMWare version (*.vmx)

If you need to downgrade VMWare hardware you can do it with VMWare vCenter Converter Standalone client.

  1. Open VMWare vCenter Converter Standalone client
  2. click to 'Convert maschine'
  3. browse Virtual machine file what you need to convert (VMware Player virtual machine directory when we get an error message "The configuration file *.vmx was created by a VMware product that is incompatible with this version of VMware Player and cannot be used.")
  4. click next >, select VMware product: VMware Player 4.0.x, set virtual machine name and new location, click next >, next >, Finish
  5. converting is started, you can see actual status

How To Set Up Custom Login Page And Google Analytics Code

  1. open: https://github.com/Evolveum/midpoint/tree/master/samples/demo
    1. see: PageLogin.html, PageBase.html
  2. For Custom Login Page:
    1. navigate to: sudo vim /var/lib/tomcat8/webapps/midpoint/WEB-INF/classes/com/evolveum/midpoint/web/page/login/PageLogin.html
    2. add snippet surrounded by <!-- begin changes --> ... <!-- end changes -->
  3. For Google Analytics code:
    1. navigate to: sudo vim /var/lib/tomcat8/webapps/midpoint/WEB-INF/classes/com/evolveum/midpoint/gui/api/page/PageBase.html
    2. add snippet surrounded by <!-- begin changes --> ... <!-- end changes -->

 

How to upgrade electra demo from VirtualBox

  1. test it:
    1. custom login page and google analytics code is set?
    2. static IP address is set?
    3. shadow details are linked?
    4. test scenarios from here
    5. cleanup after testing
      1. HR resource is cleaned?
      2. LDAP is cleaned?
    6. tasks are green?
    7. clean unused tasks
    8. after apt-get update check Provisioning self test & fix "Illegal key size" if java is upgraded
  2. export virtual machine from Virtual box to *ova, see "How to export to ESX from VirtualBox (*.ova)" chapter
  3. convert *ova to *.vmx, open *.ova in VMware player, see "How to start virtual machine in localhost from *.ova/*.ovf file in VMware Player" chapter and 5.–>7. points
  4. created *.vmx downgrade with vCenter converter, see: "How to downgrade VMWare version (*.vmx)" chapter
    1. run it to check if it's OK - boot loader is OK?
  5. convert downgraded *.vmx to *.ova, see: "How to export to ESX from VMWare player (converting *.vmx to *.ovf/*.ova)" chapter
  6. upload *.ova result to FTP 

 

  • No labels