Skip to content

Instantly share code, notes, and snippets.

@rosiel
Forked from DiegoPino/package-vagrant-box.md
Last active May 15, 2018 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rosiel/e67148a33af2b37e435e7a226242c175 to your computer and use it in GitHub Desktop.
Save rosiel/e67148a33af2b37e435e7a226242c175 to your computer and use it in GitHub Desktop.
How to create an Islandora VM

Creating a VM (.ova) from a vagrant box

  1. Get an up-to-date clone of Islandora Vagrant.
  2. Shut off all VMs, and destroy any existing VMs with the same name.
  3. vagrant up (and wait for the base box to load up)
  4. Log into Drupal and change the site name.
  5. Change the colours of the branding too, if appropriate.
  6. Clean up disk space. We just did a lot of apt-get so its cache is full.
$ sudo apt-get clean

Then, “zero out” the drive (this is for Ubuntu). The first command will exit with a failure, dd: error writing ‘/EMPTY’: No space left on device. This is expected.

$ sudo dd if=/dev/zero of=/EMPTY bs=1M
$ sudo rm -f /EMPTY

Lastly, let’s clear the Bash History and exit the VM:

$ cat /dev/null > ~/.bash_history && history -c && exit
  1. In VirtualBox, disable the shared folders under the box's Settings.
  2. In VirtualBox, power down the machine.
  3. In VirtualBox, export the appliance (File > Export Appliance). Use OVF 1.0 and no manifest. It will save as a .ova file.
  4. Get the md5 hash of that file. - see also AWS Instructions
$ openssl md5 -binary Islandora-7.x-1.11-RC1-VM.ova |base64
  1. Install and configure aws (with secret key)
  2. Upload it to Amazon, using this command line (changing the MD5, the --body file, and the --key.)
aws s3api put-object --bucket=islandoravm --content-md5=LRFeyMoqxnx89/YgkKmR9g==  --storage-class=REDUCED_REDUNDANCY --body Islandora-7.x-1.11-RC1-VM.ova --key 7.x-1.11/Islandora-7.x-1.11-RC1-VM.ova --content-type=application/vmware

Now you have a file at: ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment