Tuesday, November 9, 2010

FedoraCore VirtualBox Guest setup

How to setup FedoraCore Guest in VirtualBox inWindowXP host.
  • Download VirtualBox installer from Oracle web site and install Oracle VM VirtualBox.
  • Launch Oracle VM VirtualBox.
  • Change the default Folder location for HardDisk and Machine:
    • Go to File->Preferences->General
    • Change location of Default Hard Drive Folder.
      • c:\MyStuff\VirtualBox\HardDisks
    • Change location of Default Machine Folder.
      • c:\MyStuff\VirtualBox\Machines
  • Create new virtual machine:

    • Click on New icon.
    • On Welcome screen, click Next.
    • On VM Name and OS Type screen, enter
      • Name: salmon
      • OS Type:
        • Operating System: Linux
        • Version: Fedora
      • Click Next
    • On Memory screen, 
      • set the Base Memory Size to 1024 MB.
      • Click Next
    • On Virtual Hard Drive screen
      • Check Boot Hard Drive
      • Select Create new hard disk
      • Click Next
    •  On Hard Disk Storage Type screen
      • Select Dynamically allocated
      • Click Next
    • On Virtual Disk Location and Size screen
      • Make sure the location of salmon is under c:\MyStuff\VirtualBox\HardDisks
      • Set the initial size to 32 GB (10GB is the bare minimum).
      • Click Next
    • On Summary screen
      • Click Finish
  • Adjust Virtual Machine salmon settings
    • Click on Setting icon
    • In salmon - Settings screen 
      • Select System/Motherboard tab 
        • Under Boot Order section
          • Uncheck Floppy entry
        • Under Extended Features
          • Leave Enable IO APCI unchecked
      • Select System/Acceleration tab 
        • Make sure 
        • VT-x/AMD-V is enabled
        • Nested Pages is enabled

      • Select Display/Video tab
        • Enable 3D Acceleration
      • Select Display/Storage tab
        •  Under Storage Tree in IDE Controller, select Empty CD icon.
        • To install directly from physical Fedora i386 DVD, you need to connect a physical host device (such as DVD drive) to your virtual machine. For that, under Attributes:


          • Click on a little DVD icon to the right of the CD/DVD Drive selection. Click on "Host Drive D:".  The IDE Controller child entry will change to 'Host Drive D:' selection.
          • Select Passthrough option. 

      • Select Audio tab.

        • Check 'Enable Audio' box
        • Select 'Windows DirectSound' audio driver
        • Select 'ICH AC97' audio controller
  • Insert Fedora Core DVD disk in DVD drive.
  • Click on the Start button to begin installation
    • Set Hostname to your Host machine name (with full domain name)
    • Choose Customize now option and select
      • Choose GNOME Desktop Development
      • Under Applications select
        • Authoring and Publishing
        • Editors
        • Graphics Internet
        • Graphics
        • Office/Productivity
        • Sound and Video
        • Text-based Internet (for wget)
      • Under Development select
        • Development Libraries
        • Development Tools
        • Fedora Packager
        • GNOME Software Development
        • Web Development
        • X Software Development
      •  Under Servers select
        • MySQL Database
        • Network Servers
        • Printing Support
        • Server Configuration Tools
        • Web Server
        • Windows File Server
      • Under Base System in addition to defaults, select
        • Administration Tools
        • System Tools
      • Under Languages
        • add Russian Support
    • Continue with installation (grab a sandwich or something...). This will take a while.
  • Reboot after installation is complete and
    • Create user account
    • Setup Network Time Protocol server
    • Enable sudo access for your login account:
      • $ su -
      • Password: {your superuser password}
      • # /usr/sbin/visudo
      • {edit /etc/sudoers file and add} 
        • {username}  ALL=(ALL) ALL


  • Install Guess Additions
    • Guest Additions add very useful functionality:
      • X server driver with higher screen resolution
      • Seamless cut-n-past between Host and Guest OSes
      • Mouse driver that integrates host and virtual desktop spac
        To install Guest Additions:
    • Install development tools to be able to compile kernel drivers:
      • # yum groupinstall "Development Tools"
    • Check if running guest VM window has its menu bar at the top shown. If not, shutdown the VM machine and re-enable it for the guest.
    • In the Oracle VM VirtualBox menu, click on Devices->Install Guest Additions 
    •  
    • In the Guest Virtual Machine (VM), GNOME desktop will detect new media inserted, VBOXADDITIONS_3.2.10_66523.
    • Click Cancel to dismiss the dialog.
    • Open terminal with Applications->System Tools->Terminal

    • $ cd /media/VBOXADDITIONS_3.2.10_66523
    • $ sudo sh ./VBoxLinuxAdditions-amd64.run
    • When Guest Additions installation is complete, right click on CD icon on the desktop and Eject it.
    • Release the cursor and in the Oracle VM VirtualBox menu, click on Devices->CD/DVD Devices click on 'Host Drive D:' to unmount GuestAdditions.iso image.
    • In the Virtual Machine, edit /etc/X11/xorg.conf to add screen resolutions that matches your primary desktop/laptop screen.
      $ sudo vi /etc/X11/xorg.conf
      
      Section"Screen"
      SubSection "Display"
      Modes "1900x1200" "1280x1024" "1024x768" "800x600"
      Depth 24
      EndSection
      ...
      EndSection
      
    • Reboot the Virtual Machine. Now you should have the resizable desktop with fullscreen mode available as well. 
  • From you account in the VM, 
    • Disable Firewall.
    • Set SELinux mode to Permissive.
  • To setup USB pass-through support,
    • In the Linux guest VM, Create 'usb' group and add yourself as a user to that group.
    •  Shut down guest VM
    • In the VirtualBox window manager, select the virtual machine and open its Settings dialog.
    • Under USB settings,
      • Enable USB Controller
      • Enable USB 2.0 (EHCI) Controller
      • Add a USB Device Filter
      • Enable the filter
      • Edit filter details and set Remote to 'Any'

    • Restart the guest VM
    • When Linux desktop appears, have focus on the desktop
    • Insert the USB stick.
    • First time around, Windows XP would detect a new hardware profile. Go on with driver installation to install VirtualBox USB driver.
    • In the guest VM, under Devices tab, select the USB stick.
    • The USB device should appear on your Linux desktop as icon.

    • NOTE: For a while, I was getting this error from VirtualBox's guest VM:
      USB device SanDisk USB U3 Cruzer with 
      UUID [some id] is busy with a previous request. 
      Please try again later.
      
      Result code: E_INVALIDARG (0x80070057)
      Component:   HostUSBDevice
      Interface:   IHostUSBDevice {some id}
      Callee:      IConsole {some id} 
      In my case the error was ultimately resolved by creating the "usb" group under guest VM as outlined above. For further information, please, refer to VirtualBox bug #3033 (USB device not available to Guest)

No comments:

Post a Comment