Friday, May 06, 2011

virtualbox memory management

Memory ballooning

Starting with version 3.2, the Guest Additions of VirtualBox can change the amount of host memory that a VM uses while the machine is running. Because of how this is implemented, this feature is called "memory ballooning".

Note
VirtualBox supports memory ballooning only on 64-bit hosts, and it is not supported on Mac OS X hosts.


To change on the fly:

#VBoxManage controlvm "VM name" guestmemoryballoon


where "VM name" is the name or UUID of the virtual machine in question and is the amount of memory to allocate from the guest in megabytes.

To set a default balloon that will automatically be requested from the VM every time after it has started up:

#VBoxManage modifyvm "VM name" --guestmemoryballoon


Page Fusion

Whereas memory ballooning simply reduces the amount of RAM that is available to a VM, Page Fusion works differently: it avoids memory duplication between several similar running VMs.

In a server environment running several similar VMs (e.g. with identical operating systems) on the same host, lots of memory pages are identical. VirtualBox's Page Fusion technology, introduced with VirtualBox 3.2, is a novel technique to efficiently identify these identical memory pages and share them between multiple VMs.

Note
VirtualBox supports Page Fusion only on 64-bit hosts, and it is not supported on Mac OS X hosts. Page Fusion currently works only with Windows guests (2000 and later).


To enable Page Fusion for a VM, use the following command:

#VBoxManage modifyvm "VM name" --pagefusion on



Above content directly quote from virtualvox manual

VBoxManage Matricx

Thursday, May 05, 2011

virtualbox 4.0.6 change vdi uuid

Here is command to use to change uuid of vdi in ubuntu:

#VBoxManage internalcommands sethduuid [filehame.vdi] [uuid]

change filename.vdi and uuid to reflect correct vid name and uuid.

Tuesday, February 01, 2011

Combined Video files with ffmpeg

# cat [video1].mpg [video2].mpg | ffmpeg -f mpeg -i - -vcodec copy -acodec copy [combined_video_file].mpg

Wednesday, December 08, 2010

Lighttpd FasCGI PHP, MySQL chroot jail installation under Debian Linux

Found this HOWTO on secure lighttpd web server

Friday, January 01, 2010

Embedding flash player setup wizard

Embedding flash player setup wizard

HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg


Batch Convert mov files to flv files

adopted from here Using FFMpeg to Convert mpg or mov to flv

I am using the code mentioned in the article to batch convert the mov files I took with my HD Camcorder to flv for streaming it online.

Here is the modified code to suit my needs:


if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && strpos($file, "MOV") !== false) {
$new_filename = str_replace(" ", "_", strtolower(str_replace("MOV", "flv", $file)));
$file = str_replace(" ", "\ ", $file);
exec("ffmpeg -i $file -s 640x360 -deinterlace -ar 44100 -r 25 -qmin 3 -qmax 8 $new_filename");
}
}
closedir($handle);
}
?>



I change the display ratio to half of the 720P.

Saturday, December 19, 2009

How to make google chrome browser play youtube.com video with sound in Linux Ubuntu 9.1

"No Sound!!!" When playing youtube.com video with google chrome in Ubuntu 9.1.

Here is how I solved it:

# sudo ln -s /usr/lib/mozilla/plugins /opt/google/chrome/plugins

Close/restart chrome browser.

Voila!! there's sound when playing youtube.com video

Wednesday, December 16, 2009

PPStream Totem Plug-in

Plug-in for Totem to play video from PPStream.com

PPS Totem Plugin

Top things to do after installing Ubuntu Linux 9.10