Friday, May 30, 2014

VirtualBox: Copy/Paste (Guest additions) not working on my Ubuntu VM

I have a Ubuntu VM where I do all my development. Since I installed VirtualBox and created my VM, I never was able to make copy/paste or have better graphics. It all comes with the installation of Guest Additions in the guest machine, but for some reason the installation wasn't working.

I lived with that for some time until I got time to do some more research. First I tried to run the command to enable to copy/paste:

VBoxClient --clipboard -d

But got an error indicating that Guest Additions was not correctly installed or setup (quite not remember well).

So then I run the setup command:

sudo /etc/init.d/vboxadd setup

And got an error:

Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The gcc utility was not found. If the following module compilation fails then
this could be the reason and you should try installing it.

The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.

Stupid GCC utility was not installed! :D. Installed it:

sudo apt-get install gcc

Run again the setup and it got installed correctly. Restarted the VM and got finally my copy/paste between host and guest machines. Also my graphics acceleration. 

Tuesday, May 6, 2014


Query any item but limit results to only one.

<query-items item-descriptor="category">ALL RANGE +1</query-items>

Remove an item.

<remove-item item-descriptor="<item-descriptor>" id="<ID>"/>

Query item where property is null/not defined

<query-items item-descriptor="product">seoTags IS NULL</query-items>

Query date ranges

<query-items item-descriptor="project"><![CDATA[checkinDate > date("2016-11-18") and checkinDate < date("2016-11-21")]]></query-items>

Get where a property is set (not null)

<query-items item-descriptor="promotion">(NOT closenessQualifiers IS NULL) RANGE+1</query-items>