VirtualBox

source: vbox/trunk/doc/manual/fr_FR/user_Frontends.xml@ 38687

最後變更 在這個檔案從38687是 38233,由 vboxsync 提交於 13 年 前

doc/manual: more French translation, contributed by Jean-Philippe Mengual

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

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