Sunday, October 10, 2010

Access Localhost Web Server (Host) through VirtualBox

Say that you want to install RHEL on a virtual machine in VirtualBox using the HTTP method (via network). Then you can setup a repository on your localhost using the first 4 of your 5 RHEL installation CDs and then add them to the local web server and access them through NAT in VirtualBox.

  • After copying all the binaries (from first 4 CDs) to the preferred location, configure the httpd.conf located at /etc/httpd/conf/ (in Fedora 13) by assigning an alias to the copied location.
    • eg:
               Alias /install "/install"
              <directory>
                   Options Indexes
                   AllowOverride None
                   Order allow,deny
                   Allow from all
              </directory>
             
  • Boot the virtual machine using the first RHEL cd and at the boot screen  type "linux askmethod" (without quote) and press
  • Select the HTTP method from the menu when asked
  • Enter 10.0.2.2 as the IP address and the alias as the location ("install" in this case)
  • The installation should pick up the repository and you are good to go. :)
Good Luck!

No comments: