Archive for the ‘Virtualisation’ Category

VirtualBox machines usually have two bars in their window to make working with them easier.

These however are a great disturbance if you want to take screenshots of your machines - even if you select to leave the window border, the menu bars will still be on them.

To remove the bars, it only needs a simple terminal command. Open one and enter following (make sure that no virtual machines are running):

/usr/bin/VBoxManage setextradata global GUI/Customizations noMenuBar,noStatusBar

Next time you start a VirtualBox vm, there won't be any menu bars. To restore them again, enter following into a terminal:

/usr/bin/VBoxManage setextradata global GUI/Customizations MenuBar,StatusBar

VirtualBox offers a feature that let's you treat windows opened in the running guest system almost as is they were native to the host system - you can drag them around on the host system, copy and paste texts between the system and only see the host's desktop while doing so:

(Windows 8 Release Preview guest system on a Linux Mint 12 host system in Seamless mode)

The requirement for Seamless mode to run is that the VirtualBox Guest Additions are installed. You can quite easily install them by clicking on the Devices menu on the the guest system's window menu and selecting Install Guest Additions... - follow the installer afterwards and reboot the guest system when you are told to. After the reboot you can enter Seamless mode by selecting the guest system's window and pressing right Ctrl + L.

Establish shared folders between VirtualBox and host system

Thursday, July 5, 2012 posted by CSch

Virtualbox, as most other virtualisation technologies, provides a service to establish shared folders between the host system and the virtualbox guest OS. For that, you need to install the Virtualbox guest additions. To do so on virtual desktops, just open the Devices menu and select Install guest additions....

Mount the CD and proceed like you are told to install the guest additions (steps differ in Windows and Linux). Before you can mount a shared folder you first need to create and/or assign one. Open the settings of the Virtualbox you are running and select the last menu item from the left pane, Shared Folders. Click the icon with the plus symbol on the right to assign a shared folder and give it a name, I'll use the name blabla for future reference. After assigning a shared folder you can mount them on your virtual machine.

On a Windows machine, open a cmd terminal and enter following (replace my folder name with yours):

net use x: \\vboxsrv\blabla

The folder will then be accesible from the Computer directory.
In Linux, open a terminal and enter following:

sudo mount -t vboxsf blabla /mnt

You can replace /mnt with any mount directory you like, of course.

The shared folder is now set up. You can push files there from the host or the guest system and access them from the other, which makes connecting both much easier than setting up an FTP or SSH connection.

How to enable Windows 7 Aero in Virtualbox

Monday, May 7, 2012 posted by CSch

If you try to install a Windows 7 system in a Virtualbox you will notice that there is no 3D support there - no feature of Aero works and the Desktop is shown in the Aero fallback mode without transparency.

But if you have the latest version of Virtualbox installed there is something you can do about that - experimental 3D support is now available with the help of a guest addition. To install it, open your virtual Windows 7 box and select Device > Install Guest Additions... to start:

Wait a second for the next window to pop up and click Run VBoxWindowsAdditions.exe:

Follow the setup until you can choose what additions to install. Select Direct 3D support (experimental). As it says, it is experimental so you shouldn't use it on production systems - make sure to have backups made of everything important:

When the warning appears, don't click on Yes blindly - that will make you cancel the installation. Read instead and click on No:

Follow the last steps of the installer and restart your machine to find Aero working. It may lag at times but that is what you would expect in a virtual machine with limited resources:

Enable USB Support In Virtualbox (Ubuntu)

Thursday, December 22, 2011 posted by CSch

Enabling USB Support in Virtualbox means to be able to access USB drives plugged into your physical machine on your virtual machines. To accomplish this, you first need to download the newest version of Virtualbox (4.1.8 at the time of this writing), which is not available in the Ubuntu repositories but on the Virtualbox homepage:

Uninstall any previously installed version if present and then install the downloaded Debian package with a package installer taking care of dependencies, such as gdebi.
Next, head back to the homepage and install the Virtualbox Extension pack which supports USB 2.0.
Now you have to make yourself member of the vboxusers group. Go to the Users and Groups Settings in your Control Panel and hit Manage Groups. Scroll down to the vboxusers group and hit Properties. Check the box next to your username and click OK.

Last but not least you have to enable USB for the virtual machine. Close it if it is running and enter the Settings window. On the left panel, select USB. Check Enable USB Controller as well as Enable USB 2.0 (EHCI) Controller. Then click the button with the small green plus-symbol and add the USB device you need:

If you run the machine a USB symbol will indicate that USB is enabled and a device is running on virtual machine:

How to enable SSH on VMware ESXi Server

Friday, January 14, 2011 posted by rafael

wrote by Rafael Marangoni, from BR Link team.

By default, the ssh login is disabled on VMware ESXi, in opposite way what it happens on VMware ESX Server.

But, there’s a way to enable SSH Login.

After the system is installed, go to the console screen and type:

ALT + F1

After that, a Black screen will appear (be calm, that is normal), then type:


Next, the Server will prompt for root password. Then you type the root password.

Afterwards, you’ll have shell access. We need to edit the following file:

vi /etc/inetd.conf

Uncomment the line that starts with “SSH”. Save the file (it’s a normal vi, ZZ will do that for you).

Now reboot the server:


After it reboots, you should login with SSH on port TCP/22, and user root.

How to solve the PHP XCache error: /dev/zero: No space left on device

Wednesday, September 1, 2010 posted by Till

If you get the error "/dev/zero: No space left on device" in the apache error.log on a OpenVZ virtual machine, then the shared memory size in the xcache.ini is too high or the xcache.mm_path is set wrong.

Edit the file /etc/php5/conf.d/xcache.ini

vi /etc/php5/conf.d/xcache.ini

and check the mm_path. On a OpenVZ virtual machine it should be set to "/tmp/xcache" as /dev/zero might not work correctly in a virtual machine:

xcache.mmap_path = "/tmp/xcache"

Then restart apache2:

/etc/init.d/apache2 restart

and check if the error has been resolved.

If the roor still occurs after some time, you will have to reduce the xcache.size.

Edite the xcache.ini file:

vi /etc/php5/conf.d/xcache.ini

and set xcache.size to e.g. 8 MB

xcache.size  =                8M

Then restart apache2:

/etc/init.d/apache2 restart

Secure /tmp and /dev/shm directories in a OpenVZ enviroment

Tuesday, August 31, 2010 posted by Till

The /tmp and /dev/shm directories of a OpenVZ virtual machine shall be mounted without suid and exec permissions. To achieve this, create a a shell script on the host server for every virtual machine which contains the commands to remount the directories. This script will be started automatically by openvz when the VM is started.

I will use VPSID as placeholder for the ID of the virtual machine in the commands and the script. Replace VPSID with the id of the virtual machine that you want to create the script for, e.g. replace VPSID with 101.

Create the script:

vi /etc/vz/conf/VPSID.mount

and insert the following lines:

mount -n --bind -onosuid,noexec /vz/vps/VPSID/tmp /vz/root/VPSID/tmp
mount -n --bind -onosuid,noexec /vz/vps/VPSID/shm /vz/root/VPSID/dev/shm
exit ${?}

now make the sscript executable:

chmod 700 /etc/vz/conf/VPSID.mount

Migrate physical server system to OpenVZ virtual machine

Tuesday, August 31, 2010 posted by Till

In case you plan to virtualize your server infrastructure and migrate physical servers to OpenVZ virtual machines, you may find this tutorial helpful:

I used this to migrate a ISPConfig Debian system to OpenVZ successfully.

Backing up OpenVZ virtual machines with vzdump

Tuesday, August 4, 2009 posted by Till

Vzdump is a perl script that makes live backups of OpenVZ virtual machines very easy. The following steps are for Debian Linux but vzdump can be used on all other linux distributions. Only the installation may vary.

Download and install vzdump from

cd /tmp
dpkg -i vzdump_1.1-2_all.deb

Create the backup directory

mkdir /home/backup

Create a backup of all virtual machines as compressed (tar.gz) archive and send a email report to the root user when finished.

vzdump --dumpdir /home/backup --suspend --compress --mailto root --all

vzdump can also be used to restore a backup.  Example: restore the backup of the virtual machine 101:

vzdump --restore /home/backup/vzdump-101.tgz 101

To restore the backup to a different virtual machine, you can specify a differnt target ID. E.g. restore the backup of vm 101 to the virtual machine with the ID 500:

vzdump --restore /home/backup/vzdump-101.tgz 500