Recommended way to store VirtualBox VMs on System Drive (SSD)

  • Hello together,


    two years ago I've installed OMV 2.0 on an old pc and I remember that OMV grabbed the whole system drive for root partition.
    I agree that separation of system and data is a good thing so I arranged with it.


    Now I want to install OMV 4.0 as storage and virtualization server. I'm familiar with VirtualBox. So the combination OMV + VBox-Plugin seems to fit for me.


    But here is my problem:
    The server pc has 4 x 4TB HDDs as data storage and a 256GB SSD for system.
    I'd like to use the system SSD for the VBox VMs but I remember from OMV 2.0 that this usage is not intended. But in my case it makes absolutely sense to have the (relative small) VMs on the fast SSD.


    What is the recommended way to archive this setup in OMV 4.0?
    Does the installer have a partitioning tool now?


    But to be honest I'd like to have the VMs within the root partition. Don't want to get stuck in a too small root-partition some time.
    On my old OMV 2.0 SbNZBd Plugin had its temp dir for downloading and unpacking on the root partition too. This also makes sense to me on the new system as file access is much faster on the ssd than on the hdds.
    But VMs and storage are the main purposes of the new system. So in the end I'll go the recommended way to have the VMs on my SSD.


    Thanks for you suggestions! :)

  • first of all, use dynamique VDI for the disque.
    Use a 8 to 16 Go operating disk, depending on what you plan to do.
    After that, you can repeat the step for the data HDD and choose whatever size.



    I have a 3TO HDD, and i usually test omv with 1 IDE dynamique VDI of 16GO, and 6 SATA dynamique VDI disk of 1TO each for testing.



    the PerfectD9.3 VDI is set to be a 16GO disk.
    The Two DynamicVdisk1 and 2 bare suppose to be 1TO each.

  • Thanks for your reply but I think you missed the point. I don't want to install OMV *inside* a VM. I want to use OMV as base operating system and use its VirtualBox Plugin to have some other VMs on top of OMV. But I remember that the VirtualBox Plugin doesn't let you place VMs on the same drive than OMV is installed to. I want to know whats the recommended way to place VirtualBox VMs on the omv system drive. Any suggestions?


    Regards Mr Smile

    • Offizieller Beitrag

    I want to know whats the recommended way to place VirtualBox VMs on the omv system drive. Any suggestions?

    You would have to repartition your system drive and create/format the new partition. Once that is done, you can mount it in the filesystems tab and create a shared folder on it for use in the virtualbox plugin.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • You would have to repartition your system drive and create/format the new partition. Once that is done, you can mount it in the filesystems tab and create a shared folder on it for use in the virtualbox plugin.


    I just tried this on a OMV 4 Installation but I get lot's of Errors when booting (mdadm no arrays found, can't use swap, and some task is running for 1m30s) beside I get beeps thru the buzzer from the mainboard. In all the system suffers a lot as it looks like...


    I guess it's related to the uid mapping - can it be?


    What I did:

    • So when I installed OMV 4 fresh from the official medium I get my SSD with one big root/omv partition and a little extended with swap (same size as ram).
    • I booted a live disk and resized the omv root partition to 20GB create a LUKS-encrypted-ext4 partition (for the VM) and recreated a extended with swap in the end (technically it's a new partition).

    What I want:

    • clean fresh working thing with a usable partition on my ssd for the virtual box virtual machine


    Any easy solutions? For sure I could install a clean debian 9 directly on a small partition and run the omv install script... but is there no easy solution? :P

    • Offizieller Beitrag

    You should be able to shrink your root partition on the system drive, the ssd. Then you get room for another partition on the ssd, that can be used for the VM images.


    Now I assume you have something like this:


    /boot on sda1
    / on sda2, huge partition.
    swap on sda3


    You want something like this:


    /boot on sda1 (untouched)
    / on sda2, shrunk so about half is free storage.
    /opt/VM (or whatever) on sda3. What is left of the ssd after sda2 has been shrunk.
    swap on sda4


    You need to update fstab so sda3 is automatically mounted on /opt/VM (or whatever) on boot and swap is moved to sda4.


    Don't touch the storage drive or the entries for it in fstab.


    I use gparted to resize my partitions. They have to be offline, so you need to boot from USB, there are gparted images for that, or move the ssd to some other PC with gparted installed. Perhaps using an USB to SATA dock or something.


    But this is what you already did? What is the problem?


    (Have a good backup/full disk image of the ssd before you begin!)

  • You would have to repartition your system drive and create/format the new partition. Once that is done, you can mount it in the filesystems tab and create a shared folder on it for use in the virtualbox plugin.


    I just tried this on a OMV 4 Installation but I get lot's of Errors when booting (mdadm no arrays found, can't use swap, and some task is running for 1m30s)


    I guess it's related to the uid mapping - can it be?


    So when I installed OMV 4 fresh from the official medium I get my SSD with one big root/omv partition and a little extended with swap (same size as ram).


    I boot a live disk and resize the omv root partition to 20GB create a LUKS-encrypted-ext4 partition (for the VM) and recreate a extended with swap in the end (technically it's a new partition).


    Any easy solutions? For sure I could install a clean debian 9 directly on a small partition and run the omv install script... but is there no easy solution? :P

    Yes, this is what I did. Problem is that the system doesn't come up properly afterwards.


    Error messages in the console like:

    • mdadm no arrays found (15 to 20 times..)
    • Failed to do somth with swap
    • And some task is running for 1m30s (which is maximum allowed) and get killed.

    The clean install is just a sda1 (omv) and one (extended partition) for swap), there is no boot.
    I just shrinked sda1 and created a sda2 and recreated the swap...
    I have no idea why the system suffers so much from these "little" chances...

    • Offizieller Beitrag

    I get lot's of Errors when booting (mdadm no arrays found, can't use swap, and some task is running for 1m30s

    Do you have an mdadm array? If so, run omv-mkconf mdadm. If you re-created swap, it has a new uuid which fstab needs to be updated. The task is probably the system trying to find the old swap partition


    Any easy solutions? For sure I could install a clean debian 9 directly on a small partition and run the omv install script... but is there no easy solution?

    No because using the OS drive for anything other than the OS is technically not support and recommended against.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    The clean install is just a sda1 (omv) and one (extended partition) for swap), there is no boot.
    I just shrinked sda1 and created a sda2 and recreated the swap...
    I have no idea why the system suffers so much from these "little" chances...

    AFAIK you have (after clean install) to decrease the size of the OMV partition. Then move the swap partition to the left. Start OMV and create an additional file system on the available space. Mount the file system.

  • AFAIK you have (after clean install) to decrease the size of the OMV partition. Then move the swap partition to the left. Start OMV and create an additional file system on the available space. Mount the file system.

    Should have know this before should saved me a lot of time!
    Thank's this is the solution!


    Or the other way I did. Just shrink the omv partition and DON'T TOUCH the swap. Then everything goes fine!

  • Glad you got it working!


    But this suggests some strange bug, doesn't it? Moving/changing swap on one drive really shouldn't influence other drives?

    I was working always on the same (system) drive/ssd! But also that the system is getting upset when changing the swap is new for me. But that's how it it is nowadays when the uuid is changing like @ryecoaaron described:

    Do you have an mdadm array? If so, run omv-mkconf mdadm. If you re-created swap, it has a new uuid which fstab needs to be updated. The task is probably the system trying to find the old swap partition

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!