-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathvirtualbox-intro.html
More file actions
213 lines (213 loc) · 10.5 KB
/
Copy pathvirtualbox-intro.html
File metadata and controls
213 lines (213 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>SLP: Introduction to UNIX: VirtualBox Use</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<link rel="stylesheet" href="../markdown.css" />
</head>
<body>
<main>
<h1 id="slp-introduction-to-unix-virtualbox-use">SLP: Introduction to
UNIX: VirtualBox Use</h1>
<p><a href="index.html">Go up to the main SLP documents page</a> (<a
href="index.md">md</a>)</p>
<h3 id="purpose">Purpose</h3>
<p>VirtualBox is a free program that allows you to run another operating
system on your machine without needing to reinstall anything. You have
to install the VirtualBox client, which installs like any other program
and is available for many different platforms (Windows, Mac, Linux). We
provide you with a pre-configured VirtualBox image that contains an
Ubuntu Linux installation that you can use for this course.</p>
<h3 id="quick-start">Quick start</h3>
<ul>
<li>A bit of terminology: the ‘host’ machine is the physical computer
(laptop, desktop, etc.) that you are using. The ‘guest’ machine is the
virtual machine that is running in VirtualBox, and is often just called
the ‘guest operating system’.
<ul>
<li>You are welcome to try this on a netbook host machine, but the
computing power of a netbook may not be enough</li>
</ul></li>
<li>Ensure your computer has VT-x support enabled (see below)</li>
<li>You will need to install the Virtual Box client. It can be
downloaded for free from <a
href="https://www.virtualbox.org/wiki/Downloads">here</a>. Download the
latest version.</li>
<li>Download the provided VirtualBox image (given out in class). You
will need to unzip this file before using it.
<ul>
<li>This file is rather large (about 2.6 Gb), so you may want to try
downloading it during off hours, such as late at night. If you have
problems downloading it, let us know. If you do not have sufficient
bandwidth to download it, please see us after lecture, and we will
provide it on a different media for you.</li>
<li>Unzip this file; it will take up about 8 Gb on your machine. Once
uncompressed, you can download the .zip file that you downloaded.
<ul>
<li>Your unzip program may complain about needing some insane amount of
space (like 700 petabytes, where a petabyte is 1,000 terabytes); this is
a bug in many unzip programs. Try <a
href="http://www.7-zip.org/">7-zip</a>, which has had more success.</li>
</ul></li>
</ul></li>
<li>Run VirtualBox, and import the image:
<ul>
<li>To do that, click on ‘New’, and choose the right OS/version (“Ubuntu
(64 bit)” – don’t choose the 32 bit version!). Give it a name to help
differentiate it from other virtual machines that you may end up using
in other classes.</li>
<li>Increase the default memory – 2 Gb is reasonable. But if your
computer doesn’t have as much, then consider a lower amount.</li>
<li>At the ‘Hard drive’ screen select ‘use an existing virtual hard
drive file’, and click the folder icon to the right of the drop-down
list. You want to use the file you unzipped above.</li>
<li>That should be it for the Wizard</li>
</ul></li>
<li>Boot the machine (click the Start icon at the top - it’s a green
rightward pointing arrow). You may notice some display artifacts during
boot-up as the virtual machine changes video modes, but that will
stabilize once booting has completed.</li>
<li>The login is ‘student’ (although you’ll probably click on the ‘L33t
Hax0r’ button on the login screen), and the password is ‘password’. You
can click on the command-prompt icon on the bottom toolbar to get a
terminal window.
<ul>
<li>The documentation is available online in either <a
href="http://www.virtualbox.org/manual/UserManual.html">HTML format</a>
or <a
href="http://download.virtualbox.org/virtualbox/UserManual.pdf">PDF
format</a>, although most of the salient details are listed on this
page.</li>
</ul></li>
</ul>
<h3 id="notes">Notes</h3>
<ul>
<li>No root password is set (you can use <code>sudo</code> instead); to
change the root password, run <code>sudo passwd</code>.</li>
<li>The ‘host key’ is defined by your host machine’s operating system
(it’s the right control button under Linux, for example). This key is
used for a number of contexts, including un-capturing the mouse. To have
VirtualBox warn you about what the host key is, you can reset all
warnings via the VirtualBox help menu, and it will warn you about this
at boot-up. It may also be listed in the lower-right of the VirtualBox
window.</li>
<li>We did not install the latest version of Ubuntu, but instead
installed the Long-Term Support (LTS) version, which is 16.04. The
difference is that the LTS versions are supported for far longer (3
years or so) than the non-LTS versions (which are only supported for a
year or so). For this class, there won’t be a noticeable difference
between 16.04 and more recent versions.</li>
<li>Sound and network should work automatically, as the VirtualBox
program will connect those to your host machine’s sound and network
device drivers.</li>
</ul>
<h3 id="vt-x-support">VT-x support</h3>
<p>For 64-bit VMs, VirtualBox requires some hardware support from your
processor. This support is present on almost all processors made
recently (including all laptop or desktop processors introduced by Intel
since 2013). However, some computer manufacturers disable this support
by default. When they do this, you can usually re-enable the feature in
BIOS or “the Setup Utility”.</p>
<p>How you access the BIOS/Setup varies between manufacturers. Common
ways include pressing Enter or F2 or F12 or Del while booting the
machine. If you are using Windows 10, you may need to first shut down
the machine while holding shift - some Windows 10 installations default
to not performing a “complete” shut down. You should be able to look up
full instructions online for accessing BIOS/Setup based on the model of
your laptop or desktop.</p>
<p>Once in the Setup utility, the option to change is likely to be
called something like “Intel VT-x”, “Intel Virtualization Technology”,
“virtualization technology”, or “AMD-v”. Confusingly, this setting is
sometimes under category called “Security” instead of something more
obvious. After changing it, save the settings and reboot.</p>
<p>If you have trouble setting getting 64-bit VMs to work on your
machine, please do not hesitate to contact the course staff for
assistance.</p>
<p>In the unlikely event that you have a laptop that does not support
running 64-bit VMs with VirtualBox, we will make alternate arrangements
such as making the assignments only use 32-bit, or finding a way for you
to do the assignments by remote logging into lab machines.</p>
<h3 id="how-tos">How-Tos</h3>
<ul>
<li>To load a terminal (a.k.a. command prompt): it’s towards the bottom
of the menu on the left-hand launcher column.</li>
<li>To load emacs: it’s also in the menu on the left-hand launcher
column, right above the terminal launcher icon</li>
<li>To change the password: when logged in, you enter the ‘passwd’
command from a terminal window. You should do this. The original
password is ‘password’.</li>
<li>To toggle between full-screen and windowed mode, click on the host
key and ‘f’. Don’t know what the host key is? Read the bullet point
about this in the ‘Notes’ section, above.</li>
<li>To change the screen resolution: from the top menu bar, click on the
circular power button icon on the far right, and select ‘Displays’. Note
that there are not many resolutions available, but you can use
full-screen mode which will change the resolution to your host machine’s
resolution.</li>
<li>To set up printing: it’s probably easiest to print to a PDF,
transfer that file to your host machine (see below), and print from your
host machine.</li>
<li>Load up a file manager (like Windows Explorer): from the ‘Places’
menu (upper-left of the screen), select ‘Home Folder’</li>
<li>Make emacs show one screen (and not be a split-screen): press
control-x then press ‘1’ (this should not be necessary, by the way)</li>
</ul>
<h3 id="transferring-files-back-and-forth">Transferring files back and
forth</h3>
<p>A few options:</p>
<ul>
<li>You can use an e-mail client or use a web browser and e-mail your
files back and forth. Or use an online file server.</li>
<li>If you are using a github repository, then that will “save” your
files and allow transfer back and forth.</li>
<li>You can set up ‘shared folders’ to directly read and write files
back and forth. To do so, see <a
href="http://www.ubuntugeek.com/how-to-access-windows-host-shared-folders-from-ubuntu-guest-in-virtualbox.html">here</a>.</li>
<li><a href="http://dropbox.com">Dropbox</a> may be the easiest way to
sync files between your virtual machine and your host machine. To
install:
<ul>
<li>download the 32-bit Ubuntu version downloaded from <a
href="https://www.dropbox.com/install?os=lnx">here</a> - be sure to save
the file, not open it, from Firefox</li>
<li>install it from the command-line via ‘sudo dpkg -i
dropbox_1.4.0_i386.deb’ but note that the file name may change as a new
version is released
<ul>
<li>note: dropbox requires a supporting package (python-gpgme), but I
already installed that on the image</li>
</ul></li>
<li>once installed, a vibrating icon will appear in the left-hand
launcher; click on that, then click on “Start Dropbox”</li>
<li>this will download the proprietary daemon (a daemon is a background
process) and install it</li>
<li>at that point, the standard dropbox registration wizard will
appear</li>
</ul></li>
</ul>
<h3 id="image-creation-details">Image creation details</h3>
<p><a href="../docs/virtualbox-image-details.html">Here</a> (<a
href="../docs/virtualbox-image-details.md">md</a>) are the details of
how the image was created.</p>
</main>
</body>
</html>