storing virtual box VMs in multiple partitions in CentOS

Posted on

Problem :

A CentOS 7 server has Virtual Box installed, and the default location of the Virtual Machines is in /root/VirtualBox VMs. Is there a way that I can put each virtual machine in a separate partition? I will eventually want to separately encrypt each partition, but for now, I just want each VM in its own partition, so that vm1 is in /custompartition1, and vm2 is in /custompartition2, and so on. The partitions have already been created, but how can I set things up so that each virtual machine is located in its own separate partition?


In hopes of clarifying @MohammadMoeni’s suggestion, I am clarifying my request as follows:

I want to remove vm1 from /root/VirtualBox VMs/vm1, and instead locate it at /custompartition1/vms/vm1. I also want to remove vm2 from /root/VirtualBox VMs/vm2 and instead locate it at /custompartition2/vms/vm2.

What specific steps do I take to set up VirtualBox so that it will run vm1 from /custompartition1/vms/vm1 (and so on for vm2)? And how can this be set up in a way that will enable me to later encrypt the partition?

Note that the server has a minimal install of CentOS 7, so I am using VBoxManage at the command line.

Solution :

You can move your folder virtual machine to another folder andthe open it on virtualbox
In virtual machines hdd is many important you can make a virtual machine hdd and folder customize in another path (partition)

Leave a Reply

Your email address will not be published. Required fields are marked *