Step by step instructions to set up virtualization software such as virtualbox or VMware:

Why would you want to run a virtual machine on your computer?

Plenty of reasons:

  • You like using one OS, but need just an app or two from another running in their natural environments—Office or Photoshop in Windows (nine times out of 10), a light-on-resources game, or maybe even some uber-cool Linux app.
  • You want to try out some new software, but would rather not chance it mucking up the pretty decent system you’ve got right now.
  • Web sites that don’t play nice with the operating system you’re running (we’re looking at you, almost every streaming site except Hulu and YouTube).
  • You’re intrigued at the idea of trying out a Linux desktop, but the word “partitioning” doesn’t sound like how you want to spend a Saturday afternoon.

I have to note here that VirtualBox is far from the only competitor in this field—in fact, many in the tech community report that VMWare’s Workstation offers more features and handles multiple virtual machines better. But VirtualBox is relatively easy to set up, free to install, and works on all three major operating systems.

Setting up

First off, head over to VirtualBox’s Download page and grab the right copy for your system. The only real choice falls on Linux users having to choose between 32- and 64-bit versions for their particular distribution—you don’t want to run a 64-bit guest on a 32-bit host machine, if you can avoid it. Linux users should note that while there may be a version of VirtualBox available in their repository, it’s usually the Open Source Edition, which may not be as up-to-date as the VirtualBox download page, and doesn’t offer support for USB devices, along with a few other odds and ends.

Click through the install screens; in most cases, you won’t have to stop and change anything. You’ll probably get a warning that VirtualBox will have to disconnect and re-connect your network connection for a few seconds while it’s setting up, so finish up any crucial net transfers.

During setup on Windows, you’ll be asked to install “device software” or “drivers”—hit “Install” for each, or check the box that indicates you’ll “Always trust …” Sun’s drivers.

Once VirtualBox is installed, launch it and you’ll arrive at a tauntingly empty screen:

Setting up

Let’s get something running in there. One big advantage of virtual machines over partitioning, dual-booting, and all that other hard-drive-tweaking stuff is the ability to install a system right from an ISO file. So if you’re testing out a Linux system, just download the ISO from Ubuntu, Fedora, or wherever. And if you’ve got an older XP installation disc, you can slipstream the latest service pack into it to create a minimal-hassle installation ISO image, and never bother burning it. While you’re at it, check out Adam’s guide to trimming down Windows to the bare essentials for a real speedy virtual installation ISO. If you’ve got your installation CD or DVD, however, that’ll play, too.

Hit “New” and you’ll be asked to give your system a name you’ll recognize—in my case, an XP system I’ll unleash all my morning Lifehacker test downloads on—and let VirtualBox know generally what variety and flavor it is. Linux users trying out a funky remix can head for Linux->Other Linux.

This next screen asking for a memory allocation seems imposing—I won’t give it enough! I’ll kill my host system with too much!—but you can entirely change it later on. VirtualBox will recommend a minimum amount, based on the OS you said you were installing, but your common sense will pay off here. I’m usually not running anything intensive on my system with 2GB of memory, so if lost half a GB, or 512MB, I’d probably not notice much. Your mileage will certainly vary, but try peeling off as much as you can at first, then scale it back if you notice your system becoming unstable, or bump it up if you get frustrated with a lag-tastic system-in-a-system.

The next screen asks you to either create a new hard disk image or use an existing one. Assuming this is a first install, keep Boot Hard Disk checked and hit Next to create the image. Hit Next again at the start of the “New Virtual Disk Wizard” (they keep changing the name from “Virtual” to “image,” but it’s all the same), then you’ll be asked to choose a dynamically expanding image or a fixed-size storage. This depends on how much space you’re willing to give your virtual OS. Do you have just 8GB you want to give over, and don’t want it reaching past that? Choose the fixed-size option, set a size amount in gigabytes, and relax. Or you can choose “dynamically expanding,” which, just like it sounds, allots only a little bit of space at first, but will re-report itself to the virtual system as bigger if the OS needs a bit more space.

If you happen to have multiple SATA hard drives in your system, or a fast external SATA, the How-To Geek recommends placing your virtual machine image (the “guest”) on a separate physical drive from the machine running it (the “host”) for better multi-tasking and performance speed, plus a little less wear on a single hard drive. If not, don’t worry about it too much, and don’t go creating separate partitions for your machines, because you aren’t fooling anybody, least of all your system’s I/O bus.

Booting up

Assuming everything went well, you’ll see your new virtual system in the left-hand pane of the VirtualBox window. Huzzah! But before you hit “start,” let’s hit “Settings” and get it ready to roll the right way. The first category from the left-hand menu, General, lets you change how much base memory (or RAM) and video memory is given over to the virtual machine. Unless you’re planning to enable 3D effects, the default chosen for video memory should be fine, and the 3D acceleration box can remain un-checked. Let’s move down to “CD/DVD-ROM.”

Make sure “Mount CD/DVD Drive” is checked. If you’re going to install your virtual system from a boot CD or DVD, put it in your computer’s drive, then select “Host CD/DVD Drive.” If you’re using a downloaded or custom-made ISO file, select “ISO Image file,” hit the folder icon to the right of the drop-down box, and then hit the “Add” button and browse for the ISO you’re using. Once you’ve added an ISO file to this menu, you can mount it in any virtual machine you’re running at any time—kind of a nice feature for files you need to get at often. Hit “Select” to close this dialog.

Back at the main Settings window, head down to the Audio and/or USB menus and enable them if you’re going to be needing sound or access to thumb/external drives while you’re in your OS-in-a-box. Before we get to the “Shared Folders,” which is pretty darned convenient, let’s boot our system. Hit OK and close out your Settings window, then hit Start back at the main box to get rolling.

Whatever ISO or disc you’ve supplied VirtualBox with will load just like it’s on a machine for the first time, and you’ll go through the same installation process as if you were loading Windows/Linux/whatever on a hard drive for the first time. You’ll get occasional pop-ups from VirtualBox, “notifying” you that a mouse pointer is now in such-and-such a mode, the video display has changed, yada, yada—just hit OK and check the boxes so it doesn’t bother you further. Click through all the usual name/username/password/registration jazz you’re used to … All done? Great. After however many reboots, you’ll arrive at your fresh, clean desktop, which you could start using right away. You might notice, however, that the resolution is limited, the mouse might be jerky, and your sound or USB might not work out of the box. That’s where the Guest Additions come in.

Fine-tuning

Head to the “Devices” menu at the top of the virtual OS window (if you’ve accidentally gotten into full-screen mode, hit right-Control+F to switch out) and choose “Install Guest Additions.” In a virtual Windows, you’ll get a prompt like you were installing software you just downloaded; if not, you can open My Computer, open up the CD drive named “VirtualBox Guest Additions,” and run the auto-run software in there. In a virtual Linux, you may just get a CD or DVD mounted and displayed on the desktop. Each Linux system will be slightly different, but the Tombuntu blog’s instructions for installing VirtualBox Guest Additions in Ubuntu hold mostly true: head to where the ISO is mounted as a CD/DVD drive, then run VBoxLinuxAdditions-x86.run (or the -amd64 version for 64-bit systems). Click through everything, restart your system, and things should be a lot more convenient: Your virtual desktop resizes itself to however big you make its window, the mouse doesn’t get “captured” and require un-locking when you click around, and everything should be a bit smoother.

You’ve got a well-oiled virtual machine at this point, but let’s make it real easy to pass files between your host and guest systems (terminology should be making sense at this point, no?). The VirtualBox makers have described the process for Windows and Linux users in a FAQ post, and I’ve described the virtual-Windows-inside-Linux process in more detail in our guide to running Windows apps seamlessly inside Linux. Giannis Tsakiris has also explained setting up sharing from an XP guest, and the process is much the same for any virtual Windows (although some of the network tools have changed names).

Now you’re up and running with a machine.

VMware Workstation 5.5 Setting Up a New Virtual Machine

The New Virtual Machine Wizard guides you through the key steps for setting up a new virtual machine, helping you set various options and parameters. You can then use the virtual machine settings editor (VM > Settings) if you need to make any changes to your virtual machine’s setup.

By default, the new virtual machine uses an IDE disk for Windows 95, Windows 98, Windows Me, Windows XP, Windows Server 2003, NetWare and FreeBSD guests. The default for other guest operating systems is a SCSI disk.

Follow these steps to create a virtual machine using a virtual disk.

1. Start VMware Workstation.

Windows hosts: Double-click the VMware Workstation icon on your desktop or use the Start menu (Start > Programs > VMware > VMware Workstation).

Linux hosts: In a terminal window, enter the command

vmware &

Note: On Linux hosts, the Workstation installer adds an entry to the Start menu for VMware Workstation. However, this menu entry is located in different submenus, depending on your Linux distribution. For example:

  • SUSE Linux 9.1Start > System > More Programs > VMware Workstation
  • Red Hat Enterprise Linux AS/WS Release 3Start > System Tools > More System Tools > VMware Workstation

2. If this is the first time you have launched VMware Workstation and you did not enter the serial number when you installed the product (an option available on a Windows host), you are prompted to enter it. The serial number is on the registration card in your package or in the email message confirming your electronic distribution order. Enter your serial number and click OK.

The serial number you enter is saved and VMware Workstation does not ask you for it again. For your convenience, VMware Workstation automatically sends the serial number to the VMware Web site when you use certain Web links built into the product (for example, Help > VMware on the Web > Register Now! and Help > VMware on the Web > Request Support). This allows us to direct you to the correct Web page to register and get support for your pro

duct.

3. Start the New Virtual Machine Wizard.

When you start VMware Workstation, you can open an existing virtual machine or create a new one. Choose File > New > Virtual Machine to begin creating your virtual machine.

4. The New Virtual Machine Wizard presents you with a series of screens that you navigate using the Next and Prev buttons at the bottom of each screen. At each screen, follow the instructions, then click Next to proceed to the next screen.

Link to w_newvm_welcome.png

5. Select the method you want to use for configuring your virtual machine.

Link to w_newvm_typical.png

If you select Typical, the wizard prompts you to specify or accept defaults for the following choices.

  • The guest operating system
  • The virtual machine name and the location of the virtual machine’s files
  • The network connection type
  • Whether to allocate all the space for a virtual disk at the time you create it
  • Whether to split a virtual disk into 2GB files

If you select Custom, you also can specify how to set up your disk — create a new virtual disk, use an existing virtual disk or use a physical disk — and specify the settings needed for the type of disk you select. There is also an option to create a legacy virtual disk for use in environments with other VMware products.

Select Custom if you want to

  • Make a legacy virtual machine that is compatible with Workstation 4.x, GSX Server 3.x, ESX Server 2.x and VMware ACE 1.x.
  • Store your virtual disk’s files in a particular location
  • Use an IDE virtual disk for a guest operating system that would otherwise have a SCSI virtual disk created by default
  • Use a physical disk rather than a virtual disk (for expert users)
  • Set memory options that are different from the defaults
  • Assign more than one virtual processor to the virtual machine

6. If you selected Typical as your configuration path, skip to step 7.

If you selected Custom as your configuration path, you may create a virtual machine that fully supports all Workstation 5 features or a legacy virtual machine compatible with specific VMware products.

Link to w_newvm_legacy.png

This screen asks whether you want to create a Workstation 5 virtual machine or a legacy virtual machine. See Legacy Virtual Disks for more information.

7. Select a guest operating system.

Link to w_newvm_pick_guest.png

This screen asks which operating system you plan to install in the virtual machine. Select both an operating system and a version. The New Virtual Machine Wizard uses this information to

  • Select appropriate default values, such as the amount of memory needed
  • Name files associated with the virtual machine
  • Adjust settings for optimal performance
  • Work around special behaviors and bugs within a guest operating system

If the operating system you plan to use is not listed, select Other for both guest operating system and version.

Note: Workstation supports 64-bit guest operating systems only in Workstation versions 5.5 and later, and only on host machines with supported processors. For the list of processors Workstation supports for 64-bit guest operating systems, see Support for 64-Bit Guest Operating Systems.

Caution: Do not attempt to install a 64-bit operating system after selecting a 32-bit guest operating system type here.

The remaining steps assume you plan to install a Windows XP Professional guest operating system. You can find detailed installation notes for this and other guest operating systems in the VMware Guest Operating System Installation Guide, available from the VM

ware Web site or from the Help menu.

8. Select a name and folder for the virtual machine.

Link to w_newvm_name_vm.png

The name specified here is used if you add this virtual machine to the VMware Workstation Favorites list. This name is also used as the name of the folder where the files associated with this virtual machine are stored.

Each virtual machine should have its own folder. All associated files, such as the configuration file and the disk file, are placed in this folder.

Windows hosts: On Windows 2000, Windows XP and Windows Server 2003, the default folder for this Windows XP Professional virtual machine is C:\Documents and Settings\<username>\My Documents\My Virtual Machines\Windows XP Professional. On Windows NT, the default folder is C:\WINNT\Profiles\<username>\Personal\My Virtual Machines\Windows XP Professional.

Linux hosts: The default location for this Windows XP Professional virtual machine is <homedir>/vmware/winXPPro, where <homedir> is the home directory of the user who is currently logged on.

Virtual machine performance may be slower if your virtual hard disk is on a network drive. For best performance, be sure the virtual machine’s folder is on a local drive. However, if other users need to access this virtual machine, you should consider placing the virtual machine files in a location that is accessible to them. For more information, see Sharing Virtual Machines with Other Users.

9. Specify the number of processors for the virtual machine. The setting Two is supported only for host machines with at least two logical processors

Note: The following are all considered to have two logical processors:

  • A single-processor host with hyperthreading enabled
  • A single-processor host with a dual-core CPU
  • A multiprocessor host with two CPUs, neither of which are dual-core or have hyperthreading enabled

If the host does not have at least two logical processors, assigning two virtual processors is neither supported nor recommended: a warning message will appear. You can disregard this message and assign two virtual processors to the virtual machine, but, once you have finished creating the virtual machine, you will not be able to power it on unless you move it to a host machine with at least two logical processors. For more about Workstation support for virtual Symmetric Multiprocessing (SMP), see Using Two-Way Virtual Symmetric Multiprocessing (Experimental).

Link to w_newvm_processors.png

10. If you selected Typical as your configuration path, skip to step 11.

If you selected Custom as your configuration path, you may adjust the memory settings or accept the defaults, then click Next to continue.

Link to w_newvm_memory.png

In most cases, it is best to keep the default memory setting. If you plan to use the virtual machine to run many applications or applications that need high amounts of memory, you may want to use a higher memory setting. For more information, see Virtual Machine Memory Size.

Note: You cannot allocate more than 2GB of memory to a virtual machine if the virtual machine’s files are stored on a file system such as FAT32 that does not support files greater than 2GB.

11. Configure the networking capabilities of the virtual machine.

Link to w_newvm_use_bridged.png

If your host computer is on a network and you have a separate IP address for your virtual machine (or can get one automatically from a DHCP server), select Use bridged networking.

If you do not have a separate IP address for your virtual machine but you want to be able to connect to the Internet, select Use network address translation (NAT). NAT allows you to share files between the virtual machine and the host operating system.

For more details about VMware Workstation networking options, see Configuring a Virtual Network.

12. If you selected Typical as your configuration path, click Finish and the wizard sets up the files needed for your virtual machine.

If you selected Custom as your configuration path, continue with the steps below to configure a disk for your virtual machine.

13. Select the type of SCSI adapter you want to use with the virtual machine.

Link to w_newvm_ioadapter.png

An IDE and a SCSI adapter are installed in the virtual machine. The IDE adapter is always ATAPI. You can choose a BusLogic or an LSI Logic SCSI adapter. The default for your guest operating system is already selected. All guests except for Windows Server 2003, Red Hat Enterprise Linux 3 and NetWare default to the BusLogic adapter.

The LSI Logic adapter has improved performance and works better with generic SCSI devices. The LSI Logic adapter is also supported by ESX Server 2.0 and higher. Keep this in mind if you plan to migrate the virtual machine to another VMware product.

Your choice of SCSI adapter does not affect your decision to make your virtual disk an IDE or SCSI disk. However, some guest operating systems — such as Windows XP — do not include a driver for the Buslogic or LSI Logic adapter. You must download the driver from the LSI Logic Web site.

Note: Drivers for a Mylex (BusLogic) compatible host bus adapter are not obvious on the LSI Logic Web site. Search the support area for the numeric string in the model number. For example, search for “958” for BT/KT-958 drivers.

See the VMware Guest Operating System Installation Guide for details about the driver and the guest operating system you plan to install in this virtual machine.

14. Select the disk you want to use with the virtual machine.

Link to w_newvm_create_vdisk.png

Select Create a new virtual disk.

Virtual disks are the best choice for most virtual machines. They are quick and easy to set up and can be moved to new locations on the same host computer or to different host computers. By default, virtual disks start as small files on the host computer’s hard drive, then expand as needed — up to the size you specify in the next step. The next step also allows you to allocate all the disk space when the virtual disk is created, if you wish.

To use an existing operating system on a physical hard disk (a “raw” disk), read Configuring a Dual-Boot Computer for Use with a Virtual Machine. To install your guest operating system directly on an existing IDE disk partition, read the reference note Installing an Operating System on a Physical Partition from a Virtual Machine.

Note: Physical disk configurations are recommended only for expert users.

Caution: If you are using a Windows Server 2003, Windows XP or Windows 2000 host, see Do Not Use Windows 2000, Windows XP and Windows Server 2003 Dynamic Disks as Physical Disks.

To install the guest operating system on a IDE physical disk, select Existing IDE Disk Partition. To use a SCSI physical disk, add it to the virtual machine later with the virtual machine settings editor. Booting from a SCSI physical disk is not supported. For a discussion of some of the issues involved in using a SCSI physical disk, see Configuring Dual- or Multiple-Boot SCSI Systems to Run with VMware Workstation on a Linux Host.

15. Select whether to create an IDE or SCSI disk.

Link to w_newvm_disktype.png

The wizard recommends the best choice based on the guest operating system you selected. All Linux distributions you can select in the wizard use SCSI virtual disks by default, as do Windows NT, Windows 2000, and Windows Vista. All Windows operating systems except Windows NT, Windows 2000, and Windows Vista use IDE virtual disks by default; NetWare, FreeBSD, MS-DOS and other guests default to IDE virtual disks.

16. Specify the capacity of the virtual disk.

Link to w_newvm_disk_cap.png

Enter the size of the virtual disk that you wish to create.

You can set a size between 0.1GB and 950 GB for a SCSI virtual disk.

The option Allocate all disk space now gives somewhat better performance for your virtual machine. If you do not select Allocate all disk space now, the virtual disk’s files start small and grow as needed, but they can never grow larger than the size you set here.

Note: Allocate all disk space now is a time-consuming operation that cannot be cancelled, and requires as much physical disk space as you specify for the virtual disk.

Select the option Split disk into 2GB files if your virtual disk is stored on a file system that does not support files larger than 2GB.

17. Specify the location of the virtual disk’s files.

Link to w_newvm_disk_file.png

18. Click Finish.

The wizard sets up the files needed for your virtual machine.