VirtualBox

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

Last change on this file since 95825 was 95323, checked in by vboxsync, 3 years ago

rdesktop-vrdp: Drop as it is too old and practically abandoned, bugref:10245

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

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