Showing posts with label VirtualBox. Show all posts
Showing posts with label VirtualBox. Show all posts

VirtualBox on Mac os x - Can not find com service

Context

Mac Mini Server edition, 16 GB ram, ssd 250GB + hdd 750GB
Mac OS X server
Oracle VirtualBox
Changed (decent word for testing if something would fail) with the Mac OS X server settings, in particular the hostname.

Symptoms

Trying to start the admin screen of VirtualBox fails and gives an error telling that the tool could not connect to the COM service or the VirtualBox com services.
In the details of the error you will find something link NS_ERROR_FAILURE (0x80004005)

Explain

Do not know what is going wrong, but something is smuthering up the file and directory permissions when the hostname is changed and/or Mac OS X server services are recreated and/or restarted

Solution

Go to disk utility (Utilities > Disk Utility)
Select the main disk of the computer on the left pane
Select the first aid tab (the default one)
Click on the button to "Repair the disk permissions"
In the log file you'll see things that seem not to interfear with VBox ... at first ... but looking deeper in the stack ... 

Hope this solves your problem too ... 

References

CAlso : Apple Forum post

OEL - VBox Guest Additions

On gui-less linux installations it is not always clear how the guest additions can be installed.

This article tries to show how to do this.

The steps to do this are:
  • Get the additions mounted (supposing no cdrom is attached yet) 
  • create cdrom directories 
  • determine the cdrom device 
  • mount the device loosely 
  • install the guest additions 
  • (Install missing packages ... ) 
  • (Retry installation) 
Just click devices > install guest additions
The cdrom will become attached to the vm
Best is to reboot the system at this instance. (Have encountered that for some reason the cd device was no immediately available.)

To be able to mount the cdrom within some instances you will require a directory to mount it to.
Go to the /mnt directory as root user and create some directories with a trailing number.

For example:
mkdir cdrom0
mkdir cdrom1
...for as many as you will find cdroms required ;-)

The trailing number starts best with 0 ... why ... see later.

Determine the cdrom device.
The name of the device depends under which link the cdrom is attached.
If a cdrom is defined as a SATA device the cdrom will become available as sr0, sr1 ...
For the further documentation let 's suppose the device is /dev/sr0

Mount the cdrom by using the following command:
mount /dev/sr0 /mnt/cdrom0
So ... that is why 0 at the end ... ;-)

The output of the command will be something like this:

root@wlspfrd mnt]# mount /dev/sr0 /mnt/cdrom0
mount: block device /dev/sr0 is write-protected, mounting read-only

Go to the cdrom drive:
cd /mnt/cdrom0

[root@wlspfrd mnt]# cd /mnt/cdrom0
[root@wlspfrd cdrom0]# ls
32Bit runasroot.sh VBoxWindowsAdditions.exe
64Bit VBoxLinuxAdditions.run VBoxWindowsAdditions-x86.exe
AUTORUN.INF VBoxSolarisAdditions.pkg
autorun.sh VBoxWindowsAdditions-amd64.exe

To install the additions execute the VBoxLinuxAdditions.run command.
./VBoxLinuxAddtions.run

In a 64-bit Oracle Linux environment you will encounter a problem which is indicated by the line:
Building the main Guest Additions module [FAILED]

The reason is that the build requires the header files of the correct version of the Linux OS.
The line preceeding the FAILED error gives a clear hint:
The following command should solve the problem.
yum install kernel-uek-devel-2.6.32-200.13.1.el5uekPut the package name, in this case kernel-uek-devel-2.6.32-200.13.1.el5uek in the copy buffer

To install this package, the yum repository must be configured (context Oracle)
See the website for this: http://public-yum.oracle.com/
Follow the instructions.
cd /etc/yum.repos.d
for Oracle Linux 5:
          wget http://public-yum.oracle.com/public-yum-el5.repo
for Oracle Linux 6:
          wget http://public-yum.oracle.com/public-yum-el6.repo
In the obtained file enable (value = 1) the correct version (warning if you enable the latest version the update may take a long time ... ).

After installation of the yum repository, retry the installation of VBox additions.
This should now succeed.

After this any shared folder will become available in the /media directory.

Update dd 02-feb-2014


When using version 6 update 3 of Oracle Linux, it seems not possible to get the correct Kernel headers for the uek. At least it should be possible to find them ... but I did not find them, or at least ... not as fast as I wanted. Just used a short-circuit to get things working fast ... 

I followed these steps:
  • boot with the non-uek kernel
    This can be achieved by:
    • or change the kernel at boot time
    • or change the default boot instance in the /boot/grub/grub.conf file
  • Make sure gcc and the kernel-devel packages are installed (using yum install gcc kernel-devel kernel-headers)
  • running VBoxLinuxAdditions.run -> this should not fail anymore
  • you will find in the /media any shared folder
  • now ... reboot in
    • uek -> seems to work ... but not really guaranteed because of the difference in the compile-time and runtime-kernel versions
    • run in the version as was compiled 
      • make the kernel version permanent in the grub.conf if not already done so

Update 4-feb-2014

Context Delta : Oracle Linux 6.3 base installation with Database Server option.
Even though the kernel was booted with the compatible version (RHEL) the openGL compilation failed. All major requirements like folder sharing and screen sizing do not work.
Found on a site the hint to do an export  MAKE="/usr/bin/gmake -i " before launching the VBoxLinuxadditions.run command.
This solved immediately the problem of the shared folders not being accessible under /media/sf_*.
It did not solve the problem of the windows resizing.
After a reboot with the original UEK kernel (in OL 6.3) which caused the Shared folders not being accessible anymore.
Starting to update to really latest version of OL v6 ... see if things will be more smooth then ...
... and yes it did.
So ... changed  config file in the yum.repos.d directory to retrieve the latest versions, which at this moment in time seems to be 6.5.1. Performed a simple yum update which took 40 MB to download and install. Rebooted with the new kernel.
Mounted the cdrom again and started the installation of the VBoxGuestAdditions again.
This time no errors were encountered ... with the exception of the Window System Drivers.
Will try to fix that too.

Good Luck

VirtualBox: Switchen between host and vm

Under in the screen an indication is shown that you need to press "ctrl droite" to go back to the host environment.
Do not interprete this wrong: it is not the purpose to prest ctrl + right_arrow. You simply have to press the right control key.
Some may search long for the answer on the internet.
Some ask to a person next to him for the answer.
The difference: speed. the internet at 200000Km/s may be quicker than the sound which only gets up to 300m/s. The quality delivered by the realy-near-aural-network however ...
Greetings to SV.

VirtualBox Shared folders

I had some problems in using the method everybody seems to be using when wanting to share a folder between the WinXP host and the guest OS Ubuntu.

You may find everywhere that you need to execute the following command:
sudo mount -t vboxfs sharename mountpoint

This seems to give a protocol error.
On one of the fora there was an alternative that did work however:
sudo mount.vboxfs sharename mountpoint

This seems to work fine.
Thanks to entry found here.

virtualbox copy machine and disks

This are some procedures to follow if you want to copy one machine in Virtualbox into an other machine.

Method 1:

Export as a Open Virtual Machine Definition. (export appliance)
Then Import it again.
The very annoying thing is that by default the image files get copied into the personal VirtualBox directory ... which may not be nice to manage.
The files have to be released, copied, reloaded and linked again before the VM can see them.


Method 2: Physical copy of the hard disks

This method does not copy the machine definition ... which is no hard work to do anyway.
Supposing the hard disks that you want to copy are in one directory, just copy the directory and for the correct way of working, give the new disk image files a name corresponding to its use.
My personal standard is to prefix the directory containing the files with the name of the machine. (ex. UBUNTU_SOA). Each file in turn is also prefixed by this name.
Then the files need to get a UUID unique to all the files in the world (?).
This is required because VirtualBox uses this UUID in the registry of Virtual Media.
I found this info on this link.
The basic command when the file is already copied is:
VBoxManage internalcommands setvdiuuid "The name of the file to rename
If the files are not copied from their original location:
VBoxManage clonehd “the old name of the file” “the new name of the file

After this the disks can be defined as new virtual media names ... and since you followed the convetions ... the name and purpose of the files will be clear.


The command VBoxManage can be found in the installation directory of VirtualBox