Ticket #11526: EmulatingHaikuInVirtualBox_with_guest_additons.diff

File EmulatingHaikuInVirtualBox_with_guest_additons.diff, 12.3 KB (added by LkpPo, 5 years ago)
  • (a) "Emulating vs. (b) EmulatingHaikuInVirtualBox_with_guest_additons.txt

    a b  
    1 Virtual instances of operating systems are perfect for all kinds of testing purposes that need to be done in a safe and isolated environment. Installing Haiku in a virtual machine is a solution for people who do not want to install it on their physical computers, but wish to become familiar with it.<br />
    2      
    3     This How-To guide will describe the process of running Haiku on virtual machine (VM) using VirtualBox 3.2 There are two ways it can be done– one is installing and running Haiku from CD-ROM image, same way it would be done on a physical instance. Another way is using the already prepared VM hard disk image, for convenience and time-saving purposes. The choice in this decision is left up to the user, although many people prefer VM image as it is easier to manage.<br />
    4 For this tutorial we will be using an ISO image and VM image (vmdk) file - both can be obtained <a href="http://www.haiku-os.org/get-haiku">here</a>. The VirtualBox virtualization software and installation manual can be downloaded from <a href="http://www.virtualbox.org/wiki/Downloads">here</a>.<br />
    5 <br />Go to section:<ul>
    6               <li>  <a href="#part_iso">Installing and running Haiku from an ISO image</a></li>
    7               <li>  <a href="#part_vmimage">Running Haiku from a VM image</a></li>
    8               <li>  <a href="#part_additional">Additional Steps</a></li>
    9               <li>  <a href="#part_customVESA">Custom VESA Resolutions</a></li>
    10               <li>  <a href="#part_trouble">Troubleshooting</a></li>
    11             </ul>
     1<p>Virtual instances of operating systems are perfect for all kinds of testing
     2purposes that need to be done in a safe and isolated environment. Installing
     3Haiku in a virtual machine is a solution for people who do not want to install
     4it on their physical computers, but wish to become familiar with it.</p>
     5
     6<p>This How-To guide will describe the process of running Haiku on virtual
     7machine (VM) using <strong>VirtualBox 3.2</strong>. We also recommend
     8installing the <em>Virtualbox Guest Additions</em> that much improved
     9integration of the virtual machine to the host system. They are designed to be
     10installed inside a virtual machine after the guest operating system has been
     11installed and consist of device drivers and system applications that optimize
     12the guest operating system for better performance and usability (including
     13graphical interface).</p>
     14
     15<p>There are two ways it can be done– one is installing and running Haiku from
     16CD-ROM image, same way it would be done on a physical instance. Another way is
     17using the already prepared VM hard disk image, for convenience and time-saving
     18purposes. The choice in this decision is left up to the user, although many
     19people prefer VM image as it is easier to manage.</p>
     20
     21<p>For this tutorial we will be using an ISO image and VM image (vmdk) file -
     22both can be obtained <a href="http://www.haiku-os.org/get-haiku">here</a>. The
     23VirtualBox virtualization software and installation manual can be downloaded
     24from <a href="http://www.virtualbox.org/wiki/Downloads">here</a>.</p>
     25
     26<p>Go to section:</p>
     27
     28<ul>
     29        <li><a href="#part_iso">Installing and running Haiku from an ISO image</a></li>
     30        <li><a href="#part_vmimage">Running Haiku from a VM image</a></li>
     31        <li><a href="#part_additional">Additional Steps</a></li>
     32        <li><a href="#part_trouble">Troubleshooting</a></li>       
     33</ul>
    1234             
    1335            <h3 id="part_iso">Installing and running Haiku from an ISO image.</h3>
    1436             
     
    116138            One of the ways to increase performance if changing the video memory assigned to the virtual machine. On the left panel click Display tab, and move the first slider to the right, to increase the amount of memory assigned. This should allow the GUI to run more smoothly and be more responsive. 
    117139             
    118140            <br /><img style="padding:12px" alt="Display tab" src="https://www.haiku-os.org/files/image15.png"/><br />
    119              
    120             Another hint is to enable the hardware virtualization, which by default is disabled. On the System page, click the Processor tab and mark Enable PAE/NX to enable CPU address extension.
     141
     142            <p>If you have previously installed Virtualbox Guest Additions,
     143you can benefit from better management of the mouse between the host and the
     144VM especially if it is USB or you have more than one.</p>
     145
     146            <p>Go to settings of your VM. On the <em>System</em> page and
     147<em>Motherboard</em> tab, choose pointing device: <em>USB Tablet</em> (That
     148should fix the problem).</p>
     149
     150            <p>Another hint is to enable the hardware virtualization, which
     151by default is disabled. On the System page, click the Processor tab and mark
     152Enable PAE/NX to enable CPU address extension. Before enabling this option,
     153make sure your CPU supports it by visiting the manufacturer's information
     154page. If you're running Linux, you can see the output of the command:<p>
     155
     156<pre class="terminal">grep ^flags /proc/cpuinfo</pre>
     157
     158            <p>This list must contain flags pae and/or nx.</p>
    121159             
    122160            <br /><img style="padding:12px" alt="Settings tab" src="https://www.haiku-os.org/files/image16.png"/><br />
    123161             
    124162            After you are done with configuration, click <span class="button">OK</span> to move back to the main window.
    125163            <!--break-->
    126164            <h5>Additional Step 2. Adjusting window settings.</h5>
    127             One of the inconveniences users experience while using virtual machines are screen resolutions. By default, guest OS’s apply a big screen resolution, causing the windows to have scrolling bars on both sides to navigate in x-axis and y-axis. There are two solutions for that problem.<br />
    128              
    129             First solution is simply adjusting the screen resolution using tools built into system. In Haiku we can use the Screen preflet, which can be found under the Preferences menu. By changing the resolution the user will then notice that size of the VM window has now changed.
     165            <p>One of the inconveniences users experience while using virtual
     166machines are screen resolutions. By default, guest OS’s apply a big screen
     167resolution, causing the windows to have scrolling bars on both sides to
     168navigate in x-axis and y-axis. There are two solutions for that problem.</p>
     169
     170            <p>First solution is simply adjusting the screen resolution using
     171tools built into system. In Haiku we can use the Screen preflet, which can be
     172found under the Preferences menu. By changing the resolution the user will
     173then notice that size of the VM window has now changed.</p>
    130174             
    131175            <br /><img style="padding:12px" alt="Haiku's Screen Preflet" src="https://www.haiku-os.org/files/image17.png"/><br />
    132              
    133             Another way, is to install VirtualBox Guest Additions. They are designed to be installed inside a virtual machine after the guest operating system has been installed and consist of device drivers and system applications that optimize the guest operating system for better performance and usability (including graphical interface).  Unfortunately, there is no support for Guest Additions for Haiku yet, meaning for now the GUI needs to be controlled using system tools.  As soon as Guest Additions for Haiku will be released, this guide will be updated. For now that is the only way to solve that problem.
     176
     177            <p>You can optionally add a custom VESA resolution to the VM to get the
     178full screen mode:</p>
     179
     180            <pre class="terminal">VBoxManage setextradata "NameOfYourVM" "CustomVideoMode1" "1400x1050x16"</pre>
     181
     182            </p>Another way, is to install <em>VirtualBox Guest
     183Additions</em>. You can then enter and exit the full screen mode with the
     184<span class="key">Host</span> + <span class="key">F</span> toggle.</p>
     185
     186
    134187            <!--break-->
    135188            <h5>Additional Step 3. Expanding the size of the VM hard disk image.</h5>
    136189            Often users find the size of original VM Haiku image not big enough to fulfil their needs. By default that size is about 600mb and in this step we are going to expand it. There is a way to do it, but it’s not as easy as it sounds. Just like a regular hard drive, once created, its physical boundaries cannot be expanded any more (the size of the disk, not partitions). The solution could be reinstalling, or cloning  the content of smaller hard drive into bigger one. That is exactly what we can do in this situation.<br />
     
    145198             
    146199            Click <span class="button">Finish</span> to confirm action.<br />
    147200             
    148             For the next step we will need to switch to the command-line environment, to perform the cloning process. These steps need to be done on the host OS. Depending on OS installed instructions may vary (see <a href="http://www.virtualbox.org/manual/ch08.html">here</a> to get more information). Open the terminal/console and navigate to the location where VirtualBox was installed and run the following command:
     201            <p>For the next step we will need to switch to the command-line
     202environment, to perform the cloning process. These steps need to be done on
     203the host OS. Depending on OS installed instructions may vary (see <a
     204href="http://www.virtualbox.org/manual/ch08.html">here</a> to get more
     205information). Open the terminal/console and navigate to the location where
     206VirtualBox was installed and run the following command:</p>
    149207             
    150208            <pre class="terminal">VBoxManage clonehd [location of .vdmk VM hard drive image] [location of hard drive we created earlier] –-existing</pre>
    151             for example: (Windows host platform)
     209
     210            <p>F or example: (Windows host platform)</p>
     211
    152212            <pre class="terminal">“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” clonehd C:\haiku-r1alpha2.vmdk C:\new.vdi --existing</pre>
    153             After executing this instruction the progress calculator will appear and return the uuid when finished.
     213            <p>After executing this instruction the progress calculator will
     214appear and return the uuid when finished.</p>
    154215             
    155216            <br /><img style="padding:12px" alt="CMD output" src="https://www.haiku-os.org/files/image20.png"/><br />
    156217             
     
    159220            <br /><img style="padding:12px" alt="With the new image" src="https://www.haiku-os.org/files/image21.png"/><br />
    160221             
    161222            After the process if completed, we can delete the old, smaller hard drive VM image, and boot the new one we have just created.
    162             <!--break-->
    163             <hr />
    164                     <h3 id="part_customVESA">Custom VESA Resolutions</h3>
    165223
    166             Example:
    167             <pre class="terminal">VBoxManage setextradata "VM name" "CustomVideoMode1" "1400x1050x16"</pre>
    168224            <!--break-->
    169225            <hr />
    170 
    171                     <h3 id="part_trouble">Troubleshooting</h3>
     226            <h3 id="part_trouble">Troubleshooting</h3>
    172227            <!--break-->
     228
    173229            <h5> 1. Haiku cannot connect to the internet</h5>
    174230            There are some known issues with the network cards on VirtualBox virtual machines. The symptom is simply the inability to connect to other computers over the Internet. A solution to this problem is as follows:<br />
    175231             
     
    178234            <br /><img style="padding:12px" alt="Intel PRO/100 MT" src="https://www.haiku-os.org/files/image22.png"/><br />
    179235             
    180236            Now the network services should be working properly. 
    181             <!--break-->
    182             <h5>2. USB mice are not working in Haiku when using a Virtual Machine</h5>
    183              
    184             Sometimes when there is more than one pointing device installed on the host OS, the secondary devices does not fully cooperate with Haiku VM. This is a known issue which can be easily fixed by the use of Virtualbox Guest Additions, as it is connected to mouse integration. Because Guest Additions for Haiku are not implemented yet, the only solution for that problem is to keep on using the primary pointing device, or make the USB mouse the main pointing device. This should be fixed as soon as Guest Additions for Haiku are officially released, but for now, there is no easy way to solve this issue.