Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm planning how to partition my hard drive.

I want to have 2 partitions - one for Ubuntu, the main operating system, and the other for virtual machine images, as I want to run virtual machines of Windows and MacOS through VirtualBox.

My question is - what's the best file-system for the virtual machines partition?

Are there any advantages performance-wise to using a file-system other than, say, FAT32 or NTFS?

share|improve this question
add comment

9 Answers

up vote 10 down vote accepted

I would put your VM images on a seperate spindle. Having them on a seperate disk with a large cache is likely to yield a much larger performance boost than which filesystem you use.

Given that a corruption in a VM image could be catastrophic, I would be looking at robustness of filesystem over performance. Is it likely to survive a power failure, for example? So (to use the examples you've cited) I would certainly use NTFS over FAT32, regardless of performance characteristics, simply because it is a journaling filesystem and therefore much more fault tolerant.

share|improve this answer
1  
You beat me by a few seconds. +1 for putting them on another drive. –  Dave Drager Aug 14 '09 at 13:19
add comment

If possible, I would highly recommend putting your virtual machine images on another hard drive and not on the same drive (even if it is on a different partition). Save your main hard drive for OS tasks and running Virtualbox, and let the second drive handle the data, because there will be a lot of it going back and forth, and it will slow down your system considerable as the hard drive becomes the bottleneck.

If you have to keep it on the same drive, make sure you use large blocks when formatting it. Since large chunks of data are moved, I believe that this will help performance (someone please correct me if I am wrong here). I am not sure if there is a better fs for the images or not. This post from Sun points towards ZFS as being pretty nice to use.

share|improve this answer
1  
I counter that in production. I have a number of servers running RAID 10s for the OS and virtualization. The IO overhead of the OS (just running a hypervisor) is low enough not to be memorable, and the 64gb partition is small. THis is more efficient than lossing 2 discs. Note that I dont mean small system - the largetst has a 6 disc boot now with 64gb RAM running a lot of machines. It soon getsupgraded to 8 discs because of space need ;) –  TomTom Oct 28 '10 at 18:39
add comment

You should NOT use FAT32 - FAT32 has a limit of 4 GB in file size (Technically, 4 GB - 2 bytes if I'm not mistaken).

share|improve this answer
add comment

For host based VMs, it doesn't really matter. You'll want to use something that easily works with larger files though, so stay away from file systems like reiserfs which handles smaller files faster than larger ones. Most of my linux installs go with jfs for journaling speed and B+ Tree. See wiki link

share|improve this answer
add comment

Well, I dont know the best, but I can maybe help you rule out NTFS

..and you may already be aware of this. Ubuntu doesnt natively read NTFS. This requires the installation of a separate package, which is very simple, but I have noticed that performance on the NTFS partition, when read by Ubuntu, is noticeably slow.

share|improve this answer
add comment

The partition on Linux that hosts the vmdk files does matter I think, if that is what you are actually asking.

XFS might be best as it is more tested, you will get disk IO improvements with that. You could also use the newer ext4. The main things you want is extents so the big files don't get broken up, both these file systems have that and support Linux well. Myself, I would go with ext4 just because it is familiar, even if new. However, I have no numbers to back this up right now :-)

Also, allocate all the disk space first, don't chose grow as needed. The best option for performance might be to give the VM direct access to the partition itself, so there isn't an extra layer, but that kind of ruins the point of VMs for many people.

Lastly, this link has some tuning tips vmware server running on Linux that might help you get better IO performance.

share|improve this answer
    
Oh, virtualbox, I was thinking vmware, oh well :-) –  Kyle Brandt Aug 14 '09 at 13:47
add comment

ext3 is best. Don't go for ext4 as it was kinda disturbing to my harddisk. Before or after installing ubuntu do learn the terminal commands to repair and check your partition for errors. You will surely needed to do it occasionally in commandline mode if you deal with both NTFS and ext like partitions on same harddisk.

Due to too many command line operations, there are too many questions about every possible problem in ubuntu. Amazingly there are equal and more helpers are also available.

I was too having in such problems and by that time my system was on the window installation mode and asking for partition of hard disk. I was surfing internet on my mobile to find solutions about what to do.

And amazingly I got so many supported replies that I easily finished my partitions.

I am thanking all those who are spending their time and thoughts on ubuntu development and support!

share|improve this answer
add comment

If you chose NTFS, and you are going to run VMWare, it really doesn't like having it's VM flat files on an NTFS partition. We could never get the vm's to run if the files were on ntfs, we had to use ext3.(i am running vmware server1.x on top of RHEL)

share|improve this answer
add comment

LVM

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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