Feature Requests

Here you can provide suggestions on how to improve the product, website, etc.
al
Posts: 3
Joined: 17. May 2007, 12:09
Location: England

Feature Requests

Post by al »

I have a few requests for features that would be extremely useful to me:

1: 'Split' disks: I currently have a VMWare virtual machine on a portable hard drive with a FAT32 partition so that it can be used on Windows & Linux. This isn't currently possible with VirtualBox because of the 4GB file size limit on FAT32. I notice in trunk/include/VBox/VBoxHDD-new.h that there is a reference to the VMDK split disks, so I guess this is under consideration, no?

2: Support for virtual machines in different directories, e.g. a directory on a portable disk containing the XML descriptor, the VDI disk and any other stuff: I'd like to be able to sit down on a computer (with VirtualBox installed) I haven't used before, load VirtualBox, click file...open and point it at the XML file. This is easier than reconfiguring VirtualBox everytime the drive letter of the portable device changes.

3: With a Linux host and Windows guest, it would be really nice if the 'shared folder' feature marked all 'dot files' (e.g. '.vimrc') as hidden so that the Windows Explorer "Don't show hidden files and folders" option worked with these files.

Many thanks,

Al
achimha
Volunteer
Posts: 217
Joined: 10. May 2007, 09:24

Post by achimha »

1 and 2 are being worked on.

3 is an interesting thought.
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

- dynamic memory assignment so that the VM machine only uses the amount of RAM it needs to use rather than having a large portion of RAM assigned to the VM exclusively even if it doesn't use all that RAM.

This feature is especially important for seamless integration of Windows applications in Linux hosts for instance so that it is possible to run a RAM intensive application in the guest OS but once this application is closed the RAM can be given back to the host system. I think there was plans to include this in VirtualBox but is this still considered for upcoming versions? (Isn't VMWare already supporting dynamic RAM assignment?)
achimha
Volunteer
Posts: 217
Joined: 10. May 2007, 09:24

Post by achimha »

Dynamic RAM allocation is already in for the next version. Giving back RAM is not implemented yet and needs Guest Additions support.
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

achimha wrote:Dynamic RAM allocation is already in for the next version. Giving back RAM is not implemented yet and needs Guest Additions support.
What do you mean by dynamic RAM allocation then? Does it mean that the VM will start with a low amount of RAM and this amount will grow depending on the need but RAM can only be added to the VM and not removed?
achimha
Volunteer
Posts: 217
Joined: 10. May 2007, 09:24

Post by achimha »

Exactly.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

Well, VMware AFAIK also able only to grow RAM, not give back, plus *you* must specify RAM limit manually.

OS-level virtualization guests has it fully dynamically: they can automatically scale to 100% of physical RAM and give back when needed.

Look at Virtualization Theory:
http://www.violtan.com/ae/virtualization.html
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

OK, thanks for these informations.

Still on this topic of RAM usage I'd like your opinion on something. I'm a newbie and really don't know much about this so this may be totally ridiculous but let's go!

Since it doesn't appear possible to give unused RAM back to the host system, would it be possible to assign a very small max RAM allocation (like 10Mb) to the XP virtual machine and so force it to use swap? Of course you'll tell me that swap is really slow but is it possible to make a virtual RAM disk on the host (linux in this case) and place the XP swap file on it (through shared folders or something)??

If this is possible this would allow XP to not use the RAM directly but would use swap on a file that is located on a RAM virtual disk on the host (thus something probably as fast as direct RAM). Since the virtual disk is on the host now the point would be to make the virtual disk size variable depending on the XP pagefile (like checking the available free space on the RAM virtual disk and increase its size if the free space falls below a threshold). This would be done directly in the host through a script or similar.

Is this completely non sense or is there something useful here that would allow to give unused RAM back to the host??
Perry Werneck
Posts: 3
Joined: 18. May 2007, 22:00
Primary OS: Mandriva
VBox Version: OSE Mandriva
Guest OSses: Windows, FreeBSD, OpenSUSE, Ubuntu
Location: Brasil
Contact:

Still in RAM

Post by Perry Werneck »

Well, I *think* this will be the same 'cause (as far I know) the swap file only increases, it will not be reduced.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

Using swap with a VM is a really bad idea. It will be dog slow.
It will take like 20 minutes just to boot XP.

Currently the only solution I know of is use OS-level virtualization such as OpenVZ or buy stock of RAM. (I have 1 Gig and plan to upgrade)

But with 1 Gig of real RAM you can boot XP in VM with 256 MB of VM RAM.
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

Technologov wrote:Using swap with a VM is a really bad idea. It will be dog slow.
It will take like 20 minutes just to boot XP.

Currently the only solution I know of is use OS-level virtualization such as OpenVZ or buy stock of RAM. (I have 1 Gig and plan to upgrade)

But with 1 Gig of real RAM you can boot XP in VM with 256 MB of VM RAM.
Swapping on a harddisk is slow but not on a RAM virtual disk! What I mean by RAM virtual disk is that you assign a portion of your RAM and build a virtual partition that act just as a standard harddisk partition except it is located in the RAM -> much faster. Maybe the term RAMDISK is more appropriate than RAM virtual disk since this "disk" has nothing to do with a virtual machine!

It seems that the XP pagefile expands AND retracts according to memory needs:
"By default, Windows XP creates a pagefile that can be expanded and contracted depending on the amount of extra virtual memory that's needed." (source: http://www.theeldergeek.com/page_files_ ... tation.htm)

Therefore if the pagefile is able to retract (smaller size) when the memory needs are lower, the free space on the RAM virtual disk should increase and the virtual disk may possibly be resized as well to give back RAM to the host system.

The problem with giving XP just 256Mb of RAM is that you'll be able to boot it OK but what about running Photoshop then? With only 256Mb RAM assigned to XP Photoshop will eat everything and you'll start to use constantly the pagefile (swap) which is located on the VM -> very slow. Assigning more RAM to the VM means that the host system will get less.

With a XP pagefile on a variable-size RAM disk it would be possible to use more than 512Mb of RAM for the VM only when it is needed. Again I don't know if this is really possible, especially since it appears that RAM disks always have fixed size, but at least it sounds good to me :D

EDIT: Here we go! It seems that it is possible to create a RAMdisk with variable size. See:

Example:
mount -t tmpfs tmpfs /home/jeff/stuff

That will create a variable sized ramdisk
based upon the size of the files I put
into it. Careful what you put into it
though, if you run out of ram and start
swapping, things could get ugly. See
this page for a reference:
http://gentoo-wiki.com/TIP_Speeding_up_ ... with_tmpfs

(source: http://linuxhelp.blogspot.com/2005/12/c ... linux.html)

tmpfs is not really a ram disk because it uses the swap space instead of physical ram. However it seems that it is as fast as a ram disk... (see: http://www.solarisinternals.com/si/reading/tmpfs.pdf)
achimha
Volunteer
Posts: 217
Joined: 10. May 2007, 09:24

Post by achimha »

It's possible to give back physical RAM using memory balooning (needs Guest Additions work).

It is also possible to declare guest physical RAM as pageable. VMware does this but I'm not convinced that it's actually a good thing.
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

achimha wrote: It is also possible to declare guest physical RAM as pageable.
How can this be achieved? Is it possible with current VirtualBox/guest addons or does it require a new versions?
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

kilou:
>How can this be achieved? Is it possible with current VirtualBox/guest addons or does it require a new versions?

It will require new version. Then our memory model will be more similar to VMware. Currently our memory model is similar to that of VirtualPC. I don't think this idea is good by default, but it's good as configurable option.

But your idea is really brilliant !

You *can* make a RAMdisk on Linux:

mount -t ramfs My_ramfs /mnt/ramdisk -o maxsize=10000
-or-
mount -t ramfs My_ramfs /mnt/ramdisk

The difference between "ramfs" and "tmpfs" is that tmpfs is real RAM + swap, while ramfs uses real RAM only, there is also an option of compressed RAM disk. This "ramfs" is fully dynamic and is giving back to host all RAM, once the file(s) that reside on it gets smaller.

On Windows XP Host you also can make a RAMdisk, but it requires third-party software called RamDiskXP and it results in static ramdisk.

But how to force Windows guest eat this RAMdisk ? over SMB ? Windows will not agree to such an arrangement... Because SMB is potentially unstable.
Last edited by Technologov on 19. May 2007, 15:25, edited 1 time in total.
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

Technologov wrote:
You *can* make a RAMdisk on Linux:

mount -t ramfs My_ramfs /mnt/ramdisk -o maxsize=10000
-or-
mount -t ramfs My_ramfs /mnt/ramdisk

The difference between "ramfs" and "tmpfs" is that tmpfs is real RAM + swap, while ramfs uses real RAM only, there is also an option of compressed RAM disk. This "ramfs" is fully dynamic and is giving back to host all RAM, once the file(s) that reside on it gets smaller.

On Windows XP Host you also can make a RAMdisk, but it requires third-party software called RamDiskXP and it results in static ramdisk.

But how to force guest Windows guest eat this RAMdisk ? over SMB ? Windows will not agree to such an arrangement... Because SMB is potentially unstable.
Great! I thought that ramdisk were always fixed size but if ramfs is able to grow and shrink according to its content then it would be a much better option than tmpfs. Now as you said the point is to make XP guest to put the pagefile on this ramfs and this is probabl the trickiest part. AFAIK XP pagefile can only be moved on different partitions so we 'd need that ramfs is recognized as a valid partition in XP. I think that IFS driver (http://www.fs-driver.org/) can make XP access EXT2-3 and Linux swap partitions. However I don't know if it would recognize the ramfs....and I'm unsure if this driver would work in a virtual machine (if it was working it would be much better than file sharing except that the files systems would be mounted both on the host and in the guest....not really good I guess).

Otherwise is there a way to tell XP to put the pagefile in a particular folder instead of a partition? EDIT: yes it is possible to do this by going in regedit, searching for "pagefile" and modifying the path to the page file into a specific folder! If this is possible would the built-in file/folder sharing (fixed in VirtualBox 1.4) be sufficiently fast to share ramfs with XP so that the pagefile can be placed on it?? I know Samba is pretty slow but the built-in sharing feature of VirtualBox is supposed to be much faster.

But indeed if there is a way to put the XP pagefile on that ramfs then we would have a dynamic assignment of RAM that would be probably a nice feature. The other question is how much physical RAM does XP need during boot before it can access its pagefile and use it? This minimum would be the RAM amount that would need to be assigned to the VM through VirtualBox and all the other memory requirement should be directed to the pagefile that would reside on the ramdisk. I'm really interested in knowing more on that subject :P


EDIT: This is an article about installing an OS from a Virtual machine onto a raw disk or partition. This means that the raw partition or disk is accessible FROM the Virtual machine!! Excatly what we'd need. This is apparently supported in VMWare workstation but will VirtualBox also support this as well???

http://www.vmware.com/support/reference ... linux.html
Last edited by kilou on 19. May 2007, 16:03, edited 2 times in total.
Post Reply