VirtualBox

source: vbox/trunk/doc/manual/en_US/user_Frontends.xml@ 53908

Last change on this file since 53908 was 51568, checked in by vboxsync, 11 years ago

doc/manual: fixed description about USB support in rdesktop-vrdp

File size: 41.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4<chapter>
5 <title>Remote virtual machines</title>
6
7 <sect1 id="vrde">
8 <title>Remote display (VRDP support)</title>
9
10 <para>VirtualBox can display virtual machines remotely, meaning that a
11 virtual machine can execute on one computer even though the machine will be
12 displayed on a second computer, and the machine will be controlled from
13 there as well, as if the virtual machine was running on that second
14 computer.</para>
15
16 <para>For maximum flexibility, starting with VirtualBox 4.0, VirtualBox
17 implements remote machine display through a generic extension interface,
18 the VirtualBox Remote Desktop Extension (VRDE). The base open-source
19 VirtualBox package only provides this interface, while implementations can
20 be supplied by third parties with VirtualBox extension packages, which
21 must be installed separately from the base package. See <xref
22 linkend="intro-installing" /> for more information.</para>
23
24 <para>Oracle provides support for the <emphasis role="bold">VirtualBox
25 Remote Display Protocol (VRDP)</emphasis> in such a VirtualBox extension
26 package. When this package is installed, VirtualBox versions 4.0 and later
27 support VRDP the same way as binary (non-open-source) versions of
28 VirtualBox before 4.0 did.</para>
29
30 <para>VRDP is a backwards-compatible extension to Microsoft's Remote
31 Desktop Protocol (RDP). As a result, you can use any standard RDP client
32 to control the remote VM.</para>
33
34 <para>Even when the extension is installed, the VRDP server is disabled by
35 default. It can easily be enabled on a per-VM basis either in the
36 VirtualBox Manager in the "Display" settings (see <xref
37 linkend="settings-display" />) or with
38 <computeroutput>VBoxManage</computeroutput>:<screen>VBoxManage modifyvm "VM name" --vrde on</screen></para>
39
40 <para>If you use <computeroutput>VBoxHeadless</computeroutput> (described
41 further below), VRDP support will be automatically enabled since
42 VBoxHeadless has no other means of output.</para>
43
44 <para>By default, the VRDP server uses TCP port
45 <computeroutput>3389</computeroutput>. You will need to change the
46 default port if you run more than one VRDP server, since the port can
47 only be used by one server at a time; you might also need to change it
48 on Windows hosts since the default port might already be used by the RDP
49 server that is built into Windows itself. Ports 5000 through 5050 are
50 typically not used and might be a good choice.</para>
51
52 <para>The port can be changed either in the "Display" settings of the
53 graphical user interface or with
54 <computeroutput>--vrdeport</computeroutput> option of the
55 <computeroutput>VBoxManage modifyvm</computeroutput> command. You can
56 specify a comma-separated list of ports or ranges of ports. Use a dash
57 between two port numbers to specify a range. The VRDP server will bind
58 to <emphasis role="bold">one</emphasis> of available ports from the
59 specified list. For example, <computeroutput>VBoxManage modifyvm "VM
60 name" --vrdeport 5000,5010-5012</computeroutput> will configure the
61 server to bind to one of the ports 5000, 5010, 5011 or 5012. See <xref
62 linkend="vboxmanage-modifyvm-vrde" /> for details.</para>
63
64 <para>The actual port used by a running VM can be either queried with
65 <computeroutput>VBoxManage showvminfo</computeroutput> command or seen
66 in the GUI on the "Runtime" tab of the "Session Information Dialog",
67 which is accessible via the "Machine" menu of the VM window.</para>
68
69 <para>Support for IPv6 has been implemented in VirtualBox 4.3.
70 If the host OS supports IPv6 the VRDP server will automatically
71 listen for IPv6 connections in addition to IPv4.</para>
72
73 <sect2 id="rdp-viewers">
74 <title>Common third-party RDP viewers</title>
75
76 <para>Since VRDP is backwards-compatible to RDP, you can use any
77 standard RDP viewer to connect to such a remote virtual machine
78 (examples follow below). For this to work, you must specify the
79 <emphasis role="bold">IP address</emphasis> of your
80 <emphasis>host</emphasis> system (not of the virtual machine!) as the
81 server address to connect to, as well as the <emphasis role="bold">port
82 number</emphasis> that the VRDP server is using.</para>
83
84 <para>Here follow examples for the most common RDP viewers:<itemizedlist>
85 <listitem>
86 <para>On Windows, you can use the Microsoft Terminal Services
87 Connector (<computeroutput>mstsc.exe</computeroutput>) that ships
88 with Windows. You can start it by bringing up the "Run" dialog
89 (press the Windows key and "R") and typing "mstsc". You can also
90 find it under "Start" -&gt; "All Programs" -&gt; "Accessories"
91 -&gt; "Remote Desktop Connection". If you use the "Run" dialog,
92 you can type in options directly:<screen>mstsc 1.2.3.4:3389</screen></para>
93
94 <para>Replace <computeroutput>1.2.3.4</computeroutput> with the host IP address,
95 and <computeroutput>3389</computeroutput> with a different port if necessary.</para>
96
97 <note>
98 <para>IPv6 address must be enclosed in square brackets to specify a port.
99 For example: <computeroutput>mstsc [fe80::1:2:3:4]:3389</computeroutput></para>
100 </note>
101
102 <note>
103 <para>When connecting to localhost in order to test the
104 connection, the addresses
105 <computeroutput>localhost</computeroutput> and
106 <computeroutput>127.0.0.1</computeroutput> might not work using
107 <computeroutput>mstsc.exe</computeroutput>. Instead, the address
108 <computeroutput>127.0.0.2[:3389]</computeroutput> has to be
109 used.</para>
110 </note>
111 </listitem>
112
113 <listitem>
114 <para>On other systems, you can use the standard open-source
115 <computeroutput>rdesktop</computeroutput> program. This ships with
116 most Linux distributions, but VirtualBox also comes with a
117 modified variant of rdesktop for remote USB support (see <xref
118 linkend="usb-over-rdp" /> below).</para>
119
120 <para>With rdesktop, use a command line such as the
121 following:<screen>rdesktop -a 16 -N 1.2.3.4:3389</screen></para>
122
123 <para>As said for the Microsoft viewer above, replace <computeroutput>1.2.3.4</computeroutput>
124 with the host IP address, and <computeroutput>3389</computeroutput> with a different port if
125 necessary. The <computeroutput>-a 16</computeroutput> option
126 requests a color depth of 16 bits per pixel, which we recommend.
127 (For best performance, after installation of the guest operating
128 system, you should set its display color depth to the same value).
129 The <computeroutput>-N</computeroutput> option enables use of the
130 NumPad keys.</para>
131 </listitem>
132
133 <listitem>
134 <para>If you run the KDE desktop, you might prefer
135 <computeroutput>krdc</computeroutput>, the KDE RDP viewer. The
136 command line would look like this:<screen>krdc rdp://1.2.3.4:3389</screen></para>
137
138 <para>Again, replace <computeroutput>1.2.3.4</computeroutput> with the host IP address,
139 and <computeroutput>3389</computeroutput> with a different port if necessary.
140 The "rdp://" bit is required with krdc to switch it into RDP mode.</para>
141 </listitem>
142
143 <listitem>
144 <para>With Sun Ray thin clients you can use
145 <computeroutput>uttsc</computeroutput>, which is part of the
146 Sun Ray Windows Connector package. See the corresponding
147 documentation for details.</para>
148 </listitem>
149 </itemizedlist></para>
150 </sect2>
151
152 <sect2 id="vboxheadless">
153 <title>VBoxHeadless, the remote desktop server</title>
154
155 <para>While any VM started from the VirtualBox Manager is capable of
156 running virtual machines remotely, it is not convenient to have to run
157 the full-fledged GUI if you never want to have VMs displayed locally in
158 the first place. In particular, if you are running server hardware whose
159 only purpose is to host VMs, and all your VMs are supposed to run
160 remotely over VRDP, then it is pointless to have a graphical user
161 interface on the server at all -- especially since, on a Linux or
162 Solaris host, the VirtualBox manager comes with dependencies on the Qt
163 and SDL libraries. This is inconvenient if you would rather not have the
164 X Window system on your server at all.</para>
165
166 <para>VirtualBox therefore comes with yet another front-end called
167 <computeroutput>VBoxHeadless</computeroutput>, which produces no visible
168 output on the host at all, but instead only delivers VRDP data. This
169 front-end has no dependencies on the X Window system on Linux and
170 Solaris hosts.<footnote>
171 <para>Before VirtualBox 1.6, the headless server was called
172 <computeroutput>VBoxVRDP</computeroutput>. For the sake of backwards
173 compatibility, the VirtualBox installation still installs an
174 executable with that name as well.</para>
175 </footnote></para>
176
177 <para>To start a virtual machine with
178 <computeroutput>VBoxHeadless</computeroutput>, you have three
179 options:</para>
180
181 <itemizedlist>
182 <listitem>
183 <para>You can use <screen>VBoxManage startvm "VM name" --type headless</screen>The
184 extra <computeroutput>--type</computeroutput> option causes
185 VirtualBox to use <computeroutput>VBoxHeadless</computeroutput> as
186 the front-end to the internal virtualization engine instead of the
187 Qt front-end.</para>
188 </listitem>
189
190 <listitem>
191 <para>One alternative is to use
192 <computeroutput>VBoxHeadless</computeroutput> directly, as
193 follows:<screen>VBoxHeadless --startvm &lt;uuid|name&gt;</screen></para>
194
195 <para>This way of starting the VM helps troubleshooting problems
196 reported by <computeroutput>VBoxManage startvm ...</computeroutput>
197 because you can see sometimes more detailed error messages,
198 especially for early failures before the VM execution is started.
199 In normal situations <computeroutput>VBoxManage startvm</computeroutput>
200 is preferred since it runs the VM directly as a background process
201 which has to be done explicitly when directly starting
202 <computeroutput>VBoxHeadless</computeroutput>.</para>
203 </listitem>
204
205 <listitem>
206 <para>The other alternative is to start
207 <computeroutput>VBoxHeadless</computeroutput> from the VirtualBox
208 Manager GUI, by holding the Shift key when starting a virtual
209 machine.
210 </para>
211 </listitem>
212 </itemizedlist>
213
214 <para>Note that when you use
215 <computeroutput>VBoxHeadless</computeroutput> to start a VM, since the
216 headless server has no other means of output, the VRDP server will
217 <emphasis>always</emphasis> be enabled, regardless of whether you had
218 enabled the VRDP server in the VM's settings. If this is undesirable
219 (for example because you want to access the VM via
220 <computeroutput>ssh</computeroutput> only), start the VM like
221 this:<screen>VBoxHeadless --startvm &lt;uuid|name&gt; --vrde off</screen>To
222 have the VRDP server enabled depending on the VM configuration, as the
223 other front-ends would, use this:<screen>VBoxHeadless --startvm &lt;uuid|name&gt; --vrde config</screen></para>
224
225 <para>If you start the VM with <computeroutput>VBoxManage startvm ...</computeroutput>
226 then the configuration settings of the VM are always used.</para>
227 </sect2>
228
229 <sect2>
230 <title>Step by step: creating a virtual machine on a headless
231 server</title>
232
233 <para>The following instructions may give you an idea how to create a
234 virtual machine on a headless server over a network connection. We will
235 create a virtual machine, establish an RDP connection and install a
236 guest operating system -- all without having to touch the headless
237 server. All you need is the following:</para>
238
239 <para><orderedlist>
240 <listitem>
241 <para>VirtualBox on a server machine with a supported host
242 operating system. The VirtualBox extension pack for the VRDP
243 server must be installed (see the previous section). For the
244 following example, we will assume a Linux server.</para>
245 </listitem>
246
247 <listitem>
248 <para>An ISO file accessible from the server, containing the
249 installation data for the guest operating system to install (we
250 will assume Windows XP in the following example).</para>
251 </listitem>
252
253 <listitem>
254 <para>A terminal connection to that host through which you can
255 access a command line (e.g. via
256 <computeroutput>ssh</computeroutput>).</para>
257 </listitem>
258
259 <listitem>
260 <para>An RDP viewer on the remote client; see <xref
261 linkend="rdp-viewers" /> above for examples.</para>
262 </listitem>
263 </orderedlist>Note again that on the server machine, since we will
264 only use the headless server, neither Qt nor SDL nor the X Window system
265 will be needed.</para>
266
267 <para><orderedlist>
268 <listitem>
269 <para>On the headless server, create a new virtual machine:</para>
270
271 <screen>VBoxManage createvm --name "Windows XP" --ostype WindowsXP --register</screen>
272
273 <para>Note that if you do not specify
274 <computeroutput>--register</computeroutput>, you will have to
275 manually use the <computeroutput>registervm</computeroutput>
276 command later.</para>
277
278 <para>Note further that you do not need to specify
279 <computeroutput>--ostype</computeroutput>, but doing so selects
280 some sane default values for certain VM parameters, for example
281 the RAM size and the type of the virtual network device. To get a
282 complete list of supported operating systems you can use</para>
283
284 <screen>VBoxManage list ostypes</screen>
285 </listitem>
286
287 <listitem>
288 <para>Make sure the settings for this VM are appropriate for the
289 guest operating system that we will install. For example:<screen>VBoxManage modifyvm "Windows XP" --memory 256 --acpi on --boot1 dvd --nic1 nat</screen></para>
290 </listitem>
291
292 <listitem>
293 <para>Create a virtual hard disk for the VM (in this case, 10GB in
294 size):<screen>VBoxManage createhd --filename "WinXP.vdi" --size 10000</screen></para>
295 </listitem>
296
297 <listitem>
298 <para>Add an IDE Controller to the new VM:<screen>VBoxManage storagectl "Windows XP" --name "IDE Controller"
299 --add ide --controller PIIX4</screen></para>
300 </listitem>
301
302 <listitem>
303 <para>Set the VDI file created above as the first virtual hard
304 disk of the new VM:<screen>VBoxManage storageattach "Windows XP" --storagectl "IDE Controller"
305 --port 0 --device 0 --type hdd --medium "WinXP.vdi"</screen></para>
306 </listitem>
307
308 <listitem>
309 <para>Attach the ISO file that contains the operating system
310 installation that you want to install later to the virtual
311 machine, so the machine can boot from it:<screen>VBoxManage storageattach "Windows XP" --storagectl "IDE Controller"
312 --port 0 --device 1 --type dvddrive --medium /full/path/to/iso.iso</screen></para>
313 </listitem>
314
315 <listitem>
316 <para>Start the virtual machine using VBoxHeadless:<screen>VBoxHeadless --startvm "Windows XP"</screen></para>
317
318 <para>If everything worked, you should see a copyright notice. If,
319 instead, you are returned to the command line, then something went
320 wrong.</para>
321 </listitem>
322
323 <listitem>
324 <para>On the client machine, fire up the RDP viewer and try to
325 connect to the server (see <xref linkend="rdp-viewers" /> above
326 for how to use various common RDP viewers).</para>
327
328 <para>You should now be seeing the installation routine of your
329 guest operating system remotely in the RDP viewer.</para>
330 </listitem>
331 </orderedlist></para>
332 </sect2>
333
334 <sect2 id="usb-over-rdp">
335 <title>Remote USB</title>
336
337 <para>As a special feature on top of the VRDP support, VirtualBox
338 supports remote USB devices over the wire as well. That is, the
339 VirtualBox guest that runs on one computer can access the USB devices of
340 the remote computer on which the VRDP data is being displayed the same
341 way as USB devices that are connected to the actual host. This allows
342 for running virtual machines on a VirtualBox host that acts as a server,
343 where a client can connect from elsewhere that needs only a network
344 adapter and a display capable of running an RDP viewer. When USB devices
345 are plugged into the client, the remote VirtualBox server can access
346 them.</para>
347
348 <para>For these remote USB devices, the same filter rules apply as for
349 other USB devices, as described with <xref linkend="settings-usb" />.
350 All you have to do is specify "Remote" (or "Any") when setting up these
351 rules.</para>
352
353 <para>Accessing remote USB devices is only possible if the RDP client
354 supports this extension. On Linux and Solaris hosts, the VirtualBox
355 installation provides a suitable VRDP client called
356 <computeroutput>rdesktop-vrdp</computeroutput>. Recent versions of
357 <computeroutput>uttsc</computeroutput>, a client tailored for the use
358 with Sun Ray thin clients, also support accessing remote USB devices.
359 RDP clients for other platforms will be provided in future VirtualBox
360 versions.</para>
361
362 <para>To make a remote USB device available to a VM,
363 <computeroutput>rdesktop-vrdp</computeroutput> should be started as
364 follows:<screen>rdesktop-vrdp -r usb -a 16 -N my.host.address</screen>
365 Please refer to <xref linkend="ts_usb-linux" /> for further details on how
366 to properly set up the permissions for USB devices. Furthermore it is
367 advisable to
368 disable automatic loading of any host driver on the remote host which
369 might work on USB devices to ensure that the devices are accessible by
370 the RDP client. If the setup was properly done on the remote host,
371 plug/unplug events are visible on the VBox.log file of the VM.</para>
372 </sect2>
373
374 <sect2 id="vbox-auth">
375 <title>RDP authentication</title>
376
377 <para>For each virtual machine that is remotely accessible via RDP, you
378 can individually determine if and how client connections are
379 authenticated. For this, use <computeroutput>VBoxManage
380 modifyvm</computeroutput> command with the
381 <computeroutput>--vrdeauthtype</computeroutput> option; see <xref
382 linkend="vboxmanage-modifyvm" /> for a general introduction. Three
383 methods of authentication are available:<itemizedlist>
384 <listitem>
385 <para>The "null" method means that there is no authentication at
386 all; any client can connect to the VRDP server and thus the
387 virtual machine. This is, of course, very insecure and only to be
388 recommended for private networks.</para>
389 </listitem>
390
391 <listitem>
392 <para>The "external" method provides external authentication
393 through a special authentication library. VirtualBox ships with
394 two such authentication libraries:<orderedlist>
395 <listitem>
396 <para>The default authentication library,
397 <computeroutput>VBoxAuth</computeroutput>, authenticates
398 against user credentials of the hosts. Depending on the host
399 platform, this means:<itemizedlist>
400 <listitem>
401 <para>On Linux hosts,
402 <computeroutput>VBoxAuth.so</computeroutput>
403 authenticates users against the host's PAM
404 system.</para>
405 </listitem>
406
407 <listitem>
408 <para>On Windows hosts,
409 <computeroutput>VBoxAuth.dll</computeroutput>
410 authenticates users against the host's WinLogon
411 system.</para>
412 </listitem>
413
414 <listitem>
415 <para>On Mac OS X hosts,
416 <computeroutput>VBoxAuth.dylib</computeroutput>
417 authenticates users against the host's directory
418 service.<footnote>
419 <para>Support for Mac OS X was added in version
420 3.2.</para>
421 </footnote></para>
422 </listitem>
423 </itemizedlist></para>
424
425 <para>In other words, the "external" method per default
426 performs authentication with the user accounts that exist on
427 the host system. Any user with valid authentication
428 credentials is accepted, i.e. the username does not have to
429 correspond to the user running the VM.</para>
430 </listitem>
431
432 <listitem>
433 <para>An additional library called
434 <computeroutput>VBoxAuthSimple</computeroutput> performs
435 authentication against credentials configured in the
436 "extradata" section of a virtual machine's XML settings
437 file. This is probably the simplest way to get
438 authentication that does not depend on a running and
439 supported guest (see below). The following steps are
440 required:<orderedlist>
441 <listitem>
442 <para>Enable
443 <computeroutput>VBoxAuthSimple</computeroutput> with
444 the following command:</para>
445
446 <para><screen>VBoxManage setproperty vrdeauthlibrary "VBoxAuthSimple"</screen></para>
447 </listitem>
448
449 <listitem>
450 <para>To enable the library for a particular VM, you
451 must then switch authentication to external:<screen>VBoxManage modifyvm "VM name" --vrdeauthtype external</screen></para>
452
453 <para>Replace
454 <computeroutput>&lt;vm&gt;</computeroutput> with the
455 VM name or UUID.</para>
456 </listitem>
457
458 <listitem>
459 <para>You will then need to configure users and
460 passwords by writing items into the machine's
461 extradata. Since the XML machine settings file, into
462 whose "extradata" section the password needs to be
463 written, is a plain text file, VirtualBox uses hashes
464 to encrypt passwords. The following command must be
465 used:<screen>VBoxManage setextradata "VM name" "VBoxAuthSimple/users/&lt;user&gt;" &lt;hash&gt;</screen></para>
466
467 <para>Replace
468 <computeroutput>&lt;vm&gt;</computeroutput> with the
469 VM name or UUID,
470 <computeroutput>&lt;user&gt;</computeroutput> with the
471 user name who should be allowed to log in and
472 <computeroutput>&lt;hash&gt;</computeroutput> with the
473 encrypted password. As an example, to obtain the hash
474 value for the password "secret", you can use the
475 following command:<screen>VBoxManage internalcommands passwordhash "secret"</screen></para>
476
477 <para>This will print
478 <screen>2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b</screen>
479 You can then use VBoxManage setextradata to store this
480 value in the machine's "extradata" section.</para>
481
482 <para>As example, combined together, to set the
483 password for the user "john" and the machine "My VM"
484 to "secret", use this command:<screen>VBoxManage setextradata "My VM" "VBoxAuthSimple/users/john"
485 2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b</screen></para>
486 </listitem>
487 </orderedlist></para>
488 </listitem>
489 </orderedlist></para>
490 </listitem>
491
492 <listitem>
493 <para>Finally, the "guest" authentication method performs
494 authentication with a special component that comes with the Guest
495 Additions; as a result, authentication is not performed on the
496 host, but with the <emphasis>guest</emphasis> user
497 accounts.</para>
498
499 <para>This method is currently still in testing and not yet
500 supported.</para>
501 </listitem>
502 </itemizedlist></para>
503
504 <para>In addition to the methods described above, you can replace the
505 default "external" authentication module with any other module. For
506 this, VirtualBox provides a well-defined interface that allows you to
507 write your own authentication module. This is described in detail in the
508 VirtualBox Software Development Kit (SDK) reference; please see <xref
509 linkend="VirtualBoxAPI" /> for details.</para>
510 </sect2>
511
512 <sect2 id="vrde-crypt">
513 <title>RDP encryption</title>
514
515 <para>RDP features data stream encryption, which is based on the RC4
516 symmetric cipher (with keys up to 128bit). The RC4 keys are being
517 replaced in regular intervals (every 4096 packets).</para>
518
519 <para>RDP provides different authentication methods:<orderedlist>
520 <listitem>
521 <para>Historically, RDP4 authentication was used, with which the
522 RDP client does not perform any checks in order to verify the
523 identity of the server it connects to. Since user credentials can
524 be obtained using a "man in the middle" (MITM) attack, RDP4
525 authentication is insecure and should generally not be
526 used.</para>
527 </listitem>
528
529 <listitem>
530 <para>RDP5.1 authentication employs a server certificate for which
531 the client possesses the public key. This way it is guaranteed
532 that the server possess the corresponding private key. However, as
533 this hard-coded private key became public some years ago, RDP5.1
534 authentication is also insecure.</para>
535 </listitem>
536
537 <listitem>
538 <para>RDP5.2 authentication uses the Enhanced RDP Security, which
539 means that an external security protocol is used to secure the
540 connection. RDP4 and RDP5.1 use Standard RDP Security.
541 The VRDP server supports Enhanced RDP Security with TLS protocol and,
542 as a part of TLS handshake, sends the server certificate to the
543 client.</para>
544
545 <para>The <computeroutput>Security/Method</computeroutput> VRDE
546 property sets the desired security method, which is used for a
547 connection. Valid values are:<itemizedlist>
548 <listitem>
549 <para>
550 <computeroutput>Negotiate</computeroutput> - both Enhanced (TLS)
551 and Standard RDP Security connections are allowed. The security
552 method is negotiated with the client. This is the default setting.
553 </para>
554 </listitem>
555
556 <listitem>
557 <para>
558 <computeroutput>RDP</computeroutput> - only Standard RDP Security
559 is accepted.</para>
560 </listitem>
561
562 <listitem>
563 <para>
564 <computeroutput>TLS</computeroutput> - only Enhanced RDP Security
565 is accepted. The client must support TLS.</para>
566 </listitem>
567 </itemizedlist>
568 For example the following command allows a client to use either Standard
569 or Enhanced RDP Security connection:
570 <screen>vboxmanage modifyvm "VM name" --vrdeproperty "Security/Method=negotiate"</screen>
571 </para>
572
573 <para>If the <computeroutput>Security/Method</computeroutput> property is
574 set to either <computeroutput>Negotiate</computeroutput> or
575 <computeroutput>TLS</computeroutput>, the TLS protocol will be automatically
576 used by the server, if the client supports TLS. However, in order to use TLS
577 the server must possess the Server Certificate, the Server Private Key and the
578 Certificate Authority (CA) Certificate. The following example shows how to
579 generate a server certificate.<orderedlist>
580 <listitem>
581 Create a CA self signed certificate:
582 <screen>openssl req -new -x509 -days 365 -extensions v3_ca \
583 -keyout ca_key_private.pem -out ca_cert.pem</screen>
584 </listitem>
585
586 <listitem>
587 Generate a server private key and a request for signing:
588 <screen>openssl genrsa -out server_key_private.pem
589openssl req -new -key server_key_private.pem -out server_req.pem</screen>
590 </listitem>
591
592 <listitem>
593 Generate the server certificate:
594 <screen>openssl x509 -req -days 365 -in server_req.pem \
595 -CA ca_cert.pem -CAkey ca_key_private.pem -set_serial 01 -out server_cert.pem</screen>
596 </listitem>
597 </orderedlist>
598 The server must be configured to access the required files:
599 <screen>vboxmanage modifyvm "VM name" \
600 --vrdeproperty "Security/CACertificate=path/ca_cert.pem"</screen>
601 <screen>vboxmanage modifyvm "VM name" \
602 --vrdeproperty "Security/ServerCertificate=path/server_cert.pem"</screen>
603 <screen>vboxmanage modifyvm "VM name" \
604 --vrdeproperty "Security/ServerPrivateKey=path/server_key_private.pem"</screen>
605 </para>
606 </listitem>
607 </orderedlist></para>
608
609 <para>As the client that connects to the server determines what type
610 of encryption will be used, with rdesktop, the Linux RDP viewer, use the
611 <computeroutput>-4</computeroutput> or
612 <computeroutput>-5</computeroutput> options.</para>
613 </sect2>
614
615 <sect2 id="vrde-multiconnection">
616 <title>Multiple connections to the VRDP server</title>
617
618 <para>The VRDP server of VirtualBox supports multiple simultaneous
619 connections to the same running VM from different clients. All connected
620 clients see the same screen output and share a mouse pointer and
621 keyboard focus. This is similar to several people using the same
622 computer at the same time, taking turns at the keyboard.</para>
623
624 <para>The following command enables multiple connection mode: <screen>VBoxManage modifyvm "VM name" --vrdemulticon on</screen></para>
625 </sect2>
626
627 <sect2 id="vrde-multimonitor">
628 <title>Multiple remote monitors</title>
629
630 <para>To access two or more remote VM displays you have to enable the
631 VRDP multiconnection mode (see <xref
632 linkend="vrde-multiconnection" />).</para>
633
634 <para>The RDP client can select the virtual monitor number to connect to
635 using the <computeroutput>domain</computeroutput> logon parameter
636 (<computeroutput>-d</computeroutput>). If the parameter ends with
637 <computeroutput>@</computeroutput> followed by a number, VirtualBox
638 interprets this number as the screen index. The primary guest screen is
639 selected with <computeroutput>@1</computeroutput>, the first secondary
640 screen is <computeroutput>@2</computeroutput>, etc.</para>
641
642 <para>The Microsoft RDP6 client does not let you specify a separate
643 domain name. Instead, use
644 <computeroutput>domain\username</computeroutput> in the
645 <computeroutput>Username:</computeroutput> field -- for example,
646 <computeroutput>@2\name</computeroutput>.
647 <computeroutput>name</computeroutput> must be supplied, and must be the
648 name used to log in if the VRDP server is set up to require credentials.
649 If it is not, you may use any text as the username.</para>
650 </sect2>
651
652 <sect2 id="vrde-videochannel">
653 <title>VRDP video redirection</title>
654
655 <para>Starting with VirtualBox 3.2, the VRDP server can redirect video
656 streams from the guest to the RDP client. Video frames are compressed
657 using the JPEG algorithm allowing a higher compression ratio than
658 standard RDP bitmap compression methods. It is possible to increase the
659 compression ratio by lowering the video quality.</para>
660
661 <para>The VRDP server automatically detects video streams in a guest as
662 frequently updated rectangular areas. As a result, this method works
663 with any guest operating system without having to install additional
664 software in the guest; in particular, the Guest Additions are not
665 required.</para>
666
667 <para>On the client side, however, currently only the Windows 7 Remote
668 Desktop Connection client supports this feature. If a client does not
669 support video redirection, the VRDP server falls back to regular bitmap
670 updates.</para>
671
672 <para>The following command enables video redirection: <screen>VBoxManage modifyvm "VM name" --vrdevideochannel on</screen></para>
673
674 <para>The quality of the video is defined as a value from 10 to 100
675 percent, representing a JPEG compression level (where lower numbers mean
676 lower quality but higher compression). The quality can be changed using
677 the following command: <screen>VBoxManage modifyvm "VM name" --vrdevideochannelquality 75</screen></para>
678 </sect2>
679
680 <sect2 id="vrde-customization">
681 <title>VRDP customization</title>
682
683 <para>With VirtualBox 4.0 it is possible to disable display output,
684 mouse and keyboard input, audio, remote USB or clipboard individually in
685 the VRDP server.</para>
686
687 <para>The following commands change corresponding server
688 settings:</para>
689
690 <screen>VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableDisplay=1
691VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableInput=1
692VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableUSB=1
693VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableAudio=1
694VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableClipboard=1
695VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableUpstreamAudio=1</screen>
696
697 <para>To reenable a feature use a similar command without the trailing
698 1. For example: <screen>VBoxManage modifyvm "VM name" --vrdeproperty Client/DisableDisplay=</screen></para>
699
700 <para>These properties were introduced with VirtualBox 3.2.10. However,
701 in the 3.2.x series, it was necessary to use the following commands to
702 alter these settings instead:</para>
703
704 <screen>VBoxManage setextradata "VM name" "VRDP/Feature/Client/DisableDisplay" 1
705VBoxManage setextradata "VM name" "VRDP/Feature/Client/DisableInput" 1
706VBoxManage setextradata "VM name" "VRDP/Feature/Client/DisableUSB" 1
707VBoxManage setextradata "VM name" "VRDP/Feature/Client/DisableAudio" 1
708VBoxManage setextradata "VM name" "VRDP/Feature/Client/DisableClipboard" 1</screen>
709
710 <para>To reenable a feature use a similar command without the trailing
711 1. For example: <screen>VBoxManage setextradata "VM name" "VRDP/Feature/Client/DisableDisplay"</screen></para>
712 </sect2>
713 </sect1>
714
715 <sect1 id="teleporting">
716 <title>Teleporting</title>
717
718 <para>Starting with version 3.1, VirtualBox supports "teleporting" -- that
719 is, moving a virtual machine over a network from one VirtualBox host to
720 another, while the virtual machine is running. This works regardless of
721 the host operating system that is running on the hosts: you can teleport
722 virtual machines between Solaris and Mac hosts, for example.</para>
723
724 <para>Teleporting requires that a machine be currently running on one
725 host, which is then called the <emphasis role="bold">"source"</emphasis>.
726 The host to which the virtual machine will be teleported will then be
727 called the <emphasis role="bold">"target"</emphasis>; the machine on the
728 target is then configured to wait for the source to contact the target.
729 The machine's running state will then be transferred from the source to
730 the target with minimal downtime.</para>
731
732 <para>Teleporting happens over any TCP/IP network; the source and the
733 target only need to agree on a TCP/IP port which is specified in the
734 teleporting settings.</para>
735
736 <para>At this time, there are a few prerequisites for this to work,
737 however:<orderedlist>
738 <listitem>
739 <para>On the target host, you must configure a virtual machine in
740 VirtualBox with exactly the same hardware settings as the machine on
741 the source that you want to teleport. This does not apply to
742 settings which are merely descriptive, such as the VM name, but
743 obviously for teleporting to work, the target machine must have the
744 same amount of memory and other hardware settings. Otherwise
745 teleporting will fail with an error message.</para>
746 </listitem>
747
748 <listitem>
749 <para>The two virtual machines on the source and the target must
750 share the same storage (hard disks as well as floppy and CD/DVD
751 images). This means that they either use the same iSCSI targets or
752 that the storage resides somewhere on the network and both hosts
753 have access to it via NFS or SMB/CIFS.</para>
754
755 <para>This also means that neither the source nor the target machine
756 can have any snapshots.</para>
757 </listitem>
758 </orderedlist></para>
759
760 <para>Then perform the following steps:<orderedlist>
761 <listitem>
762 <para>On the <emphasis>target</emphasis> host, configure the virtual
763 machine to wait for a teleport request to arrive when it is started,
764 instead of actually attempting to start the machine. This is done
765 with the following VBoxManage command:<screen>VBoxManage modifyvm &lt;targetvmname&gt; --teleporter on --teleporterport &lt;port&gt;</screen></para>
766
767 <para>where <computeroutput>&lt;targetvmname&gt;</computeroutput> is
768 the name of the virtual machine on the target host and
769 <computeroutput>&lt;port&gt;</computeroutput> is a TCP/IP port
770 number to be used on both the source and the target hosts. For
771 example, use 6000. For details, see <xref
772 linkend="vboxmanage-modifyvm-teleport" />.</para>
773 </listitem>
774
775 <listitem>
776 <para>Start the VM on the target host. You will see that instead of
777 actually running, it will show a progress dialog. indicating that it
778 is waiting for a teleport request to arrive.</para>
779 </listitem>
780
781 <listitem>
782 <para>Start the machine on the <emphasis>source</emphasis> host as
783 usual. When it is running and you want it to be teleported, issue
784 the following command on the source host:<screen>VBoxManage controlvm &lt;sourcevmname&gt; teleport --host &lt;targethost&gt; --port &lt;port&gt;</screen></para>
785
786 <para>where <computeroutput>&lt;sourcevmname&gt;</computeroutput> is
787 the name of the virtual machine on the source host (the machine that
788 is currently running),
789 <computeroutput>&lt;targethost&gt;</computeroutput> is the host or
790 IP name of the target host on which the machine is waiting for the
791 teleport request, and <computeroutput>&lt;port&gt;</computeroutput>
792 must be the same number as specified in the command on the target
793 host. For details, see <xref
794 linkend="vboxmanage-controlvm" />.</para>
795 </listitem>
796 </orderedlist></para>
797
798 <para>For testing, you can also teleport machines on the same host; in
799 that case, use "localhost" as the hostname on both the source and the
800 target host.<note>
801 <para>In rare cases, if the CPUs of the source and the target are very
802 different, teleporting can fail with an error message, or the target
803 may hang. This may happen especially if the VM is running application
804 software that is highly optimized to run on a particular CPU without
805 correctly checking that certain CPU features are actually present.
806 VirtualBox filters what CPU capabilities are presented to the guest
807 operating system. Advanced users can attempt to restrict these virtual
808 CPU capabilities with the <computeroutput>VBoxManage --modifyvm
809 --cpuid</computeroutput> command; see <xref
810 linkend="vboxmanage-modifyvm-teleport" />.</para>
811 </note></para>
812 </sect1>
813</chapter>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette