Difference between revisions of "Create a new virtual machine"

From Computer Science
Jump to navigationJump to search
Line 39: Line 39:
 
Two options:
 
Two options:
  
# If you're going to install Linux yourself...
+
1. If you're going to install Linux yourself...
 +
*Make sure "Create a virtual hard disk now" is selected (it's usually the default) and click Create.
 +
*Choose "VDI (VirtualBox Disk Image)" as the hard disk file type and click 'Next'.
 +
*Choose "Dynamically allocated" and click Next. 
 +
*The filename in which the virtual disk image will be saved defaults to the name
 +
: you gave the virtual machine itself in the first step.  I wouldn't
 +
:change it (I don't see much point to doing so and it could very easily
 +
:lead to confusion later on).  Click on the folder with the green triangle
 +
:to select a place on your *host* hard drive to save the *guest* image.
 +
:Use the slider to select the size of the image; 16 GB is probably enough
 +
:and I would *not* go less than 8 GB.  Click Create.
  
    Make sure "Create a virtual hard disk now" is selected (it's usually the
+
2. If you're using a virtual-machine image in which Linux has already been installed for you...
    default) and click Create.
 
  
    Choose "VDI (VirtualBox Disk Image)" as the hard disk file type and click
+
*Select "Use an existing virtual hard disk file", click the folder with the
    Next.
+
:little green triangle next to it, navigate to the virtual disk image you
 +
:downloaded, select it, and click Open.
  
    Choose "Dynamically allocated" and click Next. 
+
*Click Next when you're done with this step.
 
 
    The filename in which the virtual disk image will be saved defaults to the
 
    name you gave the virtual machine itself in the first step.  I wouldn't
 
    change it (I don't see much point to doing so and it could very easily
 
    lead to confusion later on).  Click on the folder with the green triangle
 
    to select a place on your *host* hard drive to save the *guest* image.
 
    Use the slider to select the size of the image; 16 GB is probably enough
 
    and I would *not* go less than 8 GB.  Click Create.
 
 
 
# If you're using a virtual-machine image in which Linux has already been
 
    installed for you...
 
 
 
    Select "Use an existing virtual hard disk file", click the folder with the
 
    little green triangle next to it, navigate to the virtual disk image you
 
    downloaded, select it, and click Open.
 
 
 
    Click Next when you're done with this step.
 
  
 
=== Further Configuration ===
 
=== Further Configuration ===

Revision as of 16:49, 9 February 2020


(The following instructions were written using VirtualBox 6.0.0. They will probably work on other versions, though there may be slight differences.)

Download VirtualBox from the [vendor website](https://www.virtualbox.org) and install it.

Run VirtualBox.

Click "New".

Name and operating system

Give it a name. (Doesn't matter, but might be helpful to pick something that indicates your intended use so you can easily identify it later.)

For Type, select "Linux".

For Version, select "Arch Linux (64-bit)". (If you don't see any options that say "64-bit" and only see "32-bit", come talk to me.)

Click Next.

Memory size

The slider bar represents all of the memory installed in the host machine. Slide the pointer thingy to allocate memory to the virtual (guest) machine. More is better, but you don't want to allocate so much to the virtual machine that you deprive your host operating system of resources. I would recommend at least 512 MB and no more than half the available. If you intend to use Atom as your text editor, I would suggest no less than 2 GB. In any event, a power of 2 is best.

Click Next when you've set it.

Hard disk

Two options:

1. If you're going to install Linux yourself...

  • Make sure "Create a virtual hard disk now" is selected (it's usually the default) and click Create.
  • Choose "VDI (VirtualBox Disk Image)" as the hard disk file type and click 'Next'.
  • Choose "Dynamically allocated" and click Next.
  • The filename in which the virtual disk image will be saved defaults to the name
you gave the virtual machine itself in the first step. I wouldn't
change it (I don't see much point to doing so and it could very easily
lead to confusion later on). Click on the folder with the green triangle
to select a place on your *host* hard drive to save the *guest* image.
Use the slider to select the size of the image; 16 GB is probably enough
and I would *not* go less than 8 GB. Click Create.

2. If you're using a virtual-machine image in which Linux has already been installed for you...

  • Select "Use an existing virtual hard disk file", click the folder with the
little green triangle next to it, navigate to the virtual disk image you
downloaded, select it, and click Open.
  • Click Next when you're done with this step.

Further Configuration

Now that you've created the virtual machine, there is one configuration tweak we need to make before installing Linux onto it.

On the left-hand side of the VirtualBox windows, you'll see a list of all the virtual machines you've created (possibly only one at this point). Click it. Click the "Settings" button. Select the "Display" tab. On the right, find the "Graphics Controller" setting and make sure it's set to "VboxVGA". (If, once you've installed Linux and gotten the graphical environment working, it doesn't correctly resize itself when you change the size of the VirtualBox window, this is the setting you need to go back and check.)


Congratulations

You're done! (With the first part...)

One thing that might make your life easier is to enable cut-and-paste between host and guest: in the VirtualBox interface, go to Settings, General, Advanced, and set "Shared Clipboard" to "bidirectional".

If you're going to install Linux yourself, go to the instructions [here](install-in-vm).

If you're using a preinstalled image, proceed to [your first boot](your-first-boot).