Line 1: |
Line 1: |
| + | {{warning box|this how to is out of date. You probably wants to install the smeserver-phpvirtualbox and smeserver-virtualbox contribs for SME8 and SME9, then see here : [[Phpvirtualbox]]}} |
| + | |
| ===Maintainer=== | | ===Maintainer=== |
| [http://www.compsos.com.au CompSOS] | | [http://www.compsos.com.au CompSOS] |
Line 27: |
Line 29: |
| <li value="4">Check your current kernel.</li> | | <li value="4">Check your current kernel.</li> |
| <pre>uname -r</pre> | | <pre>uname -r</pre> |
− | <li value="5">Install kernel-devel to get the latest development tree. Latest kernel at the time of writing is 2.6.18-308.13.1.el5.<br/> | + | <li value="5">Install kernel-devel to get the latest development tree.<br/> |
− | Use this command only if you have a PAE kernel installed: | + | Use the command below, only if you have a PAE kernel installed: |
| <pre>yum clean all | | <pre>yum clean all |
| yum install kernel-PAE-devel kernel-headers | | yum install kernel-PAE-devel kernel-headers |
Line 112: |
Line 114: |
| | | |
| <li value="22">Open a terminal window to the SME Server and create a directory to store the virtual machine images.</li> | | <li value="22">Open a terminal window to the SME Server and create a directory to store the virtual machine images.</li> |
− | <pre>mkdir -p /opt/vms</pre> | + | <pre>mkdir -p /root/VirtualBox VMs/addons</pre> |
| <li value="23">Download the VirtualBox Guest Additions iso for later installation into your virtual machine guests.</li> | | <li value="23">Download the VirtualBox Guest Additions iso for later installation into your virtual machine guests.</li> |
− | <pre>mkdir -p /opt/vms/addons | + | <pre>cd /root/VirtualBox VMs/addons |
− | cd /opt/vms/addons | |
| wget http://download.virtualbox.org/virtualbox/4.3.6/VBoxGuestAdditions_4.3.6.iso</pre> | | wget http://download.virtualbox.org/virtualbox/4.3.6/VBoxGuestAdditions_4.3.6.iso</pre> |
| | | |
| <li value="24">Using a web browser, Go to http://yourdomain.com/phpvirtualbox and connect to the phpVirtualBox web application. | | <li value="24">Using a web browser, Go to http://yourdomain.com/phpvirtualbox and connect to the phpVirtualBox web application. |
− | <ul>
| |
− | <li>From the menu provided, go to select File->Preferences.</li>
| |
− | <li>Select the "General" tab.</li>
| |
− | <li>Change the Default Machine Folder to:
| |
− | <pre>/opt/vms</pre>
| |
− | </li>
| |
− | </ul>
| |
| At this point, VirtualBox should now be configured and running correctly. If you encounter problems, please recheck that you have setup VirtualBox as a service so it starts automatically after a reboot, and that your vbox.cfg file is configured correctly. To manage VirtualBox and any virtual machines, use the command line utility VBoxManage. See VBoxManage --help . For a list of available switches for VBoxManage, see this list. | | At this point, VirtualBox should now be configured and running correctly. If you encounter problems, please recheck that you have setup VirtualBox as a service so it starts automatically after a reboot, and that your vbox.cfg file is configured correctly. To manage VirtualBox and any virtual machines, use the command line utility VBoxManage. See VBoxManage --help . For a list of available switches for VBoxManage, see this list. |
| </li> | | </li> |
Line 133: |
Line 127: |
| ===Creating a Virtual Machine=== | | ===Creating a Virtual Machine=== |
| <ol> | | <ol> |
− | <li>Using a web browser, go to http://yourdomain.com/phpvbox to create your virtual machine. | + | <li>Using a web browser, go to http://yourdomain.com/phpvirtualbox to create your virtual machine. |
| <ul> | | <ul> |
| <li>Create a new virtual machine (e.g. vmXP)</li> | | <li>Create a new virtual machine (e.g. vmXP)</li> |
Line 144: |
Line 138: |
| <ul> | | <ul> |
| <li>On Windows, open an RDP client (run -> mstsc) then type your server’s hostname:port number (e.g. myserver:9000), or your Server's (not your Guest) IP address followed by colon then the port number as shown on above image (Remote Desktop Server Port under Display) (e.g. 192.168.100.1:9000).</li> | | <li>On Windows, open an RDP client (run -> mstsc) then type your server’s hostname:port number (e.g. myserver:9000), or your Server's (not your Guest) IP address followed by colon then the port number as shown on above image (Remote Desktop Server Port under Display) (e.g. 192.168.100.1:9000).</li> |
− | <b>NOTE:</b> No need to change to port number to 9000 (as per above) in your Windows registry (HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber). It will still be using port 3389 even though phpVirtualBox is using port 9000. | + | <b>NOTE:</b> No need to change to port number to 9000 (as per above) in your Windows registry (HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber). It will still be using port 3389 even though phpVirtualBox is using port 9000.<br/> |
| + | If you're remotely connected to your server's phpvirtualbox and adding a new Guest remotely, open port 9000 (source and destination TCP poty) pointing to server's IP, so you can be able to access the console built-in to PhpVirtualBox. |
| </li> | | </li> |
| </ul> | | </ul> |
Line 285: |
Line 280: |
| </ol> | | </ol> |
| | | |
− | ===Upgrading VirtualBox===
| |
− | <ol>
| |
− | <li>Remove installed VirtualBox.
| |
− | <pre>yum remove VirtualBox-4.1</pre></li>
| |
− | <li>Install the latest VirtualBox, as of this date it is VirtualBox 4.2.
| |
− | <pre>yum install --enablerepo=virtualbox VirtualBox-4.2</pre></li>
| |
− | <li>Create a '''virtualbox''' file on your /etc/default/. On Virtualbox 4.1, virtualbox file was originally /etc/vbox/vbox.cfg.
| |
− | <pre>nano /etc/default/virtualbox</pre>
| |
− | <p>''virtualbox'' should have this content.</p>
| |
− | <pre>VBOXWEB_USER='root'
| |
− | VBOXWEB_HOST=127.0.0.1
| |
− | VBOXWEB_PORT=18083
| |
− | VBOXWEB_LOGFILE=/var/log/vboxweb
| |
− | INSTALL_DIR=/usr/lib/virtualbox
| |
− | </pre></li>
| |
− | <li>Install VirtualBox extension pack, you can find the extension packs [http://www.virtualbox.org/wiki/Downloads here].
| |
− | <pre>wget http://download.virtualbox.org/virtualbox/4.2.0/Oracle_VM_VirtualBox_Extension_Pack-4.2.0-80737.vbox-extpack
| |
− | vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.2.0-80737.vbox-extpack
| |
− | </pre></li>
| |
− | <li>Test if your VirtualBox upgrade is successful by starting your existing virtual machine.
| |
− | <pre>vboxheadless –s vmXP</pre> OR
| |
− | <pre>/etc/init.d/vbox start</pre></li>
| |
− | </ol>
| |
− | ===Upgrading phpVirtualBox===
| |
− | <ol>
| |
− | <li>Make a directory to save your existing phpVirtualBox folder.
| |
− | <pre>mkdir –p /tmp/phpvirtualbox-4.1.22</pre></li>
| |
− | <li>Change directory to your phpvbox ibay then copy all of your phpVirtualBox files.
| |
− | <pre>cd /home/e-smith/files/ibays/phpvbox/html/
| |
− | cp –R * /tmp/phpvirtualbox-4.1.22</pre></li>
| |
− | <li>Download the latest phpVirtualBox to /tmp/ folder.
| |
− | <pre>cd /tmp
| |
− | wget http://phpvirtualbox.googlecode.com/files/phpvirtualbox-4.2-0b.zip
| |
− | unzip phpvirtualbox-4.2-0b.zip
| |
− | cd phpvirtualbox-4.2-0b
| |
− | yes | cp -R * /home/e-smith/files/ibays/phpvbox/html/
| |
− | </pre></li>
| |
− | <li>Rename ''config.php.example'' to ''config.php'' and edit the configuration file as per above.
| |
− | <pre>mv config.php-example config.php</pre></li>
| |
− | <li>Restart vboxwebservice
| |
− | <pre>/etc/init.d/vboxweb-service restart</pre></li>
| |
− | <li>Download the latest VBox Guest Additions and install to your Guest VM.
| |
− | <pre>cd /opt/VMs/
| |
− | wget http://download.virtualbox.org/virtualbox/4.2.0/VBoxGuestAdditions_4.2.0.iso
| |
− | </pre></li>
| |
− | </ol>
| |
| ===Troubleshooting=== | | ===Troubleshooting=== |
| | | |
Line 346: |
Line 295: |
| [[Category: Virtualisation]] | | [[Category: Virtualisation]] |
| [[Category: Advanced]] | | [[Category: Advanced]] |
| + | [[Category: Howto]] |