Section | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Creating the virtual machine
In this tutorial we will assume the use of VirtualBox as the VM player (see: http://www.virtualbox.org/)
...
- First make sure you have downloaded and installed VirtualBox and it starts correctly.
- Start VirtualBox and click the 'New' button:
- In the window that appears, for Name type 'openifs' (any name is fine), for Type select 'Linux', for Version select 'openSUSE (64bit)'.
- For Memory size, increase it to at least 1200Mb more if you can. Do not move the bar into the red! This will cause your computer to slow down drastically and it may even freeze.
The amount of memory on your computer may be less or more than shown in the figure below. - For Hard drive, select the option 'Use an existing virtual hard drive file'. Then click on the yellow folder icon to locate the virtual machine file. This file will have a name similar to the one shown below and always have the .vmdk extension.
- Then click on the Create button. The newly created virtual machine should now be shown in the left panel.
- Next, click on the Settings icon to change a few of the properties.
- Under the General tab, select Advanced. For Shared Clipboard, enable Bidirectional and likewise for Drag'n'Drop (your system may not support these). When set these will allow cut'n'paste of text between the virtual machine and your computer.
- If (and only if) you have a computer with multiple processors or multiple 'processor cores', you may want to increase the number of processors available to the virtual machine. To do this, in the Settings window, select System, then Processor and adjust the slider. As for memory settings, do not go into the red!
Enable Shared Folders. This allows both the virtual machine and the real computer to exchange files as both can read and writes files to any directories you specify as a shared folder.
Info Shared folders may not always work. It relies on software known as 'VirtualBox guest additions'. Although this is installed in the OpenIFS virtual machines, it does not always work and may need re-installing. For more information, please see below.
In the Settings window, select Shared Folders and click the blue folder icon with the green cross to create a new one.In the window that appears, under Folder Path select the folder or directory on the host computer that will act as a shared folder (create it if it doesn't already exist). Then under Folder Name give it a name as it will appear on the virtual machine; shared_folder might be a good choice.
Make sure that Read-only is not selected and Auto-mount is selected.Info With Auto-mount selected, the shared folder will be available when the virtual machine boots. It can normally be found in the directory /media/ with the prefix 'sf_' added to the shared folder name.
If shared folders do not appear to work in the virtual machine, it may be that some additional software 'Guest Additions' is not installed.
The version of Guest Additions installed must match the version of VirtualBox. If this is not the case, or in doubt, reinstall the Guest Additions software (see below).
- Close the Setttings box. To start the virtual machine, click the Start green arrow on the main window.
- When the virtual machine has booted, the keyboard layout can be changed by clicking on the small icon labelled 'gb' in the bottom right corner.
The default is set to a UK keyboard.
Resizing the screen and shared folders
Resizing screen automatically
To have the monitor size in the virtual machine change size automatically as the virtual machine window is resized, select the 'Auto resize' option from the View menu when the virtual machine is active.
...
In order for this to work, some additional software might need to be installed on the virtual machine, known as Guest Additions. If this doesn't work, try installing (or reinstalling) the guest additions software.
Change default screen size
The first time the virtual machine (VM) is started, the screen size may be set to 1024x768 pixels.
...
- Start up the virtual machine and let it start up fully.
- Resize the VM window to the required size.
- In the bottom left corner, find the openSUSE icon and click it.
- Then select 'Applications' and 'Configure Desktop':
- On the window that appears, find the icon labelled 'Display and Monitor' and click it.
- On the display window, click 'Size & Orientation' in the left bar (if not selected).
In the middle panel, find the 'Size' menu: - Select the largest size on this menu. It should match the resized window from step 2.
- Click 'Apply' to set the new resolution:
- Confirm the change and you're done.
Shared folders
Shared folders enable the host and guest machines to share files via a common folder (directory).
...
In order for this to work, some additional software might need to be installed (or reinstalled) on the virtual machine, known as Guest Additions. See below for more information.
Install Guest Additions
Warning |
---|
Although Guest additions is normally installed in the OpenIFS virtual machines, the shared_folder (and auto-screen resize) does not always work. This may be due to different versions of the guest additions between the VM and VirtualBox. In which case, re-install following the instructions below. |
To install or re-install Guest Additions follow these instructions.
Check guest additions are installed
To check if guest additions is already installed run the following command in a Terminal:
...
This will prompt for the root password 'metv1ew!
'
Install steps
These steps use the Mac OSX version of VirtualBox. Other systems may be slightly different.
- Start up the virtual machine (VM) and let it start up fully.
First check that the necessary kernel files are installed:
Code Block zypper search kernel-devel
If not, install them with the command:
Code Block sudo zypper install kernel-devel
The installation needs to be done as the root user. This command will prompt for the root password '
metv1ew!
'The 'make' and 'gcc' packages are also required but these are normally available by default in the OpenIFS virtual machine.
- With the virtual machine as the active window, select the 'Devices' menu and the 'Install guest additions CD image..
A popup window should appear in the virtual machine showing the CD. - In the virtual machine, open a Terminal window from the openSUSE icon and 'Applications' menu
In the Terminal, change to the directory where the VBoxAdditions CD was mounted. This will be under the /run/media directory, followed by the username.
Code Block title e.g. cd /run/media/openifs/VBOXADDITIONS_4.3.34_104062
(older systems may use /var/run/media instead).
To start the installation of the Guest Additions, type the following in the Terminal:
Code Block sudo ./VBoxLinuxAdditions.run
This will prompt for the root password, usually
'metv1ew!'
Info The installation may report that Guest Additions is already installed and ask you to confirm.
The installation only takes a few minutes.
- Reboot the virtual machine for the changes to take effect.
Allow normal users access to shared folders
Check that the user accounts have access to the shared folder. The shared folder is usually mounted in the /media
directory:
...
Code Block |
---|
cd ln -s /media/sf_shared_folder shared_folder |
Possible issues
Drag'n'Drop not working
Check that the Settings for the VM are set to 'Bidirectional'. Also, when the VM is running, check that the menu option "Devices" -> "Drag'n'Drop" is also set to Bidirectional.
If shared folder does not automatically mount
Mount the folder manually by (for example to your home directory):
...
The name 'shared_folder' should be the same as the name of the shared_folder in the VM Settings panel.
Shared folders stop working after kernel update
If a system update has updated the kernel files and shared folders have stopped working, reinstall the Guest Additions software. Guest Additions adds files to the kernel and these must be reinstalled if the kernel is changed.
...