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