1

My system has 4gb RAM. When I run a virtual machine I can allocate a maximum of 1gb. I have VirtualBox 5.1.34 installed from repository.

In VirtualBox I have a Windows 7 machine. This machine keeps running out of memory and slows down to a crawl. There are some programs that aren't available in Linux and I just can't get them to run in Wine. So I do need a temporary working Windows 7.

My question is since Linux has swap space, is there a configuration where I can assign 4gb of memory to a virtual machine which is 1000mb from physical RAM and 3000mb from swap space.

  • 1
    No and it would be worse than anything. Add some swap to Linux and increase ram of you vm to 1.5Gb if Linux need to swap it Will. What you see is windows swaping imagine if you machine was swapping and windows also. I think you need to either allocated more ram to your vm either stop the experiment. – Kiwy Jul 1 '18 at 6:55
-1

For using graphical interfaces and Internet browsers, 4GB is nothing out of ordinary for both Windows or Linux, and that is ignoring you are doing other operations/running other daemons simultaneously.

For sharing both OSs at the same time, it runs but it starts being on the low side, depending on what you are doing. Windows 7-10 needs at least 2GB of RAM, 1GB is clearly not enough.

If you need to use regularly with either one or another OS, you will be more happy dual booting for more heavy usage.

As for trying to take a constant planned usage of swap for regular operations, to compensate for not giving enough RAM for a VM, it is a very bad idea. It will only make the machine and I/O much slower and unstable.

A possible alternative is buying more RAM. If using a modern Linux as host and Windows 7-10, 8GB is good, I would not go for less than 16GB (and I am using indeed 16GB in two notebooks).

I suggest doing a raw disk setup from the command line for virtualbox using a real partition instead of a file, for being able to dual boot.

It takes a bit more planning, however besides being more efficient accessing a raw partition than a file, you will be able to run Windows either from VirtualBox or booting directly the machine.

Beware that those setup involves virtualbox command line steps, it cannot be done entirely from the graphical interface.

see Rawdisk access from Ubuntu Host

P.S. I also have that raw disk access from VirtualBox in my slower machine. The difference in performance is very visible. The downside is not being able to copy the VM as file(s) to other machines, however you can export it in OVA format for instance.

PS2 VirtualBox is terribly buggy. After a month and so of trying to use it for something useful in my Windows corporate laptop, I am deleting it. My experience on the Mac side at home is not that much better, I am using VmWare nowadays.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.