forked from xapi-project/xen-api
/
datamodel.ml
7974 lines (7287 loc) · 359 KB
/
datamodel.ml
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
(*
* Copyright (C) 2006-2009 Citrix Systems Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; version 2.1 only. with the special
* exception on linking described in file LICENSE.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*)
(** Data Model and Message Specification for Xen Management Tools *)
open Datamodel_types
(* IMPORTANT: Please bump schema vsn if you change/add/remove a _field_.
You do not have to bump vsn if you change/add/remove a message *)
let schema_major_vsn = 5
let schema_minor_vsn = 66
(* Historical schema versions just in case this is useful later *)
let rio_schema_major_vsn = 5
let rio_schema_minor_vsn = 19
let miami_release_schema_major_vsn = 5
let miami_release_schema_minor_vsn = 35
let orlando_release_schema_major_vsn = 5
let orlando_release_schema_minor_vsn = 55
let george_release_schema_major_vsn = 5
let george_release_schema_minor_vsn = 57
let midnight_ride_release_schema_major_vsn = 5
let midnight_ride_release_schema_minor_vsn = 60
let cowley_release_schema_major_vsn = 5
let cowley_release_schema_minor_vsn = 61
let boston_release_schema_major_vsn = 5
let boston_release_schema_minor_vsn = 63
(* the schema vsn of the last release: used to determine whether we can upgrade or not.. *)
let last_release_schema_major_vsn = boston_release_schema_major_vsn
let last_release_schema_minor_vsn = boston_release_schema_minor_vsn
(** Bindings for currently specified releases *)
(** Name of variable which refers to reference in the parameter list *)
let _self = "self"
(** All the various object names *)
let _session = "session"
let _task = "task"
let _user = "user"
let _host = "host"
let _host_metrics = "host_metrics"
let _host_crashdump = "host_crashdump"
let _host_patch = "host_patch"
let _hostcpu = "host_cpu"
let _sr = "SR"
let _sm = "SM"
let _vm = "VM"
let _vm_metrics = "VM_metrics"
let _vm_guest_metrics = "VM_guest_metrics"
let _vm_appliance = "VM_appliance"
let _dr_task = "DR_task"
let _vmpp = "VMPP"
let _network = "network"
let _vif = "VIF"
let _vif_metrics = "VIF_metrics"
let _pif = "PIF"
let _pif_metrics = "PIF_metrics"
let _bond = "Bond"
let _vlan = "VLAN"
let _pbd = "PBD"
let _vdi = "VDI"
let _vbd = "VBD"
let _vbd_metrics = "VBD_metrics"
let _vtpm = "VTPM"
let _console = "console"
let _event = "event"
let _alert = "alert"
let _crashdump = "crashdump"
let _pool = "pool"
let _pool_patch = "pool_patch"
let _data_source = "data_source"
let _blob = "blob"
let _message = "message"
let _auth = "auth"
let _subject = "subject"
let _role = "role"
let _secret = "secret"
let _tunnel = "tunnel"
let _pci = "PCI"
let _pgpu = "PGPU"
let _gpu_group = "GPU_group"
let _vgpu = "VGPU"
(** All the various static role names *)
let role_pool_admin = "pool-admin"
let role_pool_operator = "pool-operator"
let role_vm_power_admin = "vm-power-admin"
let role_vm_admin = "vm-admin"
let role_vm_operator = "vm-operator"
let role_read_only = "read-only"
let roles_all =
[ (* in decreasing total linear order of privileges *)
role_pool_admin;
role_pool_operator;
role_vm_power_admin;
role_vm_admin;
role_vm_operator;
role_read_only
]
let role_description = [
role_pool_admin,"The Pool Administrator role has full access to all features and settings, including accessing Dom0 and managing subjects, roles and external authentication";
role_pool_operator,"The Pool Operator role manages host- and pool-wide resources, including setting up storage, creating resource pools and managing patches, high availability (HA) and workload balancing (WLB)";
role_vm_power_admin,"The VM Power Administrator role has full access to VM and template management and can choose where to start VMs and use the dynamic memory control and VM snapshot features";
role_vm_admin,"The VM Administrator role can manage VMs and templates";
role_vm_operator,"The VM Operator role can use VMs and interact with VM consoles";
role_read_only,"The Read-Only role can log in with basic read-only access";
]
(* obtain all roles with at least the specified role privileges *)
let roles_gte role =
let rec gte = function []->failwith "invalid role"
|x::xs->if x=role then x::[] else x::gte xs in
gte roles_all
(* shortcuts to subsets of greater than or equal roles *)
let _R_LOCAL_ROOT_ONLY = Some([]) (* only local root, emergency and pool-secret *)
let _R_POOL_ADMIN = Some(roles_gte role_pool_admin)
let _R_POOL_OP = Some(roles_gte role_pool_operator)
let _R_VM_POWER_ADMIN = Some(roles_gte role_vm_power_admin)
let _R_VM_ADMIN = Some(roles_gte role_vm_admin)
let _R_VM_OP = Some(roles_gte role_vm_operator)
let _R_READ_ONLY = Some(roles_gte role_read_only) (* = all *)
let _R_ALL = _R_READ_ONLY
(******************************************************************************************************************)
(* Define additional RPCs for objects *)
let errors = Hashtbl.create 10
let messages = Hashtbl.create 10
exception UnspecifiedRelease
let get_oss_releases in_oss_since =
match in_oss_since with
None -> []
| Some "3.0.3" -> ["3.0.3"]
| _ -> raise UnspecifiedRelease
let get_product_releases in_product_since =
let rec go_through_release_order rs =
match rs with
[] -> raise UnspecifiedRelease
| x::xs -> if x=in_product_since then "closed"::x::xs else go_through_release_order xs
in go_through_release_order release_order
let tampa_release =
{ internal=get_product_releases rel_tampa
; opensource=get_oss_releases None
; internal_deprecated_since=None
}
let boston_release =
{ internal=get_product_releases rel_boston
; opensource=get_oss_releases None
; internal_deprecated_since=None
}
let cowley_release =
{ internal=get_product_releases rel_cowley
; opensource=get_oss_releases None
; internal_deprecated_since=None
}
let midnight_ride_release =
{ internal=get_product_releases "midnight-ride"
; opensource=get_oss_releases None
; internal_deprecated_since=None
}
let george_release =
{ internal=get_product_releases "george"
; opensource=get_oss_releases None
; internal_deprecated_since=None
}
let orlando_release =
{ internal=get_product_releases "orlando"
; opensource=get_oss_releases None
; internal_deprecated_since=None
}
let miami_symc_release =
{ internal=get_product_releases "symc"
; opensource=get_oss_releases None
; internal_deprecated_since=None
}
let miami_release =
{ internal=get_product_releases "miami"
; opensource=get_oss_releases None
; internal_deprecated_since=None
}
let rio_release =
{ internal=get_product_releases "rio"
; opensource=get_oss_releases (Some "3.0.3")
; internal_deprecated_since=None
}
let get_published lifecycle =
try
let _, published, _ = List.find (fun (t, _, _) -> t = Published) lifecycle in
Some published
with Not_found -> None
let get_deprecated lifecycle =
try
let _, deprecated, _ = List.find (fun (t, _, _) -> t = Deprecated) lifecycle in
Some deprecated
with Not_found -> None
let call ~name ?(doc="") ?(in_oss_since=Some "3.0.3") ?in_product_since ?internal_deprecated_since
?result ?(flags=[`Session;`Async])
?(effect=true) ?(tag=Custom) ?(errs=[]) ?(custom_marshaller=false) ?(db_only=false)
?(no_current_operations=false) ?(secret=false) ?(hide_from_docs=false)
?(pool_internal=false)
~allowed_roles
?(map_keys_roles=[])
?(params=[]) ?versioned_params ?lifecycle () =
(* if you specify versioned_params then these get put in the params field of the message record;
* otherwise params go in with no default values and param_release=call_release...
*)
if lifecycle = None && in_product_since = None then
failwith ("Lifecycle for message '" ^ name ^ "' not specified");
let lifecycle = match lifecycle with
| None ->
let published = match in_product_since with
| None -> []
| Some rel -> [Published, rel, doc]
in
let deprecated = match internal_deprecated_since with
| None -> []
| Some rel -> [Deprecated, rel, ""]
in
published @ deprecated
| Some l -> l
in
let call_release =
{
internal = (match get_published lifecycle with
| Some published -> get_product_releases published
| None -> ["closed"]);
opensource = get_oss_releases in_oss_since;
internal_deprecated_since = get_deprecated lifecycle;
}
in
{
msg_name = name;
msg_params =
(match versioned_params with
| None ->
List.map (fun (ptype, pname, pdoc) -> {param_type=ptype; param_name=pname;
param_doc=pdoc; param_release=call_release; param_default=None}) params
| Some ps -> ps);
msg_result = result; msg_doc = doc;
msg_session = List.mem `Session flags; msg_async = List.mem `Async flags;
msg_db_only = db_only;
msg_release = call_release;
msg_lifecycle = lifecycle;
msg_has_effect = effect; msg_tag = tag; msg_obj_name="";
msg_force_custom = None;
msg_errors = List.map (Hashtbl.find errors) errs; msg_secret = secret;
msg_custom_marshaller = custom_marshaller;
msg_no_current_operations = no_current_operations;
msg_hide_from_docs = hide_from_docs;
msg_pool_internal = pool_internal;
msg_allowed_roles = allowed_roles;
msg_map_keys_roles = map_keys_roles
}
let assert_operation_valid enum cls self = call
~in_oss_since:None
~in_product_since:rel_rio
~name:"assert_operation_valid"
~doc:"Check to see whether this operation is acceptable in the current state of the system, raising an error if the operation is invalid for some reason"
~params:[Ref cls, self, "reference to the object";
enum, "op", "proposed operation" ]
~allowed_roles:_R_POOL_ADMIN
()
let update_allowed_operations enum cls self = call
~in_oss_since:None
~in_product_since:rel_rio
~name:"update_allowed_operations"
~doc:"Recomputes the list of acceptable operations"
~params:[Ref cls, self, "reference to the object"]
~allowed_roles:_R_POOL_ADMIN
()
(** Compute an enum constant corresponding to an operation, for current_operations,
allowed_operations.*)
let operation_enum x =
x.msg_name, Printf.sprintf "refers to the operation \"%s\"" x.msg_name
let error name params ?(doc="") () =
Hashtbl.add errors name {
err_name = name;
err_params = params;
err_doc = doc;
}
let message name ?(doc="") () =
Hashtbl.add messages name {
mess_name = name;
mess_doc = doc;
}
let _ =
(* Internal *)
error Api_errors.internal_error ["message"]
~doc:"The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem." ();
error Api_errors.message_deprecated []
~doc:"This message has been deprecated." ();
error Api_errors.permission_denied ["message"]
~doc:"Caller not allowed to perform this operation." ();
(* Generic errors *)
(* licensed expired - copied from geneva *)
error Api_errors.license_expired []
~doc:"Your license has expired. Please contact your support representative." ();
error Api_errors.license_processing_error []
~doc:"There was an error processing your license. Please contact your support representative." ();
error Api_errors.license_restriction []
~doc:"This operation is not allowed under your license. Please contact your support representative." ();
error Api_errors.license_cannot_downgrade_in_pool []
~doc:"Cannot downgrade license while in pool. Please disband the pool first, then downgrade licenses on hosts separately." ();
error Api_errors.license_does_not_support_pooling []
~doc:"This host cannot join a pool because it's license does not support pooling" ();
error Api_errors.license_does_not_support_xha []
~doc:"XHA cannot be enabled because this host's license does not allow it" ();
error Api_errors.v6d_failure []
~doc:"There was a problem with the license daemon (v6d). Is it running?" ();
error Api_errors.invalid_edition ["edition"]
~doc:"The edition you supplied is invalid." ();
error Api_errors.missing_connection_details []
~doc:"The license-server connection details (address or port) were missing or incomplete." ();
error Api_errors.license_checkout_error ["reason"]
~doc:"The license for the edition you requested is not available." ();
error Api_errors.license_file_deprecated []
~doc:"This license file is no longer accepted. Please upgrade to the new licensing system." ();
error Api_errors.activation_while_not_free []
~doc:"An activation key can only be applied when the edition is set to 'free'." ();
error Api_errors.feature_restricted []
~doc:"The use of this feature is restricted." ();
error Api_errors.cannot_contact_host ["host"]
~doc:"Cannot forward messages because the host cannot be contacted. The host may be switched off or there may be network connectivity problems." ();
error Api_errors.uuid_invalid [ "type"; "uuid" ]
~doc:"The uuid you supplied was invalid." ();
error Api_errors.object_nolonger_exists []
~doc:"The specified object no longer exists." ();
error Api_errors.map_duplicate_key ["type"; "param_name"; "uuid"; "key"]
~doc:"You tried to add a key-value pair to a map, but that key is already there." ();
error Api_errors.xmlrpc_unmarshal_failure [ "expected"; "received" ]
~doc:"The server failed to unmarshal the XMLRPC message; it was expecting one element and received something else." ();
error Api_errors.message_method_unknown ["method"]
~doc:"You tried to call a method that does not exist. The method name that you used is echoed." ();
error Api_errors.message_parameter_count_mismatch ["method"; "expected"; "received"]
~doc:"You tried to call a method with the incorrect number of parameters. The fully-qualified method name that you used, and the number of received and expected parameters are returned." ();
error Api_errors.value_not_supported ["field"; "value"; "reason"]
~doc:"You attempted to set a value that is not supported by this implementation. The fully-qualified field name and the value that you tried to set are returned. Also returned is a developer-only diagnostic reason." ();
error Api_errors.invalid_value ["field"; "value"]
~doc:"The value given is invalid" ();
error Api_errors.field_type_error ["field"]
~doc:"The value specified is of the wrong type" ();
error Api_errors.operation_not_allowed ["reason"]
~doc:"You attempted an operation that was not allowed." ();
error Api_errors.operation_blocked ["ref"; "code"]
~doc:"You attempted an operation that was explicitly blocked (see the blocked_operations field of the given object)." ();
error Api_errors.not_implemented ["function"]
~doc:"The function is not implemented" ();
(* DB errors *)
error Api_errors.handle_invalid ["class"; "handle"]
~doc:"You gave an invalid object reference. The object may have recently been deleted. The class parameter gives the type of reference given, and the handle parameter echoes the bad value given." ();
error Api_errors.db_uniqueness_constraint_violation ["table";"field";"value"]
~doc:"You attempted an operation which would have resulted in duplicate keys in the database." ();
error Api_errors.location_not_unique ["SR"; "location"]
~doc:"A VDI with the specified location already exists within the SR" ();
(* Session errors *)
error Api_errors.session_authentication_failed []
~doc:"The credentials given by the user are incorrect, so access has been denied, and you have not been issued a session handle." ();
error Api_errors.session_invalid ["handle"]
~doc:"You gave an invalid session reference. It may have been invalidated by a server restart, or timed out. You should get a new session handle, using one of the session.login_ calls. This error does not invalidate the current connection. The handle parameter echoes the bad value given." ();
error Api_errors.change_password_rejected [ "msg" ]
~doc:"The system rejected the password change request; perhaps the new password was too short?" ();
error Api_errors.user_is_not_local_superuser [ "msg" ]
~doc:"Only the local superuser can execute this operation" ();
(* PIF/VIF/Network errors *)
error Api_errors.network_already_connected ["network"; "connected PIF"]
~doc:"You tried to create a PIF, but the network you tried to attach it to is already attached to some other PIF, and so the creation failed." ();
error Api_errors.cannot_destroy_system_network [ "network" ]
~doc:"You tried to destroy a system network: these cannot be destroyed." ();
error Api_errors.pif_is_physical ["PIF"]
~doc:"You tried to destroy a PIF, but it represents an aspect of the physical host configuration, and so cannot be destroyed. The parameter echoes the PIF handle you gave." ();
error Api_errors.pif_is_vlan ["PIF"]
~doc:"You tried to create a VLAN on top of another VLAN - use the underlying physical PIF/bond instead" ();
error Api_errors.pif_vlan_exists ["PIF"]
~doc:"You tried to create a PIF, but it already exists." ();
error Api_errors.pif_vlan_still_exists [ "PIF" ]
~doc:"Operation cannot proceed while a VLAN exists on this interface." ();
error Api_errors.pif_already_bonded [ "PIF" ]
~doc:"This operation cannot be performed because the pif is bonded." ();
error Api_errors.pif_cannot_bond_cross_host []
~doc:"You cannot bond interfaces across different hosts." ();
error Api_errors.pif_bond_needs_more_members []
~doc:"A bond must consist of at least two member interfaces" ();
error Api_errors.pif_configuration_error [ "PIF"; "msg" ]
~doc:"An unknown error occurred while attempting to configure an interface." ();
error Api_errors.invalid_ip_address_specified [ "parameter" ]
~doc:"A required parameter contained an invalid IP address" ();
error Api_errors.pif_is_management_iface [ "PIF" ]
~doc:"The operation you requested cannot be performed because the specified PIF is the management interface." ();
error Api_errors.pif_does_not_allow_unplug [ "PIF" ]
~doc:"The operation you requested cannot be performed because the specified PIF does not allow unplug." ();
error Api_errors.pif_has_no_network_configuration [ ]
~doc:"PIF has no IP configuration (mode currently set to 'none')" ();
error Api_errors.pif_has_no_v6_network_configuration [ ]
~doc:"PIF has no IPv6 configuration (mode currently set to 'none')" ();
error Api_errors.pif_incompatible_primary_address_type [ ]
~doc:"The primary address types are not compatible" ();
error Api_errors.cannot_plug_bond_slave ["PIF"]
~doc:"This PIF is a bond slave and cannot be plugged." ();
error Api_errors.cannot_add_vlan_to_bond_slave ["PIF"]
~doc:"This PIF is a bond slave and cannot have a VLAN on it." ();
error Api_errors.cannot_add_tunnel_to_bond_slave ["PIF"]
~doc:"This PIF is a bond slave and cannot have a tunnel on it." ();
error Api_errors.slave_requires_management_iface []
~doc:"The management interface on a slave cannot be disabled because the slave would enter emergency mode." ();
error Api_errors.vif_in_use [ "network"; "VIF" ]
~doc:"Network has active VIFs" ();
error Api_errors.cannot_plug_vif [ "VIF" ]
~doc:"Cannot plug VIF" ();
error Api_errors.mac_does_not_exist [ "MAC" ]
~doc:"The MAC address specified doesn't exist on this host." ();
error Api_errors.mac_still_exists [ "MAC" ]
~doc:"The MAC address specified still exists on this host." ();
error Api_errors.mac_invalid [ "MAC" ]
~doc:"The MAC address specified is not valid." ();
error Api_errors.duplicate_pif_device_name [ "device" ]
~doc:"A PIF with this specified device name already exists." ();
error Api_errors.could_not_find_network_interface_with_specified_device_name_and_mac_address [ "device"; "mac" ]
~doc:"Could not find a network interface with the specified device name and MAC address." ();
error Api_errors.vlan_tag_invalid ["VLAN"]
~doc:"You tried to create a VLAN, but the tag you gave was invalid -- it must be between 0 and 4094. The parameter echoes the VLAN tag you gave." ();
error Api_errors.network_contains_vif ["vifs"]
~doc:"The network contains active VIFs and cannot be deleted." ();
error Api_errors.network_contains_pif ["pifs"]
~doc:"The network contains active PIFs and cannot be deleted." ();
error Api_errors.gpu_group_contains_vgpu ["vgpus"]
~doc:"The GPU group contains active VGPUs and cannot be deleted." ();
error Api_errors.gpu_group_contains_pgpu ["pgpus"]
~doc:"The GPU group contains active PGPUs and cannot be deleted." ();
error Api_errors.device_attach_timeout [ "type"; "ref" ]
~doc:"A timeout happened while attempting to attach a device to a VM." ();
error Api_errors.device_detach_timeout [ "type"; "ref" ]
~doc:"A timeout happened while attempting to detach a device from a VM." ();
error Api_errors.device_detach_rejected [ "type"; "ref"; "msg" ]
~doc:"The VM rejected the attempt to detach the device." ();
error Api_errors.device_not_attached [ "VBD" ]
~doc:"The operation could not be performed because the VBD was not connected to the VM." ();
error Api_errors.pif_device_not_found []
~doc:"The specified device was not found." ();
error Api_errors.openvswitch_not_active []
~doc:"This operation needs the OpenVSwitch networking backend to be enabled on all hosts in the pool." ();
error Api_errors.transport_pif_not_configured ["PIF"]
~doc:"The tunnel transport PIF has no IP configuration set." ();
error Api_errors.is_tunnel_access_pif ["PIF"]
~doc:"You tried to create a VLAN or tunnel on top of a tunnel access PIF - use the underlying transport PIF instead." ();
error Api_errors.pif_tunnel_still_exists ["PIF"]
~doc:"Operation cannot proceed while a tunnel exists on this interface." ();
(* VM specific errors *)
error Api_errors.vm_is_protected [ "vm" ]
~doc:"This operation cannot be performed because the specified VM is protected by xHA" ();
error Api_errors.vm_no_crashdump_sr ["vm"]
~doc:"This VM does not have a crashdump SR specified." ();
error Api_errors.vm_no_suspend_sr ["vm"]
~doc:"This VM does not have a suspend SR specified." ();
error Api_errors.vm_memory_size_too_low ["vm"]
~doc:"The specified VM has too little memory to be started." ();
error Api_errors.vm_duplicate_vbd_device [ "vm"; "vbd"; "device" ]
~doc:"The specified VM has a duplicate VBD device and cannot be started." ();
error Api_errors.illegal_vbd_device [ "vbd"; "device" ]
~doc:"The specified VBD device is not recognised: please use a non-negative integer" ();
error Api_errors.vm_not_resident_here [ "vm"; "host" ]
~doc:"The specified VM is not currently resident on the specified host." ();
error Api_errors.domain_exists [ "vm"; "domid" ]
~doc:"The operation could not be performed because a domain still exists for the specified VM." ();
error Api_errors.cannot_reset_control_domain [ "vm" ]
~doc:"The power-state of a control domain cannot be reset." ();
error Api_errors.not_system_domain [ "vm" ]
~doc:"The given VM is not registered as a system domain. This operation can only be performed on a registered system domain." ();
error Api_errors.vm_cannot_delete_default_template ["vm"]
~doc:"You cannot delete the specified default template." ();
error Api_errors.vm_bad_power_state ["vm"; "expected"; "actual"]
~doc:"You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call." ();
error Api_errors.vm_missing_pv_drivers [ "vm" ]
~doc:"You attempted an operation on a VM which requires PV drivers to be installed but the drivers were not detected." ();
error Api_errors.vm_old_pv_drivers [ "vm"; "major"; "minor" ]
~doc:"You attempted an operation on a VM which requires a more recent version of the PV drivers. Please upgrade your PV drivers." ();
error Api_errors.vm_is_template ["vm"]
~doc:"The operation attempted is not valid for a template VM" ();
error Api_errors.other_operation_in_progress ["class"; "object"]
~doc:"Another operation involving the object is currently in progress" ();
error Api_errors.vbd_not_removable_media ["vbd"]
~doc:"Media could not be ejected because it is not removable" ();
error Api_errors.vbd_not_unpluggable ["vbd"]
~doc:"Drive could not be hot-unplugged because it is not marked as unpluggable" ();
error Api_errors.vbd_not_empty ["vbd"]
~doc:"Operation could not be performed because the drive is not empty" ();
error Api_errors.vbd_is_empty ["vbd"]
~doc:"Operation could not be performed because the drive is empty" ();
error Api_errors.vbd_tray_locked ["vbd"]
~doc:"This VM has locked the DVD drive tray, so the disk cannot be ejected" ();
error Api_errors.vbd_cds_must_be_readonly [ ]
~doc:"Read/write CDs are not supported" ();
(* CA-83260 *)
error Api_errors.disk_vbd_must_be_readwrite_for_hvm ["vbd"]
~doc:"All VBDs of type 'disk' must be read/write for HVM guests" ();
error Api_errors.vm_hvm_required ["vm"]
~doc:"HVM is required for this operation" ();
error Api_errors.vm_no_vcpus ["vm"]
~doc:"You need at least 1 VCPU to start a VM" ();
error Api_errors.vm_toomany_vcpus ["vm"]
~doc:"Too many VCPUs to start this VM" ();
error Api_errors.host_not_enough_free_memory [ "needed"; "available" ]
~doc:"Not enough host memory is available to perform this operation" ();
error Api_errors.duplicate_vm [ "vm" ]
~doc:"Cannot restore this VM because it would create a duplicate" ();
error Api_errors.vm_snapshot_with_quiesce_failed [ "vm" ]
~doc:"The quiesced-snapshot operation failed for an unexpected reason" ();
error Api_errors.vm_snapshot_with_quiesce_timeout [ "vm" ]
~doc:"The VSS plug-in has timed out" ();
error Api_errors.vm_snapshot_with_quiesce_plugin_does_not_respond [ "vm" ]
~doc:"The VSS plug-in cannot be contacted" ();
error Api_errors.vm_snapshot_with_quiesce_not_supported [ "vm"; "error" ]
~doc:"The VSS plug-in is not installed on this virtual machine" ();
error Api_errors.xen_vss_req_error_init_failed [ "vm"; "error_code" ]
~doc:"Initialization of the VSS requestor failed" ();
error Api_errors.xen_vss_req_error_prov_not_loaded [ "vm"; "error_code" ]
~doc:"The Citrix XenServer Vss Provider is not loaded" ();
error Api_errors.xen_vss_req_error_no_volumes_supported [ "vm"; "error_code" ]
~doc:"Could not find any volumes supported by the Citrix XenServer Vss Provider" ();
error Api_errors.xen_vss_req_error_start_snapshot_set_failed [ "vm"; "error_code" ]
~doc:"An attempt to start a new VSS snapshot failed" ();
error Api_errors.xen_vss_req_error_adding_volume_to_snapset_failed [ "vm"; "error_code" ]
~doc:"Some volumes to be snapshot could not be added to the VSS snapshot set" ();
error Api_errors.xen_vss_req_error_preparing_writers [ "vm"; "error_code" ]
~doc:"An attempt to prepare VSS writers for the snapshot failed" ();
error Api_errors.xen_vss_req_error_creating_snapshot [ "vm"; "error_code" ]
~doc:"An attempt to create the snapshots failed" ();
error Api_errors.xen_vss_req_error_creating_snapshot_xml_string [ "vm"; "error_code" ]
~doc:"Could not create the XML string generated by the transportable snapshot" ();
error Api_errors.vm_revert_failed [ "vm"; "snapshot" ]
~doc:"An error occured while reverting the specified virtual machine to the specified snapshot" ();
error Api_errors.vm_checkpoint_suspend_failed [ "vm" ]
~doc:"An error occured while saving the memory image of the specified virtual machine" ();
error Api_errors.vm_checkpoint_resume_failed [ "vm" ]
~doc:"An error occured while restoring the memory image of the specified virtual machine" ();
(* VM appliance errors *)
error Api_errors.operation_partially_failed [ "operation" ]
~doc:"Some VMs belonging to the appliance threw an exception while carrying out the specified operation" ();
(* Host errors *)
error Api_errors.host_offline [ "host" ]
~doc:"You attempted an operation which involves a host which could not be contacted." ();
error Api_errors.host_disabled [ "host" ]
~doc:"The specified host is disabled." ();
error Api_errors.host_disabled_until_reboot [ "host" ]
~doc:"The specified host is disabled and cannot be re-enabled until after it has rebooted." ();
error Api_errors.no_hosts_available []
~doc:"There were no hosts available to complete the specified operation." ();
error Api_errors.host_in_emergency_mode []
~doc:"Cannot perform operation as the host is running in emergency mode." ();
error Api_errors.host_cannot_destroy_self [ "host" ]
~doc:"The pool master host cannot be removed." ();
error Api_errors.host_cannot_read_metrics []
~doc:"The metrics of this host could not be read." ();
error Api_errors.host_in_use [ "host"; "type"; "ref" ]
~doc:"This operation cannot be completed as the host is in use by (at least) the object of type and ref echoed below." ();
error Api_errors.host_not_disabled []
~doc:"This operation cannot be performed because the host is not disabled. Please disable the host and then try again." ();
error Api_errors.host_not_live []
~doc:"This operation cannot be completed as the host is not live." ();
error Api_errors.host_is_live [ "host" ]
~doc:"This operation cannot be completed as the host is still live." ();
error Api_errors.host_power_on_mode_disabled []
~doc:"This operation cannot be completed as the host power on mode is disabled." ();
error Api_errors.host_its_own_slave []
~doc:"The host is its own slave. Please use pool-emergency-transition-to-master or pool-emergency-reset-master." ();
error Api_errors.host_still_booting []
~doc:"The host toolstack is still initialising. Please wait." ();
error Api_errors.host_has_no_management_ip []
~doc:"The host failed to acquire an IP address on its management interface and therefore cannot contact the master." ();
error Api_errors.host_name_invalid [ "reason" ]
~doc:"The host name is invalid." ();
error Api_errors.host_master_cannot_talk_back [ "ip" ]
~doc:"The master reports that it cannot talk back to the slave on the supplied management IP address." ();
error Api_errors.host_unknown_to_master [ "host" ]
~doc:"The master says the host is not known to it. Perhaps the Host was deleted from the master's database? Perhaps the slave is pointing to the wrong master?" ();
error Api_errors.host_broken []
~doc:"This host failed in the middle of an automatic failover operation and needs to retry the failover action" ();
error Api_errors.host_has_resident_vms [ "host" ]
~doc:"This host can not be forgotten because there are some user VMs still running" ();
error Api_errors.not_supported_during_upgrade []
~doc:"This operation is not supported during an upgrade." ();
error Api_errors.interface_has_no_ip [ "interface" ]
~doc:"The specified interface cannot be used because it has no IP address" ();
error Api_errors.auth_already_enabled ["current auth_type";"current service_name"]
~doc:"External authentication for this host is already enabled." ();
error Api_errors.auth_unknown_type ["type"]
~doc:"Unknown type of external authentication." ();
error Api_errors.auth_is_disabled []
~doc:"External authentication is disabled, unable to resolve subject name." ();
error Api_errors.auth_enable_failed ["message"]
~doc:"The host failed to enable external authentication." ();
error Api_errors.auth_enable_failed_wrong_credentials ["message"]
~doc:"The host failed to enable external authentication." ();
error Api_errors.auth_enable_failed_permission_denied ["message"]
~doc:"The host failed to enable external authentication." ();
error Api_errors.auth_enable_failed_domain_lookup_failed ["message"]
~doc:"The host failed to enable external authentication." ();
error Api_errors.auth_enable_failed_unavailable ["message"]
~doc:"The host failed to enable external authentication." ();
error Api_errors.auth_disable_failed ["message"]
~doc:"The host failed to disable external authentication." ();
error Api_errors.auth_disable_failed_wrong_credentials ["message"]
~doc:"The host failed to disable external authentication." ();
error Api_errors.auth_disable_failed_permission_denied ["message"]
~doc:"The host failed to disable external authentication." ();
(* Pool errors *)
error Api_errors.pool_joining_host_cannot_contain_shared_SRs []
~doc:"The host joining the pool cannot contain any shared storage." ();
error Api_errors.pool_joining_host_cannot_have_running_or_suspended_VMs []
~doc:"The host joining the pool cannot have any running or suspended VMs." ();
error Api_errors.pool_joining_host_cannot_have_running_VMs []
~doc:"The host joining the pool cannot have any running VMs." ();
error Api_errors.pool_joining_host_cannot_have_vms_with_current_operations []
~doc:"The host joining the pool cannot have any VMs with active tasks." ();
error Api_errors.pool_joining_host_cannot_be_master_of_other_hosts []
~doc:"The host joining the pool cannot already be a master of another pool." ();
error Api_errors.pool_joining_host_connection_failed []
~doc:"There was an error connecting to the host while joining it in the pool." ();
error Api_errors.pool_joining_host_service_failed []
~doc:"There was an error connecting to the host. the service contacted didn't reply properly." ();
error Api_errors.pool_joining_host_must_have_physical_managment_nic []
~doc:"The host joining the pool must have a physical management NIC (i.e. the management NIC must not be on a VLAN or bonded PIF)." ();
error Api_errors.pool_joining_external_auth_mismatch []
~doc:"Cannot join pool whose external authentication configuration is different." ();
error Api_errors.pool_joining_host_must_have_same_product_version []
~doc:"The host joining the pool must have the same product version as the pool master." ();
error Api_errors.pool_hosts_not_compatible []
~doc:"The hosts in this pool are not compatible." ();
error Api_errors.pool_hosts_not_homogeneous [ "reason" ]
~doc:"The hosts in this pool are not homogeneous." ();
error Api_errors.pool_not_in_emergency_mode []
~doc:"This pool is not in emergency mode." ();
error Api_errors.pool_auth_already_enabled ["host"]
~doc:"External authentication in this pool is already enabled for at least one host." ();
error Api_errors.pool_auth_enable_failed ["host";"message"]
~doc:"The pool failed to enable external authentication." ();
error Api_errors.pool_auth_enable_failed_wrong_credentials ["host";"message"]
~doc:"The pool failed to enable external authentication." ();
error Api_errors.pool_auth_enable_failed_permission_denied ["host";"message"]
~doc:"The pool failed to enable external authentication." ();
error Api_errors.pool_auth_enable_failed_domain_lookup_failed ["host";"message"]
~doc:"The pool failed to enable external authentication." ();
error Api_errors.pool_auth_enable_failed_unavailable ["host";"message"]
~doc:"The pool failed to enable external authentication." ();
error Api_errors.pool_auth_enable_failed_duplicate_hostname ["host";"message"]
~doc:"The pool failed to enable external authentication." ();
error Api_errors.pool_auth_disable_failed ["host";"message"]
~doc:"The pool failed to disable the external authentication of at least one host." ();
error Api_errors.pool_auth_disable_failed_wrong_credentials ["host";"message"]
~doc:"The pool failed to disable the external authentication of at least one host." ();
error Api_errors.pool_auth_disable_failed_permission_denied ["host";"message"]
~doc:"The pool failed to disable the external authentication of at least one host." ();
(* External directory service *)
error Api_errors.subject_cannot_be_resolved []
~doc:"Subject cannot be resolved by the external directory service." ();
error Api_errors.auth_service_error ["message"]
~doc:"Error querying the external directory service." ();
error Api_errors.subject_already_exists []
~doc:"Subject already exists." ();
(* RBAC *)
error Api_errors.role_not_found []
~doc: "Role cannot be found." ();
error Api_errors.role_already_exists []
~doc: "Role already exists." ();
error Api_errors.rbac_permission_denied ["permission";"message"]
~doc: "RBAC permission denied." ();
(* wlb errors*)
error Api_errors.wlb_not_initialized []
~doc:"No WLB connection is configured." ();
error Api_errors.wlb_disabled []
~doc:"This pool has wlb-enabled set to false." ();
error Api_errors.wlb_connection_refused []
~doc:"The WLB server refused a connection to XenServer." ();
error Api_errors.wlb_unknown_host []
~doc:"The configured WLB server name failed to resolve in DNS." ();
error Api_errors.wlb_timeout ["configured_timeout"]
~doc:"The communication with the WLB server timed out." ();
error Api_errors.wlb_authentication_failed []
~doc:"The WLB server rejected our configured authentication details." ();
error Api_errors.wlb_malformed_request []
~doc:"The WLB server rejected XenServer's request as malformed." ();
error Api_errors.wlb_malformed_response ["method"; "reason"; "response"]
~doc:"The WLB server said something that XenServer wasn't expecting or didn't understand. The method called on the WLB server, a diagnostic reason, and the response from WLB are returned." ();
error Api_errors.wlb_xenserver_connection_refused []
~doc:"The WLB server reported that XenServer refused it a connection (even though we're connecting perfectly fine in the other direction)." ();
error Api_errors.wlb_xenserver_unknown_host []
~doc:"The WLB server reported that its configured server name for this XenServer instance failed to resolve in DNS." ();
error Api_errors.wlb_xenserver_timeout []
~doc:"The WLB server reported that communication with XenServer timed out." ();
error Api_errors.wlb_xenserver_authentication_failed []
~doc:"The WLB server reported that XenServer rejected its configured authentication details." ();
error Api_errors.wlb_xenserver_malformed_response []
~doc:"The WLB server reported that XenServer said something to it that WLB wasn't expecting or didn't understand." ();
error Api_errors.wlb_internal_error []
~doc:"The WLB server reported an internal error." ();
error Api_errors.wlb_connection_reset []
~doc:"The connection to the WLB server was reset." ();
error Api_errors.wlb_url_invalid ["url"]
~doc:"The WLB URL is invalid. Ensure it is in format: <ipaddress>:<port>. The configured/given URL is returned." ();
(* Api_errors specific to running VMs on multiple hosts *)
error Api_errors.vm_unsafe_boot ["vm"]
~doc:"You attempted an operation on a VM that was judged to be unsafe by the server. This can happen if the VM would run on a CPU that has a potentially incompatible set of feature flags to those the VM requires. If you want to override this warning then use the 'force' option." ();
error Api_errors.vm_requires_sr [ "vm"; "sr" ]
~doc:"You attempted to run a VM on a host which doesn't have access to an SR needed by the VM. The VM has at least one VBD attached to a VDI in the SR." ();
error Api_errors.vm_requires_net [ "vm"; "network" ]
~doc:"You attempted to run a VM on a host which doesn't have a PIF on a Network needed by the VM. The VM has at least one VIF attached to the Network." ();
error Api_errors.vm_requires_gpu ["vm"; "GPU_group"]
~doc:"You attempted to run a VM on a host which doesn't have a pGPU available in the GPU group needed by the VM. The VM has a vGPU attached to this GPU group." ();
error Api_errors.vm_requires_iommu ["host"]
~doc:"You attempted to run a VM on a host which doesn't have I/O virtualisation (IOMMU/VT-d) enabled, which is needed by the VM." ();
error Api_errors.vm_host_incompatible_version ["host"; "vm"]
~doc:"This VM operation cannot be performed on an older-versioned host during an upgrade." ();
error Api_errors.vm_has_pci_attached ["vm"]
~doc:"This operation could not be performed, because the VM has one or more PCI devices passed through." ();
error Api_errors.host_cannot_attach_network [ "host"; "network" ]
~doc:"Host cannot attach network (in the case of NIC bonding, this may be because attaching the network on this host would require other networks [that are currently active] to be taken down)." ();
error Api_errors.vm_requires_vdi [ "vm"; "vdi" ]
~doc:"VM cannot be started because it requires a VDI which cannot be attached" ();
error Api_errors.vm_migrate_failed [ "vm"; "source"; "destination"; "msg" ]
~doc:"An error occurred during the migration process." ();
error Api_errors.vm_has_too_many_snapshots [ "vm" ]
~doc:"You attempted to migrate a VM with more than one snapshot." ();
error Api_errors.vm_has_checkpoint [ "vm" ]
~doc:"You attempted to migrate a VM which has a checkpoint." ();
error Api_errors.vdi_needs_vm_for_migrate [ "vdi" ]
~doc:"You attempted to migrate a VDI which is not attached to a runnning VM." ();
error Api_errors.mirror_failed [ "vdi" ]
~doc:"The VDI mirroring cannot be performed" ();
error Api_errors.too_many_storage_migrates [ "number" ]
~doc:"You reached the maximal number of concurrently migrating VMs." ();
error Api_errors.vm_failed_shutdown_ack []
~doc:"VM didn't acknowledge the need to shutdown." ();
error Api_errors.vm_shutdown_timeout [ "vm"; "timeout" ]
~doc:"VM failed to shutdown before the timeout expired" ();
error Api_errors.vm_crashed [ "vm" ]
~doc:"The VM crashed" ();
error Api_errors.vm_rebooted [ "vm" ]
~doc:"The VM unexpectedly rebooted" ();
error Api_errors.vm_halted [ "vm" ]
~doc:"The VM unexpectedly halted" ();
error Api_errors.bootloader_failed [ "vm"; "msg" ]
~doc:"The bootloader returned an error" ();
error Api_errors.unknown_bootloader [ "vm"; "bootloader" ]
~doc:"The requested bootloader is unknown" ();
error Api_errors.vm_attached_to_more_than_one_vdi_with_timeoffset_marked_as_reset_on_boot [ "vm" ]
~doc:"You attempted to start a VM that's attached to more than one VDI with a timeoffset marked as reset-on-boot." ();
error Api_errors.vms_failed_to_cooperate [ ]
~doc:"The given VMs failed to release memory when instructed to do so" ();
(* Storage errors *)
error Api_errors.sr_attach_failed ["sr"]
~doc:"Attaching this SR failed." ();
error Api_errors.sr_backend_failure ["status"; "stdout"; "stderr"]
~doc:"There was an SR backend failure." ();
error Api_errors.sr_uuid_exists ["uuid"]
~doc:"An SR with that uuid already exists." ();
error Api_errors.sr_no_pbds ["sr"]
~doc:"The SR has no attached PBDs" ();
error Api_errors.sr_full ["requested";"maximum"]
~doc:"The SR is full. Requested new size exceeds the maximum size" ();
error Api_errors.pbd_exists ["sr";"host";"pbd"]
~doc:"A PBD already exists connecting the SR to the host" ();
error Api_errors.sr_has_pbd ["sr"]
~doc:"The SR is still connected to a host via a PBD. It cannot be destroyed or forgotten." ();
error Api_errors.sr_has_multiple_pbds [ "PBD" ]
~doc:"The SR.shared flag cannot be set to false while the SR remains connected to multiple hosts" ();
error Api_errors.sr_requires_upgrade [ "SR" ]
~doc:"The operation cannot be performed until the SR has been upgraded" ();
error Api_errors.sr_unknown_driver [ "driver" ]
~doc:"The SR could not be connected because the driver was not recognised." ();
error Api_errors.sr_vdi_locking_failed []
~doc:"The operation could not proceed because necessary VDIs were already locked at the storage level." ();
error Api_errors.vdi_readonly [ "vdi" ]
~doc:"The operation required write access but this VDI is read-only" ();
error Api_errors.vdi_is_a_physical_device [ "vdi" ]
~doc:"The operation cannot be performed on physical device" ();
error Api_errors.vdi_is_not_iso [ "vdi"; "type" ]
~doc:"This operation can only be performed on CD VDIs (iso files or CDROM drives)" ();
error Api_errors.host_cd_drive_empty [ ]
~doc:"The host CDROM drive does not contain a valid CD" ();
error Api_errors.vdi_in_use [ "vdi"; "operation" ]
~doc:"This operation cannot be performed because this VDI is in use by some other operation" ();
error Api_errors.vdi_not_available [ "vdi" ]
~doc:"This operation cannot be performed because this VDI could not be properly attached to the VM." ();
error Api_errors.vdi_location_missing [ "sr"; "location" ]
~doc:"This operation cannot be performed because the specified VDI could not be found in the specified SR" ();
error Api_errors.vdi_missing [ "sr"; "vdi" ]
~doc:"This operation cannot be performed because the specified VDI could not be found on the storage substrate" ();
error Api_errors.vdi_incompatible_type [ "vdi"; "type" ]
~doc:"This operation cannot be performed because the specified VDI is of an incompatible type (eg: an HA statefile cannot be attached to a guest)" ();
error Api_errors.vdi_not_managed [ "vdi" ]
~doc:"This operation cannot be performed because the system does not manage this VDI" ();
error Api_errors.vdi_not_in_map [ "vdi" ]
~doc:"This VDI was not mapped to a destination SR in VM.migrate_send operation" () ;
error Api_errors.cannot_create_state_file []
~doc:"An HA statefile could not be created, perhaps because no SR with the appropriate capability was found." ();
error Api_errors.sr_operation_not_supported [ "sr" ]
~doc:"The SR backend does not support the operation (check the SR's allowed operations)" ();
error Api_errors.sr_not_empty [ ]
~doc:"The SR operation cannot be performed because the SR is not empty." ();
error Api_errors.sr_device_in_use [ ]
~doc:"The SR operation cannot be performed because a device underlying the SR is in use by the host." ();
error Api_errors.sr_not_sharable [ "sr"; "host" ]
~doc:"The PBD could not be plugged because the SR is in use by another host and is not marked as sharable." ();
error Api_errors.sr_indestructible ["sr"]
~doc:"The SR could not be destroyed, as the 'indestructible' flag was set on it." ();
error Api_errors.sm_plugin_communication_failure ["sm"]
~doc:"The SM plugin did not respond to a query." ();
error Api_errors.device_already_attached ["device"]
~doc:"The device is already attached to a VM" ();
error Api_errors.device_already_detached ["device"]
~doc:"The device is not currently attached" ();
error Api_errors.device_already_exists ["device"]
~doc:"A device with the name given already exists on the selected VM" ();
error Api_errors.invalid_device ["device"]
~doc:"The device name is invalid" ();
error Api_errors.default_sr_not_found [ "sr" ]
~doc:"The default SR reference does not point to a valid SR" ();
error Api_errors.only_provision_template [ ]
~doc:"The provision call can only be invoked on templates, not regular VMs." ();
error Api_errors.provision_failed_out_of_space [ ]
~doc:"The provision call failed because it ran out of space." ();
(* Import export errors *)
error Api_errors.import_incompatible_version [ ]
~doc:"The import failed because this export has been created by a different (incompatible) product version" ();
error Api_errors.import_error_generic [ "msg" ]
~doc:"The VM could not be imported." ();
error Api_errors.import_error_premature_eof []
~doc:"The VM could not be imported; the end of the file was reached prematurely." ();
error Api_errors.import_error_some_checksums_failed []
~doc:"Some data checksums were incorrect; the VM may be corrupt." ();
error Api_errors.import_error_cannot_handle_chunked []
~doc:"Cannot import VM using chunked encoding." ();
error Api_errors.import_error_failed_to_find_object ["id"]
~doc:"The VM could not be imported because a required object could not be found." ();
error Api_errors.import_error_attached_disks_not_found []
~doc:"The VM could not be imported because attached disks could not be found." ();
error Api_errors.import_error_unexpected_file ["filename_expected";"filename_found"]
~doc:"The VM could not be imported because the XVA file is invalid: an unexpected file was encountered." ();
(* Restore errors *)
error Api_errors.restore_incompatible_version [ ]
~doc:"The restore could not be performed because this backup has been created by a different (incompatible) product version" ();
error Api_errors.restore_target_missing_device [ "device" ]
~doc:"The restore could not be performed because a network interface is missing" ();
error Api_errors.restore_target_mgmt_if_not_in_backup [ ]
~doc:"The restore could not be performed because the host's current management interface is not in the backup. The interfaces mentioned in the backup are:" ();
error Api_errors.cannot_find_state_partition [ ]
~doc:"This operation could not be performed because the state partition could not be found" ();
error Api_errors.backup_script_failed [ "log" ]
~doc:"The backup could not be performed because the backup script failed." ();
error Api_errors.restore_script_failed [ "log" ]
~doc:"The restore could not be performed because the restore script failed. Is the file corrupt?" ();
(* Event errors *)
error Api_errors.events_lost []
~doc:"Some events have been lost from the queue and cannot be retrieved." ();
error Api_errors.event_subscription_parse_failure [ "subscription" ]
~doc:"The server failed to parse your event subscription. Valid values include: *, class-name, class-name/object-reference." ();
error Api_errors.event_from_token_parse_failure [ "token" ]
~doc:"The event.from token could not be parsed. Valid values include: '', and a value returned from a previous event.from call." ();
error Api_errors.session_not_registered ["handle"]
~doc:"This session is not registered to receive events. You must call event.register before event.next. The session handle you are using is echoed." ();
error Api_errors.task_cancelled [ "task" ]
~doc:"The request was asynchronously cancelled." ();
error Api_errors.too_many_pending_tasks [ ]
~doc:"The request was rejected because there are too many pending tasks on the server." ();
error Api_errors.too_busy [ ]
~doc:"The request was rejected because the server is too busy." ();
(* Patch errors *)
error Api_errors.out_of_space ["location"]
~doc:"There is not enough space to upload the update" ();
error Api_errors.invalid_patch []
~doc:"The uploaded patch file is invalid" ();
error Api_errors.invalid_patch_with_log [ "log" ]
~doc:"The uploaded patch file is invalid. See attached log for more details." ();
error Api_errors.cannot_find_patch []
~doc:"The requested update could not be found. This can occur when you designate a new master or xe patch-clean. Please upload the update again" ();
error Api_errors.cannot_fetch_patch ["uuid"]
~doc:"The requested update could to be obtained from the master." ();
error Api_errors.patch_already_exists [ "uuid" ]
~doc:"The uploaded patch file already exists" ();
error Api_errors.patch_is_applied [ ]
~doc:"The specified patch is applied and cannot be destroyed." ();
error Api_errors.patch_already_applied [ "patch" ]
~doc:"This patch has already been applied" ();
error Api_errors.patch_apply_failed [ "output" ]
~doc:"The patch apply failed. Please see attached output." ();
error Api_errors.patch_precheck_failed_unknown_error [ "patch"; "info" ]
~doc:"The patch precheck stage failed with an unknown error. See attached info for more details." ();
error Api_errors.patch_precheck_failed_prerequisite_missing [ "patch"; "prerequisite_patch_uuid_list" ]
~doc:"The patch precheck stage failed: prerequisite patches are missing." ();
error Api_errors.patch_precheck_failed_wrong_server_version [ "patch"; "found_version"; "required_version"]
~doc:"The patch precheck stage failed: the server is of an incorrect version." ();
error Api_errors.patch_precheck_failed_wrong_server_build [ "patch"; "found_build"; "required_build"]
~doc:"The patch precheck stage failed: the server is of an incorrect build." ();
error Api_errors.patch_precheck_failed_vm_running [ "patch" ]
~doc:"The patch precheck stage failed: there are one or more VMs still running on the server. All VMs must be suspended before the patch can be applied." ();
error Api_errors.cannot_find_oem_backup_partition []
~doc:"The backup partition to stream the updat to cannot be found" ();
error Api_errors.only_allowed_on_oem_edition ["command"]
~doc:"This command is only allowed on the OEM edition." ();
error Api_errors.not_allowed_on_oem_edition ["command"]
~doc:"This command is not allowed on the OEM edition." ();
(* Pool errors *)
error Api_errors.host_is_slave ["Master IP address"]
~doc:"You cannot make regular API calls directly on a slave. Please pass API calls via the master host." ();
(* HA errors *)
error Api_errors.ha_failed_to_form_liveset [ ]
~doc:"HA could not be enabled on the Pool because a liveset could not be formed: check storage and network heartbeat paths." ();
error Api_errors.ha_heartbeat_daemon_startup_failed [ ]
~doc:"The host could not join the liveset because the HA daemon failed to start." ();
error Api_errors.ha_host_cannot_access_statefile [ ]
~doc:"The host could not join the liveset because the HA daemon could not access the heartbeat disk." ();
error Api_errors.ha_host_is_armed [ "host" ]
~doc:"The operation could not be performed while the host is still armed; it must be disarmed first" ();
error Api_errors.ha_is_enabled [ ]