aboutsummaryrefslogtreecommitdiffstats
path: root/docs/man/xl.cfg.pod.5
blob: cd9696934bc499732118685eb66fdce1688c7c4e (plain)
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
=head1 NAME

xl.cfg - XL Domain Configuration File Syntax

=head1 SYNOPSIS

 /etc/xen/xldomain

=head1 DESCRIPTION

To create a VM (a domain in Xen terminology, sometimes called a guest)
with xl requires the provision of a domain config file.  Typically
these live in `/etc/xen/DOMAIN.cfg` where DOMAIN is the name of the
domain.

=head1 SYNTAX

A domain config file consists of a series of C<KEY=VALUE> pairs.

Some C<KEY>s are mandatory, others are general options which apply to
any guest type while others relate only to specific guest types
(e.g. PV or HVM guests).

A value C<VALUE> is one of:

=over 4

=item B<"STRING">

A string, surrounded by either single or double quotes.

=item B<NUMBER>

A number, in either decimal, octal (using a C<0> prefix) or
hexadecimal (using an C<0x> prefix).

=item B<BOOLEAN>

A C<NUMBER> interpreted as C<False> (C<0>) or C<True> (any other
value).

=item B<[ VALUE, VALUE, ... ]>

A list of C<VALUES> of the above types. Lists are homogeneous and are
not nested.

=back

The semantics of each C<KEY> defines which form of C<VALUE> is required.

=head1 OPTIONS

=head2 Mandatory Configuration Items

The following key is mandatory for any guest type:

=over 4

=item B<name="NAME">

Specifies the name of the domain.  Names of domains existing on a
single host must be unique.

=back

=head2 Selecting Guest Type

=over 4

=item B<builder="generic">

Specifies that this is to be a PV domain. This is the default.

=item B<builder="hvm">

Specifies that this is to be an HVM domain.  That is, a fully
virtualised computer with emulated BIOS, disk and network peripherals,
etc.  The default is a PV domain, suitable for hosting Xen-aware guest
operating systems.

=back

=head2 General Options

The following options apply to guests of any type.

=head3 CPU Allocation

=over 4

=item B<pool="CPUPOOLNAME">

Put the guest's vcpus into the named cpu pool.

=item B<vcpus=N>

Start the guest with N vcpus initially online.

=item B<maxvcpus=M>

Allow the guest to bring up a maximum of M vcpus. At start of day if
`vcpus=N` is less than `maxvcpus=M` then the first `N` vcpus will be
created online and the remainder will be offline.

=item B<cpus="CPU-LIST">

List of which cpus the guest is allowed to use. Default is no pinning at
all (more on this below). A C<CPU-LIST> may be specified as follows:

=over 4

=item "all"

To allow all the vcpus of the guest to run on all the cpus on the host.

=item "0-3,5,^1"

To allow all the vcpus of the guest to run on cpus 0,2,3,5.

=item ["2", "3"] (or [2, 3])

To ask for specific vcpu mapping. That means (in this example), vcpu #0
of the guest will run on cpu #2 of the host and vcpu #1 of the guest will
run on cpu #3 of the host.

=back

If this option is not specified, no vcpu to cpu pinning is established,
and the vcpus of the guest can run on all the cpus of the host.

If we are on a NUMA machine (i.e., if the host has more than one NUMA
node) and this option is not specified, libxl automatically tries to
place the guest on the least possible number of nodes. That, however,
will not affect vcpu pinning, so the guest will still be able to run on
all the cpus, it will just prefer the ones from the node it has been
placed on. A heuristic approach is used for choosing the best node (or
set of nodes), with the goals of maximizing performance for the guest
and, at the same time, achieving efficient utilization of host cpus
and memory. See F<docs/misc/xl-numa-placement.markdown> for more
details.

=back

=head3 CPU Scheduling

=over 4

=item B<cpu_weight=WEIGHT>

A domain with a weight of 512 will get twice as much CPU as a domain
with a weight of 256 on a contended host.
Legal weights range from 1 to 65535 and the default is 256.
Honoured by the credit, credit2 and sedf schedulers.

=item B<cap=N>

The cap optionally fixes the maximum amount of CPU a domain will be
able to consume, even if the host system has idle CPU cycles.
The cap is expressed in percentage of one physical CPU:
100 is 1 physical CPU, 50 is half a CPU, 400 is 4 CPUs, etc.
The default, 0, means there is no upper cap.
Honoured by the credit and credit2 schedulers.

NB: Many systems have features that will scale down the computing
power of a cpu that is not 100% utilized.  This can be in the
operating system, but can also sometimes be below the operating system
in the BIOS.  If you set a cap such that individual cores are running
at less than 100%, this may have an impact on the performance of your
workload over and above the impact of the cap. For example, if your
processor runs at 2GHz, and you cap a vm at 50%, the power management
system may also reduce the clock speed to 1GHz; the effect will be
that your VM gets 25% of the available power (50% of 1GHz) rather than
50% (50% of 2GHz).  If you are not getting the performance you expect,
look at performance and cpufreq options in your operating system and
your BIOS.

=item B<period=NANOSECONDS>

The normal EDF scheduling usage in nanoseconds. This means every period
the domain gets cpu time defined in slice.
Honoured by the sedf scheduler.

=item B<slice=NANOSECONDS>

The normal EDF scheduling usage in nanoseconds. it defines the time 
a domain get every period time.
Honoured by the sedf scheduler.

=item B<latency=N>

Scaled period if domain is doing heavy I/O.
Honoured by the sedf scheduler.

=item B<extratime=BOOLEAN>

Flag for allowing domain to run in extra time.
Honoured by the sedf scheduler.

=back

=head3 Memory Allocation

=over 4

=item B<memory=MBYTES>

Start the guest with MBYTES megabytes of RAM.

=item B<maxmem=MBYTES>

Specifies the maximum amount of memory a guest can ever see.
The value of B<maxmem=> must be equal or greater than B<memory=>.

In combination with B<memory=> it will start the guest "pre-ballooned",
if the values of B<memory=> and B<maxmem=> differ.
A "pre-ballooned" HVM guest needs a balloon driver, without a balloon driver
it will crash.

=back

=head3 Event Actions

=over 4

=item B<on_poweroff="ACTION">

Specifies what should be done with the domain if it shuts itself down.
The C<ACTION>s are:

=over 4

=item B<destroy>

destroy the domain

=item B<restart>

destroy the domain and immediately create a new domain with the same
configuration

=item B<rename-restart>

rename the domain which terminated, and then immediately create a new
domain with the same configuration as the original

=item B<preserve>

keep the domain.  It can be examined, and later destroyed with `xl
destroy`.

=item B<coredump-destroy>

write a "coredump" of the domain to F</var/xen/dump/NAME> and then
destroy the domain.

=item B<coredump-restart>

write a "coredump" of the domain to F</var/xen/dump/NAME> and then
restart the domain.

=back

The default for C<on_poweroff> is C<destroy>.

=item B<on_reboot="ACTION">

Action to take if the domain shuts down with a reason code requesting
a reboot.  Default is C<restart>.

=item B<on_watchdog="ACTION">

Action to take if the domain shuts down due to a Xen watchdog timeout.
Default is C<destroy>.

=item B<on_crash="ACTION">

Action to take if the domain crashes.  Default is C<destroy>.

=back

=head3 Other Options

=over 4

=item B<uuid="UUID">

Specifies the UUID of the domain.  If not specified, a fresh unique
UUID will be generated.

=item B<seclabel="LABEL">

Assign an XSM security label to this domain.

=item B<init_seclabel="LABEL">

Specify an XSM security label used for this domain temporarily during
its build. The domain's XSM label will be changed to the execution
seclabel (specified by "seclabel") once the build is complete, prior to
unpausing the domain. With a properly constructed security policy (such
as nomigrate_t in the example policy), this can be used to build a
domain whose memory is not accessible to the toolstack domain.

=item B<nomigrate=BOOLEAN>

Disable migration of this domain.  This enables certain other features
which are incompatible with migration. Currently this is limited to
enabling the invariant TSC feature flag in cpuid results when TSC is
not emulated.

=back

=head2 Devices

The following options define the paravirtual, emulated and physical
devices which the guest will contain.

=over 4

=item B<disk=[ "DISK_SPEC_STRING", "DISK_SPEC_STRING", ...]>

Specifies the disks (both emulated disks and Xen virtual block
devices) which are to be provided to the guest, and what objects on
the they should map to.  See F<docs/misc/xl-disk-configuration.txt>.

=item B<vif=[ "NET_SPEC_STRING", "NET_SPEC_STRING", ...]>

Specifies the networking provision (both emulated network adapters,
and Xen virtual interfaces) to provided to the guest.  See
F<docs/misc/xl-network-configuration.markdown>.

=item B<vtpm=[ "VTPM_SPEC_STRING", "VTPM_SPEC_STRING", ...]>

Specifies the virtual trusted platform module to be
provided to the guest. Please see F<docs/misc/vtpm.txt>
for more details.

Each B<VTPM_SPEC_STRING> is a comma-separated list of C<KEY=VALUE>
settings, from the following list:

=over 4

=item C<backend=DOMAIN>

Specify the backend domain name of id. This value is required!
If this domain is a guest, the backend should be set to the
vtpm domain name. If this domain is a vtpm, the
backend should be set to the vtpm manager domain name.

=item C<uuid=UUID>

Specify the uuid of this vtpm device. The uuid is used to uniquely
identify the vtpm device. You can create one using the uuidgen
program on unix systems. If left unspecified, a new uuid
will be randomly generated every time the domain boots.
If this is a vtpm domain, you should specify a value. The
value is optional if this is a guest domain.

=back

=item B<vfb=[ "VFB_SPEC_STRING", "VFB_SPEC_STRING", ...]>

Specifies the paravirtual framebuffer devices which should be supplied
to the domain.

This options does not control the emulated graphics card presented to
an HVM guest. See L<Emulated VGA Graphics Device> below for how to
configure the emulated device.

Each B<VFB_SPEC_STRING> is a comma-separated list of C<KEY=VALUE>
settings, from the following list:

=over 4

=item C<vnc=BOOLEAN>

Allow access to the display via the VNC protocol.  This enables the
other VNC-related settings.  The default is to enable this.

=item C<vnclisten="ADDRESS[:DISPLAYNUM]">

Specifies the IP address, and optionally VNC display number, to use.

NB that if you specify the display number here, you should not use
vncdisplay.

=item C<vncdisplay=DISPLAYNUM>

Specifies the VNC display number to use.  The actual TCP port number
will be DISPLAYNUM+5900.

NB that you should not use this option if you set the displaynum in the
vnclisten string.

=item C<vncunused=BOOLEAN>

Requests that the VNC display setup search for a free TCP port to use.
The actual display used can be accessed with C<xl vncviewer>.

=item C<vncpasswd="PASSWORD">

Specifies the password for the VNC server.

=item C<sdl=BOOLEAN>

Specifies that the display should be presented via an X window (using
Simple DirectMedia Layer). The default is to not enable this mode.

=item C<display=DISPLAY>

Specifies the X Window display that should be used when the sdl option
is used. Note: passing this value to the device-model is not currently
implemented, so providing this option will have no effect.

=item C<xauthority=XAUTHORITY>

Specifies the path to the X authority file that should be used to
connect to the X server when the sdl option is used. Note: passing
this value to the device-model is not currently implemented, so
providing this option will have no effect.

=item C<opengl=BOOLEAN>

Enable OpenGL acceleration of the SDL display. Only effects machines
using C<device_model_version="qemu-xen-traditional"> and only if the
device-model was compiled with OpenGL support. Disabled by default.

=item C<keymap="LANG">

Configure the keymap to use for the keyboard associated with this
display. If the input method does not easily support raw keycodes
(e.g. this is often the case when using VNC) then this allows us to
correctly map the input keys into keycodes seen by the guest. The
specific values which are accepted are defined by the version of the
device-model which you are using. See L</"Keymaps"> below or consult the
L<qemu(1)> manpage. The default is B<en-us>.

=back

=item B<pci=[ "PCI_SPEC_STRING", "PCI_SPEC_STRING", ... ]>

Specifies the host PCI devices to passthrough to this guest. Each B<PCI_SPEC_STRING>
has the form C<[DDDD:]BB:DD.F[@VSLOT],KEY=VALUE,KEY=VALUE,...> where:

=over 4

=item B<DDDD:BB:DD.F>

Identifies the PCI device from the host perspective in domain
(B<DDDD>), Bus (B<BB>), Device (B<DD>) and Function (B<F>) syntax. This is
the same scheme as used in the output of C<lspci> for the device in
question. Note: By default C<lspci> will omit the domain (B<DDDD>) if it
is zero and it is optional here also. You may specify the function
(B<F>) as B<*> to indicate all functions.

=item B<@VSLOT>

Specifies the virtual device where the guest will see this
device. This is equivalent to the B<DD> which the guest sees. In a
guest B<DDDD> and B<BB> are C<0000:00>.

=item B<KEY=VALUE>

Possible B<KEY>s are:

=over 4

=item B<permissive=BOOLEAN>

(PV only) By default pciback only allows PV guests to write "known
safe" values into PCI config space.  But many devices require writes
to other areas of config space in order to operate properly.  This
tells the pciback driver to allow all writes to PCI config space of
this device by this domain.  This option should be enabled with
caution: it gives the guest much more control over the device, which
may have security or stability implications.  It is recommended to
enable this option only for trusted VMs under administrator control.

=item B<msitranslate=BOOLEAN>

Specifies that MSI-INTx translation should be turned on for the PCI
device. When enabled, MSI-INTx translation will always enable MSI on
the PCI device regardless whether the guest uses INTx or MSI. Some
device drivers, such as NVIDIA's, detect an inconsistency and do not
function when this option is enabled. Therefore the default is false (0).

=item B<power_mgmt=BOOLEAN>

(HVM only) Specifies that the VM should be able to program the
D0-D3hot power management states for the PCI device. False (0) by
default.

=back

=back

=item B<pci_permissive=BOOLEAN>

(PV only) Changes the default value of 'permissive' for all PCI
devices passed through to this VM. See L<permissive|/"permissive_boolean">
above.

=item B<pci_msitranslate=BOOLEAN>

Changes the default value of 'msitranslate' for all PCI devices passed
through to this VM. See L<msitranslate|/"msitranslate_boolean"> above.

=item B<pci_power_mgmt=BOOLEAN>

(HVM only) Changes the default value of 'power_mgmt' for all PCI
devices passed through to this VM. See L<power_mgt|/"power_mgmt_boolean">
above.

=item B<gfx_passthru=BOOLEAN>

Enable graphics device PCI passthrough. This option makes an assigned
PCI graphics card become primary graphics card in the VM. The QEMU
emulated graphics adapter is disabled and the VNC console for the VM
will not have any graphics output. All graphics output, including boot
time QEMU BIOS messages from the VM, will go to the physical outputs
of the passedthrough physical graphics card.

The graphics card PCI device to passthrough is chosen with B<pci>
option, exactly in the same way as normal Xen PCI device
passthrough/assignment is done.  Note that gfx_passthru does not do
any kind of sharing of the GPU, so you can only assign the GPU to one
single VM at a time.

gfx_passthru also enables various legacy VGA memory ranges, BARs, MMIOs,
and ioports to be passed thru to the VM, since those are required
for correct operation of things like VGA BIOS, text mode, VBE, etc.

Enabling gfx_passthru option also copies the physical graphics card
video BIOS to the guest memory, and executes the VBIOS in the guest
to initialize the graphics card.

Most graphics adapters require vendor specific tweaks for properly
working graphics passthrough. See the XenVGAPassthroughTestedAdapters
L<http://wiki.xen.org/wiki/XenVGAPassthroughTestedAdapters> wiki page
for currently supported graphics cards for gfx_passthru.

gfx_passthru is currently only supported with the qemu-xen-traditional
device-model. Upstream qemu-xen device-model currently does not have
support for gfx_passthru.

Note that some graphics adapters (AMD/ATI cards, for example) do not
necessarily require gfx_passthru option, so you can use the normal Xen
PCI passthrough to assign the graphics card as a secondary graphics
card to the VM. The QEMU-emulated graphics card remains the primary
graphics card, and VNC output is available from the QEMU-emulated
primary adapter.

More information about Xen gfx_passthru feature is available
on the XenVGAPassthrough L<http://wiki.xen.org/wiki/XenVGAPassthrough>
wiki page.

=item B<ioports=[ "IOPORT_RANGE", "IOPORT_RANGE", ... ]>

Allow guest to access specific legacy I/O ports. Each B<IOPORT_RANGE>
is given in hexadecimal and may either a span e.g. C<2f8-2ff>
(inclusive) or a single I/O port C<2f8>.

It is recommended to use this option only for trusted VMs under
administrator control.

=item B<iomem=[ "IOMEM_START,NUM_PAGES", "IOMEM_START,NUM_PAGES", ... ]>

Allow guest to access specific hardware I/O memory pages. B<IOMEM_START>
is a physical page number. B<NUM_PAGES> is the number
of pages beginning with B<START_PAGE> to allow access. Both values
must be given in hexadecimal.

It is recommended to use this option only for trusted VMs under
administrator control.


=item B<irqs=[ NUMBER, NUMBER, ... ]>

Allow a guest to access specific physical IRQs.

It is recommended to use this option only for trusted VMs under
administrator control.

=back

=head2 Paravirtualised (PV) Guest Specific Options

The following options apply only to Paravirtual guests.

=over 4

=item B<kernel="PATHNAME">

Load the specified file as the kernel image.  Either B<kernel> or
B<bootloader> must be specified for PV guests.

=item B<ramdisk="PATHNAME">

Load the specified file as the ramdisk.

=item B<bootloader="PROGRAM">

Run C<PROGRAM> to find the kernel image and ramdisk to use.  Normally
C<PROGRAM> would be C<pygrub>, which is an emulation of
grub/grub2/syslinux.

=item B<bootloader_args=[ "ARG", "ARG", ...]>

Append B<ARG>s to the arguments to the B<bootloader>
program. Alternatively if the argument is a simple string then it will
be split into words at whitespace (this second option is deprecated).

=item B<root="STRING">

Append B<root="STRING"> to the kernel command line (Note: it is guest
specific what meaning this has).

=item B<extra="STRING">

Append B<STRING> to the kernel command line. Note: it is guest
specific what meaning this has).

=item B<e820_host=BOOLEAN>

Selects whether to expose the host e820 (memory map) to the guest via
the virtual e820. When this option is false (0) the guest pseudo-physical
address space consists of a single contiguous RAM region. When this
option is specified the virtual e820 instead reflects the host e820
and contains the same PCI holes. The total amount of RAM represented
by the memory map is always the same, this option configures only how
it is laid out.

Exposing the host e820 to the guest gives the guest kernel the
opportunity to set aside the required part of its pseudo-physical
address space in order to provide address space to map passedthrough
PCI devices. It is guest Operating System dependent whether this
option is required, specifically it is required when using a mainline
Linux ("pvops") kernel. This option defaults to true (1) if any PCI
passthrough devices are configured and false (0) otherwise. If you do not
configure any passthrough devices at domain creation time but expect
to hotplug devices later then you should set this option. Conversely
if your particular guest kernel does not require this behaviour then
it is safe to allow this to be enabled but you may wish to disable it
anyway.

=back

=head2 Fully-virtualised (HVM) Guest Specific Options

The following options apply only to HVM guests.

=head3 Boot Device

=over 4

=item B<boot=[c|d|n]>

Selects the emulated virtual device to boot from. Options are hard
disk (B<c>), cd-rom (B<d>) or network/PXE (B<n>). Multiple options can be
given and will be attempted in the order they are given. e.g. to boot
from cd-rom but fallback to the hard disk you can give B<dc>. The
default is B<cd>.

=back

=head3 Paging

The following options control the mechanisms used to virtualise guest
memory.  The defaults are selected to give the best results for the
common case and so you should normally leave these options
unspecified.

=over 4

=item B<hap=BOOLEAN>

Turns "hardware assisted paging" (the use of the hardware nested page
table feature) on or off.  This feature is called EPT (Extended Page
Tables) by Intel and NPT (Nested Page Tables) or RVI (Rapid
Virtualisation Indexing) by AMD.  Affects HVM guests only.  If turned
off, Xen will run the guest in "shadow page table" mode where the
guest's page table updates and/or TLB flushes etc. will be emulated.
Use of HAP is the default when available.

=item B<oos=BOOLEAN>

Turns "out of sync pagetables" on or off.  When running in shadow page
table mode, the guest's page table updates may be deferred as
specified in the Intel/AMD architecture manuals.  However this may
expose unexpected bugs in the guest, or find bugs in Xen, so it is
possible to disable this feature.  Use of out of sync page tables,
when Xen thinks it appropriate, is the default.

=item B<shadow_memory=MBYTES>

Number of megabytes to set aside for shadowing guest pagetable pages
(effectively acting as a cache of translated pages) or to use for HAP
state. By default this is 1MB per guest vcpu plus 8KB per MB of guest
RAM. You should not normally need to adjust this value. However if you
are not using hardware assisted paging (i.e. you are using shadow
mode) and your guest workload consists of a a very large number of
similar processes then increasing this value may improve performance.

=back

=head3 Processor and Platform Features

The following options allow various processor and platform level
features to be hidden or exposed from the guest's point of view. This
can be useful when running older guest Operating Systems which may
misbehave when faced with more modern features. In general you should
accept the defaults for these options wherever possible.

=over 4

=item B<bios="STRING">

Select the virtual firmware that is exposed to the guest.
By default, a guess is made based on the device model, but sometimes
it may be useful to request a different one, like UEFI.

=over 4

=item B<rombios>

Loads ROMBIOS, a 16-bit x86 compatible BIOS. This is used by default
when device_model_version=qemu-xen-traditional. This is the only BIOS
option supported when device_model_version=qemu-xen-traditional. This is
the BIOS used by all previous Xen versions.

=item B<seabios>

Loads SeaBIOS, a 16-bit x86 compatible BIOS. This is used by default
with device_model_version=qemu-xen.

=item B<ovmf>

Loads OVMF, a standard UEFI firmware by Tianocore project.
Requires device_model_version=qemu-xen.

=back

=item B<pae=BOOLEAN>

Hide or expose the IA32 Physical Address Extensions. These extensions
make it possible for a 32 bit guest Operating System to access more
than 4GB of RAM. Enabling PAE also enabled other features such as
NX. PAE is required if you wish to run a 64-bit guest Operating
System. In general you should leave this enabled and allow the guest
Operating System to choose whether or not to use PAE. (X86 only)

=item B<acpi=BOOLEAN>

Expose ACPI (Advanced Configuration and Power Interface) tables from
the virtual firmware to the guest Operating System. ACPI is required
by most modern guest Operating Systems. This option is enabled by
default and usually you should omit it. However it may be necessary to
disable ACPI for compatibility with some guest Operating Systems.

=item B<acpi_s3=BOOLEAN>

Include the S3 (suspend-to-ram) power state in the virtual firmware
ACPI table. True (1) by default.

=item B<acpi_s4=BOOLEAN>

Include S4 (suspend-to-disk) power state in the virtual firmware ACPI
table. True (1) by default.

=item B<apic=BOOLEAN>

Include information regarding APIC (Advanced Programmable Interrupt
Controller) in the firmware/BIOS tables on a single processor
guest. This causes the MP (multiprocessor) and PIR (PCI Interrupt
Routing) tables to be exported by the virtual firmware. This option
has no effect on a guest with multiple virtual CPUS as they must
always include these tables. This option is enabled by default and you
should usually omit it but it may be necessary to disable these
firmware tables when using certain older guest Operating
Systems. These tables have been superseded by newer constructs within
the ACPI tables. (X86 only)

=item B<nx=BOOLEAN>

Hides or exposes the No-eXecute capability. This allows a guest
Operating system to map pages such that they cannot be executed which
can enhance security. This options requires that PAE also be
enabled. (X86 only)

=item B<hpet=BOOLEAN>

Enables or disables HPET (High Precision Event Timer). This option is
enabled by default and you should usually omit it. It may be necessary
to disable the HPET in order to improve compatibility with guest
Operating Systems (X86 only)

=item B<nestedhvm=BOOLEAN>

Enable or disables guest access to hardware virtualisation features,
e.g. it allows a guest Operating System to also function as a
hypervisor. This option is disabled by default. You may want this
option if you want to run another hypervisor (including another copy
of Xen) within a Xen guest or to support a guest Operating System
which uses hardware virtualisation extensions (e.g. Windows XP
compatibility mode on more modern Windows OS).

=item B<cpuid="LIBXL_STRING"> or B<cpuid=[ "XEND_STRING", "XEND_STRING" ]>

Configure the value returned when a guest executes CPUID instruction.
Two versions of config syntax are recognized: libxl and xend.

The libxl syntax is a comma separated list of key=value pairs, preceded by the
word "host". A few keys take a numerical value, all others take a single
character which describes what to do with the feature bit.

Possible values for a single feature bit:
  '1' -> force the corresponding bit to 1
  '0' -> force to 0
  'x' -> Get a safe value (pass through and mask with the default policy)
  'k' -> pass through the host bit value
  's' -> as 'k' but preserve across save/restore and migration (not implemented)

List of keys taking a value:
apicidsize brandid clflush family localapicid maxleaf model nc proccount procpkg
stepping

List of keys taking a character:
3dnow 3dnowext 3dnowprefetch abm acpi aes altmovcr8 apic avx clfsh cmov
cmplegacy cmpxchg16 cmpxchg8 cntxid dca de ds dscpl dtes64 est extapic f16c
ffxsr fma4 fpu fxsr htt hypervisor ia64 ibs lahfsahf lm lwp mca mce misalignsse
mmx mmxext monitor movbe msr mtrr nodeid nx osvw osxsave pae page1gb pat pbe
pclmulqdq pdcm pge popcnt pse pse36 psn rdtscp skinit smx ss sse sse2 sse3
sse4_1 sse4_2 sse4a ssse3 svm svm_decode svm_lbrv svm_npt svm_nrips
svm_pausefilt svm_tscrate svm_vmcbclean syscall sysenter tbm tm tm2 topoext tsc
vme vmx wdt x2apic xop xsave xtpr

The xend syntax is a list of values in the form of
'leafnum:register=bitstring,register=bitstring'
  "leafnum" is the requested function,
  "register" is the response register to modify
  "bitstring" represents all bits in the register, its length must be 32 chars.
  Each successive character represent a lesser-significant bit, possible values
  are listed above in the libxl section.

Example to hide two features from the guest: 'tm', which is bit #29 in EDX, and
'pni' (SSE3), which is bit #0 in ECX:

xend: [ '1:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0,edx=xx0xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ]

libxl: 'host,tm=0,sse3=0'

More info about the CPUID instruction can be found in the processor manuals, and
in Wikipedia: L<http://en.wikipedia.org/wiki/CPUID>

=item B<acpi_firmware="STRING">

Specify a path to a file that contains extra ACPI firmware tables to pass in to
a guest. The file can contain several tables in their binary AML form
concatenated together. Each table self describes its length so no additional
information is needed. These tables will be added to the ACPI table set in the
guest. Note that existing tables cannot be overridden by this feature. For
example this cannot be used to override tables like DSDT, FADT, etc.

=item B<smbios_firmware="STRING">

Specify a path to a file that contains extra SMBIOS firmware structures to pass
in to a guest. The file can contain a set DMTF predefined structures which will
override the internal defaults. Not all predefined structures can be overridden,
only the following types: 0, 1, 2, 3, 11, 22, 39. The file can also contain any
number of vendor defined SMBIOS structures (type 128 - 255). Since SMBIOS
structures do not present their overall size, each entry in the file must be
preceded by a 32b integer indicating the size of the next structure.

=back 

=head3 Guest Virtual Time Controls

=over 4

=item B<tsc_mode="MODE">


Specifies how the TSC (Time Stamp Counter) should be provided to the
guest (X86 only). Specifying this option as a number is
deprecated. Options are:

=over 4

=item B<"default">

Guest rdtsc/p executed natively when monotonicity can be guaranteed
and emulated otherwise (with frequency scaled if necessary).

=item B<"always_emulate">

Guest rdtsc/p always emulated at 1GHz (kernel and user). Guest rdtsc/p
always emulated and the virtual TSC will appear to increment (kernel
and user) at a fixed 1GHz rate, regardless of the PCPU HZ rate or
power state; Although there is an overhead associated with emulation
this will NOT affect underlying CPU performance.

=item B<"native">

Guest rdtsc always executed natively (no monotonicity/frequency
guarantees); guest rdtscp emulated at native frequency if unsupported
by h/w, else executed natively.

=item B<"native_paravirt">

Same as B<native>, except xen manages TSC_AUX register so guest can
determine when a restore/migration has occurred and assumes guest
obtains/uses pvclock-like mechanism to adjust for monotonicity and
frequency changes.

=back

Please see F<docs/misc/tscmode.txt> for more information on this option.

=item B<localtime=BOOLEAN>

Set the real time clock to local time or to UTC. False (0) by default,
i.e. set to UTC.

=item B<rtc_timeoffset=SECONDS>

Set the real time clock offset in seconds. False (0) by default.


=item B<vpt_align=BOOLEAN>

Specifies that periodic Virtual Platform Timers should be aligned to
reduce guest interrupts. Enabling this option can reduce power
consumption, especially when a guest uses a high timer interrupt
frequency (HZ) values. The default is true (1).

=item B<timer_mode=MODE>

Specifies the mode for Virtual Timers. The valid values are as follows:

=over 4

=item B<"delay_for_missed_ticks">

Delay for missed ticks. Do not advance a vcpu's time beyond the
correct delivery time for interrupts that have been missed due to
preemption. Deliver missed interrupts when the vcpu is rescheduled and
advance the vcpu's virtual time stepwise for each one.

=item B<"no_delay_for_missed_ticks">

No delay for missed ticks. As above, missed interrupts are delivered,
but guest time always tracks wallclock (i.e., real) time while doing
so.

=item B<"no_missed_ticks_pending">

No missed interrupts are held pending. Instead, to ensure ticks are
delivered at some non-zero rate, if we detect missed ticks then the
internal tick alarm is not disabled if the VCPU is preempted during
the next tick period.

=item B<"one_missed_tick_pending">

One missed tick pending. Missed interrupts are collapsed
together and delivered as one 'late tick'.  Guest time always tracks
wallclock (i.e., real) time.

=back

=back

=head3 Support for Paravirtualisation of HVM Guests

The following options allow Paravirtualised features (such as devices)
to be exposed to the guest Operating System in an HVM guest.
Utilising these features requires specific guest support but when
available they will result in improved performance.

=over 4

=item B<xen_platform_pci=BOOLEAN>

Enable or disable the Xen platform PCI device.  The presence of this
virtual device enables a guest Operating System (subject to the
availability of suitable drivers) to make use of paravirtualisation
features such as disk and network devices etc. Enabling these drivers
improves performance and is strongly recommended when available. PV
drivers are available for various Operating Systems including HVM
Linux L<http://wiki.xen.org/wiki/XenLinuxPVonHVMdrivers> and Microsoft
Windows L<http://wiki.xen.org/wiki/XenWindowsGplPv>.

=item B<viridian=BOOLEAN>

Turns on or off the exposure of MicroSoft Hyper-V (AKA viridian)
compatible enlightenments to the guest.  These can improve performance
of Microsoft Windows guests from Windows Vista and Windows 2008
onwards and setting this option for such guests is strongly
recommended. This option should be harmless for other versions of
Windows (although it will not give any benefit) and the majority of
other non-Windows OSes. However it is known to be incompatible with
some other Operating Systems and in some circumstance can prevent
Xen's own paravirtualisation interfaces for HVM guests from being
used.

=back

=head3 Emulated VGA Graphics Device

The following options control the features of the emulated graphics
device.  Many of these options behave similarly to the equivalent key
in the B<VFB_SPEC_STRING> for configuring virtual frame buffer devices
(see above).

=over 4

=item B<videoram=MBYTES>

Sets the amount of RAM which the emulated video card will contain,
which in turn limits the resolutions and bit depths which will be
available.
The default amount of video ram for stdvga is 8MB which is sufficient
for e.g. 1600x1200 at 32bpp and videoram option is currently working
only when using the qemu-xen-traditional device-model.

When using the emulated Cirrus graphics card (B<vga="cirrus">)
the amount of video ram is fixed at 4MB which is sufficient
for 1024x768 at 32 bpp and videoram option is currently working
only when using the upstream qemu-xen device-model.

=item B<stdvga=BOOLEAN>

Select a standard VGA card with VBE (VESA BIOS Extensions) as the
emulated graphics device. The default is false (0) which means to emulate
a Cirrus Logic GD5446 VGA card. If your guest supports VBE 2.0 or
later (e.g. Windows XP onwards) then you should enable this.
stdvga supports more video ram and bigger resolutions than Cirrus.
This option is deprecated, use vga="stdvga" instead.

=item B<vga="STRING">

Selects the emulated video card (stdvga|cirrus).
The default is cirrus.

=item B<vnc=BOOLEAN>

Allow access to the display via the VNC protocol.  This enables the
other VNC-related settings.  The default is to enable this.

=item B<vncviewer=BOOLEAN>

Automatically spawn a vncviewer when creating/restoring a guest.

=item B<vnclisten="ADDRESS[:DISPLAYNUM]">

Specifies the IP address, and optionally VNC display number, to use.

=item B<vncdisplay=DISPLAYNUM>

Specifies the VNC display number to use. The actual TCP port number
will be DISPLAYNUM+5900.

=item B<vncunused=BOOLEAN>

Requests that the VNC display setup search for a free TCP port to use.
The actual display used can be accessed with C<xl vncviewer>.

=item B<vncpasswd="PASSWORD">

Specifies the password for the VNC server.

=item B<keymap="LANG">

Configure the keymap to use for the keyboard associated with this
display. If the input method does not easily support raw keycodes
(e.g. this is often the case when using VNC) then this allows us to
correctly map the input keys into keycodes seen by the guest. The
specific values which are accepted are defined by the version of the
device-model which you are using. See L</"Keymaps"> below or consult the
L<qemu(1)> manpage. The default is B<en-us>.

=item B<sdl=BOOLEAN>

Specifies that the display should be presented via an X window (using
Simple DirectMedia Layer). The default is not to enable this mode.

=item B<opengl=BOOLEAN>

Enable OpenGL acceleration of the SDL display. Only effects machines
using B<device_model_version="qemu-xen-traditional"> and only if the
device-model was compiled with OpenGL support. False (0) by default.

=item B<nographic=BOOLEAN>

Enable or disable the virtual graphics device.  The default is to
provide a VGA graphics device but this option can be used to disable
it.

=back

=head3 Spice Graphics Support

The following options control the features of SPICE.

=over 4

=item B<spice=BOOLEAN>

Allow access to the display via the SPICE protocol.  This enables the
other SPICE-related settings.

=item B<spicehost="ADDRESS">

Specify the interface address to listen on if given, otherwise any
interface.

=item B<spiceport=NUMBER>

Specify the port to listen on by the SPICE server if the SPICE is
enabled.

=item B<spicetls_port=NUMBER>

Specify the secure port to listen on by the SPICE server if the SPICE
is enabled. At least one of the spiceport or spicetls_port must be
given if SPICE is enabled.  NB. the options depending on spicetls_port
have not been supported.

=item B<spicedisable_ticketing=BOOLEAN>

Enable client connection without password. When disabled, spicepasswd
must be set. The default is false (0).

=item B<spicepasswd="PASSWORD">

Specify the ticket password which is used by a client for connection.

=item B<spiceagent_mouse=BOOLEAN>

Whether SPICE agent is used for client mouse mode. The default is true (1)
(turn on)

=item B<spicevdagent=BOOLEAN>

Enables spice vdagent. The Spice vdagent is an optional component for
enhancing user experience and performing guest-oriented management
tasks. Its features includes: client mouse mode (no need to grab mouse
by client, no mouse lag), automatic adjustment of screen resolution,
copy and paste (text and image) between client and domU. It also
requires vdagent service installed on domU o.s. to work. The default is 0.

=item B<spice_clipboard_sharing=BOOLEAN>

Enables Spice clipboard sharing (copy/paste). It requires spicevdagent
enabled. The default is false (0).

=back

=head3 Miscellaneous Emulated Hardware

=over 4

=item B<serial=DEVICE>

Redirect the virtual serial port to B<DEVICE>. Please see the
B<-serial> option in the L<qemu(1)> manpage for details of the valid
B<DEVICE> options. Default is B<vc> when in graphical mode and
B<stdio> if B<nographics=1> is used.

=item B<soundhw=DEVICE>

Select the virtual sound card to expose to the guest. The valid
devices are defined by the device model configuration, please see the
L<qemu(1)> manpage for details. The default is not to export any sound
device.

=item B<usb=BOOLEAN>

Enables or disables an emulated USB bus in the guest.

=item B<usbdevice=[ "DEVICE", "DEVICE", ...]>

Adds B<DEVICE>s to the emulated USB bus. The USB bus must also be
enabled using B<usb=1>. The most common use for this option is
B<usbdevice=['tablet']> which adds pointer device using absolute
coordinates. Such devices function better than relative coordinate
devices (such as a standard mouse) since many methods of exporting
guest graphics (such as VNC) work better in this mode. Note that this
is independent of the actual pointer device you are using on the
host/client side.

Host devices can also be passed through in this way, by specifying
host:USBID, where USBID is of the form xxxx:yyyy.  The USBID can
typically be found by using lsusb or usb-devices.

The form usbdevice=DEVICE is also accepted for backwards compatibility.

More valid options can be found in the "usbdevice" section of the qemu
documentation.

=item B<vendor_device="VENDOR_DEVICE">

Selects which variant of the QEMU xen-pvdevice should be used for this
guest. Valid values are:

=over 4

=item B<none>

The xen-pvdevice should be omitted. This is the default.

=item B<xenserver>

The xenserver variant of the xen-pvdevice (device-id=C000) will be
specified, enabling the use of XenServer PV drivers in the guest.

=back

This parameter only takes effect when device_model_version=qemu-xen.
See F<docs/misc/pci-device-reservations.txt> for more information.

=back

=head2 Device-Model Options

The following options control the selection of the device-model.  This
is the component which provides emulation of the virtual devices to an
HVM guest.  For a PV guest a device-model is sometimes used to provide
backends for certain PV devices (most usually a virtual framebuffer
device).

=over 4

=item B<device_model_version="DEVICE-MODEL">

Selects which variant of the device-model should be used for this
guest. Valid values are:

=over 4

=item B<qemu-xen>

Use the device-model merged into the upstream QEMU project.
This device-model is the default for Linux dom0.

=item B<qemu-xen-traditional>

Use the device-model based upon the historical Xen fork of Qemu.
This device-model is still the default for NetBSD dom0.

=back

It is recommended to accept the default value for new guests.  If
you have existing guests then, depending on the nature of the guest
Operating System, you may wish to force them to use the device
model which they were installed with.

=item B<device_model_override="PATH">

Override the path to the binary to be used as the device-model. The
binary provided here MUST be consistent with the
`device_model_version` which you have specified. You should not
normally need to specify this option.

=item B<device_model_stubdomain_override=BOOLEAN>

Override the use of stubdomain based device-model.  Normally this will
be automatically selected based upon the other features and options
you have selected.

=item B<device_model_stubdomain_seclabel="LABEL">

Assign an XSM security label to the device-model stubdomain.

=item B<device_model_args=[ "ARG", "ARG", ...]>

Pass additional arbitrary options on the device-model command
line. Each element in the list is passed as an option to the
device-model.

=item B<device_model_args_pv=[ "ARG", "ARG", ...]>

Pass additional arbitrary options on the device-model command line for
a PV device model only. Each element in the list is passed as an
option to the device-model.

=item B<device_model_args_hvm=[ "ARG", "ARG", ...]>

Pass additional arbitrary options on the device-model command line for
an HVM device model only. Each element in the list is passed as an
option to the device-model.

=back

=head2 Keymaps

The keymaps available are defined by the device-model which you are
using. Commonly this includes:

        ar  de-ch  es  fo     fr-ca  hu  ja  mk     no  pt-br  sv
        da  en-gb  et  fr     fr-ch  is  lt  nl     pl  ru     th
        de  en-us  fi  fr-be  hr     it  lv  nl-be  pt  sl     tr

The default is B<en-us>.

See L<qemu(1)> for more information.

=head1 SEE ALSO

=over 4

=item L<xl(1)>

=item L<xlcpupool.cfg(5)>

=item F<xl-disk-configuration>

=item F<xl-network-configuration>

=item F<docs/misc/tscmode.txt>

=back

=head1 FILES

F</etc/xen/NAME.cfg>
F</var/xen/dump/NAME>

=head1 BUGS

This document may contain items which require further
documentation. Patches to improve incomplete items (or any other item)
are gratefully received on the xen-devel@lists.xen.org mailing
list. Please see L<http://wiki.xen.org/wiki/SubmittingXenPatches> for
information on how to submit a patch to Xen.