VirtualBox

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

最後變更 在這個檔案從35173是 34693,由 vboxsync 提交於 14 年 前

Manual: fixes

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

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