VirtualBox VMs on a seperate NTFS partition unaffected by re-installs of host OS

Hi there,

I intend to make a couple of VMs with VBox, on host Manjaro. I am thinking of setting this up in a particular manner and I have a few clarifications to get in this regard. Please throw light upon them.

Regarding location of the VB configuration files and its software:

By default, VB has a folder on the host computer where all the configuration files of VB are stored. The location for these folders is /home/username. This folder contains the VBox configuration files configured by the $user, if I am right. Am I right? The VB software is installed inside the /root partition of the host OS, which is Manjaro in this case. Again, am I right about this too?

Regarding location of the VMs created with VB:

Further, when the $user creates a VM on which a guest OS is installed, can this VM be placed on a separate partition, other than /home or /root or /data?

Regarding future re-installation of the host OS:

I wish to create such a setup because, if in future, it comes upon me to re-install the host Manjaro OS, the VB configuration files on the /home and the VMs on the separate partition are unaffected. Once I re-install the host OS on the /root and re-install VB there, things are as before. I don't have to re-create the VMs or re-configure the VB again. Is this possible? Can this be accomplished?

Regarding the file system of the separate partition where all kinds of OSes could be installed:

Suppose, I want to install Windows and Android or any other Linux based OS as the guest OSes on two of the VMs, which would be placed on a separate partition. Can the file system on this partition be NTFS? I am asking because AFAIK, Windows works only on NTFS and Android or other Linux OSes work only on EXT3/EXT4, if I am right?

Regarding Linux directory for VMs:

Linux has a directory system, like /home for user configuration files, /root for the OS, /data for storing files, /swap for swap, etc. Similarly is there a directory type for virtual machine like things? If yes, which is it?

These are some of the things currently coming to my mind that I would like to get informed, before I proceed with creating VMs on VB.

Please kindly throw light upon these matters.

Thank you & Regards

You can put the VMs wherever you want. By default, I think they get placed in a subdirectory of your home directory.

Eh...what? The disks the guests use are virtualized. They are basically files in the host OS. The guest sees it as a block device which can be formatted with ext4, ntfs or anything else you want. You don't need to use an ntfs partition to store Windows VMs.

You can put them wherever you want.


1 Like

Thanks for the clarifications Dalto,

If at a later time, I re-install the host OS and reinstall VB in it, would the old VMs which are on a separate partition, and the old VB configuration files which are on /home, which have not been affected because they are on separate partitions, get integrated with the newly re-installed host OS & VB?

While re-installing the host, I show the installer my home partition as /home, swap as /swap, data as /data and then what do I name this separate directory where I have placed my VMs, so that when I reinstall VB, it immediately recognizes where the VMs are placed and get integrated with it. Or does it fall under altogether a different process of editing /etc/fstab?

As you are new to Linux and this topic is about VirtualBox I want to make you aware of the guide to VirtualBox in the #technical-issues-and-assistance:tutorials section.

All necessary files and configuration for running a specific guest is stored in the same folder.

The only settings stored in the ~/.config is the virtual machines registered on the system. The only thing you have to do to register the VM is to double click the vbox file located in the VM's storage folder.

The setup you are describing I have been using for years.

I keep all my stuff on separate partitions and mount the partitions using systemd units and symlink my data back into the relevant folders in my home.

/data/private/Documents => ~/Documents
/data/virtualbox => ~/VirtualBox VMS

I have more folders but you get the idea

My mount units is backed up as well and it is super simple to copy them back and enable them

Using this approach I can reinstall my system and have my data back in place in less than 15 minutes.

On an afterthought

Unless you have specific intention of running a VM from a Windows host - don't use NTFS for the storage - ext4 is the recommended filesystem on Linux. Yes there is other filesystems but those are not well suited for storage of virtual machines.

1 Like

Ah! this is the beauty of Linux, linux-aarhus. Thanks for coming again.

I will take my time to go through the links thoroughly. Thanks for the links.

By the way you said in one of those links;

Manjaro uses udev to load devices at boot time

What actually is the meaning of 'devices' here; partitions?

Devices are disks, mouse, keyboard, usb, printer - anything which is part of or attached to a computer system.

Linux do not use the term drive or drive mapping because a storage location can take many forms - so in the context devices refers to any kind of storage location - a disk partition, a network share, a ftp server etc.

In this case a device is a partition e.g. /dev/sdy2

1 Like

Ah!, thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by