Creating VirtualBox in Memory

This is for discussing general topics about how to use VirtualBox.
Post Reply
TheScriptGuy
Posts: 5
Joined: 15. May 2021, 05:39

Creating VirtualBox in Memory

Post by TheScriptGuy »

Hi!

I'm not sure if this has been asked before (I don't seem to find anything when I search).

I'm running VirtualBox on Debian 10. I'm looking to have a VM run entirely in memory. When the VM is powered off, a script then copies the data to a slower disk to be kept for long term storage.

What I thought I could do was the following:
1. Create a new temporary file system in memory for the VM.
2. Copy the VM files from slower storage to the temporary filesystem in memory.
3. VM runs in memory.
4. When VM is powered down, copy files from temporary filesystem in memory back to slower storage.

I don't the inner workings in VirtualBox, but do you think this is possible? What things should I look out for?

Let me know if you have any questions.

Thanks!
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Creating VirtualBox in Memory

Post by mpack »

When you say "create VirtualBox" are you talking about a VM? If so: we don't refer to VMs as VirtualBoxes. The VM is called a VM or a guest and the host software is called VirtualBox.

If you mean - can you run a VM from RAM? Then naturally it's possible - you need only create a RAMdisk and copy the VM there before running it. The VM would have to be registered from its RAM drive location. I don't quite see the point however. VirtualBox still needs to be installed on physical disk and you still need to keep hard disk copies around so all the RAM copying does AFAICS is slow down the VM boot and generally waste RAM. If the objective is to speed up the VM then yes it might have an effect, but an SSD would be almost as good with none of the risks (say: of a power cut).

If you mean: can the VirtualBox software be run on a PC it has not been installed on then, no it can't. VirtualBox requires a number of drivers to be installed in the host OS before you can launch VMs. That will require admin rights on most hosts.
Post Reply