We are working on automated testing of virtual appliance. This appliance has a EULA which blocks all services from starting before accepted at first. There are separate ways to solve or workaround this obstacle:
- Edit OVF and MF files to erase the EULA section and to update the signature.
- Redirect console output and input to the SSH session and to accept it with SSH client.
- Use 3rd party products, like OvfTool which can deploy appliance from command line with EULA acceptance.
- Implement EULA acceptance option when connecting to vCenter API and using ImportVApp.
Solutions #1 and #3 seemed too dirty and we did not manage to make solutions #2 and #4 work. So, we went with an alternative approach. The basic concept is that upon EULA acceptance, the event needs to be registered at the persistent storage, so that EULA is not displayed during subsequent boots. So, we accepted EULA and ran command which displays files that were changed recently (something like, find . -mmin -5)
. After some digging, we found the relevant code in /opt/vmware/share/vami/vami_ovf_process
, function ignoreEula()
. The trick is to change the code to make this function return zero always. This will eliminate EULA appearance.