OSes‎ > ‎

Virtual Machines

Here are tips for Virtual Machines (VirtualBox, VMware Workstation, Virtual PC under Windows 7 and Hyper-V under Server 2008 R2).   If you want to run Linux virtual machine under Windows, it is better to use VirtualBox or VMware (Virtual PC is so awkward for Linux).
Updated 8/30/2012

Index

How can I install Hyper-V ?

For consumer OS like Windows 7 or 8, Hyper-V is installed from "Add Windows Feature". It turned out that Server 2008 uses Server Manager "Add Roles".

Top


How can I have the VirtualBox shared directory permission?

When you create a virtual box Ubuntu, the shared directory is mounted in /media/sf_(NameOfSharedDir), i.e. /media/sf_Videos when I named the shared directory as "Videos".Unfortunately, when I tried to cd to /media/sf_Videos, I get permission denied.The solution was found here http://unix.stackexchange.com/questions/52667/file-permission-issues-with-shared-folders-under-virtual-box-ubuntu-guest-wind.

  
  sudo usermod -aG vboxsf ytosa  
  logout and login again (to make softlink visible)  
  ln -s /media/sf_Videos /home/ytosa/shared
  
where ytosa is my username on Ubuntu. Now my home directory has shared directory by soft link.

Top


How can I test VT-X working?

In order for virtual machine to use more than 1 cpu, VT-X must be available. It must be setin BIOS. This feature is available under recent CPUs. In my case Oracle Virtual Box setting showed CPU greyed out for a virtual machine. Its log revealed that 00:00:01.399 HWACCM: No VT-x or AMD-V CPU extension found. Reason VERR_VMX_NO_VMX. I needed the confirmation. Microsoft has the software to check http://www.microsoft.com/download/en/details.aspx?id=592 but it won't run on Windows Server 2008 R2. It turned out that SecurAble.exe which is available at http://www.grc.com/securable.htm can run under Windows Server 2008 R2. I found another tool provided by VMWare which also gives more detailed information. The software, vt.iso, is obtained from http://communities.vmware.com/docs/DOC-8978/version/19 which you must burn a CD and boot from it. Both of these confirmed that VT-X is not availab.e I coould not find the cause and I ended up reinstalling Windows Server 2008 R2 all over gain. After that, VT-X is available and was able to install Windows 8 Beta.

Top


How can I convert VirtualPC .vhd to VirtualBox .vdi?

Windows 7 Professional owner is allowed to download Windows XP SP3 .vhd to their PC.Since Virtual PC is so lame, I wanted to use it under Virtual Box. The method described below did not work for me after spending 3 hours.  Too bad. (Someone did figure outhow to do in http://www.qc4blog.com/?p=721.It is best to use "Ubuntu" Linux so that the downloading of qemu can be done easily by apt-get install qemu. Note that when you do "qemu-img convert -O raw myfile.vhd myfile.bin", it will create the maximum disk size file it was configured to. In my case the original file was only 9 Gbyte but it created a 127 Gbyte raw file (which is the maximum size under Virtual PC). Thus you have to make sure that you have enough disk space. The conversionfrom raw to .vdi is done by VirtualBox command called VBoxManage which exists inProgram Files\Oracle\VirtualBox directory. )

Top


How can I share Windows directory under VirtualBox?

OBSOLETED: VirtualBox mount Shared Directory as /media/sf_(SharedDirectoryName).  For permission issue, look at the top item.

VirtualBox sharing is not automatic like VMware, even though you specify the sharing under Virtual Machine setting. You have to mount the shared folder by hand.

  
  mount -t vboxsf (sharedName) /mnt/sharewhere (sharedName) 
  is the one you specified as the Folder name.  Note that I mount it at /mnt/share directory.  
  

Top


How can I make the virtual harddisk size bigger?

In both VirtualBox and VMware, you specify the virtual disk size when you createa virtual machine. The question is how to make it bigger after you created a virtual machine.It turned out that VMware workstation supplies the tool at Virtual Machine Settings → Hard Disk → Utitilities → Expand .... In VirtualBox, it is more painful.see http://forums.virtualbox.org/viewtopic.php?t=585.

Top


How can I get higher resolutions in VM?

I initially got only 800x600 under Ubuntu 10.04 and CentOS 5.5 installation underVirtualBox. VMware Workstation was able to get higher resolution under Ubuntu 10.04 and CentOS. If you use the custom instal, then I only get 800x600 resolution. It turned out that the default Linux install does not recognize the virtual video card in both VirtualBox and VMware and thus assigns VESA as the video card. That is why 800x600 is the maximum resolution. Here is the step:


  VortualBox
  CentOS 5.5 case: (after the standard iso install)  
  1. Make sure that you install updates and then add Developer Tools.  
  2. Run Install Guest Additions from the VirtualBox window menu.  
  3. CentOS will mount VBOXADDITIONS_3.2.6_6312 into /media/ 
  4. When you run, autorun.sh will produce "bin/sh: bad interpreter: Permission denied"     
     This error is due to autorun.sh referring to "gksu" at line 44.     
	 Quick fix is to copy CD to your local directory and edit autorun.sh to remove gksu.  
  5. You become "su".  
  6. sh ./autorun.sh
  
  Ubuntu 10.04 case:
  1. Run "Install Guest Additions" from the VirtualBox window menu.
  2. You have to mount the virtual CD.
  3. sh ./autorun.sh 
     will cause the messagebox asking su (gksu exists on Ubuntu 10.04).
  
  VMware Workstation  
  1. This process is required only when you pick custom install.  CentOS 5.5 is required to     
     to do custom install, since the automatic install creates the root partition size     
	 of only 3 Gbytes and thus you cannot install developer tools.  
  2. Run VM->VMware Tools
  

Top


Compare Virtual Machines available at this time

Currently there are four Virtual Machines available. VMware, VirtualBox, Virtual PC and Hyper-V.I could not find information on the emulated hardware for each machine and thus I tried them all by installing Ubuntu 10.4 release and running lspci.


VMWare workstation Oracle VirtualBox Virtual PC on Windows 764bit Hyper-V on Windows 2008
Host Bridge Intel 440BX/ZX/DX -82443Host Bridge (rev 01) Intell 440 FX PMC (rev02) Intel 440BX/DX/ZX -82443Host Bridge (rev 01) Intel 440BX/DX/ZX -82443Host Bridge (rev 01)
PCI Bridge Intel 440BX/DX/ZX -82443AGP Bridge (rev 01)


ISA Bridge Intel 82371AB/EB/MBPIIX4 ISA (rev 08) Intel 82371SB PIIX3 ISA Intel 82371AB/EB/MBPIIX4 ISA (rev 01) Intel 82371AB/EB/MBPIIX4 ISA (rev 01)
IDE Intel 82371AB/EB/MBPIIX4 IDE (rev 01) Intel 82371AB/EB/MBPIIX4 IDE (rev 01) Intel 82371AB/EB/MBPIIX4 IDE (rev 01) Intel 82371AB/EB/MBPIIX4 IDE (rev 01)
ACPI Bridge Intel 82371AB/EB/MBPIIX4 ACPI (rev 08) Intel 82371AB/EB/MBPIIX4 ACPI (rev 08) Intel 82371AB/EB/MBPIIX4 ACPI (rev 08) Intel 82371AB/EB/MBPIIX4 ACPI (rev 08)
System Peripheral Vmware Virtual MachineCommunication Interface (rev 10) Innotek SystemberatungGmbH VirtualBox Guest Service

VGA Controller Vmware SVGA Adapter (24bit color) InnoTek SystemberatungGmbH VirtualBox Graphic Adapter S3 Inc. 86c764/765(Trio32/64/64V+) (16bit color only) Microsoft Corp. Device 5353 (24bit color)
SATA Controler
Intel 82801HBM/HEM(ICH8M/ICH8M-E) SATA AHCI Controller (rev 02)

SCSI Controller LSI Logic/Symbios Logic53c1030 PCI-X Fusion MPT Dual Ultra320 SCSI(rev01)


USB Controller Intel 82371AB/EB/MBPIIX4 USB Apple Computer Inc.KeyLargo/Intrepid USB

USB2 Controller Vmware USB2 EHCIControoler Intel 82801FB/FBM/FR/FRW(ICH6 Family) USB2 EHCI Controller

Ethernet Controller Intel 82545EM GigabitEthernet Controller (rev 01) Intel 82540EM GigabitEthernet Controller (rev 02) Digital Equipment Corp.DECchip 21140 [Fasternet] (rev 20)
Multimedia Audio Ensoniq ES1371(AudioPCI-97) (rev 02) Intel 82801AA AC'97Audio Controller (rev 01) SoundBlaster16 or AWE32 or compatible
Comment Installing Vmware Tool makes screen resolution bigger than800x600. Can install 32 bit or 64 bit OS Installing "Install Guest Additions" makes resolution bigger than800x600.  Can install 32bit or 64bit OS. Virtual disk is only upto 120 Gbytes. Sound chip not recognized by latest Linux. Resolution 1152x864,1024x768, 800x600, 640x480.  

HyperV does not support sound emulation. The only way to get the sound is to use Remote Desktop (RDP).Here is the description on how to ( http://www.sudonym.com/61/full-sound-through-rdp-from-a-hyper-v-windows-7-vm).

Top

Home