# VirtualBox



## emre (Nov 17, 2008)

Hi all,

is there any progress on virtualbox freebsd port?


----------



## soko1 (Nov 17, 2008)

http://www.virtualbox.org/wiki/Porting_VirtualBox


----------



## graudeejs (Nov 17, 2008)

> On the other hand, take FreeBSD, the only major difference is the kernel, so *porting VirtualBox to FreeBSD should be a picnic compared to Mac OS X*.



lol


----------



## Maledictus (Nov 17, 2008)

Slightly offtopic:

Is anyone running freebsd in virtualbox successfully? Whenever I try to compile a kernel I get an error like this:
http://forums.virtualbox.org/viewtopic.php?t=8207


----------



## ninjaslim (Nov 17, 2008)

It's more or less the kernel driver that's problematic because it hasn't been ported.  I know that the program itself compiles and runs to a degree.


----------



## bradm2k (Nov 17, 2008)

Maledictus said:
			
		

> Slightly offtopic:
> 
> Is anyone running freebsd in virtualbox successfully? Whenever I try to compile a kernel I get an error like this:
> http://forums.virtualbox.org/viewtopic.php?t=8207



I was able to get i386 6.3 running in VirtualBox under Ubuntu 8.10 without any issues.

Had the same issues as mentioned in the post with 7.0 and AMD64 versions. Seems like a lost cause at this point.


----------



## mgp (Nov 17, 2008)

some work has been done on porting VB
but I don't know if the work is still going on
check this out


----------



## none (Nov 17, 2008)

well,

as for running vb on top of a 7-stable amd64 and then running some linux for amd64 as guests, is it possible ?

I want to run Folding@Home on amd64 linux, but I'd like to have my desktop on FreeBSD AMD64 

thanks,

none


----------



## fate (Nov 17, 2008)

atm no


----------



## none (Nov 18, 2008)

fate said:
			
		

> atm no



close ?

so I must wait for linuxlator64 though ...

none


----------



## fate (Nov 18, 2008)

http://vbox.innotek.de/pipermail/vbox-dev/2008-October/000848.html


----------



## none (Nov 18, 2008)

fate said:
			
		

> http://vbox.innotek.de/pipermail/vbox-dev/2008-October/000848.html



I tried qemu once, but no luck. smp is just for testing, as it makes appear two cpu's but in the real machine they end up using just once cpu. and it was way too slow for F@H.

well, linuxlator64 is the only way now ... I'll look for it.

thanks,

none


----------



## hrsetrdr (Jan 17, 2009)

none said:
			
		

> well,
> 
> as for running vb on top of a 7-stable amd64 and then running some linux for amd64 as guests, is it possible ?
> 
> ...


h

+1

Same exact goal here!


----------



## none (Jan 17, 2009)

hrsetrdr said:
			
		

> h
> 
> +1
> 
> Same exact goal here!



forget virtualbox for this, I tried some patches for linuxlator64 and I really think is the way to go. not functional right now though. if I had to bet, I'd go linuxlator64.

none


----------



## hrsetrdr (Jan 21, 2009)

Linuxlator64?   I had to google that; interesting, hope this pans out.


----------



## sossego (Mar 16, 2009)

If I knew about this, I never would have attempted the howto thread. 7.0 with ULE here.


----------



## knotabot (Mar 29, 2009)

> * VirtualBox 2.1.4 for Windows hosts x86 | AMD64 (only on Windows x64!)
> 
> * VirtualBox 2.1.4 for OS X hosts Intel Macs
> 
> ...



It looks like they have a downloadable version for FreeBSD.
http://www.virtualbox.org/wiki/Downloads


----------



## vermaden (Mar 29, 2009)

knotabot said:
			
		

> It looks like they have a downloadable version for FreeBSD.
> http://www.virtualbox.org/wiki/Downloads



Where you see it mate?


----------



## DrJ (Mar 29, 2009)

My understanding has been that VB compiles on FreeBSD (after some diddles) but that the kernel portion is still missing.  I've not seen anything to change that opinion, but I would *love* to learn otherwise.  The interface just is not that interesting without being able actually to run a VM.


----------



## vermaden (Mar 29, 2009)

DrJ said:
			
		

> My understanding has been that VB compiles on FreeBSD (after some diddles) but that the kernel portion is still missing.  I've not seen anything to change that opinion, but I would *love* to learn otherwise.  The interface just is not that interesting without being able actually to run a VM.



Yeah, true virtualziation is propably the only thing that I miss on FreeBSD.


----------



## knotabot (Mar 29, 2009)

When I installed FreeBSD I remember seeing opensolaris.ko
Is this opensolaris kernel?
Two Sun products that don't work together?


> On the other hand, take FreeBSD, the only major difference is the kernel, *so porting VirtualBox to FreeBSD should be a picnic* compared to Mac OS X.


Which means they haven't yet.

They had on the VB download page FreeBSD in the works last year. Now I see OpenSolaris and no FreeBSD to come so I assumed it had arived.


----------



## DrJ (Mar 29, 2009)

knotabot said:
			
		

> When I installed FreeBSD I remember seeing opensolaris.ko


No you didn't.


> Is this opensolaris kernel?
> Two Sun products that don't work together?



FreeBSD is *not* a Sun product.  Yes, the early SunOS was BSD, but thereafter Solaris became a SysVR4 product.  So FreeBSD and Solaris share a common ancestor, but have diverged significantly.


----------



## Djn (Mar 29, 2009)

DrJ said:
			
		

> No you didn't.



Yes, he did. It's the module with helper functions for dtrace or zfs or possibly both. Not that that helps in any way or form.


----------



## DrJ (Mar 29, 2009)

Ah, thanks for the correction.  I don't use either.  Still, the kernel is not a kernel module.


----------



## sossego (Mar 30, 2009)

There is only a partial version for x86 while amd64 remains a platform to be ported to on FreeBSD.
You can't build any version later than 2.0.0 because they need  kBuild>1.4.x and that is the only patched version for FreeBSD.
Sun could use some help and could try openly asking the BSD community on forums, blogs,and other resources again 
instead of waiting for volunteers. The kBuild above was patched not because they asked but because one BSD member asked another BSD member about the problem.
Like KVM, kqemu, and Xen, it is still a front end to qemu. I wish it did have full qemu functionality built in, that would be nice.
Another problem is that it requires 32bit libraries to work. Don't believe me? Try installing it on any 64bit Windows or Linux box without ia32libs/32bit libs. 
It hasn't been completely ported to Windows- you need mingw to build, qt3/4 libs, alsa, pulse, etc. None of these are available as exe files AFAIK.
Better put VirtualBox in the catagory with Xen, KVM, and VirtualIron- a work to port FreeBSD to in the future.
If you think about it, the only "true" virtualization software that allows you to directly use hardware are live images. You can even execute binaries from the host system by simply mounting in most cases. 

I'm not a kernel hacker so you're more than welcome to join me in trying to port.


----------



## phoenix (Mar 30, 2009)

sossego said:
			
		

> Like KVM, kqemu, and Xen, it is still a front end to qemu. I wish it did have full qemu functionality built in, that would be nice.



They aren't "front-ends" to QEmu.  Not even close.  They use bits of QEmu to provide certain hardware bits (mainly related to network and block I/O), to simplify hardware-assisted virtualisation.  But that's it, and only on x86/amd64.

KVM has been (or will be shortly) integrated into QEmu, though, as "a qemu accelerator" module similar to kqemu.

Front-ends to QEmu would be things like qemu-launcher, which just provide a nice GUI or management interface to the complete QEmu package, providing access to all the weird and wonderful things that QEmu can emulated.


----------



## sossego (Mar 30, 2009)

Poor choice of words on my part but none of them work without qemu.
I believe the common phrase in all of them is somewhat of "a modified form of qemu." Each one also falls back on qemu if the system/cpu doesn't have the proper flags.
KVM has already been  active in Linux.


----------



## scf@ (Apr 17, 2009)

phoenix said:
			
		

> Front-ends to QEmu would be things like qemu-launcher, which just provide a nice GUI or management interface to the complete QEmu package, providing access to all the weird and wonderful things that QEmu can emulated.



I personally use aqemu (emulators/aqemu).  Except for e1000 missing in the UI due to how it detects whether qemu supports it or not, it works quite well.


----------



## emre (May 2, 2009)

and good news for all

http://vbox.innotek.de/pipermail/vbox-dev/2009-April/001328.html

thanks Alexander.


----------



## sossego (May 2, 2009)

x86 or amd64?

Which one?
 And, since virtualbox is dependent upon ia32libs, has a pure 64bit solution been implemented yet?


----------



## vermaden (May 3, 2009)

@emre

At fscking last, thanks for sharing the news mate.


----------



## knotabot (May 4, 2009)

It's only a hand grenade, not yet a bullseye.
Not yet useable for the average joe.


----------



## sossego (May 4, 2009)

It's been this workable for x86 for a bit now.


----------



## DrJ (May 4, 2009)

So how do you install it?


----------



## sossego (May 5, 2009)

Download and untar.
Be sure to have all dependencies.
http://forums.freebsd.org/showthread.php?t=3005

Be sure to check the present build with these old instructions.
You won't have to patch i386 for anything.
It needs to be run from within the  folder.
It uses the same commands as qemu.


----------



## DrJ (May 5, 2009)

Thanks -- I'll give it a try!

I'll post back with questions or results, but give me a bit of time.


----------



## DrJ (May 5, 2009)

OK -- first question -- which download?  There is none labeled "FreeBSD" in any of the usual places (including SVN).


----------



## gilinko (May 5, 2009)

DrJ said:
			
		

> OK -- first question -- which download?  There is none labeled "FreeBSD" in any of the usual places (including SVN).



There won't be anyone labeled FreeBSD, as it isn't supported officially(yet). Grab the source code from the OSE version from the bottom of the page, either by the nightly snapshot or directly from the SVN.


----------



## DrJ (May 5, 2009)

OK -- thanks.


----------



## DrJ (May 6, 2009)

It doesn't compile for me on 7-STABLE (essentially 7.2-R) i386.

I installed the various required programs listed on the VBox site, changed a couple of the INC locations, and did the Bash symlink.  ./configure works fine, but the compile fails for either no flags or the ones in the amd64 guide.  The latter fails with the inability to create a bunch of directories.

I can give more information, but I'm done for the night.


----------



## FreeMWP (May 7, 2009)

Hi everybody

Haven't tryed myself, but you can try the experimental virtualbox port from svn:

http://svn.bluelife.at/projects/packages/blueports/emulators/virtualbox/


----------



## DrJ (May 7, 2009)

It's compiling now.  There is an ominous warning in the open tasks (since I'm on 7-STABLE):

Open tasks:

   1. Fix kernel crashes on 7.2-RELEASE.
   2. Code cleanup.
   3. Fix errors on AMD64.
   4. Fix user/permission problems.


----------



## DrJ (May 8, 2009)

Well, it compiled fine on i386 7-STABLE.  I got partway through an installation of W2K server before the mouse capture override failed.  Subsequently the loading vbox kernel module has locked the computer solid, even through it worked the first time.  I've no idea why.

The screens did all come up, and I did get partway through the installation, so there definitely is hope, though things seem a bit raw right now.

The permissions are funky too.  If you try it, it sets the VM up in /root (since you have to run it as su right now).  I don't have much space allocated to /, so that filled up.  There is an option to change the default location, which I did subsequently.  Be aware of that.


----------



## Gusi (May 8, 2009)

DrJ said:
			
		

> It's compiling now.  There is an ominous warning in the open tasks (since I'm on 7-STABLE):
> 
> Open tasks:
> 
> ...



 I'd add :


Fix kernel crashes on 8.0-CURRENT
Vbox doesn't detect the module the second time
        it is launched in 8.0-CURRENT (the first time seems to detect it)
No graphical display in 8.0-current. The screen remains grey.

  I'm starting to see in the code why 2 is happening (didn't had much time). Don't know where to start for item number 3, any ideas ?


----------



## DrJ (May 8, 2009)

The Makefile also does not add the vboxusers group (or whatever it is called).  The suggestion in the description to add regular users to the vbox group therefore fails, and vbox must be run as root.

This is a detail, but usually su commands are written with a "$" prompt to distinguish it from those that a regular user can issue (as "%").  So the -description file should be revised.

I should add that subsequent attempts to load the kernel module were after reboots, so the system should have been clean.  Practically that was the only way after the hard lockup.


----------



## vermaden (May 9, 2009)

DrJ said:
			
		

> This is a detail, but usually su commands are written with a "$" prompt to distinguish it from those that a regular user can issue (as "%").



*$* and *%* are both prompts of normal user, bash/sh and csh/zsh respectively, *#* is used for root prompt.


----------



## halplus (May 14, 2009)

Hey folks, freebsd can run many linux software with the linux ABI. I mean if the problem is about a binary not available for FreeBSD you can give it a try. Trying to emulate a whole computer, then i guess we are in a problem for the moment. VB seems to me a good way. It is not very fast but will do the trick.


----------



## sossego (May 15, 2009)

VirtualBox is dependent upon ia32 libs and vm86 functions.
AMD64 for FreeBSD would have to run both.
Be aware that any pure 64bit Linux system is unable to run VirtualBox. What does this tell you about it running on FreeBSD?

The VM is looking for Linux kernel hooks/mods/etc.

The linux binary does not work because you must be able to use the actual kernel and make the vm calls natively. Sorry, but only one kernel at a time.


----------



## DrJ (May 15, 2009)

So what is the status of the port?  It does not seem to be discussed on the lists.


----------



## sossego (May 16, 2009)

The port status is non-existent. You are welcome to start it.
What Sun/VBox wants are FreeBSD hackers to write the program to access the kernel.
The build has not yet been optimized.
If you ask Sun for help with FreeBSD, you won't get it.
So, you're kind of on your own.

You can link a folder to root from the initial user account or you can build and run from within the folder itself.


----------



## DrJ (May 16, 2009)

sossego said:
			
		

> The port status is non-existent.



Well, not really.  After I posted here, I found a thread that is calling for testing on -emulation.  It is an active thread.

I'm getting my kernel and VBox sources in sync.  More later.


----------



## alie (May 16, 2009)

vboxadd.ko, vboxvideo and vboxmouse available for FreeBSD ?


----------



## sossego (May 16, 2009)

DrJ, it is non-existent.
You can always have it officially added.

I saw the other links.
It doesn't work on amd64 yet.
Et cetera, et al.

http://www.freebsd.org/cgi/ports.cgi?query=virtualbox&stype=all

Proof above that I am right.

alie, 

you need to install it from within a folder, then create an folder to link to for root, then run it according to basic qemu options.

If you want to test it out on a virtual machine. Yes, a build upon a build then try qemu without kqemu.
Type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.

Build and run the freebsd image. Load aio without kqemu or use -no-kqemu.

Build your vm with a root partition of 4G to ensure the build of a functional vm within the vm.

Copy the patches and build to another image on the vm.
Since it is qemu based, you should be able to change the vm image to an ISO image. You should be able to burn the image and mount it later.

Want optional help? Ask one of the freebsd hackers.


----------



## DrJ (May 16, 2009)

Please read my post again.  I said that there is a discussion about VBox on the -emulation list.  There you will find a call for testing the VirtualBox port.  There is a link provided on that list for the port.  

No, it is not in the ports tree yet, but there *is* a port.  Not in its final form, but it does exist.


----------



## manolis@ (May 19, 2009)

FWIW, I've built the port mentioned here:

http://lists.freebsd.org/pipermail/freebsd-emulation/2009-May/006026.html

(Seems they also got an updated version now)

using ports-mgmt/tinderbox on a 7.2-RELEASE.

Installed the packages on a 7.2-RELEASE machine. Few things to note:

- It failed to install the kernel module into /boot/modules. I copied it manually (it was present in the package tarball but would not get copied, maybe a problem with the install script?)
- Need to mount /proc per instructions
- The kernel module may cause a panic if kldunload'ed

Other than that it works fine. I've got a complete set of packages (208 including all dependencies) and can upload them if anyone wishes to try.

Here is a screenshot of it running XP:

http://www.flickr.com/photos/sonic2000gr/3545490246/sizes/l/


----------



## DrJ (May 19, 2009)

I have the kernel module located in the right place; maybe that was fixed in version 2 (which I installed).

I still have issues with the kernel module causing a hard lock when it is loaded.  It is really odd: if I load it right after VBox is installed, then it loads fine, and VBox is stable.  If there was a reboot inbetween, then it has locked on me 7 out of 8 tries.  Just odd.

Were you able to load the Guest Additions?  I am limited to 800x600, 16 bit resolution.  That is a very severe limitation.


----------



## SaveTheRbtz (May 20, 2009)

i have strange issue with virtualbox:
It complites and runs, but when i start any virtual machine virtualbox freezes at:
*"Starting virtual machine" 0% *
and eats all my cpu
System is _FreeBSD 8.0-CURRENT #45 r192392_
VirtualBox revisions: from first FreeBSD to latest _virtualbox-2.2.2r19801_

i've asked this question at #vbox-dev but there are not so many freebsd users =(


----------



## DrJ (May 20, 2009)

There have been some issues with AMD64 that the devs are trying to straighten out.  There was a new VBox version posted on -emulation (there is a link on the thread); it is up to version 3 if you count the call for testing as version 1.

Have you tried that one?


----------



## DrJ (May 20, 2009)

The posting I replied to has now disappeared!  No idea what happened to it...


----------



## manolis@ (May 20, 2009)

DrJ said:
			
		

> Were you able to load the Guest Additions?  I am limited to 800x600, 16 bit resolution.  That is a very severe limitation.



Yes. The guest additions are not included in the package and fail to download if you select them from the menu. But you can download them manually from here:

http://dlc.sun.com/virtualbox/2.2.2/VBoxGuestAdditions_2.2.2.iso

Just rename the file To VBoxGuestAdditions.iso and move it to /usr/local/lib/virtualbox so the GUI can find it. 

They work fine on XP (the only guest I tried for the time being)


----------



## DutchDaemon (May 20, 2009)

DrJ said:
			
		

> The posting I replied to has now disappeared!  No idea what happened to it...



Poster deleted it.


----------



## FBSDin20Steps (May 20, 2009)

Virtualbox won't load on my AMD64...

I've an updated ports and source tree. I've rebuild world and
kernel (generic) to make sure any 32 bit libraries are on my
system. Compile of VirtualBox was successful. Enabled proc
 in /etc/fstab and created the vboxusers group. Did a reboot.

Loaded the vboxdrv module.


```
$ kldstat | grep vbox
 8    1 0xffffffff80e6b000 1e86e    vboxdrv.ko
$
```

Opened a terminal in Gnome executed the command "VirtualBox" but
 nothing happens. No errors.

Is there anything I am missing?


----------



## DrJ (May 20, 2009)

It is in an odd location (/usr/local/lib, IIRC; I'm not on my BSD box).  You may not have it in your path.  I'd grep for the program file, and execute it with the full path.


----------



## FBSDin20Steps (May 20, 2009)

It's in "/usr/local/lib/virtualbox". Executing the file gives me the same result.


----------



## FBSDin20Steps (May 21, 2009)

When I run virtualbox as root *sudo truss VirtualBox* I get the registration form but when I run it as user. It quits on me.


----------



## DrJ (May 21, 2009)

I've only been able to get it to run as root.  Given the other issues I have, I've not explored why a regular user didn't work.


----------



## Andy_Kosela (Jun 13, 2009)

FBSDin20Steps said:
			
		

> When I run virtualbox as root *sudo truss VirtualBox* I get the registration form but when I run it as user. It quits on me.



Odd but when I run just # VirtualBox it just stalls and does nothing, but with # truss VirtualBox it runs without any problems (just installed Fedora 11).

The port needs polishing but I think it will be working soon..Many thanks to developers who work on this.


----------



## hydra (Jun 13, 2009)

Same problem here (amd64). Just running 
	
	



```
# VirtualBox
```
 doesn't work, but with 
	
	



```
# sudo truss VirtualBox
```
 it works  Thanks for the idea, I would never think of it


----------



## knotabot (Jun 18, 2009)

Here is a list of Virtualbox Guest OS support by OS:
http://www.virtualbox.org/wiki/Guest_OSes


----------



## copypaiste (Jun 20, 2009)

I've got a strange trouble with virtualbox-2.2.51.r20457_2 on 7.2-RELEASE
Enabling additional controllers in 'Hard Disks' settings gives me errors like this one:


```
!!Assertion Failed!!
Expression: pDev
Location  : /usr/ports/emulators/virtualbox/work/virtualbox-2.2.51r20457/src/VBox/VMM/PDMDevice.cpp(195) int pdmR3DevInit(VM*)
Configuration error: device 'ahci' not found!
```

...and vm falls into 'Aborted' state.

It seems that there's no support for virtual ahci and scsi devises and I can add no more than 3 virtual hard drives for each virtual machine. Any hints on that?


----------



## mousaka (Jun 21, 2009)

copypaiste said:
			
		

> It seems that there's no support for virtual ahci and scsi devises and I can add no more than 3 virtual hard drives for each virtual machine. Any hints on that?


Correct, because the port is based on the Open Source Edition (OSE), which doesn't support SATA-controller.

Because of the last sentence in the mentioned page:





> Also, this allows you to connect more than three virtual hard disks to the machine.


I assume it's the same issue for SCSI-controllers, as this would allow you to use more disks.

Hopefully SUN will release soon a FreeBSD binary version.

mousaka


----------



## copypaiste (Jun 21, 2009)

Doh... 

Thanks for your answer, mousaka! 
So, no workarounds available for this limitation yet?


----------



## fronclynne (Jun 21, 2009)

*but really, 3 drives on a virtual machine?  omg, wtf?*



			
				copypaiste said:
			
		

> Doh...
> 
> Thanks for your answer, mousaka!
> So, no workarounds available for this limitation yet?


Of the top of my head, and without testing it, judicious use of mdconfig(8) & nfs on the host machine.  (I mean, I've done it in the days of yore with qemu, fwiw and ymmv, and all that.)


----------



## ErikaHayley (Jun 21, 2009)

Thanks


----------



## hedwards (Jun 22, 2009)

mousaka said:
			
		

> Hopefully SUN will release soon a FreeBSD binary version.
> 
> mousaka


At this point is it even possible to compile the open source version under AMD64? I've been trying and the dependencies never seem to work out the way that they should.


----------



## mousaka (Jun 22, 2009)

hedwards said:
			
		

> At this point is it even possible to compile the open source version under AMD64?


For me it works fine under 7.2-STABLE amd64.

I'm limited to 32bit guest tough as my CPU doesn't support Intel VT or AMD-V



> I've been trying and the dependencies never seem to work out the way that they should.


My crystal ball is sadly out of order. 

mousaka


----------



## lme@ (Jun 22, 2009)

To all users who cannot get VB running, with `# Virtualbox` and nothing happens:
Open another terminal, type `# pgrep VirtualBox` and if there are two PIDs returned, kill one. Usually killing the process with the higher PID works. After that, the other VB process runs correctly.


----------



## hedwards (Jun 28, 2009)

mousaka said:
			
		

> For me it works fine under 7.2-STABLE amd64.
> 
> I'm limited to 32bit guest tough as my CPU doesn't support Intel VT or AMD-V


I'll give it another try, perhaps kbuild and the other dependencies have been fixed.

I have however noticed that it seems to run pretty well under Windows, definitely without the speed issues I'm used to.


----------



## hedwards (Jun 29, 2009)

Hmm, apparently there's now an AMD64 PBI available, so I'll put off trying to get it to work in FreeBSD for the time being.

It seems to work pretty well, except for it being sluggish and that I need to manually load the module when I boot up.


----------



## ProServ (Nov 29, 2009)

*vbox on remote host*

Anyone have vbox running on remote host without X running? Is there a doc or something for this?

Thanks!


----------



## graudeejs (Nov 29, 2009)

refer to virtul box documentation 
http://download.virtualbox.org/virtualbox/3.0.12/UserManual.pdf

there were related topics (i haven't read it entirely, I'ev just read Table of Content


----------



## swills@ (Dec 4, 2009)

Hi, I'm using VirtualBox on 8.0-amd64. It's working great. I'm trying to build a test environment for doing automated installs. I've setup two VMs, one with two interfaces to be the install server and the other to be the test installed machine.

On the install server, the first interface is on the normal LAN via bridged mode. The second interface is using the "Internal network" setting. 

On the test install machine, it's just on the "Internal network". I've done a manual install in it, and it's working fine and can talk to the install server via the internal network interface.

Yet, when I boot this VM and select the LAN boot option, it immediately fails. tcpdump inside the install server (the other machine on the internal network) shows no packets coming from the test VM. So it seems that although VirtualBox claims to support LAN boot, it can't really do it. Anyone else tried this or have any experience with it?

Thanks for any help.

Update: Using one of the non-Intel NICs gets me further. It DHCPs, tftp downloads the pxeboot file, but then VirtualBox crashes. Perhaps the newer version of VirtualBox would work better?


----------



## trev (Dec 5, 2009)

I've been trying to compile VB for some months (7-Stable amd64) but always get errors when the build process is applying patches. Today's attempt:


```
===>  Found saved configuration for virtualbox-3.0.51.r22902_2
===>  Extracting for virtualbox-3.0.51.r22902_2
=> MD5 Checksum OK for virtualbox-3.0.51r22902.tar.bz2.
=> SHA256 Checksum OK for virtualbox-3.0.51r22902.tar.bz2.
===>  Patching for virtualbox-3.0.51.r22902_2
===>  Applying FreeBSD patches for virtualbox-3.0.51.r22902_2
2 out of 3 hunks failed--saving rejects to src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c.rej
=> Patch patch-amd64-r0-exec-alloc failed to apply cleanly.
=> Patch(es) patch-Config.kmk applied cleanly.
*** Error code 1

Stop in /usr/ports/emulators/virtualbox.
*** Error code 1

Stop in /usr/ports/emulators/virtualbox.
```

What am I missing?


----------



## hitchup (Dec 9, 2009)

*Same result -- 32bit on 7.2*



			
				trev said:
			
		

> I've been trying to compile VB for some months (7-Stable amd64) but always get errors when the build process is applying patches. Today's attempt:
> 
> 
> ```
> ...



********************************
Received the same error on 7.2 32 bit os


----------



## trev (Dec 9, 2009)

hitchup said:
			
		

> Received the same error on 7.2 32 bit os



Cool. It's not just me, and it's not just amd64 which was what I was beginning to suspect. Strike that thought, which leaves us back at the beginning...


----------



## vermaden (Dec 9, 2009)

@hitchup / @trev

Have You been trying to update Ports tree?

If that does not help, I would submit a BUG: http://freebsd.org/send-pr.html


----------



## trev (Dec 10, 2009)

vermaden said:
			
		

> @hitchup / @trev
> Have You been trying to update Ports tree?



Yes - it is updated every night.



> If that does not help, I would submit a BUG: http://freebsd.org/send-pr.html



I would have done that except that noone else (apart from hitchup above) seems to have ever had the problem. As I mentioned, I've had the issue for months.

[LATER]

Success!


```
===>   Installing ldconfig configuration file
===>   Registering installation for virtualbox-3.0.51.r22902_3
```

The trick was to delete the virtualbox directory from /usr/ports and then re-run csup to re-fetch it. "make clean" was obviously not enough.


----------



## vermaden (Dec 10, 2009)

trev said:
			
		

> The trick was to delete the virtualbox directory from /usr/ports and then re-run csup to re-fetch it. "make clean" was obviously not enough.


Interesting ... good to know You have found a sollution


----------



## Zare (Dec 10, 2009)

make clean only cleans out working files from compilation. It seems that your port info + patches weren't up to date, now the question is why the standard update process didn't fetch new port information, and csup did it.


----------



## Shura (Dec 14, 2009)

Hi, people.
I've istalled VirtualBox, but faced with one issue. VBoxManage has not '--audio pulse' option.
When I made port I checked option 'With pulse audio', but it had not got any effect.
How to add 'pulse' support?


----------



## Eponasoft (Dec 16, 2009)

Wow...I finally managed to get VirtualBox built and running...and I've gotta say, this is like a dream come true.  For what I need a vm for, this surpasses vmware by about ten thousand miles. While it was certainly not easy to get all the dependencies built for it (curse you dbus-qt4 and phonon), I can now look back on the experience and laugh...I learned a lot more about FreeBSD and the Ports Collection doing this.


----------

