1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
|
---|
4 | <!ENTITY % all.entities SYSTEM "all-entities.ent">
|
---|
5 | %all.entities;
|
---|
6 | ]>
|
---|
7 | <chapter id="remotevm">
|
---|
8 |
|
---|
9 | <title>Remote Virtual Machines</title>
|
---|
10 |
|
---|
11 | <sect1 id="vrde">
|
---|
12 |
|
---|
13 | <title>Remote Display (VRDP Support)</title>
|
---|
14 |
|
---|
15 | <para>
|
---|
16 | &product-name; can display virtual machines remotely, meaning that
|
---|
17 | a virtual machine can execute on one computer even though the
|
---|
18 | machine will be displayed on a second computer, and the machine
|
---|
19 | will be controlled from there as well, as if the virtual machine
|
---|
20 | was running on that second computer.
|
---|
21 | </para>
|
---|
22 |
|
---|
23 | <para>
|
---|
24 | For maximum flexibility, &product-name; implements remote machine
|
---|
25 | display through a generic extension interface called the
|
---|
26 | VirtualBox Remote Desktop Extension (VRDE). The base open source
|
---|
27 | &product-name; package only provides this interface, while
|
---|
28 | implementations can be supplied by third parties with
|
---|
29 | &product-name; extension packages, which must be installed
|
---|
30 | separately from the base package. See
|
---|
31 | <xref linkend="intro-installing" />.
|
---|
32 | </para>
|
---|
33 |
|
---|
34 | <para>
|
---|
35 | Oracle provides support for the VirtualBox Remote Display Protocol
|
---|
36 | (VRDP) in such an &product-name; extension package. When this
|
---|
37 | package is installed, &product-name; versions 4.0 and later
|
---|
38 | support VRDP the same way as binary, non-open source, versions of
|
---|
39 | &product-name; before 4.0 did.
|
---|
40 | </para>
|
---|
41 |
|
---|
42 | <para>
|
---|
43 | VRDP is a backwards-compatible extension to Microsoft's Remote
|
---|
44 | Desktop Protocol (RDP). As a result, you can use any standard RDP
|
---|
45 | client to control the remote VM.
|
---|
46 | </para>
|
---|
47 |
|
---|
48 | <para>
|
---|
49 | Even when the extension is installed, the VRDP server is disabled
|
---|
50 | by default. It can easily be enabled on a per-VM basis either in
|
---|
51 | the VirtualBox Manager in the
|
---|
52 | <emphasis role="bold">Display</emphasis> settings, see
|
---|
53 | <xref linkend="settings-display" />, or with the
|
---|
54 | <command>VBoxManage</command> command, as follows:
|
---|
55 | </para>
|
---|
56 |
|
---|
57 | <screen>VBoxManage modifyvm "VM name" --vrde on</screen>
|
---|
58 |
|
---|
59 | <para>
|
---|
60 | By default, the VRDP server uses TCP port
|
---|
61 | <computeroutput>3389</computeroutput>. You will need to change the
|
---|
62 | default port if you run more than one VRDP server, since the port
|
---|
63 | can only be used by one server at a time. You might also need to
|
---|
64 | change it on Windows hosts since the default port might already be
|
---|
65 | used by the RDP server that is built into Windows itself. Ports
|
---|
66 | 5000 through 5050 are typically not used and might be a good
|
---|
67 | choice.
|
---|
68 | </para>
|
---|
69 |
|
---|
70 | <para>
|
---|
71 | The port can be changed either in the
|
---|
72 | <emphasis role="bold">Display</emphasis> settings of the graphical
|
---|
73 | user interface or with the <option>--vrdeport</option> option of
|
---|
74 | the <command>VBoxManage modifyvm</command> command. You can
|
---|
75 | specify a comma-separated list of ports or ranges of ports. Use a
|
---|
76 | dash between two port numbers to specify a range. The VRDP server
|
---|
77 | will bind to <emphasis>one</emphasis> of the available ports from
|
---|
78 | the specified list. For example, <computeroutput>VBoxManage
|
---|
79 | modifyvm "VM name" --vrdeport 5000,5010-5012</computeroutput> will
|
---|
80 | configure the server to bind to one of the ports 5000, 5010, 5011,
|
---|
81 | or 5012. See <xref linkend="vboxmanage-modifyvm-vrde" />.
|
---|
82 | </para>
|
---|
83 |
|
---|
84 | <para>
|
---|
85 | The actual port used by a running VM can be either queried with
|
---|
86 | the <command>VBoxManage showvminfo</command> command or seen in
|
---|
87 | the GUI on the <emphasis role="bold">Runtime</emphasis> tab of the
|
---|
88 | <emphasis role="bold">Session Information</emphasis> dialog, which
|
---|
89 | is accessible from the <emphasis role="bold">Machine</emphasis>
|
---|
90 | menu of the VM window.
|
---|
91 | </para>
|
---|
92 |
|
---|
93 | <para>
|
---|
94 | Support for IPv6 has been implemented in &product-name; 4.3. If
|
---|
95 | the host OS supports IPv6 the VRDP server will automatically
|
---|
96 | listen for IPv6 connections in addition to IPv4.
|
---|
97 | </para>
|
---|
98 |
|
---|
99 | <sect2 id="rdp-viewers">
|
---|
100 |
|
---|
101 | <title>Common Third-Party RDP Viewers</title>
|
---|
102 |
|
---|
103 | <para>
|
---|
104 | Since VRDP is backwards-compatible to RDP, you can use any
|
---|
105 | standard RDP viewer to connect to such a remote virtual machine.
|
---|
106 | For this to work, you must specify the IP address of your
|
---|
107 | <emphasis>host</emphasis> system, not of the virtual machine, as
|
---|
108 | the server address to connect to. You must also specify the port
|
---|
109 | number that the VRDP server is using.
|
---|
110 | </para>
|
---|
111 |
|
---|
112 | <para>
|
---|
113 | The following examples are for the most common RDP viewers:
|
---|
114 | </para>
|
---|
115 |
|
---|
116 | <itemizedlist>
|
---|
117 |
|
---|
118 | <listitem>
|
---|
119 | <para>
|
---|
120 | On Windows, you can use the Microsoft Terminal Services
|
---|
121 | Connector, <command>mstsc.exe</command>, that is included
|
---|
122 | with Windows. Press the Windows key + R, to display the
|
---|
123 | <emphasis role="bold">Run</emphasis> dialog. Enter
|
---|
124 | <command>mstsc</command> to start the program. You can also
|
---|
125 | find the program in <emphasis role="bold">Start</emphasis>,
|
---|
126 | <emphasis role="bold">All Programs</emphasis>,
|
---|
127 | <emphasis role="bold">Accessories</emphasis>,
|
---|
128 | <emphasis role="bold">Remote Desktop Connection</emphasis>.
|
---|
129 | If you use the <emphasis role="bold">Run</emphasis> dialog,
|
---|
130 | you can enter options directly. For example:
|
---|
131 | </para>
|
---|
132 |
|
---|
133 | <screen>mstsc 1.2.3.4:3389</screen>
|
---|
134 |
|
---|
135 | <para>
|
---|
136 | Replace <computeroutput>1.2.3.4</computeroutput> with the
|
---|
137 | host IP address, and <computeroutput>3389</computeroutput>
|
---|
138 | with a different port, if necessary.
|
---|
139 | </para>
|
---|
140 |
|
---|
141 | <note>
|
---|
142 | <itemizedlist>
|
---|
143 |
|
---|
144 | <listitem>
|
---|
145 | <para>
|
---|
146 | IPv6 addresses must be enclosed in square brackets to
|
---|
147 | specify a port. For example: <computeroutput>mstsc
|
---|
148 | [fe80::1:2:3:4]:3389</computeroutput>
|
---|
149 | </para>
|
---|
150 | </listitem>
|
---|
151 |
|
---|
152 | <listitem>
|
---|
153 | <para>
|
---|
154 | When connecting to localhost in order to test the
|
---|
155 | connection, the addresses
|
---|
156 | <computeroutput>localhost</computeroutput> and
|
---|
157 | <computeroutput>127.0.0.1</computeroutput> might not
|
---|
158 | work using <command>mstsc.exe</command>. Instead, the
|
---|
159 | address
|
---|
160 | <computeroutput>127.0.0.2[:3389]</computeroutput> has
|
---|
161 | to be used.
|
---|
162 | </para>
|
---|
163 | </listitem>
|
---|
164 |
|
---|
165 | </itemizedlist>
|
---|
166 | </note>
|
---|
167 | </listitem>
|
---|
168 |
|
---|
169 | <listitem>
|
---|
170 | <para>
|
---|
171 | On other systems, you can use the standard open source
|
---|
172 | <command>rdesktop</command> program. This ships with most
|
---|
173 | Linux distributions, but &product-name; also comes with a
|
---|
174 | modified variant of <command>rdesktop</command> for remote
|
---|
175 | USB support. See <xref linkend="usb-over-rdp" />.
|
---|
176 | </para>
|
---|
177 |
|
---|
178 | <para>
|
---|
179 | With <command>rdesktop</command>, use a command line such as
|
---|
180 | the following:
|
---|
181 | </para>
|
---|
182 |
|
---|
183 | <screen>rdesktop -a 16 -N 1.2.3.4:3389</screen>
|
---|
184 |
|
---|
185 | <para>
|
---|
186 | Replace <computeroutput>1.2.3.4</computeroutput> with the
|
---|
187 | host IP address, and <computeroutput>3389</computeroutput>
|
---|
188 | with a different port, if necessary. The <computeroutput>-a
|
---|
189 | 16</computeroutput> option requests a color depth of 16 bits
|
---|
190 | per pixel, which we recommend. For best performance, after
|
---|
191 | installation of the guest operating system, you should set
|
---|
192 | its display color depth to the same value. The
|
---|
193 | <computeroutput>-N</computeroutput> option enables use of
|
---|
194 | the NumPad keys.
|
---|
195 | </para>
|
---|
196 | </listitem>
|
---|
197 |
|
---|
198 | <listitem>
|
---|
199 | <para>
|
---|
200 | You can use the Remmina remote desktop client with VRDP.
|
---|
201 | This application is included with some Linux distributions,
|
---|
202 | such as Debian and Ubuntu.
|
---|
203 | </para>
|
---|
204 | </listitem>
|
---|
205 |
|
---|
206 | <listitem>
|
---|
207 | <para>
|
---|
208 | If you run the KDE desktop, you can use
|
---|
209 | <computeroutput>krdc</computeroutput>, the KDE RDP viewer. A
|
---|
210 | typical command line is as follows:
|
---|
211 | </para>
|
---|
212 |
|
---|
213 | <screen>krdc rdp://1.2.3.4:3389</screen>
|
---|
214 |
|
---|
215 | <para>
|
---|
216 | Replace <computeroutput>1.2.3.4</computeroutput> with the
|
---|
217 | host IP address, and <computeroutput>3389</computeroutput>
|
---|
218 | with a different port, if necessary. The "rdp://" prefix is
|
---|
219 | required with krdc to switch it into RDP mode.
|
---|
220 | </para>
|
---|
221 | </listitem>
|
---|
222 |
|
---|
223 | <listitem>
|
---|
224 | <para>
|
---|
225 | With Sun Ray thin clients you can use
|
---|
226 | <command>uttsc</command>, which is part of the Sun Ray
|
---|
227 | Windows Connector package. See the Sun Ray documentation for
|
---|
228 | details.
|
---|
229 | </para>
|
---|
230 | </listitem>
|
---|
231 |
|
---|
232 | </itemizedlist>
|
---|
233 |
|
---|
234 | </sect2>
|
---|
235 |
|
---|
236 | <sect2 id="vboxheadless">
|
---|
237 |
|
---|
238 | <title>VBoxHeadless, the Remote Desktop Server</title>
|
---|
239 |
|
---|
240 | <para>
|
---|
241 | While any VM started from the VirtualBox Manager is capable of
|
---|
242 | running virtual machines remotely, it is not convenient to have
|
---|
243 | to run the full-fledged GUI if you never want to have VMs
|
---|
244 | displayed locally in the first place. In particular, if you are
|
---|
245 | running server hardware whose only purpose is to host VMs, and
|
---|
246 | all your VMs are supposed to run remotely over VRDP, then it is
|
---|
247 | pointless to have a graphical user interface on the server at
|
---|
248 | all. This is especially true for Linux or Oracle Solaris hosts,
|
---|
249 | as the VirtualBox Manager comes with dependencies on the Qt and
|
---|
250 | SDL libraries. This is inconvenient if you would rather not have
|
---|
251 | the X Window system on your server at all.
|
---|
252 | </para>
|
---|
253 |
|
---|
254 | <para>
|
---|
255 | &product-name; therefore comes with a front-end called
|
---|
256 | <computeroutput>VBoxHeadless</computeroutput>, which produces no
|
---|
257 | visible output on the host at all, but still can optionally deliver
|
---|
258 | VRDP data. This front-end has no dependencies on the X Window system
|
---|
259 | on Linux and Oracle Solaris hosts.
|
---|
260 | </para>
|
---|
261 |
|
---|
262 | <note>
|
---|
263 | <para>
|
---|
264 | Before &product-name; 1.6, the headless server was called
|
---|
265 | <computeroutput>VBoxVRDP</computeroutput>. For the sake of
|
---|
266 | backwards compatibility, the &product-name; installation still
|
---|
267 | installs an executable with that name as well.
|
---|
268 | </para>
|
---|
269 | </note>
|
---|
270 |
|
---|
271 | <para>
|
---|
272 | To start a virtual machine with
|
---|
273 | <computeroutput>VBoxHeadless</computeroutput>, you have the
|
---|
274 | following options:
|
---|
275 | </para>
|
---|
276 |
|
---|
277 | <itemizedlist>
|
---|
278 |
|
---|
279 | <listitem>
|
---|
280 | <para>
|
---|
281 | Use the <command>VBoxManage</command> command, as follows:
|
---|
282 | </para>
|
---|
283 |
|
---|
284 | <screen>VBoxManage startvm "VM name" --type headless</screen>
|
---|
285 |
|
---|
286 | <para>
|
---|
287 | The <computeroutput>--type</computeroutput> option causes
|
---|
288 | &product-name; to use
|
---|
289 | <computeroutput>VBoxHeadless</computeroutput> as the
|
---|
290 | front-end to the internal virtualization engine, instead of
|
---|
291 | the Qt front-end.
|
---|
292 | </para>
|
---|
293 | </listitem>
|
---|
294 |
|
---|
295 | <listitem>
|
---|
296 | <para>
|
---|
297 | Use the <command>VBoxHeadless</command> command, as follows:
|
---|
298 | </para>
|
---|
299 |
|
---|
300 | <screen>VBoxHeadless --startvm <uuid|name></screen>
|
---|
301 |
|
---|
302 | <para>
|
---|
303 | This way of starting the VM helps troubleshooting problems
|
---|
304 | reported by <command>VBoxManage startvm</command>, because
|
---|
305 | you can sometimes see more detailed error messages,
|
---|
306 | especially for early failures before the VM execution is
|
---|
307 | started. In normal situations <command>VBoxManage
|
---|
308 | startvm</command> is preferred, since it runs the VM
|
---|
309 | directly as a background process which has to be done
|
---|
310 | explicitly when directly starting with
|
---|
311 | <computeroutput>VBoxHeadless</computeroutput>. The full
|
---|
312 | documentation of the command is in
|
---|
313 | <xref linkend="man_vboxheadless"/>.
|
---|
314 | </para>
|
---|
315 | </listitem>
|
---|
316 |
|
---|
317 | <listitem>
|
---|
318 | <para>
|
---|
319 | Start <computeroutput>VBoxHeadless</computeroutput> from the
|
---|
320 | VirtualBox Manager GUI, by pressing the Shift key when
|
---|
321 | starting a virtual machine or by selecting
|
---|
322 | <emphasis role="bold">Headless Start</emphasis> from the
|
---|
323 | <emphasis role="bold">Machine</emphasis> menu.
|
---|
324 | </para>
|
---|
325 | </listitem>
|
---|
326 |
|
---|
327 | </itemizedlist>
|
---|
328 |
|
---|
329 | <para>
|
---|
330 | When you use the <computeroutput>VBoxHeadless</computeroutput>
|
---|
331 | command to start a VM, the VRDP server will be enabled according
|
---|
332 | to the VM configuration. You can override the VM's setting using
|
---|
333 | <computeroutput>--vrde</computeroutput> command line parameter.
|
---|
334 | To enable the VRDP server, start the VM as follows:
|
---|
335 | </para>
|
---|
336 |
|
---|
337 | <screen>VBoxHeadless --startvm <uuid|name> --vrde on</screen>
|
---|
338 |
|
---|
339 | <para>
|
---|
340 | To disable the VRDP server:
|
---|
341 | </para>
|
---|
342 |
|
---|
343 | <screen>VBoxHeadless --startvm <uuid|name> --vrde off</screen>
|
---|
344 |
|
---|
345 | <para>
|
---|
346 | To have the VRDP server enabled depending on the VM
|
---|
347 | configuration, as for other front-ends:
|
---|
348 | </para>
|
---|
349 |
|
---|
350 | <screen>VBoxHeadless --startvm <uuid|name> --vrde config</screen>
|
---|
351 |
|
---|
352 | <para>
|
---|
353 | This command is the same as the following:
|
---|
354 | </para>
|
---|
355 |
|
---|
356 | <screen>VBoxHeadless --startvm <uuid|name></screen>
|
---|
357 |
|
---|
358 | <para>
|
---|
359 | If you start the VM with <command>VBoxManage startvm</command>
|
---|
360 | then the configuration settings of the VM are always used.
|
---|
361 | </para>
|
---|
362 |
|
---|
363 | </sect2>
|
---|
364 |
|
---|
365 | <sect2 id="headless-vm-steps">
|
---|
366 |
|
---|
367 | <title>Step by Step: Creating a Virtual Machine on a Headless Server</title>
|
---|
368 |
|
---|
369 | <para>
|
---|
370 | The following instructions describe how to create a virtual
|
---|
371 | machine on a headless server over a network connection. This
|
---|
372 | example creates a virtual machine, establishes an RDP connection
|
---|
373 | and installs a guest operating system. All of these tasks are
|
---|
374 | done without having to touch the headless server. You need the
|
---|
375 | following prerequisites:
|
---|
376 | </para>
|
---|
377 |
|
---|
378 | <itemizedlist>
|
---|
379 |
|
---|
380 | <listitem>
|
---|
381 | <para>
|
---|
382 | &product-name; on a server machine with a supported host
|
---|
383 | operating system. The &product-name; Extension Pack for the
|
---|
384 | VRDP server must be installed, see <xref linkend="vrde"/>.
|
---|
385 | The procedures assume a Linux server is used.
|
---|
386 | </para>
|
---|
387 | </listitem>
|
---|
388 |
|
---|
389 | <listitem>
|
---|
390 | <para>
|
---|
391 | An ISO file accessible from the server, containing the
|
---|
392 | installation data for the guest operating system to install.
|
---|
393 | Windows XP is used in the example.
|
---|
394 | </para>
|
---|
395 | </listitem>
|
---|
396 |
|
---|
397 | <listitem>
|
---|
398 | <para>
|
---|
399 | A terminal connection to that host through which you can
|
---|
400 | access a command line, such as
|
---|
401 | <computeroutput>ssh</computeroutput>.
|
---|
402 | </para>
|
---|
403 | </listitem>
|
---|
404 |
|
---|
405 | <listitem>
|
---|
406 | <para>
|
---|
407 | An RDP viewer on the remote client. See
|
---|
408 | <xref linkend="rdp-viewers" /> for examples.
|
---|
409 | </para>
|
---|
410 | </listitem>
|
---|
411 |
|
---|
412 | </itemizedlist>
|
---|
413 |
|
---|
414 | <para>
|
---|
415 | Note that on the server machine, since we will only use the
|
---|
416 | headless server, Qt and the X Window system are not required.
|
---|
417 | </para>
|
---|
418 |
|
---|
419 | <orderedlist>
|
---|
420 |
|
---|
421 | <listitem>
|
---|
422 | <para>
|
---|
423 | On the headless server, create a new virtual machine. For
|
---|
424 | example:
|
---|
425 | </para>
|
---|
426 |
|
---|
427 | <screen>VBoxManage createvm --name "Windows XP" --ostype WindowsXP --register</screen>
|
---|
428 |
|
---|
429 | <para>
|
---|
430 | If you do not specify
|
---|
431 | <computeroutput>--register</computeroutput>, you will have
|
---|
432 | to manually use the <command>registervm</command> command
|
---|
433 | later.
|
---|
434 | </para>
|
---|
435 |
|
---|
436 | <para>
|
---|
437 | You do not need to specify
|
---|
438 | <computeroutput>--ostype</computeroutput>, but doing so
|
---|
439 | selects some sensible default values for certain VM
|
---|
440 | parameters. For example, the RAM size and the type of the
|
---|
441 | virtual network device. To get a complete list of supported
|
---|
442 | operating systems you can use the following command:
|
---|
443 | </para>
|
---|
444 |
|
---|
445 | <screen>VBoxManage list ostypes</screen>
|
---|
446 | </listitem>
|
---|
447 |
|
---|
448 | <listitem>
|
---|
449 | <para>
|
---|
450 | Make sure the settings for the VM are appropriate for the
|
---|
451 | guest operating system that we will install. For example:
|
---|
452 | </para>
|
---|
453 |
|
---|
454 | <screen>VBoxManage modifyvm "Windows XP" --memory 256 --acpi on --boot1 dvd --nic1 nat</screen>
|
---|
455 | </listitem>
|
---|
456 |
|
---|
457 | <listitem>
|
---|
458 | <para>
|
---|
459 | Create a virtual hard disk for the VM. For example, to
|
---|
460 | create a 10 GB virtual hard disk:
|
---|
461 | </para>
|
---|
462 |
|
---|
463 | <screen>VBoxManage createhd --filename "WinXP.vdi" --size 10000</screen>
|
---|
464 | </listitem>
|
---|
465 |
|
---|
466 | <listitem>
|
---|
467 | <para>
|
---|
468 | Add an IDE Controller to the new VM. For example:
|
---|
469 | </para>
|
---|
470 |
|
---|
471 | <screen>VBoxManage storagectl "Windows XP" --name "IDE Controller"
|
---|
472 | --add ide --controller PIIX4</screen>
|
---|
473 | </listitem>
|
---|
474 |
|
---|
475 | <listitem>
|
---|
476 | <para>
|
---|
477 | Set the VDI file you created as the first virtual hard disk
|
---|
478 | of the new VM. For example:
|
---|
479 | </para>
|
---|
480 |
|
---|
481 | <screen>VBoxManage storageattach "Windows XP" --storagectl "IDE Controller"
|
---|
482 | --port 0 --device 0 --type hdd --medium "WinXP.vdi"</screen>
|
---|
483 | </listitem>
|
---|
484 |
|
---|
485 | <listitem>
|
---|
486 | <para>
|
---|
487 | Attach the ISO file that contains the operating system
|
---|
488 | installation that you want to install later to the virtual
|
---|
489 | machine. This is done so that the VM can boot from it.
|
---|
490 | </para>
|
---|
491 |
|
---|
492 | <screen>VBoxManage storageattach "Windows XP" --storagectl "IDE Controller"
|
---|
493 | --port 0 --device 1 --type dvddrive --medium /full/path/to/iso.iso</screen>
|
---|
494 | </listitem>
|
---|
495 |
|
---|
496 | <listitem>
|
---|
497 | <para>
|
---|
498 | Enable the VirtualBox Remote Desktop Extension, the VRDP
|
---|
499 | server, as follows:
|
---|
500 | </para>
|
---|
501 |
|
---|
502 | <screen>VBoxManage modifyvm "Windows XP" --vrde on</screen>
|
---|
503 | </listitem>
|
---|
504 |
|
---|
505 | <listitem>
|
---|
506 | <para>
|
---|
507 | Start the virtual machine using the
|
---|
508 | <command>VBoxHeadless</command> command:
|
---|
509 | </para>
|
---|
510 |
|
---|
511 | <screen>VBoxHeadless --startvm "Windows XP"</screen>
|
---|
512 |
|
---|
513 | <para>
|
---|
514 | If the configuration steps worked, you should see a
|
---|
515 | copyright notice. If you are returned to the command line,
|
---|
516 | then something did not work correctly.
|
---|
517 | </para>
|
---|
518 | </listitem>
|
---|
519 |
|
---|
520 | <listitem>
|
---|
521 | <para>
|
---|
522 | On the client machine, start the RDP viewer and connect to
|
---|
523 | the server. See <xref linkend="rdp-viewers" /> for details
|
---|
524 | of how to use various common RDP viewers.
|
---|
525 | </para>
|
---|
526 |
|
---|
527 | <para>
|
---|
528 | The installation routine of your guest operating system
|
---|
529 | should be displayed in the RDP viewer.
|
---|
530 | </para>
|
---|
531 | </listitem>
|
---|
532 |
|
---|
533 | </orderedlist>
|
---|
534 |
|
---|
535 | </sect2>
|
---|
536 |
|
---|
537 | <sect2 id="usb-over-rdp">
|
---|
538 |
|
---|
539 | <title>Remote USB</title>
|
---|
540 |
|
---|
541 | <para>
|
---|
542 | As a special feature additional to the VRDP support,
|
---|
543 | &product-name; also supports remote USB devices over the wire.
|
---|
544 | That is, an &product-name; guest that runs on one computer can
|
---|
545 | access the USB devices of the remote computer on which the VRDP
|
---|
546 | data is being displayed the same way as USB devices that are
|
---|
547 | connected to the actual host. This enables running of virtual
|
---|
548 | machines on an &product-name; host that acts as a server, where
|
---|
549 | a client can connect from elsewhere that needs only a network
|
---|
550 | adapter and a display capable of running an RDP viewer. When USB
|
---|
551 | devices are plugged into the client, the remote &product-name;
|
---|
552 | server can access them.
|
---|
553 | </para>
|
---|
554 |
|
---|
555 | <para>
|
---|
556 | For these remote USB devices, the same filter rules apply as for
|
---|
557 | other USB devices. See <xref linkend="settings-usb" />. All you
|
---|
558 | have to do is specify Remote, or Any, when setting up these
|
---|
559 | rules.
|
---|
560 | </para>
|
---|
561 |
|
---|
562 | <para>
|
---|
563 | Accessing remote USB devices is only possible if the RDP client
|
---|
564 | supports this extension. On Linux and Oracle Solaris hosts, the
|
---|
565 | &product-name; installation provides a suitable VRDP client
|
---|
566 | called <command>rdesktop-vrdp</command>. Recent versions of
|
---|
567 | <command>uttsc</command>, a client tailored for the use with Sun
|
---|
568 | Ray thin clients, also support accessing remote USB devices. RDP
|
---|
569 | clients for other platforms will be provided in future
|
---|
570 | &product-name; versions.
|
---|
571 | </para>
|
---|
572 |
|
---|
573 | <para>
|
---|
574 | To make a remote USB device available to a VM,
|
---|
575 | <command>rdesktop-vrdp</command> should be started as follows:
|
---|
576 | </para>
|
---|
577 |
|
---|
578 | <screen>rdesktop-vrdp -r usb -a 16 -N my.host.address</screen>
|
---|
579 |
|
---|
580 | <para>
|
---|
581 | See <xref linkend="ts_usb-linux" /> for further details on how
|
---|
582 | to properly set up the permissions for USB devices. Furthermore
|
---|
583 | it is advisable to disable automatic loading of any host driver
|
---|
584 | on the remote host which might work on USB devices to ensure
|
---|
585 | that the devices are accessible by the RDP client. If the setup
|
---|
586 | was properly done on the remote host, plug and unplug events are
|
---|
587 | visible in the VBox.log file of the VM.
|
---|
588 | </para>
|
---|
589 |
|
---|
590 | </sect2>
|
---|
591 |
|
---|
592 | <sect2 id="vbox-auth">
|
---|
593 |
|
---|
594 | <title>RDP Authentication</title>
|
---|
595 |
|
---|
596 | <para>
|
---|
597 | For each virtual machine that is remotely accessible using RDP,
|
---|
598 | you can individually determine if and how client connections are
|
---|
599 | authenticated. For this, use the <command>VBoxManage
|
---|
600 | modifyvm</command> command with the
|
---|
601 | <option>--vrdeauthtype</option> option. See
|
---|
602 | <xref linkend="vboxmanage-modifyvm" />. The following methods of
|
---|
603 | authentication are available:
|
---|
604 | </para>
|
---|
605 |
|
---|
606 | <itemizedlist>
|
---|
607 |
|
---|
608 | <listitem>
|
---|
609 | <para>
|
---|
610 | The <emphasis role="bold">null</emphasis> method means that
|
---|
611 | there is no authentication at all. Any client can connect to
|
---|
612 | the VRDP server and thus the virtual machine. This is very
|
---|
613 | insecure and only to be recommended for private networks.
|
---|
614 | </para>
|
---|
615 | </listitem>
|
---|
616 |
|
---|
617 | <listitem>
|
---|
618 | <para>
|
---|
619 | The <emphasis role="bold">external</emphasis> method
|
---|
620 | provides external authentication through a special
|
---|
621 | authentication library. &product-name; ships with two
|
---|
622 | special authentication libraries:
|
---|
623 | </para>
|
---|
624 |
|
---|
625 | <orderedlist>
|
---|
626 |
|
---|
627 | <listitem>
|
---|
628 | <para>
|
---|
629 | The default authentication library,
|
---|
630 | <computeroutput>VBoxAuth</computeroutput>, authenticates
|
---|
631 | against user credentials of the hosts. Depending on the
|
---|
632 | host platform, this means the following:
|
---|
633 | </para>
|
---|
634 |
|
---|
635 | <itemizedlist>
|
---|
636 |
|
---|
637 | <listitem>
|
---|
638 | <para>
|
---|
639 | On Linux hosts,
|
---|
640 | <computeroutput>VBoxAuth.so</computeroutput>
|
---|
641 | authenticates users against the host's PAM system.
|
---|
642 | </para>
|
---|
643 | </listitem>
|
---|
644 |
|
---|
645 | <listitem>
|
---|
646 | <para>
|
---|
647 | On Windows hosts,
|
---|
648 | <computeroutput>VBoxAuth.dll</computeroutput>
|
---|
649 | authenticates users against the host's WinLogon
|
---|
650 | system.
|
---|
651 | </para>
|
---|
652 | </listitem>
|
---|
653 |
|
---|
654 | <listitem>
|
---|
655 | <para>
|
---|
656 | On Mac OS X hosts,
|
---|
657 | <computeroutput>VBoxAuth.dylib</computeroutput>
|
---|
658 | authenticates users against the host's directory
|
---|
659 | service.
|
---|
660 | </para>
|
---|
661 | </listitem>
|
---|
662 |
|
---|
663 | </itemizedlist>
|
---|
664 |
|
---|
665 | <para>
|
---|
666 | In other words, the external method by default performs
|
---|
667 | authentication with the user accounts that exist on the
|
---|
668 | host system. Any user with valid authentication
|
---|
669 | credentials is accepted. For example, the username does
|
---|
670 | not have to correspond to the user running the VM.
|
---|
671 | </para>
|
---|
672 | </listitem>
|
---|
673 |
|
---|
674 | <listitem>
|
---|
675 | <para>
|
---|
676 | An additional library called
|
---|
677 | <computeroutput>VBoxAuthSimple</computeroutput> performs
|
---|
678 | authentication against credentials configured in the
|
---|
679 | "extradata" section of a virtual machine's XML settings
|
---|
680 | file. This is probably the simplest way to get
|
---|
681 | authentication that does not depend on a running and
|
---|
682 | supported guest. The following steps are required:
|
---|
683 | </para>
|
---|
684 |
|
---|
685 | <orderedlist>
|
---|
686 |
|
---|
687 | <listitem>
|
---|
688 | <para>
|
---|
689 | Enable
|
---|
690 | <computeroutput>VBoxAuthSimple</computeroutput> with
|
---|
691 | the following command:
|
---|
692 | </para>
|
---|
693 |
|
---|
694 | <screen>VBoxManage setproperty vrdeauthlibrary "VBoxAuthSimple"</screen>
|
---|
695 | </listitem>
|
---|
696 |
|
---|
697 | <listitem>
|
---|
698 | <para>
|
---|
699 | To enable the library for a particular VM, you must
|
---|
700 | switch authentication to external, as follows:
|
---|
701 | </para>
|
---|
702 |
|
---|
703 | <screen>VBoxManage modifyvm "VM name" --vrdeauthtype external</screen>
|
---|
704 |
|
---|
705 | <para>
|
---|
706 | Replace <computeroutput><vm></computeroutput>
|
---|
707 | with the VM name or UUID.
|
---|
708 | </para>
|
---|
709 | </listitem>
|
---|
710 |
|
---|
711 | <listitem>
|
---|
712 | <para>
|
---|
713 | You then need to configure users and passwords by
|
---|
714 | writing items into the machine's extradata. Since
|
---|
715 | the XML machine settings file, into whose
|
---|
716 | <computeroutput>extradata</computeroutput> section
|
---|
717 | the password needs to be written, is a plain text
|
---|
718 | file, &product-name; uses hashes to encrypt
|
---|
719 | passwords. The following command must be used:
|
---|
720 | </para>
|
---|
721 |
|
---|
722 | <screen>VBoxManage setextradata "VM name" "VBoxAuthSimple/users/<user>" <hash></screen>
|
---|
723 |
|
---|
724 | <para>
|
---|
725 | Replace <computeroutput><vm></computeroutput>
|
---|
726 | with the VM name or UUID,
|
---|
727 | <computeroutput><user></computeroutput> with
|
---|
728 | the user name who should be allowed to log in and
|
---|
729 | <computeroutput><hash></computeroutput> with
|
---|
730 | the encrypted password. As an example, to obtain the
|
---|
731 | hash value for the password
|
---|
732 | <computeroutput>secret</computeroutput>, you can use
|
---|
733 | the following command:
|
---|
734 | </para>
|
---|
735 |
|
---|
736 | <screen>VBoxManage internalcommands passwordhash "secret"</screen>
|
---|
737 |
|
---|
738 | <para>
|
---|
739 | This command will generate output similar to the
|
---|
740 | following:
|
---|
741 | </para>
|
---|
742 |
|
---|
743 | <screen>2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b</screen>
|
---|
744 |
|
---|
745 | <para>
|
---|
746 | You then use <command>VBoxManage
|
---|
747 | setextradata</command> to store this value in the
|
---|
748 | machine's <computeroutput>extradata</computeroutput>
|
---|
749 | section.
|
---|
750 | </para>
|
---|
751 |
|
---|
752 | <para>
|
---|
753 | As a combined example, to set the password for the
|
---|
754 | user <computeroutput>john</computeroutput> and the
|
---|
755 | machine <computeroutput>My VM</computeroutput> to
|
---|
756 | <computeroutput>secret</computeroutput>, use this
|
---|
757 | command:
|
---|
758 | </para>
|
---|
759 |
|
---|
760 | <screen>VBoxManage setextradata "My VM" "VBoxAuthSimple/users/john"
|
---|
761 | 2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b</screen>
|
---|
762 | </listitem>
|
---|
763 |
|
---|
764 | </orderedlist>
|
---|
765 | </listitem>
|
---|
766 |
|
---|
767 | </orderedlist>
|
---|
768 | </listitem>
|
---|
769 |
|
---|
770 | <listitem>
|
---|
771 | <para>
|
---|
772 | The <emphasis role="bold">guest</emphasis> authentication
|
---|
773 | method performs authentication with a special component that
|
---|
774 | comes with the Guest Additions. As a result, authentication
|
---|
775 | is not performed on the host, but with the guest user
|
---|
776 | accounts.
|
---|
777 | </para>
|
---|
778 |
|
---|
779 | <para>
|
---|
780 | This method is currently still in testing and not yet
|
---|
781 | supported.
|
---|
782 | </para>
|
---|
783 | </listitem>
|
---|
784 |
|
---|
785 | </itemizedlist>
|
---|
786 |
|
---|
787 | <para>
|
---|
788 | In addition to the methods described above, you can replace the
|
---|
789 | default external authentication module with any other module.
|
---|
790 | For this, &product-name; provides a well-defined interface that
|
---|
791 | enables you to write your own authentication module. This is
|
---|
792 | described in detail in the &product-name; Software Development
|
---|
793 | Kit (SDK) reference. See <xref linkend="VirtualBoxAPI" />.
|
---|
794 | </para>
|
---|
795 |
|
---|
796 | </sect2>
|
---|
797 |
|
---|
798 | <sect2 id="vrde-crypt">
|
---|
799 |
|
---|
800 | <title>RDP Encryption</title>
|
---|
801 |
|
---|
802 | <para>
|
---|
803 | RDP features data stream encryption, which is based on the RC4
|
---|
804 | symmetric cipher, with keys up to 128-bit. The RC4 keys are
|
---|
805 | replaced at regular intervals, every 4096 packets.
|
---|
806 | </para>
|
---|
807 |
|
---|
808 | <para>
|
---|
809 | RDP provides the following different authentication methods:
|
---|
810 | </para>
|
---|
811 |
|
---|
812 | <itemizedlist>
|
---|
813 |
|
---|
814 | <listitem>
|
---|
815 | <para>
|
---|
816 | <emphasis role="bold">RDP4</emphasis> authentication was
|
---|
817 | used historically. With RDP4, the RDP client does not
|
---|
818 | perform any checks in order to verify the identity of the
|
---|
819 | server it connects to. Since user credentials can be
|
---|
820 | obtained using a man in the middle (MITM) attack, RDP4
|
---|
821 | authentication is insecure and should generally not be used.
|
---|
822 | </para>
|
---|
823 | </listitem>
|
---|
824 |
|
---|
825 | <listitem>
|
---|
826 | <para>
|
---|
827 | <emphasis role="bold">RDP5.1</emphasis> authentication
|
---|
828 | employs a server certificate for which the client possesses
|
---|
829 | the public key. This way it is guaranteed that the server
|
---|
830 | possess the corresponding private key. However, as this
|
---|
831 | hard-coded private key became public some years ago, RDP5.1
|
---|
832 | authentication is also insecure.
|
---|
833 | </para>
|
---|
834 | </listitem>
|
---|
835 |
|
---|
836 | <listitem>
|
---|
837 | <para>
|
---|
838 | <emphasis role="bold">RDP5.2</emphasis> authentication uses
|
---|
839 | Enhanced RDP Security, which means that an external security
|
---|
840 | protocol is used to secure the connection. RDP4 and RDP5.1
|
---|
841 | use Standard RDP Security. The VRDP server supports Enhanced
|
---|
842 | RDP Security with TLS protocol and, as a part of TLS
|
---|
843 | handshake, sends the server certificate to the client.
|
---|
844 | </para>
|
---|
845 |
|
---|
846 | <para>
|
---|
847 | The <computeroutput>Security/Method</computeroutput> VRDE
|
---|
848 | property sets the desired security method, which is used for
|
---|
849 | a connection. Valid values are as follows:
|
---|
850 | </para>
|
---|
851 |
|
---|
852 | <itemizedlist>
|
---|
853 |
|
---|
854 | <listitem>
|
---|
855 | <para>
|
---|
856 | <emphasis role="bold">Negotiate.</emphasis> Both
|
---|
857 | Enhanced (TLS) and Standard RDP Security connections are
|
---|
858 | allowed. The security method is negotiated with the
|
---|
859 | client. This is the default setting.
|
---|
860 | </para>
|
---|
861 | </listitem>
|
---|
862 |
|
---|
863 | <listitem>
|
---|
864 | <para>
|
---|
865 | <emphasis role="bold">RDP.</emphasis> Only Standard RDP
|
---|
866 | Security is accepted.
|
---|
867 | </para>
|
---|
868 | </listitem>
|
---|
869 |
|
---|
870 | <listitem>
|
---|
871 | <para>
|
---|
872 | <emphasis role="bold">TLS.</emphasis> Only Enhanced RDP
|
---|
873 | Security is accepted. The client must support TLS.
|
---|
874 | </para>
|
---|
875 |
|
---|
876 | <para>
|
---|
877 | The OpenSSL library version determines which versions of
|
---|
878 | TLS are supported. The &product-name; clients include at
|
---|
879 | least Version 1.1.0 of the OpenSSL library. This library
|
---|
880 | supports TLS versions 1.0, 1.1, and 1.2. Some clients
|
---|
881 | might include newer versions of the OpenSSL library and
|
---|
882 | thus support additional TLS versions.
|
---|
883 | </para>
|
---|
884 | </listitem>
|
---|
885 |
|
---|
886 | </itemizedlist>
|
---|
887 |
|
---|
888 | <para>
|
---|
889 | For example, the following command enables a client to use
|
---|
890 | either Standard or Enhanced RDP Security connection:
|
---|
891 | </para>
|
---|
892 |
|
---|
893 | <screen>vboxmanage modifyvm "VM name" --vrdeproperty "Security/Method=negotiate"</screen>
|
---|
894 |
|
---|
895 | <para>
|
---|
896 | If the <computeroutput>Security/Method</computeroutput>
|
---|
897 | property is set to either Negotiate or TLS, the TLS protocol
|
---|
898 | will be automatically used by the server, if the client
|
---|
899 | supports TLS. However, in order to use TLS the server must
|
---|
900 | possess the Server Certificate, the Server Private Key and
|
---|
901 | the Certificate Authority (CA) Certificate. The following
|
---|
902 | example shows how to generate a server certificate.
|
---|
903 | </para>
|
---|
904 |
|
---|
905 | <orderedlist>
|
---|
906 |
|
---|
907 | <listitem>
|
---|
908 | <para>
|
---|
909 | Create a CA self signed certificate.
|
---|
910 | </para>
|
---|
911 |
|
---|
912 | <screen>openssl req -new -x509 -days 365 -extensions v3_ca \
|
---|
913 | -keyout ca_key_private.pem -out ca_cert.pem</screen>
|
---|
914 | </listitem>
|
---|
915 |
|
---|
916 | <listitem>
|
---|
917 | <para>
|
---|
918 | Generate a server private key and a request for signing.
|
---|
919 | </para>
|
---|
920 |
|
---|
921 | <screen>openssl genrsa -out server_key_private.pem
|
---|
922 | openssl req -new -key server_key_private.pem -out server_req.pem</screen>
|
---|
923 | </listitem>
|
---|
924 |
|
---|
925 | <listitem>
|
---|
926 | <para>
|
---|
927 | Generate the server certificate.
|
---|
928 | </para>
|
---|
929 |
|
---|
930 | <screen>openssl x509 -req -days 365 -in server_req.pem \
|
---|
931 | -CA ca_cert.pem -CAkey ca_key_private.pem -set_serial 01 -out server_cert.pem</screen>
|
---|
932 | </listitem>
|
---|
933 |
|
---|
934 | </orderedlist>
|
---|
935 |
|
---|
936 | <para>
|
---|
937 | The server must be configured to access the required files.
|
---|
938 | For example:
|
---|
939 | </para>
|
---|
940 |
|
---|
941 | <screen>vboxmanage modifyvm "VM name" \
|
---|
942 | --vrdeproperty "Security/CACertificate=path/ca_cert.pem"</screen>
|
---|
943 |
|
---|
944 | <screen>vboxmanage modifyvm "VM name" \
|
---|
945 | --vrdeproperty "Security/ServerCertificate=path/server_cert.pem"</screen>
|
---|
946 |
|
---|
947 | <screen>vboxmanage modifyvm "VM name" \
|
---|
948 | --vrdeproperty "Security/ServerPrivateKey=path/server_key_private.pem"</screen>
|
---|
949 | </listitem>
|
---|
950 |
|
---|
951 | </itemizedlist>
|
---|
952 |
|
---|
953 | <para>
|
---|
954 | As the client that connects to the server determines what type
|
---|
955 | of encryption will be used, with <command>rdesktop</command>,
|
---|
956 | the Linux RDP viewer, use the
|
---|
957 | <computeroutput>-4</computeroutput> or
|
---|
958 | <computeroutput>-5</computeroutput> options.
|
---|
959 | </para>
|
---|
960 |
|
---|
961 | </sect2>
|
---|
962 |
|
---|
963 | <sect2 id="vrde-multiconnection">
|
---|
964 |
|
---|
965 | <title>Multiple Connections to the VRDP Server</title>
|
---|
966 |
|
---|
967 | <para>
|
---|
968 | The VRDP server of &product-name; supports multiple simultaneous
|
---|
969 | connections to the same running VM from different clients. All
|
---|
970 | connected clients see the same screen output and share a mouse
|
---|
971 | pointer and keyboard focus. This is similar to several people
|
---|
972 | using the same computer at the same time, taking turns at the
|
---|
973 | keyboard.
|
---|
974 | </para>
|
---|
975 |
|
---|
976 | <para>
|
---|
977 | The following command enables multiple connection mode:
|
---|
978 | </para>
|
---|
979 |
|
---|
980 | <screen>VBoxManage modifyvm "VM name" --vrdemulticon on</screen>
|
---|
981 |
|
---|
982 | </sect2>
|
---|
983 |
|
---|
984 | <sect2 id="vrde-multimonitor">
|
---|
985 |
|
---|
986 | <title>Multiple Remote Monitors</title>
|
---|
987 |
|
---|
988 | <para>
|
---|
989 | To access two or more remote VM displays you have to enable the
|
---|
990 | VRDP multiconnection mode. See
|
---|
991 | <xref linkend="vrde-multiconnection"/>.
|
---|
992 | </para>
|
---|
993 |
|
---|
994 | <para>
|
---|
995 | The RDP client can select the virtual monitor number to connect
|
---|
996 | to using the <computeroutput>domain</computeroutput> login
|
---|
997 | parameter (<computeroutput>-d</computeroutput>). If the
|
---|
998 | parameter ends with <computeroutput>@</computeroutput> followed
|
---|
999 | by a number, &product-name; interprets this number as the screen
|
---|
1000 | index. The primary guest screen is selected with
|
---|
1001 | <computeroutput>@1</computeroutput>, the first secondary screen
|
---|
1002 | is <computeroutput>@2</computeroutput>, and so on.
|
---|
1003 | </para>
|
---|
1004 |
|
---|
1005 | <para>
|
---|
1006 | The Microsoft RDP6 client does not let you specify a separate
|
---|
1007 | domain name. Instead, enter
|
---|
1008 | <computeroutput>domain\username</computeroutput> in the
|
---|
1009 | <emphasis role="bold">Username</emphasis> field. For example,
|
---|
1010 | <computeroutput>@2\name</computeroutput>.
|
---|
1011 | <computeroutput>name</computeroutput> must be supplied, and must
|
---|
1012 | be the name used to log in if the VRDP server is set up to
|
---|
1013 | require credentials. If it is not, you may use any text as the
|
---|
1014 | username.
|
---|
1015 | </para>
|
---|
1016 |
|
---|
1017 | </sect2>
|
---|
1018 |
|
---|
1019 | <sect2 id="vrde-videochannel">
|
---|
1020 |
|
---|
1021 | <title>VRDP Video Redirection</title>
|
---|
1022 |
|
---|
1023 | <para>
|
---|
1024 | The VRDP server can redirect video streams from the guest to the
|
---|
1025 | RDP client. Video frames are compressed using the JPEG algorithm
|
---|
1026 | allowing a higher compression ratio than standard RDP bitmap
|
---|
1027 | compression methods. It is possible to increase the compression
|
---|
1028 | ratio by lowering the video quality.
|
---|
1029 | </para>
|
---|
1030 |
|
---|
1031 | <para>
|
---|
1032 | The VRDP server automatically detects video streams in a guest
|
---|
1033 | as frequently updated rectangular areas. As a result, this
|
---|
1034 | method works with any guest operating system without having to
|
---|
1035 | install additional software in the guest. In particular, the
|
---|
1036 | Guest Additions are not required.
|
---|
1037 | </para>
|
---|
1038 |
|
---|
1039 | <para>
|
---|
1040 | On the client side, however, currently only the Windows 7 Remote
|
---|
1041 | Desktop Connection client supports this feature. If a client
|
---|
1042 | does not support video redirection, the VRDP server falls back
|
---|
1043 | to regular bitmap updates.
|
---|
1044 | </para>
|
---|
1045 |
|
---|
1046 | <para>
|
---|
1047 | The following command enables video redirection:
|
---|
1048 | </para>
|
---|
1049 |
|
---|
1050 | <screen>VBoxManage modifyvm "VM name" --vrdevideochannel on</screen>
|
---|
1051 |
|
---|
1052 | <para>
|
---|
1053 | The quality of the video is defined as a value from 10 to 100
|
---|
1054 | percent, representing a JPEG compression level, where lower
|
---|
1055 | numbers mean lower quality but higher compression. The quality
|
---|
1056 | can be changed using the following command:
|
---|
1057 | </para>
|
---|
1058 |
|
---|
1059 | <screen>VBoxManage modifyvm "VM name" --vrdevideochannelquality 75</screen>
|
---|
1060 |
|
---|
1061 | </sect2>
|
---|
1062 |
|
---|
1063 | <sect2 id="vrde-customization">
|
---|
1064 |
|
---|
1065 | <title>VRDP Customization</title>
|
---|
1066 |
|
---|
1067 | <para>
|
---|
1068 | With &product-name; it is possible to disable display output,
|
---|
1069 | mouse and keyboard input, audio, remote USB, or clipboard
|
---|
1070 | individually in the VRDP server.
|
---|
1071 | </para>
|
---|
1072 |
|
---|
1073 | <para>
|
---|
1074 | The following commands change the corresponding server settings:
|
---|
1075 | </para>
|
---|
1076 |
|
---|
1077 | <screen>VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableDisplay=1
|
---|
1078 | VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableInput=1
|
---|
1079 | VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableUSB=1
|
---|
1080 | VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableAudio=1
|
---|
1081 | VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableClipboard=1
|
---|
1082 | VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableUpstreamAudio=1</screen>
|
---|
1083 |
|
---|
1084 | <para>
|
---|
1085 | To reenable a feature, use a similar command without the
|
---|
1086 | trailing 1. For example:
|
---|
1087 | </para>
|
---|
1088 |
|
---|
1089 | <screen>VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableDisplay=</screen>
|
---|
1090 |
|
---|
1091 | </sect2>
|
---|
1092 |
|
---|
1093 | </sect1>
|
---|
1094 |
|
---|
1095 | <sect1 id="teleporting">
|
---|
1096 |
|
---|
1097 | <title>Teleporting</title>
|
---|
1098 |
|
---|
1099 | <para>
|
---|
1100 | &product-name; supports <emphasis>teleporting</emphasis>.
|
---|
1101 | Teleporting is moving a virtual machine over a network from one
|
---|
1102 | &product-name; host to another, while the virtual machine is
|
---|
1103 | running. This works regardless of the host operating system that
|
---|
1104 | is running on the hosts. You can teleport virtual machines between
|
---|
1105 | Oracle Solaris and Mac OS X hosts, for example.
|
---|
1106 | </para>
|
---|
1107 |
|
---|
1108 | <para>
|
---|
1109 | Teleporting requires that a machine be currently running on one
|
---|
1110 | host, which is called the <emphasis>source</emphasis>. The host to
|
---|
1111 | which the virtual machine will be teleported is called the
|
---|
1112 | <emphasis>target</emphasis>. The machine on the target is then
|
---|
1113 | configured to wait for the source to contact the target. The
|
---|
1114 | machine's running state will then be transferred from the source
|
---|
1115 | to the target with minimal downtime.
|
---|
1116 | </para>
|
---|
1117 |
|
---|
1118 | <para>
|
---|
1119 | Teleporting happens over any TCP/IP network. The source and the
|
---|
1120 | target only need to agree on a TCP/IP port which is specified in
|
---|
1121 | the teleporting settings.
|
---|
1122 | </para>
|
---|
1123 |
|
---|
1124 | <para>
|
---|
1125 | At this time, there are a few prerequisites for this to work, as
|
---|
1126 | follows:
|
---|
1127 | </para>
|
---|
1128 |
|
---|
1129 | <itemizedlist>
|
---|
1130 |
|
---|
1131 | <listitem>
|
---|
1132 | <para>
|
---|
1133 | On the target host, you must configure a virtual machine in
|
---|
1134 | &product-name; with exactly the same hardware settings as the
|
---|
1135 | machine on the source that you want to teleport. This does not
|
---|
1136 | apply to settings which are merely descriptive, such as the VM
|
---|
1137 | name, but obviously for teleporting to work, the target
|
---|
1138 | machine must have the same amount of memory and other hardware
|
---|
1139 | settings. Otherwise teleporting will fail with an error
|
---|
1140 | message.
|
---|
1141 | </para>
|
---|
1142 | </listitem>
|
---|
1143 |
|
---|
1144 | <listitem>
|
---|
1145 | <para>
|
---|
1146 | The two virtual machines on the source and the target must
|
---|
1147 | share the same storage, hard disks as well as floppy disks and
|
---|
1148 | CD/DVD images. This means that they either use the same iSCSI
|
---|
1149 | targets or that the storage resides somewhere on the network
|
---|
1150 | and both hosts have access to it using NFS or SMB/CIFS.
|
---|
1151 | </para>
|
---|
1152 |
|
---|
1153 | <para>
|
---|
1154 | This also means that neither the source nor the target machine
|
---|
1155 | can have any snapshots.
|
---|
1156 | </para>
|
---|
1157 | </listitem>
|
---|
1158 |
|
---|
1159 | </itemizedlist>
|
---|
1160 |
|
---|
1161 | <para>
|
---|
1162 | To configure teleporting, perform the following steps:
|
---|
1163 | </para>
|
---|
1164 |
|
---|
1165 | <orderedlist>
|
---|
1166 |
|
---|
1167 | <listitem>
|
---|
1168 | <para>
|
---|
1169 | On the <emphasis>target</emphasis> host, configure the virtual
|
---|
1170 | machine to wait for a teleport request to arrive when it is
|
---|
1171 | started, instead of actually attempting to start the machine.
|
---|
1172 | This is done with the following <command>VBoxManage</command>
|
---|
1173 | command:
|
---|
1174 | </para>
|
---|
1175 |
|
---|
1176 | <screen>VBoxManage modifyvm <targetvmname> --teleporter on --teleporterport <port></screen>
|
---|
1177 |
|
---|
1178 | <para>
|
---|
1179 | where <computeroutput><targetvmname></computeroutput> is
|
---|
1180 | the name of the virtual machine on the target host and
|
---|
1181 | <computeroutput><port></computeroutput> is a TCP/IP port
|
---|
1182 | number to be used on both the source and the target hosts. For
|
---|
1183 | example, use 6000. See
|
---|
1184 | <xref linkend="vboxmanage-modifyvm-teleport" />.
|
---|
1185 | </para>
|
---|
1186 | </listitem>
|
---|
1187 |
|
---|
1188 | <listitem>
|
---|
1189 | <para>
|
---|
1190 | Start the VM on the target host. Instead of running, the VM
|
---|
1191 | shows a progress dialog, indicating that it is waiting for a
|
---|
1192 | teleport request to arrive.
|
---|
1193 | </para>
|
---|
1194 | </listitem>
|
---|
1195 |
|
---|
1196 | <listitem>
|
---|
1197 | <para>
|
---|
1198 | Start the VM on the <emphasis>source</emphasis> host as usual.
|
---|
1199 | When it is running and you want it to be teleported, issue the
|
---|
1200 | following command on the source host:
|
---|
1201 | </para>
|
---|
1202 |
|
---|
1203 | <screen>VBoxManage controlvm <sourcevmname> teleport --host <targethost> --port <port></screen>
|
---|
1204 |
|
---|
1205 | <para>
|
---|
1206 | where <computeroutput><sourcevmname></computeroutput> is
|
---|
1207 | the name of the virtual machine on the source host, which is
|
---|
1208 | the machine that is currently running.
|
---|
1209 | <computeroutput><targethost></computeroutput> is the
|
---|
1210 | host or IP name of the target host on which the machine is
|
---|
1211 | waiting for the teleport request, and
|
---|
1212 | <computeroutput><port></computeroutput> must be the same
|
---|
1213 | number as specified in the command on the target host. See
|
---|
1214 | <xref linkend="vboxmanage-controlvm" />.
|
---|
1215 | </para>
|
---|
1216 | </listitem>
|
---|
1217 |
|
---|
1218 | </orderedlist>
|
---|
1219 |
|
---|
1220 | <para>
|
---|
1221 | For testing, you can also teleport machines on the same host. In
|
---|
1222 | that case, use localhost as the hostname on both the source and
|
---|
1223 | the target host.
|
---|
1224 | </para>
|
---|
1225 |
|
---|
1226 | <note>
|
---|
1227 | <para>
|
---|
1228 | In rare cases, if the CPUs of the source and the target are very
|
---|
1229 | different, teleporting can fail with an error message, or the
|
---|
1230 | target may hang. This may happen especially if the VM is running
|
---|
1231 | application software that is highly optimized to run on a
|
---|
1232 | particular CPU without correctly checking that certain CPU
|
---|
1233 | features are actually present. &product-name; filters what CPU
|
---|
1234 | capabilities are presented to the guest operating system.
|
---|
1235 | Advanced users can attempt to restrict these virtual CPU
|
---|
1236 | capabilities with the <computeroutput>VBoxManage modifyvm
|
---|
1237 | --cpuid</computeroutput> command. See
|
---|
1238 | <xref linkend="vboxmanage-modifyvm-teleport" />.
|
---|
1239 | </para>
|
---|
1240 | </note>
|
---|
1241 |
|
---|
1242 | </sect1>
|
---|
1243 |
|
---|
1244 | <xi:include href="user_man_VBoxHeadless.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
---|
1245 |
|
---|
1246 |
|
---|
1247 | </chapter>
|
---|