Skip to content
Mark Bussey edited this page Jan 5, 2014 · 21 revisions

Building a Virtual Machine image for HydraDAM

Pre-requisites

  • VitualBox or other virtualization software (these instructions assume VirtualBox, but VMWare, Paralells, or other options should work)
  • Centos 6.3 or Ubuntu 12.1 64-bit install image
  • Host system with at least 20GB free disk space

Detailed Instructions

Step 1 - Create the basic Virtual Machine

  1. Start VitualBox Manager
  2. Create a new Virtual Machine
  3. Give the VM a name of your choice, eg. 'HydraDAM - Demo' - this name only identifies the machine in your VBox Manager, and does not need to match anything elsewhere
  4. Choose a type of 'Linux'
  5. Choose 'RedHat (64bit)' for Centos or RedHat; 'Ubuntu' for Ubuntu
  6. Click 'continue'
  7. Allocate 1024-4096 MB of memory depending available physical memory (this setting can be adjusted post installation) and click 'continue'
  8. Select the option to create a new virtual hard drive and click 'Create'
  9. Choose to create a VDI (VirtualBox Disk Image) (any disk type will work, we chose the default for these instructions) and click 'continue'
  10. Choose either 'Dynamically allocated' or 'Fixed Size' depending upon how much free disk space you are willing to tie up (if you will be moving your VM image to other physical systems, you may want to choose dynamic to reduce the file size to be copied)
  11. Use the default name (match the machine name) unless you have a different local convention
  12. Allocate 15GB for the drive
  13. Click 'Create' and VirtualBox Manager will show the new Virtual Machine in its main window

Step 2 - Install the Operating System, updates, and configure basic tools

  1. Click 'Settings' on the VM
  2. Select the 'Storage' tab
  3. Click the disk icon with a green plus next to "Controller: IDE"
  4. Click on 'Choose disk'
  5. Navigate to wherever you have your operating ISO image stored and select it. (the 'Storage Tree' should now show the ISO attached to the IDE controller
  6. Select the 'Network' tab
  7. Select 'Adapter 1'
  8. Set the attachment to 'Bridged Adapter' (use the defaults for all other settings unless you have specific local conventions for Virtual Machines)
  9. [optional] Enable the shared clipboard between your host system and VM by selecting the 'General' tab, 'Advanced' section, and setting 'Shared Clipboard' to 'Bidirectional'
  10. Click 'OK' to exit the settings configuration
  11. Click on the large green 'Start' arrow in the main Virtual Machine manager window to start the VM
  12. Depending on your operating system, make the appropriate choice to install the Operating System to the VM hard drive
  13. Follow the prompts to install your selected OS (you can usually use the default options)
    1. Give the system the hostname 'hydradam' or follow local convention1
  14. Shutdown the system $ sudo shutdown -h 0
  15. From the VirtualBox settings, remove the OS install ISO image attachment from the IDE Controller under the 'Storage Tree'
  16. Start the system again
  17. Create a default user named 'archivist'
    • For convenience, we add the 'archivist' user to the sudoers list (this may be frowned upon by your local ops staff - if so, follow local convention and/or revoke this setting once the install is complete)
    • $ sudo su
      # visudo
    • Vagrant set the secure_path to /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/vagrant/bin
    • Add the line archivist ALL=(ALL) NOPASSWD: ALL and save the changes by hitting ESC :wq
    • # exit to return to the archivist user context
  18. Activate your network connection sudo ifup eth0 - you must do this every time you reboot the vm
  19. Enable the NTP Service
  20. Update the system software
    • Centos: sudo yum update
    • Ubuntu: sudo apt-get update -y; sudo apt-get upgrade -y
  21. Reboot your VM to make sure any kernel updates from the previous step (apt-get / yum update) are active
  22. Install VirtualBox Guest Addition prerequisites
    • Centos:
      1. Add the epel6 repository su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm' - when prompted for a password, enter root user's password
      2. Install kernel headers and other dependencies for Guest Additions sudo yum install gcc dkms kernel-devel
    • Ubuntu:
      1. Install kernel headers and other dependencies for Guest Additions sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)
  23. Install VirtualBox Guest Additions (Host+D in your virtual machine or 'Devices'/'Install Guest Additions' from the Virtual Machine menu)
  24. Add the the 'archivist' user to the VirtualBox shared folders group
    sudo usermod -aG vboxsf archivist
  25. Install and configure Avahi to enable dynamic name resolution on the local area network
    • Ubuntu: installed and configured as part of default installation
    • Centos: sudo yum install avahi avahi-autoipd avahi-compat-libdns_sd avahi-glib avahi-gobject avahi-tools nss-mdns nss-mdns.i?86 kdelibs
      Verify your nsswitch.conf file is ready for Avahi:
      grep '^hosts:' /etc/nsswitch.conf
      Should return hosts: files mdns4_minimal [NOTFOUND=return] dns mdns
      Verify the service is set to start on boot
      sudo chkconfig --list avahi-daemon
      sudo service avahi-daemon status
  26. Enable Multicast DNS in your firewall (udp port 5353) - use system-config-firewall for systems with a gui head; otherwise add the following line to /etc/sysconfig/iptables before the REJECT line: -A INPUT -p udp -m udp --dport 5353 -m comment --comment "mDNS" -j ACCEPT
  27. Make sure sshd is enabled if you need to support ssh connections

Step 3 - Install your hydra head

Start with the Production Installation: Overview

Clone this wiki locally