Saturday, July 2, 2011

How to Install Mac OS X 10.5.5 Leopard on VirtualBox 3.1.4


Everybody likes work with Mac OS X without buying Mac Hardware on your normal PC, If you are a person like this, then you reached correct place. This article explains how to install Mac OS X 10.5.5 Leopard on VirtualBox 3.1.4.  No any additional hardware or software needs to be purchased for this installation. This method is completely for testing purpose and not to use permanently or in production environment.
maconvirtualbox1
Mac OS X 10.5.5 installation DVD is not required and this method will work with  AMD or Intel processor X 86 computers.
After two posts published about,
Install Mac OS X 10.5.5 Leopard on VMware Workstation in X86 Computer and
Install Mac OS X 10.5.5 Leopard on VMware Player 3,
I wanted to try the same Mac OS X image on Sun VirtualBox,  because it is faster.
Two Issues I faced on installing Mac OS X in Sun VirtualBox with this image and without Installation DVD.
1) This VMware Image did not boot in VirtualBox.
2) Mac OS X admin password did work once it booted.
I will be explaining how to fix above issues and successfully install Mac OS X on VirtualBox. So far I did not find any articles on web to install and run Mac OS X 10.5.5 on VirtualBox without installation DVD.

Required Products for Mac OS X 10.5.5 installation.

1) Sun VirtualBox
2) Mac OS X 10.5.5 VMware image
3) Intel and AMD processor virtualization utility

Installation Steps

1) Download the Mac OS X VMware Image here. ( it’s an torrent download & approx 1.9GB size)
2) Extract the downloaded image by WinRar.
3) Now, Open VirtualBox. Create a new virtual machine with following configuration.
Operating System - BSD
Version – FreeBSD
freebsdos
Mother Board Extended Features – Select Enable IO APIC,
enableio
Processor Extended Features -Select Enable PAE/NX
enablepae
Acceleration Hardware Virtualization – Select Enable VT-x/AMD-V
enablevte
If you can’t see Acceleration tab under system settings, it means hardware virtualization is not enabled on motherboard BIOS. This Mac OS X VMware image works only with hardware virtualization enabled computers on VirtualBox. If this is not available on your computer, then you can use same Mac OS X image with VMware Player 3 to run Leopard 10.5.5 on X 86 computers.
Allocate memory – Minimum 1GB
Hard disk – Select Existing hard disk and add converted Mac OS X VMDK file. You can see the hard disk size as 30GB. When adding the Mac VMDK file, attach as ICH6 or PIIX4 only. If you select PIIX3, Mac will hang with booting screen.
macvmdk
Read more here how to add vmdk files in VirtualBox as hard disk.
4) Here we go; we are ready to start Mac on VirtualBox. Don’t start the virtual machine, because it will not work now. After configured following settings, close VirtualBox application completely and change the XML file. Add the string mentioned in below step.
5) VirtualBox creates and saves virtual machine’s configurations in a XML file. Normally location isuser profile -> .Virtualbox -> machines -> machine name.
Edit the XML file and add
<ExtraDataItem name=”VBoxInternal2/SupportExtHwProfile” value=”on” />
My Mac OS X XML file looks like below,
Mac OS X 10.5.5 Leopard VirtualBox 3.1.4
If you are facing difficulty to start Mac OS X on VirtualBox after above settings, open the XML file and look for this string again.
6) If Mac booting screen stuck with Mac logo on VirtualBox as below, I’m sure something wrong with hardware virtualization.
maclogohangs
7) Mac admin password with for Mac OS X Vmware image is Xelabo, as hinted below.
macpassword
8) Now start the virtual machine, I’m sure you can see a real Mac OS X 10.5.5 leopard on VirtualBox. Below is the screen shot of running Mac OS X inside Sun VirtualBox.
Mac OS X 10.5.5 Leopard VirtualBox 3.1.4
9) As you could see in above screen, network is working fine with this image. I can ping to my host Windows 7 computer from Mac OS X. I set up ‘Host only’ network in VirtualBox.
To use this method to run Mac OS X in VirtualBox, hardware virtualization in BIOS and Acceleration Hardware Virtualization – Enable VT-x/AMD-V in Sun VirtualBox should be enabled. To check whether hardware virtualization is enabled in motherboard BIOS, use AMD and Inter processer utilities.
Read more about check and enable virtualization technology in motherboard BIOS.
That’s it. Installation is done. Unfortunately VirtualBox additions cannot be installed and increased the screen resolutions. Other than these, if you face any difficulties, feel free to share.
If this method useful for in any case, just drop a comment.

Solutions

I showed the all steps what I did to run Mac on VirtualBox in my PC.
PC configurations is,
Intel Core2duo 2.66GHz,
3GB RAM
P35 Intel Chipset.
If stuck with Mac logo (without loading arrows), then check the following checks.
1)      Enable IO APIC
2)      Enable PAE/NX, make processors numbers 1
3)      Enable VT-x
4)      You can Try Enable Nested Paging. ( it worked for me without enabling it, but Tony said it worked for him after enabled)
5)      IDE Controller ICH6
6)      Close VirtualBox completely and open the XML file to make sure extra string is there.
7)      Still it hangs? Shutdown the virtual machine and restart several times. It will work. ( Don’t ask me why)
If stuck with Mac logo (with loading arrows), then check the following checks.
1)      Enable VT-x
2)      Check BIOS whether hardware virtualization is enabled.
3)      Run virtualization detecting tools to make sure host OS is detecting hardware virtualization. Because in some PCs, even when VT is enabled in BIOS but OS will not detect.
4)      Close VirtualBox completely and open the XML file to make sure extra string is there.
I tried the same Mac OS X Leopard image in VirtualBox 3.2 beta. It worked without any changes in XML file, and I could feel the performance improvement inside virtual machine.

Setup and Test VirtualBox Teleportation in Normal PC- Live Migration of Virtual Machines


Recently I had time to check VirtualBox teleportation in my local PC. This is a cool feature started coming from 3.1 and later versions. In this post I demonstrate how to setup and test VirtualBox teleportation which means live migration of working virtual machines between different hosts over network.

What is the use of VirtualBox teleportation?

This mainly helps to move most critical virtual machines to other different hosts without shutting down and any down time which called live migration in VirtualBox. This is mostly suitable for production environment servers and desktops. Without any down time you can move VMs to other hosts and shutdown existing host.
VB teleportation works regardless of host OS, means you can move one VM from Windows host toLinux host or Mac Host. It’s better to run same version of VirtualBox in both hosts.
The original VM will be called as ‘source VM’ and other host, where you are going to teleport will be called as ‘target VM’.

What I’m going to do here?

Test VirtualBox Teleportation Normal PC
My Source Computer is
1) A desktop computer
2) Windows 7 Host OS ( Intel Core2Duo 2.66GHz, 3GB Ram)
3) VirtualBox 3.1.6
4) The Guest VM is Windows 7 32Bit
My Target Computer is
1) A Laptop Computer
2) Windows 7 Host OS ( Intel Pentium Dual Core 1.46GHz, 2GB Ram)
3) VirtualBox 3.1.6
TCP/IP network configured between these two computers and I switched all Windows firewall  settings completely. Now what I’m going to do is, while Windows 7 guest VM is working in my desktop host, I will migrate it to laptop computer without any downtime by VirtualBox teleporting.

Basic Requirements for VirtualBox Teleportation

1) Both hosts should run VB 3.1 or later versions.
2) Both virtual machines in target and source must share same storage disk.
3) Target and source virtual machines should be configured with very similar configuration, such as processor settings, memory, display memory, storage type..etc.
4) VMs with snapshots will fail. So delete any snapshots. Both host computers must have very similar type of processors. Intel to AMD processor live migration may fail.

Simple Steps to Setup VirtualBox Teleportation in Normal PC

1) Before start setting up source or target machines, we need to setup common storage where both hosts can access over network. I installed FreeNAS as one VM in desktop and setup iSCSI disk storage. Read more here to install and setup FreeNAS iSCSI disks in VirtualBox.
2) Add iSCSI disk to VirtualBox media manager. We have to select this disk to install Windows 7 guest VM ( Source VM)
Read more here to add iSCSI disks to VM media manager.
3) Create a new VM Windows 7, select ‘existing disk’ option and select iSCSI disk from media manager which we added in previous installation.
in this example win7_1 is VM name ( Source)
iSCSI FreeNAS Storage IP is 10.10.11.250
Desktop Host IP is 10.10.11.11
Test VirtualBox Teleportation Normal PC
Continue and complete the installation.
4) Start the VM, install some programs and open them. So once this virtual machine migrated to laptop computer, we can cross check.
5) Now go to target machine (which is my laptop). Here also we have to create a virtual machine, but installation is not required. Make sure this host can communicate to FreeNAS iSCSI server. Add iSCSI disk to VB media manager as you did earlier. Create a new VM Windows 7, select existing disk option and select same iSCSI disk.
in this example win7_2 is VM name ( Target)
Laptop Host IP is 10.10.11.10
6) Make sure settings of this win7_2 (Target) exactly matching win7_1 (source).
7) Do not start this target virtual machine. We will execute a command to wait for teleport.
Type following command in target (Laptop) computer.
VBoxManage modifyvm < targetvmname> –teleporter on –teleporterport
My command is
VBoxManage modifyvm win7_2 --teleporter on –teleporterport 1234
Win7_2 – Target VM which will be waiting for teleport to arrive
1234 – Port is listening on host computer for teleport arrivals.
8) Now start target VM. One small progress box will pop and wait for teleportation, as shown below.
Test VirtualBox Teleportation Normal PC
9) Go to source computer (desktop), let’s send win7_1 source virtual machine to laptop by live migration. Issue the following command while VM is working.
VBoxManage controlvm teleport –host –port
My command is,
VBoxManage controlvm win7_1 teleport --host 10.10.11.10 --port 1234
win7_1 – source VM, migrating to laptop (target) computer
10.10.11.10 – Target host (Laptop) computer IP address
1234 – The port number waiting for teleportation arrival.
10) Teleporting screen changed as shown below in target laptop.
Test VirtualBox Teleportation Normal PC
11) Successful teleporting command will return 100% completion in source machine command prompt.
Test VirtualBox Teleportation Normal PC
Also, source machine VM state changed to ‘teleported’.
Test VirtualBox Teleportation Normal PC

VirtualBox Teleportation Failed for me

Because of previous successful screenshots, don’t think I succeeded in first try of live migration in VirtualBox, it failed for me several times.
1) Teleportation failed in VirtualBox 3.2 with some errors. I didn’t waste my time to fix it or find out the reasons. Directly I installed VB 3.1.6 on both hosts. This solved my issue.
2) I missed to remove floppy drive controller in target VM.
3) Network connection type was different in both VMs. NAT and Bridged, I changed both types identical.
4) Removed the CD Rom controller. Either makes it empty or you must share common CD between both hosts.
5) Source VM storage type was SATA and target was IDE. It failed for me.
6) My Laptop host processor is not having VT. So, when source VM is enabled with VT and Nested paging live migration failed because of VMs processor mismatch. I disabled VT and Nested paging in source VM
After fixed above issues in VirtualBox, teleportation worked fine and quickly. My working Windows 7 VM migrated to different host within 5 seconds. It’s really cool.
It’s amazing, a 80MB piece of software does the live migration between different hosts very nicely without any down time.
Have you tried this in production environment? Or after this post at home? Share with us the problems you faced and how fixed them. Also, don’t miss to drop a comment if this post useful for you in VirtualBox teleportation.

VDI to VMDK


vdi-to-vmdkThis post explains how to convert vdi to vmdk and open Sun VirtualBoxvirtual machinein to VMware workstation or VMplayer 3. As you are aware, Virtual Box uses VDI as hard disk file and VMware uses VMDK.  Opening VMDK in VirtualBox is very straight forward since VirtualBox supports VMDK. But opening VDI files in VMware workstation or VMware player is not possible, because VMware doesn’t support VDI files.
After I wrote steps to convert VMDK to VDI and How to open VMDK files in Sun VirtualBox, I wanted to try converting VDI to VMDK. When I googled , found only few steps   work with Linux or Mac environment and didn’t work for me in Windows.
Found the two following posts in google first page, but both did not work for me. I’m sure it wouldn’t have worked for others too.
How to convert VDI to VMDK; Converting a VirtualBox image to a VMware disk image and vice versa
how to convert vdi to vmdk in Sun VirtualBox Vbox
So, after several attempts, here are the steps worked for me in converting VDI to VMDK in Windows environment and allowed to open VirtualBox virtual machine in VMware Workstation and player.
Before convert VDI to VMDK, make sure to delete snapshots in VirtualBox. Because each snapshot keeps different hard disk files separately from major disk file. So if you convert the major VDI file to VMDK then you will get the first version of virtual machine before any snapshots. There for we have to merge all snapshots to major disk file to get the latest virtual machine in VMware. By deleting snapshots you can merge all snapshot hard disks to main hard disk file.
Read more about deleting snapshots in VirtualBox 3.1 under branched snapshots.

Steps to Convert VDI to VMDK

1) Convert VDI file to RAW format by Vboxmanage command.
Vboxmanage internalcommands converttoraw >
VDI to VMDK
In this example I have WinXP.vdi at G:\VirtualBox location. You must add path to Windows OS to work this vboxmanage and qemu-img commands.  Read more about setting up these commands paths in Windows which is explained in VMDK to VDI.
2) Once RAW disk is created, now we can convert RAW to VMDK. For this conversion you need third party software QEMU Manager for Windows which can be download here.
VDI to VMDK
3) After installed QEMU Manager for Windows, start the conversion of RAW to VMDK by following command.
Qemu-img convert -O vmdk
VDI to VMDK
4) VMDK file will be stored at the location you specified in command. This VMDK file is containing the same data which VirtualBox VDI file had.
VDI to VMDK
5) Now we will import this VMDK file in to VMware Player 3 and run the same virtual machine which was running in Sun VirtualBox.
When people wanted to change virtual machines between VirtualBox and VMware, they try to convert VMX to XML or XML to VMX. It’s wrong.  You cannot convert virtual machines by converting these files. VMX is a virtual machine configuration file on VMware and XML is for Sun VirtualBox. We must convert the hard disk files (VMDK or VDI) to be able to swap virtual machines.
Then how about VMX and XML? We have to create them. When you create virtual machines in VMware or VirtualBox it creates theses configuration files automatically. So do not waste your time to convert VMX to XML or XML to VMX.
6) To import converted VMDK files to VMware player, just create a new Windows XP virtual machine. You have to create same OS of VDI file. In this example I converted Windows XP VirtualBox virtual machine.  I’m assuming that you know the steps to create Windows XP virtual machine in VMware Player 3, so I’m not going to explain it.
Before start the virtual machine, remove the newly added hard disk during the creation and add the converted VMDK ( VMXP.vmdk) as a hard disk.
7) That’s it. Play the virtual machine. Now, you must be able to see the same Sun VirtualBox virtual machine in VMware Player. You may have to allow drivers installation, because VMware and Sun VirtualBox desktop virtualization software are totally different.

This method not only to transfer virtual machines to VMware from VirtualBox, but also to access VirtualBox VDI files in VMware products.
The similar method can be used to convert VDI to VMDK and open in VMware Workstation.
I hope this post will be useful to convert VirtualBox VDI files to VMware VMDK files in Windows environment and transfer virtual machines between top desktop virtualization software.
Let me know if you face any problem on this VDI to VMDK conversion.

VMDK to VDI in Windows


This article explains how you can convert vmdk to vdi in windows environment.  Vmdk is default disk file format in Desktop virtualization software VMware workstation and vdi is in sun VirtualBox.
There are some articles on internet about doing the same steps in Linux or sun environment. This method explains how to convert vmdk e to vdi file format in windows environment.
vmdk to vdi

I recommend two ways for vmdk to vdi

1)      It’s not required to convert vmdk to vdi to open your VMware workstation guest operating systems on VirtualBox, because VirtualBox supports VMware vmdk file as hard disk file.
Vmdk file can be added to sun VirtualBox media manager very easily. Check my earlier post on how to open vmdk file in sun VirtualBox.
After successfully added vmdk file to VirtualBox media manager. You can boot  OS from vmdk file by following steps;
Create a new virtual machine in virtual box with correct operating system. Instead of creating a new hard disk, select the existing vmdk disk file . That’s it, boot the OS. Do not worry about vmx file which is having VMware virtual machine configuration only. Vmx file only required for VMware.
This is the first step to use vmdk file in VirtualBox without converting to vdi format. Let’s go to second step.
2)      This step to convert vmdk file to vdi physically in windows environment. Some extra works to be done to archive this.
Twice we have to convert files to get vdi file.
Vmdk  –>raw  –>vdi
To convert vmdk file to raw format, we require third party software called QEMU manager. Download the latest version of QEMU manager here for Windows
Install it. We will not be using the GUI version of software.
Let’s say, I’m going to convert new Google chrome OS vmdk file to vdi format.
So first we will convert vmdk to raw format by following command.
vmdk to vdi
-O ( Capital O)
Above command created raw file (.bin) at specified location.
vmdk to vdi
(Don’t bother about VLC media file format)
QEMU manager’s part is completed with vmdk to raw file conversion.
Now we will use VirtualBox command to convert this raw file (.bin) to vdi format.
Use following command to convert,
Vboxmanage convertfromraw   
vmdk to vdi
If all correct, without any error message you can see vdi file in destination.
Desktop virtualization software
Then, simply you can use this vdi in sun VirtualBox media manager (also you can vmdk files in VirtualBox media manager)
These are the easy steps to convert vmdk file to vdi file in windows environment.
If you want to use qemu-img or vboxmanage commands in windows computer anywhere, I mean not from the program location, you can add the paths of these commands in ‘ Environment Variables’ under system properties.
Just for easy reference, see below picture.
Desktop virtualization software
I’m expecting to hear your comments and problems in this vmdk to vdi conversion.

What is the Best Desktop Virtualization Software, How to Decide?


I decided to publish this article after received several emails from readers regarding what is the best desktop virtualization software. This is completely from my experience and personal opinion.  If you ask an automobile expert about which is the best car in the world, he or she can’t answer, because it depends on your requirement and category or type. It’s applicable here too.
Best Desktop Virtualization Software
I’m a heavy user of desktop virtualization software on daily basis. I use these products at my work place to install Server operating systems with client operating systems for testing purpose. Again at home, I do all testing on different types of guest Operating systems such as Windows, Linux and Mac OS X for blogging purpose.
So far, I have worked with VMware workstation, VMware Player, Sun/Oracle VirtualBox and Microsoft Virtual PC. I have never worked with Parallels desktop virtualization products.

So, what is the best desktop virtualization software? Here are the few facts decide it.

1) Compatibility
The best software should run on any host operating Systems with any guest OS. For example if you take VMware Player, it should be able to run in Windows, Linux and Mac OS X, also it should support multi Operating Systems as guest.
Most of the time we use desktop virtualization software for testing purpose with different types of OSwithout disturbing host OS. So, make sure your software can run most of the latest OS as guest.
2) Performance
This is another major factor to decide the best desktop virtualization software. Performance of guest and host machine should be good with any product.
Some software will take more resources from host computer to just run the application without running any virtual machines. On the other hand, with minimum configuration for VM, it should work fast and smooth within the desktop virtualization software.
3) Built in Features
The each additional built in features will help to have a good working experience with the best product. When it comes to desktop virtualization, I think Snapshots, P2V, Cloning, Export/Import, guest additions, shared folders, networking and virtual disk options are essential for a normal user.
Therefore, it’s always better to have software with most of the built in features.
4) Cost
Yes, it decides the best.  If I can get the most of the features what I wanted for free, then I will stick with it. Instead of paying some money for few features for different product, we will be happy with using free product without any cost. Am I right?
5) Hardware Support
The program should be compatible for the hardware platform of your physical computer. If you have AMD, Intel, 64 bit or 32 bit processor based computers, then the software must run in it with full usage of physical hardware.
Supporting number of processor cores, virtual memory, virtual display, sound cards and physical ports will be an added advantage.
6) Additional Tools for Virtual machines
The special package which helping Virtual machine to communicate with host computer’s hardware, is an essential for each guest OS.  In my opinion, the best desktop virtualization software must have these types of tools (like VMware tools and VirtualBox guest additions) for all guest Operating Systems. So, we can experience the performance improvement, display options, sound and other features.
7) Cross Software Support
I don’t know how much this is important for you, but I like this feature. For example, if I have a Linux VM in VirtualBox at home, I should be able to take this VM to office tomorrow and work in VMware with different host, then bring back again. It sounds cool, isn’t it? But it’s very much possible.
This type of cross software supports depends on virtual machine’s configuration and hard disk file formats. Also, export and import options of different file formats will be an added advantage of moving virtual machines across different hosts.
8.) Support and Updates
How quickly you get support from vendor? How often they release the patches and updates?, these all are not only important  for desktop virtualization software but for all software.

Final Thought about Best Desktop Virtualization Software

I have listed above points which I considered to select the best desktop virtualization. These all are depending on my requirements. To be honest, I worked only on Intel physical computer with Microsoft host Operating Systems, therefore I would have missed some important facts should be considered here.
Leave comments on points I missed.
Oracle VirtualBox is the best desktop virtualization software in my personal opinion. I never worked with Parallels for Windows. VMware workstation is an excellent and competitive product for Oracle VirtualBox, but it’s not free. VMware Player is a free product, but its missing most the required features.
This final thought doesn’t mean that VirtualBox is 100% perfect and not having any issues. It’s having several drawbacks.
do expect your opinion on this post and tell me what is your favorite or best desktop virtualization software and reason for that.

10 Simple Steps to Improve Virtual Machine Performance in VMware


Improve Virtual Machine Performance VMware
Follow these easy steps to improve virtual machine performance in VMware Workstation; some methods can be used in VMware Player too. Most of the users missed to tweak virtual machines to work better and end up with blaming software. Speed up VMs can be done easily and let’s feel the power of desktop virtualization.
VMware has more options than VirtualBox to speed up virtual machines.  The below methods are applicable in VMware console mode, I meant not inside guest OS. In Two ways you can improve virtual machine performance.

Two Ways

1)      Virtual machine configuration in VMware
2)      Tweaks inside Guest OS (Windows disk defragmentation, remove startup programs  …etc,)
This post covers the first way.
Improve Virtual Machine Performance VMware
Simple Steps to Improve Virtual machine performance in VMware
1) Hardware Allocation
Yes, Increase the memory size and processor cores (if supports) to guest operating system. You have to consider host usage while allocating memory, but processor cores can be set to maximumwithout considering host usage.
2) Allocate Disk Space Now
If you frequently transfer data to guest machine then better to allocate all disk space now. Expanding storage option may slow down disk performance when data transfer happening to guest machine as it should increase virtual disk size in real time.
Improve Virtual Machine Performance VMware
3) Delete Snapshots
Snapshots are saved in different virtual disk files than original disk file. More snapshots keep more disk files. If really snapshots are not required then delete them and merge with original disk file. I’m sure this method will improve disk performance by reducing access time and help in next step also.
4) Defragment Disk File
This doesn’t mean defragmentation inside guest Operating System. You can defragment virtual disk file from VMware console to compact and fragment data in VMDK file. Disk access time can be saved lot in this method.
Improve Virtual Machine Performance VMware
5) Do not Forget to install Latest VMware Tools
Have you installed latest VMware Tools in workstation or VM Player?.VMware Tools, increase the network speed to 1 GB, increase display performance, allow easy file transfer between host and guest, Mouse integration and unity view which all help to improve virtual machine performance well. VMware recommends running virtual machine in full screen to get better performance.
6) How about 64Bit OS?
If host computer supports 64bit architecture, and you will not install 32Bit software inside guest OS, then consider about 64Bit guest OS installation. 64Bit Guest works well in VMware workstation and VM Player.
7) Access via Remote Display
For me, this helped lot. I felt easy by accessing virtual machines via Windows remote desktop instead of direct console view. Moreover, you can start guest OS in headless mode and access via remote display in other networked computers. This will reduce the resource load to host and guest machines.
8) Save and Play
Instead of shutting down and starting every time, just save and resume VMs. Resuming works faster than starting a virtual machine from beginning.
9) Keep Virtual Disk files in non-busy and high speed physical disks.
Again this impacts the disk access timing and gust performance. This will be useful when you have multiple running virtual machines. Keep VMDK files in high speed disks.
10) From Guest OS
Finally, use the all methods you know to improve guest OS performance from inside VM.
I combined all above steps from my experience and how it worked for me. If you have any more methods to speed up VMs in VMware, share it here.  Also, I will be happy to listen from you if these steps work for you.