1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
<chapter id="Introduction">
<title>First Steps</title>
<para>
Welcome to &product-name;.
</para>
<para>
&product-name; is a cross-platform virtualization application. What
does that mean? For one thing, it installs on your existing Intel or
AMD-based computers, whether they are running Windows, Mac OS X,
Linux, or Oracle Solaris operating systems (OSes). Secondly, it
extends the capabilities of your existing computer so that it can
run multiple OSes, inside multiple virtual machines, at the same
time. As an example, you can run Windows and Linux on your Mac, run
Windows Server 2016 on your Linux server, run Linux on your Windows
PC, and so on, all alongside your existing applications. You can
install and run as many virtual machines as you like. The only
practical limits are disk space and memory.
</para>
<para>
&product-name; is deceptively simple yet also very powerful. It can
run everywhere from small embedded systems or desktop class machines
all the way up to datacenter deployments and even Cloud
environments.
</para>
<para>
The following screenshot shows how &product-name;, installed on an
Apple Mac OS X computer, is running Windows Server 2016 in a virtual
machine window.
</para>
<figure id="fig-win2016-intro">
<title>Windows Server 2016 Virtual Machine, Displayed on a Mac OS X Host</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/vm-vista-running.png"
width="14cm" />
</imageobject>
</mediaobject>
</figure>
<para>
In this User Manual, we will begin simply with a quick introduction
to virtualization and how to get your first virtual machine running
with the easy-to-use &product-name; graphical user interface.
Subsequent chapters will go into much more detail covering more
powerful tools and features, but fortunately, it is not necessary to
read the entire User Manual before you can use &product-name;.
</para>
<para>
You can find a summary of &product-name;'s capabilities in
<xref linkend="features-overview" />. For existing &product-name;
users who just want to find out what is new in this release, see the
<xref linkend="ChangeLog"/>.
</para>
<sect1 id="virt-why-useful">
<title>Why is Virtualization Useful?</title>
<para>
The techniques and features that &product-name; provides are
useful in the following scenarios:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Running multiple operating systems
simultaneously.</emphasis> &product-name; enables you to run
more than one OS at a time. This way, you can run software
written for one OS on another, such as Windows software on
Linux or a Mac, without having to reboot to use it. Since you
can configure what kinds of <emphasis>virtual</emphasis>
hardware should be presented to each such OS, you can install
an old OS such as DOS or OS/2 even if your real computer's
hardware is no longer supported by that OS.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Easier software
installations.</emphasis> Software vendors can use virtual
machines to ship entire software configurations. For example,
installing a complete mail server solution on a real machine
can be a tedious task. With &product-name;, such a complex
setup, often called an <emphasis>appliance</emphasis>, can be
packed into a virtual machine. Installing and running a mail
server becomes as easy as importing such an appliance into
&product-name;.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Testing and disaster
recovery.</emphasis> Once installed, a virtual machine and its
virtual hard disks can be considered a
<emphasis>container</emphasis> that can be arbitrarily frozen,
woken up, copied, backed up, and transported between hosts.
</para>
<para>
On top of that, with the use of another &product-name; feature
called <emphasis>snapshots</emphasis>, one can save a
particular state of a virtual machine and revert back to that
state, if necessary. This way, one can freely experiment with
a computing environment. If something goes wrong, such as
problems after installing software or infecting the guest with
a virus, you can easily switch back to a previous snapshot and
avoid the need of frequent backups and restores.
</para>
<para>
Any number of snapshots can be created, allowing you to travel
back and forward in virtual machine time. You can delete
snapshots while a VM is running to reclaim disk space.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Infrastructure consolidation.</emphasis>
Virtualization can significantly reduce hardware and
electricity costs. Most of the time, computers today only use
a fraction of their potential power and run with low average
system loads. A lot of hardware resources as well as
electricity is thereby wasted. So, instead of running many
such physical computers that are only partially used, one can
pack many virtual machines onto a few powerful hosts and
balance the loads between them.
</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="virtintro">
<title>Some Terminology</title>
<para>
When dealing with virtualization, and also for understanding the
following chapters of this documentation, it helps to acquaint
oneself with a bit of crucial terminology, especially the
following terms:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Host operating system (host
OS).</emphasis> This is the OS of the physical computer on
which &product-name; was installed. There are versions of
&product-name; for Windows, Mac OS X, Linux, and Oracle
Solaris hosts. See <xref linkend="hostossupport" />.
</para>
<para>
Most of the time, this manual discusses all &product-name;
versions together. There may be platform-specific differences
which we will point out where appropriate.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Guest operating system (guest
OS).</emphasis> This is the OS that is running inside the
virtual machine. Theoretically, &product-name; can run any x86
OS such as DOS, Windows, OS/2, FreeBSD, and OpenBSD. But to
achieve near-native performance of the guest code on your
machine, we had to go through a lot of optimizations that are
specific to certain OSes. So while your favorite OS
<emphasis>may</emphasis> run as a guest, we officially support
and optimize for a select few, which include the most common
OSes.
</para>
<para>
See <xref linkend="guestossupport" />.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Virtual machine (VM).</emphasis> This is
the special environment that &product-name; creates for your
guest OS while it is running. In other words, you run your
guest OS <emphasis>in</emphasis> a VM. Normally, a VM is shown
as a window on your computer's desktop. Depending on which of
the various frontends of &product-name; you use, the VM might
be shown in full screen mode or remotely on another computer.
</para>
<para>
Internally, &product-name; treats a VM as a set of parameters
that specify its behavior. Some parameters describe hardware
settings, such as the amount of memory and number of CPUs
assigned. Other parameters describe the state information,
such as whether the VM is running or saved.
</para>
<para>
You can view these VM settings in the VirtualBox Manager
window, the <emphasis role="bold">Settings</emphasis> dialog,
and by running the <command>VBoxManage</command> command. See
<xref linkend="vboxmanage" />.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Guest Additions.</emphasis> This refers
to special software packages which are shipped with
&product-name; but designed to be installed
<emphasis>inside</emphasis> a VM to improve performance of the
guest OS and to add extra features. See
<xref linkend="guestadditions" />.
</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="features-overview">
<title>Features Overview</title>
<para>
The following is a brief outline of &product-name;'s main
features:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Portability.</emphasis> &product-name;
runs on a large number of 64-bit host operating systems. See
<xref linkend="hostossupport" />.
</para>
<para>
&product-name; is a so-called <emphasis>hosted</emphasis>
hypervisor, sometimes referred to as a <emphasis>type
2</emphasis> hypervisor. Whereas a
<emphasis>bare-metal</emphasis> or <emphasis>type 1</emphasis>
hypervisor would run directly on the hardware, &product-name;
requires an existing OS to be installed. It can thus run
alongside existing applications on that host.
</para>
<para>
To a very large degree, &product-name; is functionally
identical on all of the host platforms, and the same file and
image formats are used. This enables you to run virtual
machines created on one host on another host with a different
host OS. For example, you can create a virtual machine on
Windows and then run it under Linux.
</para>
<para>
In addition, virtual machines can easily be imported and
exported using the Open Virtualization Format (OVF), an
industry standard created for this purpose. You can even
import OVFs that were created with a different virtualization
software. See <xref linkend="ovf" />.
</para>
<para>
For users of &oci; the functionality extends to exporting and
importing virtual machines to and from the cloud. This
simplifies development of applications and deployment to the
production environment. See
<xref linkend="cloud-export-oci"/>.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Guest Additions: shared folders,
seamless windows, 3D virtualization.</emphasis> The
&product-name; Guest Additions are software packages which can
be installed <emphasis>inside</emphasis> of supported guest
systems to improve their performance and to provide additional
integration and communication with the host system. After
installing the Guest Additions, a virtual machine will support
automatic adjustment of video resolutions, seamless windows,
accelerated 3D graphics and more. See
<xref linkend="guestadditions" />.
</para>
<para>
In particular, Guest Additions provide for <emphasis>shared
folders</emphasis>, which let you access files on the host
system from within a guest machine. See
<xref linkend="sharedfolders" />.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Great hardware support.</emphasis> Among
other features, &product-name; supports the following:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Guest multiprocessing
(SMP).</emphasis> &product-name; can present up to 32
virtual CPUs to each virtual machine, irrespective of how
many CPU cores are physically present on your host.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">USB device support.</emphasis>
&product-name; implements a virtual USB controller and
enables you to connect arbitrary USB devices to your
virtual machines without having to install device-specific
drivers on the host. USB support is not limited to certain
device categories. See <xref linkend="settings-usb" />.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Hardware compatibility.</emphasis>
&product-name; virtualizes a vast array of virtual
devices, among them many devices that are typically
provided by other virtualization platforms. That includes
IDE, SCSI, and SATA hard disk controllers, several virtual
network cards and sound cards, virtual serial and parallel
ports and an Input/Output Advanced Programmable Interrupt
Controller (I/O APIC), which is found in many computer
systems. This enables easy cloning of disk images from
real machines and importing of third-party virtual
machines into &product-name;.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Full ACPI support.</emphasis> The
Advanced Configuration and Power Interface (ACPI) is fully
supported by &product-name;. This enables easy cloning of
disk images from real machines or third-party virtual
machines into &product-name;. With its unique
<emphasis>ACPI power status support</emphasis>,
&product-name; can even report to ACPI-aware guest OSes
the power status of the host. For mobile systems running
on battery, the guest can thus enable energy saving and
notify the user of the remaining power, for example in
full screen modes.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Multiscreen resolutions.</emphasis>
&product-name; virtual machines support screen resolutions
many times that of a physical screen, allowing them to be
spread over a large number of screens attached to the host
system.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Built-in iSCSI support.</emphasis>
This unique feature enables you to connect a virtual
machine directly to an iSCSI storage server without going
through the host system. The VM accesses the iSCSI target
directly without the extra overhead that is required for
virtualizing hard disks in container files. See
<xref linkend="storage-iscsi" />.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">PXE Network boot.</emphasis> The
integrated virtual network cards of &product-name; fully
support remote booting using the Preboot Execution
Environment (PXE).
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
<emphasis role="bold">Multigeneration branched
snapshots.</emphasis> &product-name; can save arbitrary
snapshots of the state of the virtual machine. You can go back
in time and revert the virtual machine to any such snapshot
and start an alternative VM configuration from there,
effectively creating a whole snapshot tree. See
<xref linkend="snapshots" />. You can create and delete
snapshots while the virtual machine is running.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">VM groups.</emphasis> &product-name;
provides a groups feature that enables the user to organize
and control virtual machines collectively, as well as
individually. In addition to basic groups, it is also possible
for any VM to be in more than one group, and for groups to be
nested in a hierarchy. This means you can have groups of
groups. In general, the operations that can be performed on
groups are the same as those that can be applied to individual
VMs: Start, Pause, Reset, Close (Save state, Send Shutdown,
Poweroff), Discard Saved State, Show in File System, Sort.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Clean architecture and unprecedented
modularity.</emphasis> &product-name; has an extremely modular
design with well-defined internal programming interfaces and a
clean separation of client and server code. This makes it easy
to control it from several interfaces at once. For example,
you can start a VM simply by clicking on a button in the
&product-name; graphical user interface and then control that
machine from the command line, or even remotely. See
<xref linkend="frontends" />.
</para>
<para>
Due to its modular architecture, &product-name; can also
expose its full functionality and configurability through a
comprehensive <emphasis role="bold">software development kit
(SDK),</emphasis> which enables integration of &product-name;
with other software systems. See
<xref linkend="VirtualBoxAPI" />.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Remote machine display.</emphasis> The
VirtualBox Remote Desktop Extension (VRDE) enables
high-performance remote access to any running virtual machine.
This extension supports the Remote Desktop Protocol (RDP)
originally built into Microsoft Windows, with special
additions for full client USB support.
</para>
<para>
The VRDE does not rely on the RDP server that is built into
Microsoft Windows. Instead, the VRDE is plugged directly into
the virtualization layer. As a result, it works with guest
OSes other than Windows, even in text mode, and does not
require application support in the virtual machine either. The
VRDE is described in detail in <xref linkend="vrde" />.
</para>
<para>
On top of this special capacity, &product-name; offers you
more unique features:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Extensible RDP
authentication.</emphasis> &product-name; already supports
Winlogon on Windows and PAM on Linux for RDP
authentication. In addition, it includes an easy-to-use
SDK which enables you to create arbitrary interfaces for
other methods of authentication. See
<xref linkend="vbox-auth" />.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">USB over RDP.</emphasis> Using RDP
virtual channel support, &product-name; also enables you
to connect arbitrary USB devices locally to a virtual
machine which is running remotely on an &product-name; RDP
server. See <xref linkend="usb-over-rdp" />.
</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="hostossupport">
<title>Supported Host Operating Systems</title>
<para>
Currently, &product-name; runs on the following host OSes:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Windows hosts (64-bit):</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
Windows 8.1
</para>
</listitem>
<listitem>
<para>
Windows 10 RTM (1507 / 2015 LTSB) build 10240
</para>
</listitem>
<listitem>
<para>
Windows 10 Anniversary Update (1607 / 2016 LTSB) build
14393
</para>
</listitem>
<listitem>
<para>
Windows 10 Fall Creators Update (1709) build 16299
</para>
</listitem>
<listitem>
<para>
Windows 10 April 2018 Update (1803) build 17134
</para>
</listitem>
<listitem>
<para>
Windows 10 October 2018 Update (1809 / 2019 LTSC) build
17763
</para>
</listitem>
<listitem>
<para>
Windows 10 May 2019 Update (19H1 / 1903) build 18362
</para>
</listitem>
<listitem>
<para>
Windows 10 November 2019 Update (19H2 / 1909) build 18363
</para>
</listitem>
<listitem>
<para>
Windows Server 2012
</para>
</listitem>
<listitem>
<para>
Windows Server 2012 R2
</para>
</listitem>
<listitem>
<para>
Windows Server 2016
</para>
</listitem>
<listitem>
<para>
Windows Server 2019
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
<emphasis role="bold">Mac OS X hosts (64-bit):</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
10.13 (High Sierra)
</para>
</listitem>
<listitem>
<para>
10.14 (Mojave)
</para>
</listitem>
<listitem>
<para>
10.15 (Catalina)
</para>
</listitem>
</itemizedlist>
<para>
Intel hardware is required. See also
<xref linkend="KnownIssues" />.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Linux hosts (64-bit).</emphasis>
Includes the following:
</para>
<itemizedlist>
<listitem>
<para>
Ubuntu 18.04 LTS, 19.03 and 19.10
</para>
</listitem>
<listitem>
<para>
Debian GNU/Linux 9 ("Stretch") and 10 ("Buster")
</para>
</listitem>
<listitem>
<para>
Oracle Linux 6, 7 and 8
</para>
</listitem>
<listitem>
<para>
CentOS/Red Hat Enterprise Linux 6, 7 and 8
</para>
</listitem>
<listitem>
<para>
Fedora 30 and 31
</para>
</listitem>
<listitem>
<para>
Gentoo Linux
</para>
</listitem>
<listitem>
<para>
SUSE Linux Enterprise server 12 and 15
</para>
</listitem>
<listitem>
<para>
openSUSE Leap 15.1
</para>
</listitem>
</itemizedlist>
<para>
It should be possible to use &product-name; on most systems
based on Linux kernel 2.6, 3.x, 4.x or 5.x using either the
&product-name; installer or by doing a manual installation.
See <xref linkend="install-linux-host" />. However, the
formally tested and supported Linux distributions are those
for which we offer a dedicated package.
</para>
<para>
Note that Linux 2.4-based host OSes are no longer supported.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Oracle Solaris hosts (64-bit
only).</emphasis> The following versions are supported with
the restrictions listed in <xref linkend="KnownIssues" />:
</para>
<itemizedlist>
<listitem>
<para>
Oracle Solaris 11
</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
<para>
Note that any feature which is marked as
<emphasis>experimental</emphasis> is not supported. Feedback and
suggestions about such features are welcome.
</para>
<sect2 id="hostcpurequirements">
<title>Host CPU Requirements</title>
<para>
SSE2 (Streaming SIMD Extensions 2) support is required for host
CPUs.
</para>
</sect2>
</sect1>
<sect1 id="intro-installing">
<title>Installing &product-name; and Extension Packs</title>
<para>
&product-name; comes in many different packages, and installation
depends on your host OS. If you have installed software before,
installation should be straightforward. On each host platform,
&product-name; uses the installation method that is most common
and easy to use. If you run into trouble or have special
requirements, see <xref linkend="installation" /> for details
about the various installation methods.
</para>
<para>
&product-name; is split into the following components:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Base package.</emphasis> The base
package consists of all open source components and is licensed
under the GNU General Public License V2.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Extension packs.</emphasis> Additional
extension packs can be downloaded which extend the
functionality of the &product-name; base package. Currently,
Oracle provides a single extension pack, available from:
<ulink url="http://www.virtualbox.org" />. The extension pack
provides the following added functionality:
</para>
<itemizedlist>
<listitem>
<para>
The virtual USB 2.0 (EHCI) device. See
<xref linkend="settings-usb" />.
</para>
</listitem>
<listitem>
<para>
The virtual USB 3.0 (xHCI) device. See
<xref linkend="settings-usb" />.
</para>
</listitem>
<listitem>
<para>
VirtualBox Remote Desktop Protocol (VRDP) support. See
<xref linkend="vrde" />.
</para>
</listitem>
<listitem>
<para>
Host webcam passthrough. See
<xref linkend="webcam-passthrough" />.
</para>
</listitem>
<listitem>
<para>
Intel PXE boot ROM.
</para>
</listitem>
<!-- <listitem>
<para>
Experimental support for PCI passthrough on Linux hosts.
See <xref linkend="pcipassthrough" />.
</para>
</listitem>-->
<listitem>
<para>
Disk image encryption with AES algorithm. See
<xref linkend="diskencryption" />.
</para>
</listitem>
<listitem>
<para>
Cloud integration features. See <xref linkend="ovf"/>.
</para>
</listitem>
</itemizedlist>
<para>
&product-name; extension packages have a
<filename>.vbox-extpack</filename> file name extension. To
install an extension, simply double-click on the package file
and a <emphasis role="bold">Network Operations
Manager</emphasis> window is shown to guide you through the
required steps.
</para>
<para>
To view the extension packs that are currently installed,
start the VirtualBox Manager, as shown in
<xref linkend="intro-starting"/>. From the
<emphasis role="bold">File</emphasis> menu, select
<emphasis role="bold">Preferences</emphasis>. In the window
that displays, go to the
<emphasis role="bold">Extensions</emphasis> category. This
shows you the extensions which are currently installed, and
enables you to remove a package or add a new package.
</para>
<para>
Alternatively, you can use the <command>VBoxManage</command>
command line. See <xref linkend="vboxmanage-extpack" />.
</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="intro-starting">
<title>Starting &product-name;</title>
<para>
After installation, you can start &product-name; as follows:
</para>
<itemizedlist>
<listitem>
<para>
On a Windows host, in the
<emphasis role="bold">Programs</emphasis> menu, click on the
item in the <emphasis role="bold">VirtualBox</emphasis> group.
On some Windows platforms, you can also enter
<command>VirtualBox</command> in the search box of the
<emphasis role="bold">Start</emphasis> menu.
</para>
</listitem>
<listitem>
<para>
On a Mac OS X host, in the Finder, double-click on the
<emphasis role="bold">VirtualBox</emphasis> item in the
Applications folder. You may want to drag this item onto your
Dock.
</para>
</listitem>
<listitem>
<para>
On a Linux or Oracle Solaris host, depending on your desktop
environment, an &product-name; item may have been placed in
either the System or System Tools group of your
<emphasis role="bold">Applications</emphasis> menu.
Alternatively, you can enter <command>VirtualBox</command> in
a terminal window.
</para>
</listitem>
</itemizedlist>
<para>
When you start &product-name; for the first time, a window like
the following is displayed:
</para>
<figure id="fig-vbox-manager-initial">
<title>VirtualBox Manager Window, After Initial Startup</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/virtualbox-main-empty.png"
width="10cm" />
</imageobject>
</mediaobject>
</figure>
<para>
This window is called the <emphasis role="bold">VirtualBox
Manager</emphasis>. The left pane will later list all your virtual
machines. Since you have not yet created any virtual machines,
this list is empty. The <emphasis role="bold">Tools</emphasis>
button provides access to user tools, such as the Virtual Media
Manager.
</para>
<para>
The pane on the right displays the properties of the currently
selected virtual machine. Since you do not have any machines yet,
the pane displays a welcome message.
</para>
<para>
The buttons on the right pane are used to create and work with
VMs.
</para>
<para>
The following figure gives an idea of what &product-name; might
look like after you have created some VMs.
</para>
<figure id="fig-vbox-manager-populated">
<title>VirtualBox Manager Window, After Creating Virtual Machines</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/virtualbox-main.png"
width="12cm" />
</imageobject>
</mediaobject>
</figure>
</sect1>
<sect1 id="gui-createvm">
<title>Creating Your First Virtual Machine</title>
<para>
Click <emphasis role="bold">New</emphasis> in the VirtualBox
Manager window. A wizard is shown, to guide you through setting up
a new virtual machine (VM).
</para>
<figure id="fig-new-vm-name">
<title>Creating a New Virtual Machine: Name and Operating System</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/create-vm-1.png"
width="10cm" />
</imageobject>
</mediaobject>
</figure>
<para>
On the following pages, the wizard will ask you for the bare
minimum of information that is needed to create a VM, in
particular:
</para>
<orderedlist>
<listitem>
<para>
The <emphasis role="bold">Name</emphasis> of the VM you choose
is shown in the machine list of the VirtualBox Manager window
and is also used for the VM's files on disk.
</para>
<para>
Be sure to assign each VM an informative name that describes
the OS and software running on the VM. For example,
<literal>Windows 10 with Visio</literal>.
</para>
</listitem>
<listitem>
<para>
The <emphasis role="bold">Machine Folder</emphasis> is the
location where VMs are stored on your computer. The default
folder location is shown.
</para>
</listitem>
<listitem>
<para>
For <emphasis role="bold">Operating System Type</emphasis>,
select the OS that you want to install. The supported OSes are
grouped. If you want to install something very unusual that is
not listed, select <emphasis role="bold">Other</emphasis>.
Depending on your selection, &product-name; will enable or
disable certain VM settings that your guest OS may require.
This is particularly important for 64-bit guests. See
<xref linkend="intro-64bitguests" />. It is therefore
recommended to always set it to the correct value.
</para>
</listitem>
<listitem>
<para>
On the next page, select the <emphasis role="bold">Memory
(RAM)</emphasis> that &product-name; should allocate every
time the virtual machine is started. The amount of memory
given here will be taken away from your host machine and
presented to the guest OS, which will report this size as the
virtual computer's installed RAM.
</para>
<caution>
<para>
Choose this setting carefully. The memory you give to the VM
will not be available to your host OS while the VM is
running, so do not specify more than you can spare.
</para>
<para>
For example, if your host machine has 4 GB of RAM and you
enter 2048 MB as the amount of RAM for a particular virtual
machine, you will only have 2 GB left for all the other
software on your host while the VM is running. If you run
two VMs at the same time, even more memory will be allocated
for the second VM, which may not even be able to start if
that memory is not available.
</para>
<para>
On the other hand, you should specify as much as your guest
OS and your applications will require to run properly. A
guest OS may require at least 1 or 2 GB of memory to install
and boot up. For best performance, more memory than that may
be required.
</para>
</caution>
<para>
Always ensure that the host OS has enough RAM remaining. If
insufficient RAM remains, the system might excessively swap
memory to the hard disk, which effectively brings the host
system to a standstill.
</para>
<para>
As with the other settings, you can change this setting later,
after you have created the VM.
</para>
</listitem>
<listitem>
<para>
Next, you must specify a <emphasis role="bold">Virtual Hard
Disk</emphasis> for your VM.
</para>
<para>
There are many and potentially complicated ways in which
&product-name; can provide hard disk space to a VM, see
<xref linkend="storage" />, but the most common way is to use
a large image file on your physical hard disk, whose contents
&product-name; presents to your VM as if it were a complete
hard disk. This file then represents an entire hard disk, so
you can even copy it to another host and use it with another
&product-name; installation.
</para>
<para>
The wizard displays the following window:
</para>
<figure id="fig-new-vm-hard-disk">
<title>Creating a New Virtual Machine: Hard Disk</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/create-vm-2.png"
width="10cm" />
</imageobject>
</mediaobject>
</figure>
<para>
At this screen, you have the following options:
</para>
<itemizedlist>
<listitem>
<para>
To create a new, empty virtual hard disk, click the
<emphasis role="bold">Create</emphasis> button.
</para>
</listitem>
<listitem>
<para>
You can pick an <emphasis>existing</emphasis> disk image
file.
</para>
<para>
The drop-down list presented in the window lists all disk
images which are currently remembered by &product-name;.
These disk images are currently attached to a virtual
machine, or have been attached to a virtual machine.
</para>
<para>
Alternatively, click on the small
<emphasis role="bold">folder icon</emphasis> next to the
drop-down list. In the displayed file dialog, you can
click <emphasis role="bold">Add</emphasis> to select any
disk image file on your host disk.
</para>
</listitem>
</itemizedlist>
<para>
If you are using &product-name; for the first time, you will
want to create a new disk image. Click the
<emphasis role="bold">Create</emphasis> button.
</para>
<para>
This displays another window, the <emphasis role="bold">Create
Virtual Hard Disk Wizard</emphasis> wizard. This wizard helps
you to create a new disk image file in the new virtual
machine's folder.
</para>
<para>
&product-name; supports the following types of image files:
</para>
<itemizedlist>
<listitem>
<para>
A <emphasis role="bold">dynamically allocated
file</emphasis> only grows in size when the guest actually
stores data on its virtual hard disk. Therefore, this file
is small initially. As the drive is filled with data, the
file grows to the specified size.
</para>
</listitem>
<listitem>
<para>
A <emphasis role="bold">fixed-size file</emphasis>
immediately occupies the file specified, even if only a
fraction of that virtual hard disk space is actually in
use. While occupying much more space, a fixed-size file
incurs less overhead and is therefore slightly faster than
a dynamically allocated file.
</para>
</listitem>
</itemizedlist>
<para>
For details about the differences, see
<xref linkend="vdidetails" />.
</para>
<para>
To prevent your physical hard disk (host OS) from filling up,
&product-name; limits the size of the image file. But the
image file must be large enough to hold the contents of the
guest OS and the applications you want to install. For a
Windows or Linux guest, you will probably need several
gigabytes for any serious use. The limit of the image file
size can be changed later, see
<xref linkend="vboxmanage-modifymedium"/>.
</para>
<figure id="fig-new-vm-vdi">
<title>Creating a New Virtual Machine: File Location and Size</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/create-vdi-1.png"
width="10cm" />
</imageobject>
</mediaobject>
</figure>
<para>
After having selected or created your image file, click
<emphasis role="bold">Next</emphasis> to go to the next page.
</para>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Create</emphasis>, to create your
new virtual machine. The virtual machine is displayed in the
list on the left side of the VirtualBox Manager window, with
the name that you entered initially.
</para>
</listitem>
</orderedlist>
<note>
<para>
After becoming familiar with the use of wizards, consider using
the Expert Mode available in some wizards. Where available, this
is selectable using a button, and speeds up the process of using
wizards.
</para>
</note>
</sect1>
<sect1 id="intro-running">
<title>Running Your Virtual Machine</title>
<para>
To start a virtual machine, you have several options:
</para>
<itemizedlist>
<listitem>
<para>
Double-click on the VM's entry in the list in the VirtualBox
Manager window.
</para>
</listitem>
<listitem>
<para>
Select the VM's entry in the list in the VirtualBox Manager
window, and click <emphasis role="bold">Start</emphasis> at
the top of the window.
</para>
</listitem>
<listitem>
<para>
Go to the <filename>VirtualBox VMs</filename> folder in your
system user's home directory. Find the subdirectory of the
machine you want to start and double-click on the machine
settings file. This file has a <filename>.vbox</filename> file
extension.
</para>
</listitem>
</itemizedlist>
<para>
Starting a virtual machine displays a new window, and the virtual
machine which you selected will boot up. Everything which would
normally be seen on the virtual system's monitor is shown in the
window. See the screenshot image in
<xref linkend="Introduction"/>.
</para>
<para>
In general, you can use the virtual machine as you would use a
real computer. There are couple of points worth mentioning
however.
</para>
<sect2 id="intro-starting-vm-first-time">
<title>Starting a New VM for the First Time</title>
<para>
When a VM is started for the first time, the
<emphasis role="bold">First Start Wizard</emphasis>, is
displayed. This wizard helps you to select an installation
medium. Since the VM is created empty, it would otherwise behave
just like a real computer with no OS installed. It will do
nothing and display an error message that no bootable OS was
found.
</para>
<para>
For this reason, the wizard helps you to select a medium to
install an OS from.
</para>
<itemizedlist>
<listitem>
<para>
If you have physical CD or DVD media from which you want to
install your guest OS, such as a Windows installation CD or
DVD, put the media into your host's CD or DVD drive.
</para>
<para>
In the wizard's drop-down list of installation media, select
<emphasis role="bold">Host Drive</emphasis> with the correct
drive letter. In the case of a Linux host, choose a device
file. This will allow your VM to access the media in your
host drive, and you can proceed to install from there.
</para>
</listitem>
<listitem>
<para>
If you have downloaded installation media from the Internet
in the form of an ISO image file such as with a Linux
distribution, you would normally burn this file to an empty
CD or DVD and proceed as described above. With
&product-name; however, you can skip this step and mount the
ISO file directly. &product-name; will then present this
file as a CD or DVD-ROM drive to the virtual machine, much
like it does with virtual hard disk images.
</para>
<para>
In this case, the wizard's drop-down list contains a list of
installation media that were previously used with
&product-name;.
</para>
<para>
If your medium is not in the list, especially if you are
using &product-name; for the first time, click the small
folder icon next to the drop-down list to display a standard
file dialog. Here you can pick an image file on your host
disks.
</para>
</listitem>
</itemizedlist>
<para>
After completing the choices in the wizard, you will be able to
install your OS.
</para>
</sect2>
<sect2 id="keyb_mouse_normal">
<title>Capturing and Releasing Keyboard and Mouse</title>
<para>
&product-name; provides a virtual USB tablet device to new
virtual machines through which mouse events are communicated to
the guest OS. If you are running a modern guest OS that can
handle such devices, mouse support may work out of the box
without the mouse being <emphasis>captured</emphasis> as
described below. See <xref linkend="settings-motherboard" />.
</para>
<para>
Otherwise, if the virtual machine detects only standard PS/2
mouse and keyboard devices, since the OS in the virtual machine
does not know that it is not running on a real computer, it
expects to have exclusive control over your keyboard and mouse.
But unless you are running the VM in full screen mode, your VM
needs to share keyboard and mouse with other applications and
possibly other VMs on your host.
</para>
<para>
After installing a guest OS and before you install the Guest
Additions, described later, either your VM or the rest of your
computer can "own" the keyboard and the mouse. Both cannot own
the keyboard and mouse at the same time. You will see a
<emphasis>second</emphasis> mouse pointer which is always
confined to the limits of the VM window. You activate the VM by
clicking inside it.
</para>
<para>
To return ownership of keyboard and mouse to your host OS,
&product-name; reserves a special key on your keyboard: the
<emphasis>Host key</emphasis>. By default, this is the
<emphasis>right Ctrl key</emphasis> on your keyboard. On a Mac
host, the default Host key is the left Command key. You can
change this default in the &product-name; Global Settings. See
<xref linkend="globalsettings" />. The current setting for the
Host key is always displayed at the bottom right of your VM
window.
</para>
<figure id="fig-host-key">
<title>Host Key Setting on the Virtual Machine Task Bar</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/vm-hostkey.png"
width="7cm" />
</imageobject>
</mediaobject>
</figure>
<para>
This means the following:
</para>
<itemizedlist>
<listitem>
<para>
Your <emphasis role="bold">keyboard</emphasis> is owned by
the VM if the VM window on your host desktop has the
keyboard focus. If you have many windows open in your guest
OS, the window that has the focus in your VM is used. This
means that if you want to enter text within your VM, click
on the title bar of your VM window first.
</para>
<para>
To release keyboard ownership, press the Host key. As
explained above, this is typically the right Ctrl key.
</para>
<para>
Note that while the VM owns the keyboard, some key
sequences, such as Alt+Tab, will no longer be seen by the
host, but will go to the guest instead. After you press the
Host key to reenable the host keyboard, all key presses will
go through the host again, so that sequences such as Alt+Tab
will no longer reach the guest. For technical reasons it may
not be possible for the VM to get all keyboard input even
when it does own the keyboard. Examples of this are the
Ctrl+Alt+Del sequence on Windows hosts or single keys
grabbed by other applications on X11 hosts such as the GNOME
desktop Locate Pointer feature.
</para>
</listitem>
<listitem>
<para>
Your <emphasis role="bold">mouse</emphasis> is owned by the
VM only after you have clicked in the VM window. The host
mouse pointer will disappear, and your mouse will drive the
guest's pointer instead of your normal mouse pointer.
</para>
<para>
Note that mouse ownership is independent of that of the
keyboard. Even after you have clicked on a titlebar to be
able to enter text into the VM window, your mouse is not
necessarily owned by the VM yet.
</para>
<para>
To release ownership of your mouse by the VM, press the Host
key.
</para>
</listitem>
</itemizedlist>
<para>
As this behavior is inconvenient, &product-name; provides a set
of tools and device drivers for guest systems called the
&product-name; Guest Additions. These tools make VM keyboard and
mouse operations much more seamless. Most importantly, the Guest
Additions suppress the second "guest" mouse pointer and make
your host mouse pointer work directly in the guest. See
<xref linkend="guestadditions" />.
</para>
</sect2>
<sect2 id="specialcharacters">
<title>Typing Special Characters</title>
<para>
Some OSes expect certain key combinations to initiate certain
procedures. The key combinations that you type into a VM might
target the host OS, the &product-name; software, or the guest
OS. The recipient of these keypresses depends on a number of
factors, including the key combination itself.
</para>
<itemizedlist>
<listitem>
<para>
Host OSes reserve certain key combinations for themselves.
For example, you cannot use the
<emphasis role="bold">Ctrl+Alt+Delete</emphasis> combination
to reboot the guest OS in your VM because this key
combination is usually hard-wired into the host OS. So, even
though both the Windows and Linux OSes intercept this key
combination, only the host OS would be rebooted.
</para>
<para>
On Linux and Oracle Solaris hosts, which use the X Window
System, the key combination
<emphasis role="bold">Ctrl+Alt+Backspace</emphasis> normally
resets the X server and restarts the entire graphical user
interface. As the X server intercepts this combination,
pressing it will usually restart your
<emphasis>host</emphasis> graphical user interface and kill
all running programs, including &product-name;, in the
process.
</para>
<para>
On Linux hosts supporting virtual terminals, the key
combination <emphasis role="bold">Ctrl+Alt+Fx</emphasis>,
where Fx is one of the function keys from F1 to F12,
normally enables you to switch between virtual terminals. As
with <emphasis role="bold">Ctrl+Alt+Delete</emphasis>, these
combinations are intercepted by the host OS and therefore
always switch terminals on the <emphasis>host</emphasis>.
</para>
<para>
If, instead, you want to send these key combinations to the
<emphasis>guest</emphasis> OS in the virtual machine, you
will need to use one of the following methods:
</para>
<itemizedlist>
<listitem>
<para>
Use the items in the
<emphasis role="bold">Input</emphasis>,
<emphasis role="bold">Keyboard</emphasis> menu of the
virtual machine window. This menu includes the settings
<emphasis role="bold">Insert Ctrl+Alt+Delete</emphasis>
and <emphasis role="bold">Insert
Ctrl+Alt+Backspace</emphasis>. However, the latter
setting affects only Linux guests or Oracle Solaris
guests.
</para>
<para>
This menu also includes an option for inserting the Host
key combination.
</para>
</listitem>
<listitem>
<para>
Use special key combinations with the Host key, which is
normally the right Control key. &product-name; then
translates the following key combinations for the VM:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Host key + Del</emphasis>
sends <emphasis role="bold">Ctrl+Alt+Del</emphasis>
to reboot the guest OS.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Host key +
Backspace</emphasis> sends
<emphasis role="bold">Ctrl+Alt+Backspace</emphasis>
to restart the graphical user interface of a Linux
or Oracle Solaris guest.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Host key + Function
key</emphasis>. For example, use this key
combination to simulate
<emphasis role="bold">Ctrl+Alt+Fx</emphasis> to
switch between virtual terminals in a Linux guest.
</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
For some other keyboard combinations such as
<emphasis role="bold">Alt+Tab</emphasis> to switch between
open windows, &product-name; enables you to configure
whether these combinations will affect the host or the
guest, if a virtual machine currently has the focus. This is
a global setting for all virtual machines and can be found
under <emphasis role="bold">File</emphasis>,
<emphasis role="bold">Preferences</emphasis>,
<emphasis role="bold">Input</emphasis>.
</para>
</listitem>
<listitem>
<para>
A soft keyboard can be used to input key combinations in the
guest. See <xref linkend="soft-keyb"/>.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="intro-removable-media-changing">
<title>Changing Removable Media</title>
<para>
While a virtual machine is running, you can change removable
media in the <emphasis role="bold">Devices</emphasis> menu of
the VM's window. Here you can select in detail what
&product-name; presents to your VM as a CD, DVD, or floppy
drive.
</para>
<para>
The settings are the same as those available for the VM in the
<emphasis role="bold">Settings</emphasis> dialog of the
&product-name; main window. But as the
<emphasis role="bold">Settings</emphasis> dialog is disabled
while the VM is in the Running or Saved state, the
<emphasis role="bold">Devices</emphasis> menu saves you from
having to shut down and restart the VM every time you want to
change media.
</para>
<para>
Using the <emphasis role="bold">Devices</emphasis> menu, you can
attach the host drive to the guest or select a floppy or DVD
image, as described in <xref linkend="settings-storage" />.
</para>
<para>
The <emphasis role="bold">Devices</emphasis> menu also includes
an option for creating a virtual ISO (VISO) from selected files
on the host.
</para>
</sect2>
<sect2 id="intro-resize-window">
<title>Resizing the Machine's Window</title>
<para>
You can resize the VM's window while that VM is running. When
you do, the window is scaled as follows:
</para>
<orderedlist>
<listitem>
<para>
If you have <emphasis role="bold">scaled mode</emphasis>
enabled, then the virtual machine's screen will be scaled to
the size of the window. This can be useful if you have many
machines running and want to have a look at one of them
while it is running in the background. Alternatively, it
might be useful to enlarge a window if the VM's output
screen is very small, for example because you are running an
old OS in it.
</para>
<para>
To enable scaled mode, press <emphasis role="bold">Host key
+ C</emphasis>, or select <emphasis role="bold">Scaled
Mode</emphasis> from the
<emphasis role="bold">View</emphasis> menu in the VM window.
To leave scaled mode, press <emphasis role="bold">Host key +
C </emphasis>again.
</para>
<para>
The aspect ratio of the guest screen is preserved when
resizing the window. To ignore the aspect ratio, press
<emphasis role="bold">Shift</emphasis> during the resize
operation.
</para>
<para>
See <xref linkend="KnownIssues" /> for additional remarks.
</para>
</listitem>
<listitem>
<para>
If you have the Guest Additions installed and they support
automatic <emphasis role="bold">resizing</emphasis>, the
Guest Additions will automatically adjust the screen
resolution of the guest OS. For example, if you are running
a Windows guest with a resolution of 1024x768 pixels and you
then resize the VM window to make it 100 pixels wider, the
Guest Additions will change the Windows display resolution
to 1124x768.
</para>
<para>
See <xref linkend="guestadditions" />.
</para>
</listitem>
<listitem>
<para>
Otherwise, if the window is bigger than the VM's screen, the
screen will be centered. If it is smaller, then scroll bars
will be added to the machine window.
</para>
</listitem>
</orderedlist>
</sect2>
<sect2 id="intro-save-machine-state">
<title>Saving the State of the Machine</title>
<para>
When you click on the <emphasis role="bold">Close</emphasis>
button of your virtual machine window, at the top right of the
window, just like you would close any other window on your
system, &product-name; asks you whether you want to save or
power off the VM. As a shortcut, you can also press
<emphasis role="bold">Host key + Q</emphasis>.
</para>
<figure id="fig-vm-close">
<title>Closing Down a Virtual Machine</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/vm-close.png"
width="10cm" />
</imageobject>
</mediaobject>
</figure>
<para>
The difference between the three options is crucial. They mean
the following:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Save the machine state:</emphasis>
With this option, &product-name;
<emphasis>freezes</emphasis> the virtual machine by
completely saving its state to your local disk.
</para>
<para>
When you start the VM again later, you will find that the VM
continues exactly where it was left off. All your programs
will still be open, and your computer resumes operation.
Saving the state of a virtual machine is thus in some ways
similar to suspending a laptop computer by closing its lid.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Send the shutdown signal.</emphasis>
This will send an ACPI shutdown signal to the virtual
machine, which has the same effect as if you had pressed the
power button on a real computer. This should trigger a
proper shutdown mechanism from within the VM.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Power off the machine:</emphasis> With
this option, &product-name; also stops running the virtual
machine, but <emphasis>without</emphasis> saving its state.
</para>
<warning>
<para>
This is equivalent to pulling the power plug on a real
computer without shutting it down properly. If you start
the machine again after powering it off, your OS will have
to reboot completely and may begin a lengthy check of its
virtual system disks. As a result, this should not
normally be done, since it can potentially cause data loss
or an inconsistent state of the guest system on disk.
</para>
</warning>
<para>
As an exception, if your virtual machine has any snapshots,
see <xref linkend="snapshots"/>, you can use this option to
quickly <emphasis
role="bold">restore the current
snapshot</emphasis> of the virtual machine. In that case,
powering off the machine will not disrupt its state, but any
changes made since that snapshot was taken will be lost.
</para>
</listitem>
</itemizedlist>
<para>
The <emphasis role="bold">Discard</emphasis> button in the
VirtualBox Manager window discards a virtual machine's saved
state. This has the same effect as powering it off, and the same
warnings apply.
</para>
</sect2>
</sect1>
<sect1 id="gui-vmgroups">
<title>Using VM Groups</title>
<para>
VM groups enable the user to create ad hoc groups of VMs, and to
manage and perform functions on them collectively, as well as
individually.
</para>
<para>
The following figure shows VM groups displayed in VirtualBox
Manager.
</para>
<figure id="fig-vm-groups">
<title>Groups of Virtual Machines</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/vm-groups.png"
width="10cm" />
</imageobject>
</mediaobject>
</figure>
<para>
The following features are available for groups:
</para>
<itemizedlist>
<listitem>
<para>
Create a group using the VirtualBox Manager. Do one of the
following:
</para>
<itemizedlist>
<listitem>
<para>
Drag one VM on top of another VM.
</para>
</listitem>
<listitem>
<para>
Select multiple VMs and select
<emphasis role="bold">Group</emphasis> from the
right-click menu.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Create and manage a group using the command line. Do one of
the following:
</para>
<itemizedlist>
<listitem>
<para>
Create a group and assign a VM. For example:
</para>
<screen>VBoxManage modifyvm "vm01" --groups "/TestGroup"</screen>
<para>
This command creates a group "TestGroup" and attaches the
VM "vm01" to that group.
</para>
</listitem>
<listitem>
<para>
Detach a VM from the group, and delete the group if empty.
For example:
</para>
<screen>VBoxManage modifyvm "vm01" --groups ""</screen>
<para>
This command detaches all groups from the VM "vm01" and
deletes the empty group.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Create multiple groups. For example:
</para>
<screen>VBoxManage modifyvm "vm01" --groups "/TestGroup,/TestGroup2"</screen>
<para>
This command creates the groups "TestGroup" and "TestGroup2",
if they do not exist, and attaches the VM "vm01" to both of
them.
</para>
</listitem>
<listitem>
<para>
Create nested groups, having a group hierarchy. For example:
</para>
<screen>VBoxManage modifyvm "vm01" --groups "/TestGroup/TestGroup2"</screen>
<para>
This command attaches the VM "vm01" to the subgroup
"TestGroup2" of the "TestGroup" group.
</para>
</listitem>
<listitem>
<para>
The following is a summary of group commands: Start, Pause,
Reset, Close (save state, send shutdown signal, poweroff),
Discard Saved State, Show in File System, Sort.
</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="snapshots">
<title>Snapshots</title>
<para>
With snapshots, you can save a particular state of a virtual
machine for later use. At any later time, you can revert to that
state, even though you may have changed the VM considerably since
then. A snapshot of a virtual machine is thus similar to a machine
in Saved state, but there can be many of them, and these saved
states are preserved.
</para>
<para>
To see the snapshots of a virtual machine, click on the machine
name in VirtualBox Manager. Then click the
<emphasis role="bold">List</emphasis> icon next to the machine
name, and select <emphasis role="bold">Snapshots</emphasis>. Until
you take a snapshot of the machine, the list of snapshots will be
empty except for the <emphasis role="bold">Current
State</emphasis> item, which represents the "now" point in the
lifetime of the virtual machine.
</para>
<sect2 id="snapshots-take-restore-delete">
<title>Taking, Restoring, and Deleting Snapshots</title>
<para>
There are three operations related to snapshots, as follows:
</para>
<orderedlist>
<listitem>
<para>
<emphasis role="bold">Take a snapshot</emphasis>. This makes
a copy of the machine's current state, to which you can go
back at any given time later.
</para>
<itemizedlist>
<listitem>
<para>
If your VM is running, select <emphasis role="bold">Take
Snapshot</emphasis> from the
<emphasis role="bold">Machine</emphasis> pull-down menu
of the VM window.
</para>
</listitem>
<listitem>
<para>
If your VM is in either the Saved or the Powered Off
state, as displayed next to the VM name in the
&product-name; main window, click the
<emphasis role="bold">List</emphasis> icon next to the
machine name and select
<emphasis role="bold">Snapshots</emphasis>. The
snapshots window is shown. Do one of the following:
</para>
<itemizedlist>
<listitem>
<para>
Click the <emphasis role="bold">Take</emphasis>
icon.
</para>
</listitem>
<listitem>
<para>
Right-click on the <emphasis role="bold">Current
State </emphasis>item in the list and select
<emphasis role="bold">Take</emphasis>.
</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
<para>
In either case, a window is displayed prompting you for a
snapshot name. This name is purely for reference purposes to
help you remember the state of the snapshot. For example, a
useful name would be "Fresh installation from scratch, no
Guest Additions", or "Service Pack 3 just installed". You
can also add a longer text in the
<emphasis role="bold">Description</emphasis> field.
</para>
<para>
Your new snapshot will then appear in the snapshots list.
Underneath your new snapshot, you will see an item called
<emphasis role="bold">Current State</emphasis>, signifying
that the current state of your VM is a variation based on
the snapshot you took earlier. If you later take another
snapshot, you will see that they are displayed in sequence,
and that each subsequent snapshot is derived from an earlier
one.
</para>
<figure id="fig-snapshots-list">
<title>Snapshots List For a Virtual Machine</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/snapshots-1.png"
width="10cm" />
</imageobject>
</mediaobject>
</figure>
<para>
&product-name; imposes no limits on the number of snapshots
you can take. The only practical limitation is disk space on
your host. Each snapshot stores the state of the virtual
machine and thus occupies some disk space. See
<xref linkend="snapshots-contents"/> for details on what is
stored in a snapshot.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Restore a snapshot</emphasis>. In the
list of snapshots, right-click on any snapshot you have
taken and select <emphasis role="bold">Restore</emphasis>.
By restoring a snapshot, you go back or forward in time. The
current state of the machine is lost, and the machine is
restored to the exact state it was in when the snapshot was
taken.
</para>
<note>
<para>
Restoring a snapshot will affect the virtual hard drives
that are connected to your VM, as the entire state of the
virtual hard drive will be reverted as well. This means
also that all files that have been created since the
snapshot and all other file changes <emphasis>will be
lost. </emphasis>In order to prevent such data loss while
still making use of the snapshot feature, it is possible
to add a second hard drive in
<emphasis>write-through</emphasis> mode using the
<command>VBoxManage</command> interface and use it to
store your data. As write-through hard drives are
<emphasis>not</emphasis> included in snapshots, they
remain unaltered when a machine is reverted. See
<xref linkend="hdimagewrites" />.
</para>
</note>
<para>
To avoid losing the current state when restoring a snapshot,
you can create a new snapshot before the restore operation.
</para>
<para>
By restoring an earlier snapshot and taking more snapshots
from there, it is even possible to create a kind of
alternate reality and to switch between these different
histories of the virtual machine. This can result in a whole
tree of virtual machine snapshots, as shown in the
screenshot above.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Delete a snapshot</emphasis>. This
does not affect the state of the virtual machine, but only
releases the files on disk that &product-name; used to store
the snapshot data, thus freeing disk space. To delete a
snapshot, right-click on the snapshot name in the snapshots
tree and select <emphasis role="bold">Delete</emphasis>.
Snapshots can be deleted even while a machine is running.
</para>
<note>
<para>
Whereas taking and restoring snapshots are fairly quick
operations, deleting a snapshot can take a considerable
amount of time since large amounts of data may need to be
copied between several disk image files. Temporary disk
files may also need large amounts of disk space while the
operation is in progress.
</para>
</note>
<para>
There are some situations which cannot be handled while a VM
is running, and you will get an appropriate message that you
need to perform this snapshot deletion when the VM is shut
down.
</para>
</listitem>
</orderedlist>
</sect2>
<sect2 id="snapshots-contents">
<title>Snapshot Contents</title>
<para>
Think of a snapshot as a point in time that you have preserved.
More formally, a snapshot consists of the following:
</para>
<itemizedlist>
<listitem>
<para>
The snapshot contains a complete copy of the VM settings,
including the hardware configuration, so that when you
restore a snapshot, the VM settings are restored as well.
For example, if you changed the hard disk configuration or
the VM's system settings, that change is undone when you
restore the snapshot.
</para>
<para>
The copy of the settings is stored in the machine
configuration, an XML text file, and thus occupies very
little space.
</para>
</listitem>
<listitem>
<para>
The complete state of all the virtual disks attached to the
machine is preserved. Going back to a snapshot means that
all changes that had been made to the machine's disks, file
by file and bit by bit, will be undone as well. Files that
were since created will disappear, files that were deleted
will be restored, changes to files will be reverted.
</para>
<para>
Strictly speaking, this is only true for virtual hard disks
in "normal" mode. You can configure disks to behave
differently with snapshots, see
<xref linkend="hdimagewrites" />. In technical terms, it is
not the virtual disk itself that is restored when a snapshot
is restored. Instead, when a snapshot is taken,
&product-name; creates differencing images which contain
only the changes since the snapshot were taken. When the
snapshot is restored, &product-name; throws away that
differencing image, thus going back to the previous state.
This is both faster and uses less disk space. For the
details, which can be complex, see
<xref linkend="diffimages" />.
</para>
<para>
Creating the differencing image as such does not occupy much
space on the host disk initially, since the differencing
image will initially be empty and grow dynamically later
with each write operation to the disk. The longer you use
the machine after having created the snapshot, however, the
more the differencing image will grow in size.
</para>
</listitem>
<listitem>
<para>
If you took a snapshot while the machine was running, the
memory state of the machine is also saved in the snapshot.
This is in the same way that memory can be saved when you
close a VM window. When you restore such a snapshot,
execution resumes at exactly the point when the snapshot was
taken.
</para>
<para>
The memory state file can be as large as the memory size of
the VM and will therefore occupy considerable disk space.
</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
<sect1 id="configbasics">
<title>Virtual Machine Configuration</title>
<para>
When you select a virtual machine from the list in the VirtualBox
Manager window, you will see a summary of that machine's settings
on the right.
</para>
<para>
Clicking on <emphasis role="bold">Settings</emphasis> displays a
window, where you can configure many of the properties of the
selected VM. But be careful when changing VM settings. It is
possible to change all VM settings after installing a guest OS,
but certain changes might prevent a guest OS from functioning
correctly if done after installation.
</para>
<note>
<para>
The <emphasis role="bold">Settings</emphasis> button is disabled
while a VM is either in the Running or Saved state. This is
because the <emphasis role="bold">Settings</emphasis> dialog
enables you to change fundamental characteristics of the virtual
machine that is created for your guest OS. For example, the
guest OS may not perform well if half of its memory is taken
away. As a result, if the
<emphasis role="bold">Settings</emphasis> button is disabled,
shut down the current VM first.
</para>
</note>
<para>
&product-name; provides a wide range of parameters that can be
changed for a virtual machine. The various settings that can be
changed in the <emphasis role="bold">Settings</emphasis> window
are described in detail in <xref linkend="BasicConcepts" />. Even
more parameters are available when using the
<command>VBoxManage</command> command line interface. See
<xref linkend="vboxmanage" />.
</para>
</sect1>
<sect1 id="intro-removing">
<title>Removing and Moving Virtual Machines</title>
<para>
You can remove a VM from &product-name; or move the VM and its
associated files, such as disk images, to another location on the
host.
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Removing a VM.</emphasis> To remove a
VM, right-click on the VM in the VirtualBox Manager's machine
list and select <emphasis role="bold">Remove</emphasis>.
</para>
<para>
The confirmation dialog enables you to specify whether to only
remove the VM from the list of machines or to remove the files
associated with the VM.
</para>
<para>
Note that the <emphasis role="bold">Remove</emphasis> menu
item is disabled while a VM is running.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Moving a VM.</emphasis> To move a VM to
a new location on the host, right-click on the VM in the
VirtualBox Manager's machine list and select
<emphasis
role="bold">Move</emphasis>.
</para>
<para>
The file dialog prompts you to specify a new location for the
VM.
</para>
<para>
When you move a VM, &product-name; configuration files are
updated automatically to use the new location on the host.
</para>
<para>
Note that the <emphasis role="bold">Move</emphasis> menu item
is disabled while a VM is running.
</para>
<para>
You can also use the <command>VBoxManage movevm</command>
command to move a VM. See <xref linkend="vboxmanage-movevm"/>.
</para>
</listitem>
</itemizedlist>
<para>
For information about removing or moving a disk image file from
&product-name;, see <xref linkend="vdis"/>.
</para>
</sect1>
<sect1 id="clone">
<title>Cloning Virtual Machines</title>
<para>
You can create a full copy or a linked copy of an existing VM.
This copy is called a <emphasis>clone</emphasis>. You might use a
cloned VM to experiment with a VM configuration, to test different
guest OS levels, or to back up a VM.
</para>
<para>
The <emphasis role="bold">Clone Virtual Machine</emphasis> wizard
guides you through the cloning process.
</para>
<figure id="fig-clone-wizard">
<title>The Clone Virtual Machine Wizard</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/clone-vm.png"
width="10cm" />
</imageobject>
</mediaobject>
</figure>
<para>
Start the wizard by clicking
<emphasis role="bold">Clone</emphasis> in the right-click menu of
the VirtualBox Manager's machine list or in the
<emphasis role="bold">Snapshots</emphasis> view of the selected
VM.
</para>
<para>
Specify a new <emphasis role="bold">Name</emphasis> for the clone.
You can choose a <emphasis role="bold">Path</emphasis> for the
cloned virtual machine, otherwise &product-name; uses the default
machines folder.
</para>
<para>
The <emphasis role="bold">Clone Type</emphasis> option specifies
whether to create a clone linked to the source VM or to create a
fully independent clone:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Full Clone:</emphasis> Copies all
dependent disk images to the new VM folder. A full clone can
operate fully without the source VM.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Linked Clone:</emphasis> Creates new
differencing disk images based on the source VM disk images.
If you select the current state of the source VM as the clone
point, &product-name; creates a new snapshot.
</para>
</listitem>
</itemizedlist>
<para>
The <emphasis role="bold">Snapshots</emphasis> option specifies
whether to create a clone of the current machine state only or of
everything.
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Everything:</emphasis> Clones the
current machine state and all its snapshots.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Current Machine State and All
Children:</emphasis>. Clones a VM snapshot and all its child
snapshots.
</para>
</listitem>
</itemizedlist>
<para>
The following clone options are available:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">MAC Address Policy:</emphasis> Specifies
how to retain network card MAC addresses when cloning the VM.
</para>
<para>
For example, the <emphasis role="bold">Generate New MAC
Addresses For All Network Adapters</emphasis> value assigns a
new MAC address to each network card during cloning. This is
the default setting. This is the best option when both the
source VM and the cloned VM must operate on the same network.
Other values enable you to retain the existing MAC addresses
in the cloned VM.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Keep Disk Names:</emphasis> Retains the
disk image names when cloning the VM.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Keep Hardware UUIDs:</emphasis> Retains
the hardware universally unique identifiers (UUIDs) when
cloning the VM.
</para>
</listitem>
</itemizedlist>
<para>
The duration of the clone operation depends on the size and number
of attached disk images. In addition, the clone operation saves
all the differencing disk images of a snapshot.
</para>
<para>
Note that the <emphasis role="bold">Clone</emphasis> menu item is
disabled while a machine is running.
</para>
<para>
You can also use the <command>VBoxManage clonevm</command> command
to clone a VM. See <xref linkend="vboxmanage-clonevm" />.
</para>
</sect1>
<sect1 id="ovf">
<title>Importing and Exporting Virtual Machines</title>
<para>
&product-name; can import and export virtual machines in the
following formats:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Open Virtualization Format
(OVF).</emphasis> This is the industry-standard format. See
<xref linkend="ovf-about"/>.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Cloud service formats.</emphasis> Export
to and import from cloud services such as &oci; is supported.
See <xref linkend="cloud-integration"/>.
</para>
</listitem>
</itemizedlist>
<sect2 id="ovf-about">
<title>About the OVF Format</title>
<para>
OVF is a cross-platform standard supported by many
virtualization products which enables the creation of ready-made
virtual machines that can then be imported into a hypervisor
such as &product-name;. &product-name; makes OVF import and
export easy to do, using the VirtualBox Manager window or the
command-line interface.
</para>
<para>
Using OVF enables packaging of <emphasis>virtual
appliances</emphasis>. These are disk images, together with
configuration settings that can be distributed easily. This way
one can offer complete ready-to-use software packages, including
OSes with applications, that need no configuration or
installation except for importing into &product-name;.
</para>
<note>
<para>
The OVF standard is complex, and support in &product-name; is
an ongoing process. In particular, no guarantee is made that
&product-name; supports all appliances created by other
virtualization software. For a list of known limitations, see
<xref linkend="KnownIssues" />.
</para>
</note>
<para>
Appliances in OVF format can appear in the following variants:
</para>
<itemizedlist>
<listitem>
<para>
They can come in several files, as one or several disk
images, typically in the widely-used VMDK format. See
<xref linkend="vdidetails" />. They also include a textual
description file in an XML dialect with an
<filename>.ovf</filename> extension. These files must then
reside in the same directory for &product-name; to be able
to import them.
</para>
</listitem>
<listitem>
<para>
Alternatively, the above files can be packed together into a
single archive file, typically with an
<filename>.ova</filename> extension. Such archive files use
a variant of the TAR archive format and can therefore be
unpacked outside of &product-name; with any utility that can
unpack standard TAR files.
</para>
</listitem>
</itemizedlist>
<note>
<para>
OVF cannot describe snapshots that were taken for a virtual
machine. As a result, when you export a virtual machine that
has snapshots, only the current state of the machine will be
exported. The disk images in the export will have a
<emphasis>flattened</emphasis> state identical to the current
state of the virtual machine.
</para>
</note>
</sect2>
<sect2 id="ovf-import-appliance">
<title>Importing an Appliance in OVF Format</title>
<para>
The following steps show how to import an appliance in OVF
format.
</para>
<orderedlist>
<listitem>
<para>
Double-click on the OVF or OVA file.
</para>
<para>
&product-name; creates file type associations automatically
for any OVF and OVA files on your host OS.
</para>
</listitem>
<listitem>
<para>
Select <emphasis role="bold">File</emphasis>,
<emphasis role="bold">Import Appliance</emphasis> from the
VirtualBox Manager window.
</para>
<para>
From the file dialog, go to the file with either the
<filename>.ovf</filename> or the <filename>.ova</filename>
file extension.
</para>
<para>
Click <emphasis role="bold">Import</emphasis> to open the
<emphasis role="bold">Appliance Settings</emphasis> screen.
</para>
<figure id="fig-import-appliance">
<title>Appliance Settings Screen for Import Appliance</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/ovf-import.png"
width="12cm" />
</imageobject>
</mediaobject>
</figure>
<para>
This screen shows the VMs described in the OVF or OVA file
and enables you to change the VM settings.
</para>
<para>
By default, membership of VM groups is preserved on import
for VMs that were initially exported from &product-name;.
You can change this behavior by using the
<emphasis
role="bold">Primary Group</emphasis>
setting for the VM.
</para>
<para>
The following global settings apply to all of the VMs that
you import:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Base Folder:</emphasis> Specifies
the directory on the host in which to store the imported
VMs.
</para>
<para>
If an appliance has multiple VMs, you can specify a
different directory for each VM by editing the
<emphasis role="bold">Base Folder</emphasis> setting for
the VM.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">MAC Address Policy:</emphasis>
Reinitializes the MAC addresses of network cards in your
VMs prior to import, by default. You can override the
default behavior and preserve the MAC addresses on
import.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Import Hard Drives as
VDI:</emphasis> Imports hard drives in the VDI format
rather than in the default VMDK format.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Import</emphasis> to import the
appliance.
</para>
<para>
&product-name; copies the disk images and creates local VMs
with the settings described on the
<emphasis role="bold">Appliance Settings</emphasis> screen.
The imported VMs are shown in the list of VMs in VirtualBox
Manager.
</para>
<para>
Because disk images are large, the VMDK images that are
included with virtual appliances are shipped in a compressed
format that cannot be used directly by VMs. So, the images
are first unpacked and copied, which might take several
minutes.
</para>
</listitem>
</orderedlist>
<para>
You can use the <command>VBoxManage import</command> command to
import an appliance. See <xref linkend="vboxmanage-import" />.
</para>
</sect2>
<sect2 id="ovf-export-appliance">
<title>Exporting an Appliance in OVF Format</title>
<para>
The following steps show how to export an appliance in OVF
format.
</para>
<orderedlist>
<listitem>
<para>
Select <emphasis role="bold">File</emphasis>,
<emphasis role="bold"> Export Appliance</emphasis> to open
the <emphasis role="bold">Export Virtual
Appliance</emphasis> wizard.
</para>
<para>
From the initial window, you can combine several VMs into an
OVF appliance.
</para>
<para>
Select one or more VMs to export, and click
<emphasis role="bold">Next</emphasis>.
</para>
</listitem>
<listitem>
<para>
The <emphasis role="bold">Appliance Settings</emphasis>
screen enables you to select the following settings:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Format:</emphasis> Selects the
<emphasis role="bold">Open Virtualization
Format</emphasis> value for the output files.
</para>
<para>
The <emphasis role="bold">&oci;</emphasis> value exports
the appliance to &oci;. See
<xref linkend="cloud-export-oci"/>.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">File:</emphasis> Selects the
location in which to store the exported files.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">MAC Address Policy:</emphasis>
Specifies whether to retain or reassign network card MAC
addresses on export.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Write Manifest File:</emphasis>
Enables you to include a manifest file in the exported
archive file.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Include ISO Image
Files:</emphasis> Enables you to include ISO image files
in the exported archive file.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Next</emphasis> to show the
<emphasis role="bold">Virtual System Settings</emphasis>
screen.
</para>
<para>
You can edit settings for the virtual appliance. For
example, you can change the name of the virtual appliance or
add product information, such as vendor details or license
text.
</para>
<para>
Double-click the appropriate field to change its value.
</para>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Export</emphasis> to begin the
export process. Note that this operation might take several
minutes.
</para>
</listitem>
</orderedlist>
<para>
You can use the <command>VBoxManage export</command> command to
export an appliance. See <xref linkend="vboxmanage-export" />.
</para>
</sect2>
</sect1>
<sect1 id="cloud-integration">
<title>Integrating with &oci;</title>
<para>
This section describes how to use the features of &product-name;
to integrate with &oci;.
</para>
<para>
Integrating with &oci; involves the following steps:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Prepare for &oci;
Integration.</emphasis> Before using &product-name; with &oci;
there are some initial configuration steps you may need to do.
See <xref linkend="cloud-integration-steps"/>.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Use &product-name; with
&oci;.</emphasis> <xref linkend="cloud-vbox-oci-tasks"/>
describes how you can use &product-name; with &oci;.
</para>
</listitem>
</itemizedlist>
<sect2 id="cloud-integration-steps">
<title>Preparing for &oci; Integration</title>
<para>
Perform the following configuration steps before using
&product-name; to integrate with your &oci; account.
</para>
<orderedlist>
<listitem>
<para>
<emphasis role="bold">Install the Extension Pack.</emphasis>
Cloud integration features are only available when you
install the &product-name; Extension Pack. See
<xref linkend="intro-installing"/>.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Create a key pair.</emphasis> Generate
an API signing key pair that is used for API requests to
&oci;. See <xref linkend="cloud-create-api-keypair"/>.
</para>
<para>
Upload the public key of the key pair from your client
device to the cloud service. See
<xref linkend="cloud-upload-public-key"/>.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Create a cloud profile.</emphasis> The
cloud profile contains resource identifiers for your cloud
account, such as your user OCID, and details of your key
pair. See <xref linkend="cloud-create-cloud-profile"/>.
</para>
</listitem>
</orderedlist>
</sect2>
<sect2 id="cloud-create-api-keypair">
<title>Creating an API Signing Key Pair</title>
<para></para>
<para>
To use the cloud integration features of &product-name;, you
must generate an API signing key pair that is used for API
requests to &oci;.
</para>
<para>
Your API requests are signed with your private key, and &oci;
uses the public key to verify the authenticity of the request.
You must upload the public key to the &oci; Console.
</para>
<note>
<para>
This key pair is not the same SSH key that you use to access
compute instances on &oci;.
</para>
</note>
<orderedlist>
<listitem>
<para>
(Optional) Create a <filename>.oci</filename> directory to
store the key pair.
</para>
<screen>$ mkdir ~/.oci</screen>
<para>
The key pair is usually installed in the
<filename>.oci</filename> folder in your home directory. For
example, <filename>~/.oci</filename> on a Linux system.
</para>
</listitem>
<listitem>
<para>
Generate the private key.
</para>
<para>
Use the <command>openssl</command> command.
</para>
<itemizedlist>
<listitem>
<para>
To generate a private key with a passphrase:
</para>
<screen>$ openssl genrsa -out ~/.oci/oci_api_key.pem -aes128 2048 </screen>
</listitem>
<listitem>
<para>
To generate a private key without a passphrase:
</para>
<screen>$ openssl genrsa -out ~/.oci/oci_api_key.pem 2048</screen>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Change permissions for the private key.
</para>
<screen>$ chmod 600 ~/.oci/oci_api_key.pem</screen>
<para>
Generate the public key.
</para>
<screen>$ openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem</screen>
</listitem>
</orderedlist>
</sect2>
<sect2 id="cloud-upload-public-key">
<title>Uploading the Public Key to &oci;</title>
<para>
Use the following steps to upload your public key to &oci;.
</para>
<orderedlist>
<listitem>
<para>
Log in to the &oci; Console.
</para>
</listitem>
<listitem>
<para>
Display the <emphasis role="bold">User Settings</emphasis>
page.
</para>
<para>
Click <emphasis role="bold">Profile</emphasis>,
<emphasis role="bold">User Settings</emphasis>.
</para>
</listitem>
<listitem>
<para>
Display your current API signing keys.
</para>
<para>
Click <emphasis role="bold">Resources</emphasis>,
<emphasis role="bold">API Keys</emphasis>.
</para>
</listitem>
<listitem>
<para>
Upload the public key.
</para>
<para>
Click <emphasis role="bold">Add Public Key</emphasis>.
</para>
<para>
The <emphasis role="bold">Add Public Key</emphasis> dialog
is displayed.
</para>
<figure id="fig-upload-key-oci">
<title>Upload Public Key Dialog in &oci; Console</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/upload-key.png"
width="12cm" />
</imageobject>
</mediaobject>
</figure>
<para>
Select one of the following options:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Choose Public Key File.</emphasis>
This option enables you to browse to the public key file
on your local hard disk.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Paste Public Keys.</emphasis> This
option enables you to paste the contents of the public
key file into the window in the dialog box.
</para>
</listitem>
</itemizedlist>
<para>
Click <emphasis role="bold">Add</emphasis> to upload the
public key.
</para>
</listitem>
</orderedlist>
</sect2>
<sect2 id="cloud-create-cloud-profile">
<title>Creating a Cloud Profile</title>
<para>
&product-name; uses a <emphasis>cloud profile</emphasis> to
connect to &oci;. A cloud profile is a text file that contains
details of your key files and Oracle Cloud Identifier (OCID)
resource identifiers for your cloud account, such as the
following:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Fingerprint of the public
key.</emphasis> To obtain the fingerprint, you can use the
<command>openssl</command> command:
</para>
<screen>$ openssl rsa -pubout -outform DER -in ~/.oci/oci_api_key.pem | openssl md5 -c</screen>
</listitem>
<listitem>
<para>
<emphasis role="bold">Location of the private key on the
client device.</emphasis> Specify the full path to the
private key.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">(Optional) Passphrase for the private
key.</emphasis>. This is only required if the key is
encrypted.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Region</emphasis>. Shown on the &oci;
Console. Click
<emphasis role="bold">Administration</emphasis>,
<emphasis role="bold">Tenancy Details</emphasis>.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Tenancy OCID.</emphasis> Shown on the
&oci; Console. Click
<emphasis role="bold">Administration</emphasis>,
<emphasis role="bold">Tenancy Details</emphasis>.
</para>
<para>
A link enables you to copy the Tenancy OCID.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Compartment OCID.</emphasis> Shown on
the &oci; Console. Click
<emphasis role="bold">Identity</emphasis>,
<emphasis role="bold">Compartments</emphasis>.
</para>
<para>
A link enables you to copy the Compartment OCID.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">User OCID.</emphasis> Shown on the
&oci; Console. Click
<emphasis role="bold">Profile</emphasis>,
<emphasis role="bold">User Settings</emphasis>.
</para>
<para>
A link enables you to copy the User OCID.
</para>
</listitem>
</itemizedlist>
<para>
You can create a cloud profile in the following ways:
</para>
<itemizedlist>
<listitem>
<para>
Automatically, by using the <emphasis role="bold">Cloud
Profile Manager</emphasis>. See
<xref linkend="cloud-using-cloud-profile-manager"/>.
</para>
<para>
The Cloud Profile Manager is a component of &product-name;
that enables you to create, edit, and manage cloud profiles
for your cloud service accounts.
</para>
</listitem>
<listitem>
<para>
Automatically, by using the <command>VBoxManage
cloudprofile</command> command. See
<xref linkend="vboxmanage-cloudprofile"/>.
</para>
</listitem>
<listitem>
<para>
Manually, by creating an <filename>oci_config</filename>
file in your &product-name; global configuration directory.
For example, this is
<filename>$HOME/.config/VirtualBox/oci_config</filename> on
a Linux host.
</para>
</listitem>
<listitem>
<para>
Manually, by creating a <filename>config</filename> file in
your &oci; configuration directory. For example, this is
<filename>$HOME/.oci/config</filename> on a Linux host.
</para>
<para>
This is the same file that is used by the &oci; command line
interface.
</para>
<para>
&product-name; automatically uses the
<filename>config</filename> file if no cloud profile file is
present in your global configuration directory.
Alternatively, you can import this file manually into the
Cloud Profile Manager.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="cloud-using-cloud-profile-manager">
<title>Using the Cloud Profile Manager</title>
<para>
This section describes how to use the Cloud Profile Manager to
create a cloud profile.
</para>
<para>
To open the Cloud Profile Manager click
<emphasis role="bold">File</emphasis>,
<emphasis role="bold">Cloud Profile Manager</emphasis> in the
VirtualBox Manager window.
</para>
<figure id="fig-cloud-profile-manager">
<title>The Cloud Profile Manager</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/cloud-profile-manager.png"
width="12cm" />
</imageobject>
</mediaobject>
</figure>
<para>
You can use the Cloud Profile Manager in the following ways:
</para>
<itemizedlist>
<listitem>
<para>
To create a new cloud profile automatically
</para>
</listitem>
<listitem>
<para>
To create a cloud profile by importing settings from your
&oci; configuration file.
</para>
</listitem>
</itemizedlist>
<para>
Perform the following steps to create a new cloud profile
automatically, using the Cloud Profile Manager:
</para>
<orderedlist>
<listitem>
<para>
Click the <emphasis role="bold">Add</emphasis> icon and
specify a <emphasis role="bold">Name</emphasis> for the
profile.
</para>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Properties</emphasis> and
specify the following property values for the profile:
</para>
<itemizedlist>
<listitem>
<para>
Compartment OCID
</para>
</listitem>
<listitem>
<para>
Fingerprint of the public key
</para>
</listitem>
<listitem>
<para>
Location of the private key on the client device
</para>
</listitem>
<!-- <listitem>
<para>
(Optional) Passphrase for the private key, if the key is
encrypted
</para>
</listitem>-->
<listitem>
<para>
Region OCID
</para>
</listitem>
<listitem>
<para>
Tenancy OCID
</para>
</listitem>
<listitem>
<para>
User OCID
</para>
</listitem>
</itemizedlist>
<para>
Some of these are settings for your &oci; account, which you
can view from the &oci; Console.
</para>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Apply</emphasis> to save your
changes.
</para>
<para>
The cloud profile settings are saved in the
<filename>oci_config</filename> file in your &product-name;
global settings directory.
</para>
</listitem>
</orderedlist>
<para>
Perform the following steps to import an existing &oci;
configuration file into the Cloud Profile Manager:
</para>
<orderedlist>
<listitem>
<para>
Ensure that a <filename>config</filename> file is present in
your &oci; configuration directory. For example, this is
<filename>$HOME/.oci/config</filename> on a Linux host.
</para>
</listitem>
<listitem>
<para>
Click the <emphasis role="bold">Import</emphasis> icon to
open a dialog that prompts you to import cloud profiles from
external files.
</para>
<warning>
<para>
This action overwrites any cloud profiles that are in your
&product-name; global settings directory.
</para>
</warning>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Import</emphasis>.
</para>
<para>
Your cloud profile settings are saved to the
<filename>oci_config</filename> file in your &product-name;
global settings directory.
</para>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Properties</emphasis> to show
the cloud profile settings.
</para>
<para>
Double-click on the appropriate field to change the value.
</para>
</listitem>
<listitem>
<para>
Click <emphasis role="bold">Apply</emphasis> to save your
changes.
</para>
</listitem>
</orderedlist>
</sect2>
<sect2 id="cloud-vbox-oci-tasks">
<title>Using &product-name; With &oci;</title>
<para>
This section describes how you can use &product-name; with &oci;
to do the following tasks:
</para>
<itemizedlist>
<listitem>
<para>
Export an &product-name; VM to &oci;. See
<xref linkend="cloud-export-oci"/>.
</para>
</listitem>
<listitem>
<para>
Import a cloud instance into &product-name;. See
<xref linkend="cloud-import-oci"/>.
</para>
</listitem>
<listitem>
<para>
Create a new cloud instance from a custom image stored on
&oci;. See <xref linkend="cloud-new-vm"/>.
</para>
</listitem>
<listitem>
<para>
Use the <command>VBoxManage</command> commands to integrate
with &oci; and perform cloud operations. See
<xref linkend="cloud-using-cli"/>.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="cloud-export-oci">
<title>Exporting an Appliance to &oci;</title>
<para>
&product-name; supports the export of VMs to an &oci; service.
The exported VM is stored on &oci; as a custom Linux image. You
can configure whether a cloud instance is created and started
after the export process has completed.
</para>
<note>
<para>
Before you export a VM to &oci;, you must prepare the VM as
described in <xref linkend="cloud-export-oci-prepare-vm"/>.
</para>
</note>
<para>
Use the following steps to export a VM to &oci;:
</para>
<orderedlist>
<listitem>
<para>
Select <emphasis role="bold">File</emphasis>,
<emphasis role="bold">Export Appliance</emphasis> to open
the <emphasis role="bold">Export Virtual
Appliance</emphasis> wizard.
</para>
<para>
Select a VM to export and click
<emphasis role="bold">Next</emphasis> to open the
<emphasis role="bold">Appliance Settings</emphasis> screen.
</para>
</listitem>
<listitem>
<para>
From the <emphasis role="bold">Format</emphasis> drop-down
list, select <emphasis role="bold">&oci;</emphasis>.
</para>
<para>
In the <emphasis role="bold">Account</emphasis> drop-down
list, select the cloud profile for your &oci; account.
</para>
<para>
The list after the <emphasis role="bold">Account</emphasis>
field shows the profile settings for your cloud account.
</para>
<figure id="fig-export-appliance-oci">
<title>Appliance Settings Screen, Showing Cloud Profile and Machine Creation
Settings</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/export-appliance-oci.png"
width="12cm" />
</imageobject>
</mediaobject>
</figure>
<para>
In the <emphasis role="bold">Machine Creation</emphasis>
field, select an option to configure settings for a cloud
instance created when you export to &oci;. The options
enable you to do one of the following:
</para>
<itemizedlist>
<listitem>
<para>
Configure settings for the cloud instance
<emphasis>after</emphasis> you have finished exporting
the VM.
</para>
</listitem>
<listitem>
<para>
Configure settings for the cloud instance
<emphasis>before</emphasis> you start to export the VM.
</para>
</listitem>
<listitem>
<para>
Do not create a cloud instance when you export the VM.
</para>
</listitem>
</itemizedlist>
<para>
Click <emphasis role="bold">Next</emphasis> to make an API
request to the &oci; service and open the
<emphasis role="bold">Virtual System Settings</emphasis>
screen.
</para>
</listitem>
<listitem>
<para>
(Optional) Edit storage settings used for the exported
virtual machine in &oci;. You can change the following
settings:
</para>
<itemizedlist>
<listitem>
<para>
The name of the bucket used to store the exported files.
</para>
</listitem>
<listitem>
<para>
Whether to store the custom image in &oci;.
</para>
</listitem>
<listitem>
<para>
The name for the custom image in &oci;.
</para>
</listitem>
<listitem>
<para>
The launch mode for the custom image.
</para>
<para>
<emphasis role="bold">Paravirtualized</emphasis> mode
gives improved performance and should be suitable for
most &product-name; VMs.
</para>
<para>
<emphasis role="bold">Emulated</emphasis> mode is
suitable for legacy OS images.
</para>
</listitem>
</itemizedlist>
<para>
Click <emphasis role="bold">Export</emphasis> to continue.
</para>
</listitem>
<listitem>
<para>
Depending on the selection in the
<emphasis role="bold">Machine Creation</emphasis> field, the
<emphasis role="bold">Cloud Virtual Machine
Settings</emphasis> screen may be displayed before or after
export. This screen enables you to configure settings for
the cloud instance, such as Shape and Disk Size.
</para>
<para>
Click <emphasis role="bold">Create</emphasis>. The VM is
exported to &oci;.
</para>
<para>
Depending on the <emphasis role="bold">Machine
Creation</emphasis> setting, a cloud instance may be started
after upload to &oci; is completed.
</para>
</listitem>
<listitem>
<para>
Monitor the export process by using the &oci; Console.
</para>
</listitem>
</orderedlist>
<para>
You can also use the <command>VBoxManage export</command>
command to export a VM to &oci;. See
<xref linkend="vboxmanage-export-cloud"/>.
</para>
<sect3 id="cloud-export-oci-prepare-vm">
<title>Preparing a VM for Export to &oci;</title>
<para>
&oci; provides the option to import a custom Linux image.
Before an &product-name; image can be exported to &oci;, the
custom image needs to be prepared to ensure that instances
launched from the custom image can boot correctly and that
network connections will work. This section provides advice on
how to prepare a Linux image for export from &product-name;.
</para>
<para>
The following list shows some tasks to consider when preparing
an Oracle Linux VM for export:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Use DHCP for network
addresses.</emphasis> Configure the VM to use a DHCP
server to allocate network addresses, rather than using a
static IP address. The &oci; instance will then be
allocated an IP address automatically.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Do not specify a MAC
address.</emphasis> The network interface configuration
for the VM must not specify the MAC address.
</para>
<para>
Remove the HWADDR setting from the
<filename>/etc/sysconfig/ifcfg-<replaceable>devicename</replaceable></filename>
network script.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Disable persistent network device
naming rules.</emphasis> This means that the &oci;
instance will use the same network device names as the VM.
</para>
<orderedlist>
<listitem>
<para>
Change the GRUB kernel parameters.
</para>
<para>
Add <literal>net.ifnames=0</literal> and
<literal>biosdevname=0</literal> as kernel parameter
values to the <literal>GRUB_CMDLINE_LINUX</literal>
variable.
</para>
</listitem>
<listitem>
<para>
Update the GRUB configuration.
</para>
<screen># grub2-mkconfig -o /boot/grub2/grub.cfg</screen>
</listitem>
<listitem>
<para>
Disable any <literal>udev</literal> rules for network
device naming.
</para>
<para>
For example, if an automated <literal>udev</literal>
rule exists for <literal>net-persistence</literal>:
</para>
<screen># cd /etc/udev/rules.d
# rm -f 70-persistent-net.rules
# ln -s /dev/null /etc/udev/rules.d/70-persistent-net.rules</screen>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>
<emphasis role="bold">Enable the serial
console.</emphasis> This enables you to troubleshoot the
instance when it is running on &oci;.
</para>
<orderedlist>
<listitem>
<para>
Edit the <filename>/etc/default/grub</filename> file,
as follows:
</para>
<itemizedlist>
<listitem>
<para>
Remove the <literal>resume</literal> setting from
the kernel parameters. This setting slows down
boot time significantly.
</para>
</listitem>
<listitem>
<para>
Replace <literal>GRUB_TERMINAL="gfxterm"</literal>
with <literal>GRUB_TERMINAL="console
serial"</literal>. This configures use of the
serial console instead of a graphical terminal.
</para>
</listitem>
<listitem>
<para>
Add <literal>GRUB_SERIAL_COMMAND="serial --unit=0
--speed=115200"</literal>. This configures the
serial connection.
</para>
</listitem>
<listitem>
<para>
Add <literal>console=tty0
console=ttyS0,115200</literal> to the
<literal>GRUB_CMDLINE_LINUX</literal> variable.
This adds the serial console to the Linux kernel
boot parameters.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Regenerate the GRUB configuration.
</para>
<screen># grub2-mkconfig -o /boot/grub2/grub.cfg</screen>
</listitem>
<listitem>
<para>
To verify the changes, reboot the machine and run the
<command>dmesg</command> command to look for the
updated kernel parameters.
</para>
<screen># dmesg |grep console=ttyS0</screen>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>
<emphasis role="bold">Enable paravirtualized device
support.</emphasis> You do this by adding the
<literal>virtio</literal> drivers to the
<literal>initrd</literal> for the VM.
</para>
<orderedlist>
<listitem>
<para>
This procedure works only on machines with a Linux
kernel of version 3.4 or later. Check that the VM is
running a supported kernel:
</para>
<screen># uname -a</screen>
</listitem>
<listitem>
<para>
Use the <literal>dracut</literal> tool to rebuild
<literal>initrd</literal>. Add the
<literal>qemu</literal> module, as follows:
</para>
<screen># dracut –-logfile /var/log/Dracut.log –-force –-add qemu</screen>
</listitem>
<listitem>
<para>
Verify that the <literal>virtio</literal> drivers are
now present in <literal>initrd</literal>.
</para>
<screen> # lsinitrd |grep virtio</screen>
</listitem>
</orderedlist>
</listitem>
</itemizedlist>
<para>
For more information about importing a custom Linux image into
&oci;, see also:
</para>
<para>
<ulink url="https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/importingcustomimagelinux.htm" />
</para>
</sect3>
</sect2>
<sect2 id="cloud-import-oci">
<title>Importing an Instance from &oci;</title>
<para>
Perform the following steps to import a cloud instance from
&oci; into &product-name;:
</para>
<orderedlist>
<listitem>
<para>
Select <emphasis role="bold">File</emphasis>,
<emphasis role="bold">Import Appliance</emphasis> to open
the <emphasis role="bold">Import Virtual
Appliance</emphasis> wizard.
</para>
<para>
In the <emphasis role="bold">Source</emphasis> drop-down
list, select <emphasis role="bold">&oci;</emphasis>.
</para>
<para>
In the <emphasis role="bold">Account</emphasis> drop-down
list, select the cloud profile for your &oci; account.
</para>
<para>
The list after the <emphasis role="bold">Account</emphasis>
field shows the profile settings for your cloud account.
</para>
<para>
Choose the required cloud instance from the list in the
<emphasis role="bold">Machines</emphasis> field.
</para>
<para>
Click <emphasis role="bold">Next</emphasis> to make an API
request to the &oci; service and display the
<emphasis role="bold">Appliance Settings</emphasis> screen.
</para>
</listitem>
<listitem>
<para>
(Optional) Edit settings for the new local virtual machine.
</para>
<para>
For example, you can edit the VM name and description.
</para>
<figure id="fig-import-instance-oci">
<title>Import Cloud Instance Screen, Showing Profile Settings and VM Settings</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/import-instance.png"
width="12cm" />
</imageobject>
</mediaobject>
</figure>
<para>
Click <emphasis role="bold">Import</emphasis> to import the
instance from &oci;.
</para>
</listitem>
<listitem>
<para>
Monitor the import process by using the &oci; Console.
</para>
</listitem>
</orderedlist>
<para>
You can also use the <command>VBoxManage import</command>
command to import an instance from &oci;. See
<xref linkend="vboxmanage-import-cloud"/>.
</para>
<simplesect id="import-instance-sequence">
<title>Importing an Instance: Overview of Events</title>
<para>
The following describes the sequence of events when you import
an instance from &oci;.
</para>
<itemizedlist>
<listitem>
<para>
A custom image is created from the boot volume of the
instance.
</para>
</listitem>
<listitem>
<para>
The custom image is exported to an &oci; object and is
stored using Object Storage in the bucket specified by the
user.
</para>
</listitem>
<listitem>
<para>
The &oci; object is downloaded to the local host. The
object is a TAR archive which contains a boot volume of
the instance in QCOW2 format and a JSON file containing
metadata related to the instance.
</para>
</listitem>
<listitem>
<para>
The boot volume of the instance is extracted from the
archive and a new VMDK image is created by converting the
boot volume into the VMDK format. The VMDK image is
registered with &product-name;.
</para>
</listitem>
<listitem>
<para>
A new VM is created using the VMDK image for the cloud
instance.
</para>
<para>
By default, the new VM is not started after import from
&oci;.
</para>
</listitem>
<listitem>
<para>
The downloaded TAR archive is deleted after a successful
import.
</para>
</listitem>
</itemizedlist>
</simplesect>
</sect2>
<sect2 id="cloud-new-vm">
<title>Creating New Cloud Instances from a Custom Image</title>
<para>
You can use &product-name; to create new instances from a custom
image on your cloud service.
</para>
<para>
<xref linkend="cloud-export-oci"/> describes how to create a
custom image when you are exporting a VM to &oci;. Using a
custom image means that you can quickly create cloud instances
without having to upload your image to the cloud service every
time.
</para>
<para>
Perform the following steps to create a new cloud instance on
&oci;:
</para>
<orderedlist>
<listitem>
<para>
Select <emphasis role="bold">File</emphasis>,
<emphasis role="bold">New Cloud VM</emphasis> to open the
<emphasis role="bold">Create Cloud Virtual
Machine</emphasis> wizard.
</para>
</listitem>
<listitem>
<para>
From the <emphasis role="bold">Destination</emphasis>
drop-down list, select
<emphasis role="bold">&oci;</emphasis>.
</para>
<para>
In the <emphasis role="bold">Account</emphasis> drop-down
list, select the cloud profile for your &oci; account.
</para>
<para>
The list after the <emphasis role="bold">Account</emphasis>
field shows the profile settings for your cloud account.
</para>
<para>
In the <emphasis role="bold">Images</emphasis> list, select
from the custom images available on &oci;.
</para>
<figure id="fig-newcloudvm">
<title>New Cloud VM Wizard, Showing List of Custom Images</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/newcloudvm.png"
width="12cm" />
</imageobject>
</mediaobject>
</figure>
<para>
Click <emphasis role="bold">Next</emphasis> to make an API
request to the &oci; service and open the
<emphasis role="bold">Cloud Virtual Machine
Settings</emphasis> screen.
</para>
</listitem>
<listitem>
<para>
(Optional) Edit settings used for the new instance on &oci;.
</para>
<para>
For example, you can edit the Disk Size and Shape used for
the VM instance and the networking configuration.
</para>
<para>
Click <emphasis role="bold">Create</emphasis> to create the
new cloud instance.
</para>
</listitem>
<listitem>
<para>
Monitor the instance creation process by using the &oci;
Console.
</para>
</listitem>
</orderedlist>
<para>
You can also use the <command>VBoxManage cloud
instance</command> command to create and manage instances on a
cloud service. See <xref linkend="vboxmanage-cloud"/>.
</para>
</sect2>
<sect2 id="cloud-using-cli">
<title>Using VBoxManage Commands With &oci;</title>
<para>
This section includes some examples of how
<command>VBoxManage</command> commands can be used to integrate
with &oci; and perform common cloud operations.
</para>
<para>
<emphasis role="bold">Creating a Cloud Profile</emphasis>
</para>
<para>
To create a cloud profile called <literal>vbox-oci</literal>:
</para>
<screen>VBoxManage cloudprofile --provider "OCI" --profile="vbox-oci" add \
--clouduser="ocid1.user.oc1..." --keyfile="/home/username/.oci/oci_api_key.pem" \
--tenancy="ocid1.tenancy.oc1..." --compartment="ocid1.compartment.oc1..." --region="us-ashburn-1"
</screen>
<para>
The new cloud profile is added to the
<filename>oci_config</filename> file in your &product-name;
global configuration directory. For example, this is
<filename>$HOME/.VirtualBox/oci_config</filename> on a Windows
host.
</para>
<para>
<emphasis role="bold">Listing Cloud Instances</emphasis>
</para>
<para>
To list the instances in your &oci; compartment:
</para>
<screen>VBoxManage cloud --provider="OCI" --profile="vbox-oci" list instances
</screen>
<para>
<emphasis role="bold">Exporting an &product-name; VM to the
Cloud</emphasis>
</para>
<para>
To export a VM called <literal>myVM</literal> and create a cloud
instance called <literal>myVM_Cloud</literal>:
</para>
<screen>VBoxManage export myVM --output OCI:// --cloud 0 --vmname myVM_Cloud \
--cloudprofile "vbox-oci" --cloudbucket myBucket \
--cloudshape VM.Standard2.1 --clouddomain US-ASHBURN-AD-1 --clouddisksize 50 \
--cloudocivcn ocid1.vcn.oc1... --cloudocisubnet ocid1.subnet.oc1... \
--cloudkeepobject true --cloudlaunchinstance true --cloudpublicip true
</screen>
<para>
<emphasis role="bold">Importing a Cloud Instance Into
&product-name;</emphasis>
</para>
<para>
To import a cloud instance and create an &product-name; VM
called <literal>oci_Import</literal>:
</para>
<screen>VBoxManage import OCI:// --cloud --vmname oci_Import --memory 4000
--cpus 3 --ostype FreeBSD_64 --cloudprofile "vbox-oci"
--cloudinstanceid ocid1.instance.oc1... --cloudbucket myBucket
</screen>
<para>
<emphasis role="bold">Creating a New Cloud Instance From a
Custom Image</emphasis>
</para>
<para>
To create a new cloud instance from a custom image on &oci;:
</para>
<screen>VBoxManage cloud --provider="OCI" --profile="vbox-oci" instance create \
--domain-name="oraclecloud.com" --image-id="ocid1.image.oc1..." --display-name="myInstance" \
--shape="VM.Standard2.1" --subnet="ocid1.subnet.oc1..."</screen>
<para>
<emphasis role="bold">Terminating a Cloud Instance</emphasis>
</para>
<para>
To terminate an instance in your compartment on &oci;:
</para>
<screen>VBoxManage cloud --provider="OCI" --profile="vbox-oci" instance terminate \
--id="ocid1.instance.oc1..." </screen>
<para>
For more details about the available commands for cloud
operations, see <xref linkend="vboxmanage-cloud"/>.
</para>
</sect2>
</sect1>
<sect1 id="globalsettings">
<title>Global Settings</title>
<para>
The <emphasis role="bold">Global Settings</emphasis> dialog can be
displayed using the <emphasis role="bold">File</emphasis> menu, by
clicking the <emphasis role="bold">Preferences</emphasis> item.
This dialog offers a selection of settings, most of which apply to
all virtual machines of the current user. The
<emphasis role="bold">Extensions</emphasis> option applies to the
entire system.
</para>
<para>
The following settings are available:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">General.</emphasis> Enables the user to
specify the default folder or directory for VM files, and the
VRDP Authentication Library.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Input.</emphasis> Enables the user to
specify the Host key. This is the key that toggles whether the
cursor is in the focus of the VM or the Host OS windows, see
<xref linkend="keyb_mouse_normal"/>. The Host key is also used
to trigger certain VM actions, see
<xref linkend="specialcharacters"/>.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Update.</emphasis> Enables the user to
specify various settings for Automatic Updates.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Language.</emphasis> Enables the user to
specify the GUI language.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Display.</emphasis> Enables the user to
specify the screen resolution, and its width and height. A
default scale factor can be specified for all guest screens.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Network.</emphasis> Enables the user to
configure the details of NAT networks. See
<xref linkend="network_nat_service"/>.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Extensions.</emphasis> Enables the user
to list and manage the installed extension packages.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Proxy.</emphasis> Enables the user to
configure a HTTP Proxy Server.
</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="frontends">
<title>Alternative Front-Ends</title>
<para>
As briefly mentioned in <xref linkend="features-overview" />,
&product-name; has a very flexible internal design that enables
you to use multiple interfaces to control the same virtual
machines. For example, you can start a virtual machine with the
VirtualBox Manager window and then stop it from the command line.
With &product-name;'s support for the Remote Desktop Protocol
(RDP), you can even run virtual machines remotely on a headless
server and have all the graphical output redirected over the
network.
</para>
<para>
The following front-ends are shipped in the standard
&product-name; package:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">VirtualBox.</emphasis> This is the
VirtualBox Manager, a graphical user interface that uses the
Qt toolkit. This interface is described throughout this
manual. While this is the simplest and easiest front-end to
use, some of the more advanced &product-name; features are not
included.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">VBoxManage.</emphasis> A command-line
interface for automated and detailed control of every aspect
of &product-name;. See
<xref
linkend="vboxmanage" />.
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">VBoxHeadless.</emphasis> A front-end
that produces no visible output on the host at all, but can
act as a RDP server if the VirtualBox Remote Desktop Extension
(VRDE) is installed and enabled for the VM. As opposed to the
other graphical interfaces, the headless front-end requires no
graphics support. This is useful, for example, if you want to
host your virtual machines on a headless Linux server that has
no X Window system installed. See
<xref linkend="vboxheadless" />.
</para>
</listitem>
</itemizedlist>
<para>
If the above front-ends still do not satisfy your particular
needs, it is possible to create yet another front-end to the
complex virtualization engine that is the core of &product-name;,
as the &product-name; core neatly exposes all of its features in a
clean API. See <xref linkend="VirtualBoxAPI" />.
</para>
</sect1>
<sect1 id="soft-keyb">
<title>Soft Keyboard</title>
<para>
&product-name; provides a <emphasis>soft keyboard</emphasis> that
enables you to input keyboard characters on the guest. A soft
keyboard is an on-screen keyboard that can be used as an
alternative to a physical keyboard. See
<xref linkend="soft-keyb-using"/> for details of how to use the
soft keyboard.
</para>
<caution>
<para>
For best results, ensure that the keyboard layout configured on
the guest OS matches the keyboard layout used by the soft
keyboard. &product-name; does not do this automatically.
</para>
</caution>
<figure id="fig-soft-keyb">
<title>Soft Keyboard in a Guest Virtual Machine</title>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="images/softkeybd.png"
width="14cm" />
</imageobject>
</mediaobject>
</figure>
<para>
The soft keyboard can be used in the following scenarios:
</para>
<itemizedlist>
<listitem>
<para>
When the physical keyboard on the host is not the same as the
keyboard layout configured on the guest. For example, if the
guest is configured to use an international keyboard, but the
host keyboard is US English.
</para>
</listitem>
<listitem>
<para>
To send special key combinations to the guest. Note that some
common key combinations are also available in the
<emphasis role="bold">Input</emphasis>,
<emphasis role="bold">Keyboard</emphasis> menu of the guest VM
window. See <xref linkend="specialcharacters"/>.
</para>
</listitem>
<listitem>
<para>
For guests in kiosk mode, where a physical keyboard is not
present.
</para>
</listitem>
<listitem>
<para>
When using nested virtualization, the soft keyboard provides a
method of sending key presses to a guest.
</para>
</listitem>
</itemizedlist>
<para>
By default, the soft keyboard includes some common international
keyboard layouts. You can copy and modify these to meet your own
requirements. See <xref linkend="soft-keyb-custom"/>.
</para>
<sect2 id="soft-keyb-using">
<title>Using the Soft Keyboard</title>
<orderedlist>
<listitem>
<para>
Display the soft keyboard.
</para>
<para>
In the guest VM window, select
<emphasis role="bold">Input</emphasis>,
<emphasis role="bold">Keyboard</emphasis>,
<emphasis role="bold">Soft Keyboard</emphasis>.
</para>
</listitem>
<listitem>
<para>
Select the required keyboard layout.
</para>
<para>
The name of the current keyboard layout is displayed in the
task bar of the soft keyboard window. This is the previous
keyboard layout that was used.
</para>
<para>
Click the <emphasis role="bold">Layout List</emphasis> icon
in the task bar of the soft keyboard window. The
<emphasis role="bold">Layout List</emphasis> window is
displayed.
</para>
<para>
Select the required keyboard layout from the entries in the
<emphasis role="bold">Layout List</emphasis> window.
</para>
<para>
The keyboard display graphic is updated to show the
available input keys.
</para>
</listitem>
<listitem>
<para>
Use the soft keyboard to enter keyboard characters on the
guest.
</para>
<itemizedlist>
<listitem>
<para>
Modifier keys such as Shift, Ctrl, and Alt are available
on the soft keyboard. Click once to select the modifier
key, click twice to lock the modifier key.
</para>
<para>
The <emphasis role="bold">Reset the Keyboard and Release
All Keys</emphasis> icon can be used to release all
pressed modifier keys, both on the host and the guest.
</para>
</listitem>
<listitem>
<para>
To change the look of the soft keyboard, click the
<emphasis role="bold">Settings</emphasis> icon in the
task bar. You can change colors used in the keyboard
graphic, and can hide or show sections of the keyboard,
such as the NumPad or multimedia keys.
</para>
</listitem>
</itemizedlist>
</listitem>
</orderedlist>
</sect2>
<sect2 id="soft-keyb-custom">
<title>Creating a Custom Keyboard Layout</title>
<para>
You can use one of the supplied default keyboard layouts as the
starting point to create a custom keyboard layout.
</para>
<note>
<para>
To permananently save a custom keyboard layout, you must save
it to file. Otherwise, any changes you make are discarded when
you close down the <emphasis role="bold">Soft
Keyboard</emphasis> window.
</para>
<para>
Custom keyboard layouts that you save are stored as an XML
file on the host, in the <filename>keyboardLayouts</filename>
folder in the global configuration data directory. For
example, in
<filename>$HOME/.config/VirtualBox/keyboardLayouts</filename>
on a Linux host.
</para>
</note>
<orderedlist>
<listitem>
<para>
Display the <emphasis role="bold">Layout List</emphasis>.
</para>
<para>
Click the <emphasis role="bold">Layout List</emphasis> icon
in the task bar of the soft keyboard window.
</para>
</listitem>
<listitem>
<para>
Make a copy of an existing keyboard layout.
</para>
<para>
Highlight the required layout and click the
<emphasis role="bold">Copy the Selected Layout</emphasis>
icon.
</para>
<para>
A new layout entry with a name suffix of
<literal>-Copy</literal> is created.
</para>
</listitem>
<listitem>
<para>
Edit the new keyboard layout.
</para>
<para>
Highlight the new layout in the <emphasis role="bold">Layout
List</emphasis> and click the <emphasis role="bold">Edit the
Selected Layout</emphasis> icon.
</para>
<para>
Enter a new name for the layout.
</para>
<para>
Edit keys in the new layout. Click on the key that you want
to edit and enter new key captions in the
<emphasis role="bold">Captions</emphasis> fields.
</para>
<para>
The keyboard graphic is updated with the new captions.
</para>
</listitem>
<listitem>
<para>
(Optional) Save the layout to file. This means that your
custom keyboard layout will be available for future use.
</para>
<para>
Highlight the new layout in the <emphasis role="bold">Layout
List</emphasis> and click the <emphasis role="bold">Save the
Selected Layout into File</emphasis> icon.
</para>
<para>
Any custom layouts that you create can later be removed from
the Layout List, by highlighting and clicking the
<emphasis role="bold">Delete the Selected Layout</emphasis>
icon.
</para>
</listitem>
</orderedlist>
</sect2>
</sect1>
</chapter>
|