# FreeBSD host hangs with VirtualBox + Win2003x32+6Gb RAM



## G_Nerc (Apr 8, 2012)

Hi friends! I need a help!
I have a:
*HW:* Server 4-cores Xeon + 7Gb RAM + 500Gb HDD
*HOST OS: * FreeBSD 9.0 amd64 *[default install with GENERIC kernel]* + VirtualBox 4.1.12
When I try to install in virtualbox a Windows guest with 6Gb RAM, after several minutes of guest system install, host system hangs. 
Now I have not any logs from it.
System responses to ping requests, but not accessible by ssh after hangs.
And if I install guest system with 2Gb RAM, host isn't hangs.

What I need to do for solve that problem?


----------



## bbzz (Apr 8, 2012)

Out of curiosity, why do you need whooping 6GB out of 7GB for Windows?


----------



## G_Nerc (Apr 8, 2012)

It will be terminal server mainly for work with software which consumes not much CPU time, but eats 400-600MB RAM for one instance.
I know that someone starts tell Me that FreeBSD + VirtualBox is a bad solution for critical tasks. But I have 6 Windows PDC+DNS+DHCP servers and 2 MS Exchange Server installation in FreeBSD + VirtualBox and it works fine.
And 6 GB from 7Gb available I whooping for Windows also because host machine will not have any other roles.


----------



## pkubaj (Apr 8, 2012)

If Windows VM in VirtualBox is the only thing this PC will serve for, can't you just install Windows as a host with no VMs? You know, performance in VM is crippled at best and you won't be using this host anything else.


----------



## G_Nerc (Apr 9, 2012)

pkubaj said:
			
		

> If Windows VM in VirtualBox is the only thing this PC will serve for, can't you just install Windows as a host with no VMs? You know, performance in VM is crippled at best and you won't be using this host anything else.


Thank you, but I need an answer for my question.


----------



## wblock@ (Apr 9, 2012)

Wait... Windows 2003 *32-bit*?  It's not going to see more than about 3.5G anyway.  Unless PAE is involved, and it might be.


----------



## G_Nerc (Apr 9, 2012)

Good day *wblock@*! Maybe your version is  right, but Windows 2003 32bit installs without problem on native machine with more than 4Gb RAM. And if problem in 32bit Windows, does it mean that host machine must completely hangs? Maybe needs some dig in that problem for good PR to VirtualBox developers and maintainers?


----------



## da1 (Apr 10, 2012)

Firstly, I would like to point out what wblock said about the 32 bit architecture of Windows; you will not able to use 4GB of RAM or more on it. Maybe you can try a 64 bit version?

Then, off to debugging. 
1) Show us the settings you have for the Windows VM

```
VBoxManage showvminfo <vm_name>
```

Open several terminals to the host OS and monitor the disks, top, vmstat, and enable the "all" log in /etc/syslog.conf:

```
*.*                  /var/log/all.log
```
then, create the file and restart syslog and monitor this log in yet another terminal.

You said that the host is hung and ssh doesn't work. Maybe you can monitor network buffers in another terminal. BTW, do you have swap configured for the host? Is is getting full?

PS: Although 


> Windows 2003 32bit installs without problem on native machine with more than 4Gb RAM.


 you will not be able to use more than 4 (sometimes not more than 3.5G) RAM.


----------



## freethread (Apr 10, 2012)

PAE and AWE API are supported in Windows 2003 32bit, up to 8GB (but in some cases the machine can only see 6GB). What I don't know is the total amount of memory in 32bit machines without PAE support (non Windows host) and 32bit VM (guest).


----------



## wblock@ (Apr 11, 2012)

VirtualBox might not handle a guest using PAE.


----------



## dalecosp (Apr 11, 2012)

Long time user, but not a developer here, but I'm pretty curious on the "swap" issue as well.  You've got a hardware box telling F*ree*BSD it has 7G of RAM, might it not try to do quite a bit of "swapping" when VirtualBox gets busy?

Almost every F*ree*BSD "hang" I've ever experienced in a system that was otherwise known to work was due to swap and/or disk space issues.


----------



## mix_room (Apr 11, 2012)

Since you say that it works when you give the virtual machine 2GB of RAM I would suggest trying to find the break point where it no longer works. You are probably either running out of RAM on the host, or the guest is doing something odd when accessing the RAM. 

And as previsou posters have said: if you are not running anything else on the machine, why bother with the virtualization layer instead of running windows on bare-metal?


----------



## wblock@ (Apr 11, 2012)

The break point might be at or around 4G guest memory.  There could be a 32/64-bit bug in VirtualBox.

As far as running in a VM, that's an appealing idea because it makes the guest completely portable, easily moved to a different host and not sensitive to driver or validation issues.


----------



## G_Nerc (Apr 23, 2012)

Thanks all and sorry for my disappearing. Problem I think in that: host machine has 7GB RAM, I see that when I give to VBox 3GB RAM it uses near 4GB, so when I give to it 6GB, it starts aggressively using swap file and the system freezes.

Problem #2: Ive installed succesfully Win2003x32 to VBox with 3.4GB RAM, and I have AMD CNET network adapter in virtual machine. Network works fine in VM. After that I gave to VM 5GB and when I start it, network in VM is not working and in device manager *I* see that the network card has a problem (device not using resources)

For problem #2 I will try to change network adapter type.


----------

