forked from xapi-project/xen-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli_frontend.ml
2795 lines (2562 loc) · 79.9 KB
/
cli_frontend.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.
*)
(**
* @group Command-Line Interface (CLI)
*)
(* ----------------------------------------------------------------------
XE-CLI Front End
---------------------------------------------------------------------- *)
open Cli_util
open Cli_cmdtable
open Stringext
module D = Debug.Debugger(struct let name = "cli" end)
open D
(* ---------------------------------------------------------------------
Command table
--------------------------------------------------------------------- *)
let vmselectors = ["<vm-selectors>"]
let vmselectorsinfo = " The simplest way to select the VM on which the \
operation is to be performed is by supplying the argument \
'vm=<name or uuid>'. VMs can also be \
specified by filtering the full list of VMs on the values of fields. For \
example, specifying 'power-state=halted' will select all VMs whose \
power-state field is equal to 'halted'. Where multiple VMs are matching, \
the option '--multiple' must be specified to perform the operation. The \
full list of fields that can be matched can be obtained by the command \
'xe vm-list params=all'. If no parameters to select VMs are given, \
the operation will be performed on all VMs."
let hostselectors = ["<host-selectors>"]
let hostselectorsinfo = " The simplest way to select the host on which the \
operation is to be performed is by supplying the argument \
'host=<name or uuid>'. Hosts can also be \
specified by filtering the full list of hosts on the values of fields. For \
example, specifying 'enabled=true' will select all hosts whose \
'enabled' field is equal to 'true'. Where multiple hosts are matching, \
and the operation can be performed on multiple hosts, the option '--multiple' \
must be specified to perform the operation. The \
full list of fields that can be matched can be obtained by the command \
'xe host-list params=all'. If no parameters to select hosts are given, \
the operation will be performed on all hosts."
let rec cmdtable_data : (string*cmd_spec) list =
[
"log-set-output",
{
reqd=["output"];
optn=["key";"level"];
help="Set all loggers to the specified output (nil, stderr, string, file:<filename>, syslog:<something>).";
implementation=No_fd Cli_operations.log_set_output;
flags=[Neverforward];
};
"log-get-keys",
{
reqd=[];
optn=[];
help="List the keys known by the logger.";
implementation=No_fd Cli_operations.log_get_keys;
flags=[Neverforward];
};
"log-reopen",
{
reqd=[];
optn=[];
help="Reopen all loggers (use this for rotating files).";
implementation=No_fd_local_session Cli_operations.log_reopen;
flags=[Neverforward];
};
"log-get",
{
reqd=[];
optn=[];
help="Return the log currently stored in the string logger.";
implementation=No_fd Cli_operations.log_get;
flags=[Neverforward];
};
(*
"blob-get",
{
reqd=["uuid";"filename"];
optn=[];
help="Save the binary blob to the local filesystem";
implementation=With_fd Cli_operations.blob_get;
flags=[];
};
"blob-put",
{
reqd=["uuid";"filename"];
optn=[];
help="Upload a binary blob to the xapi server";
implementation=With_fd Cli_operations.blob_put;
flags=[];
};
"blob-create",
{
reqd=["name"];
optn=["mime-type";"vm-uuid";"host-uuid";"sr-uuid";"network-uuid";"pool-uuid"];
help="Create a binary blob to be associated with an API object";
implementation=No_fd Cli_operations.blob_create;
flags=[];
};
*)
"message-create",
{
reqd=["name"; "priority"; "body"];
optn=["vm-uuid";"host-uuid";"sr-uuid";"pool-uuid"];
help="Create a message associated with a particular API object. Note exactly one of the optional parameters must be supplied.";
implementation=No_fd Cli_operations.message_create;
flags=[];
};
"message-destroy",
{
reqd=["uuid"];
optn=[];
help="Destroy an existing message.";
implementation=No_fd Cli_operations.message_destroy;
flags=[];
};
(* "host-introduce",
{
reqd=["name"; "address"; "remote-port"; "remote-username"; "remote-password"];
optn=["description"];
help="Introduce a remote host";
implementation=No_fd Cli_operations.host_introduce
};*)
"pool-enable-binary-storage",
{
reqd=[];
optn=[];
help="Enable the storage of binary data, including RRDs, messages and blobs.";
implementation=No_fd Cli_operations.pool_enable_binary_storage;
flags=[Hidden];
};
"pool-disable-binary-storage",
{
reqd=[];
optn=[];
help="Disable the storage of binary data. This will destroy any messages, RRDs and blobs stored across the pool.";
implementation=No_fd Cli_operations.pool_disable_binary_storage;
flags=[Hidden];
};
"pool-designate-new-master",
{
reqd=["host-uuid"];
optn=[];
help="Request an orderly handover of the role of master to another host.";
implementation=No_fd Cli_operations.pool_designate_new_master;
flags=[];
};
"pool-sync-database",
{
reqd=[];
optn=[];
help="Synchronise the current database across all hosts in the pool.";
implementation=No_fd Cli_operations.pool_sync_database;
flags=[];
};
"pool-join",
{
reqd=["master-address"; "master-username"; "master-password"];
optn=["force"];
help="Instruct host to join an existing pool.";
implementation=No_fd Cli_operations.pool_join;
flags=[];
};
"pool-emergency-reset-master",
{
reqd=["master-address"];
optn=[];
help="Instruct slave to reset master address.";
implementation=No_fd_local_session Cli_operations.pool_emergency_reset_master;
flags=[Neverforward];
};
"pool-emergency-transition-to-master",
{
reqd=[];
optn=[];
help="Instruct slave to become pool master.";
implementation=No_fd_local_session Cli_operations.pool_emergency_transition_to_master;
flags=[Neverforward];
};
"pool-recover-slaves",
{
reqd=[];
optn=[];
help="Instruct master to try and reset master-address of all slaves currently running in emergency mode.";
implementation=No_fd Cli_operations.pool_recover_slaves;
flags=[];
};
"pool-eject",
{
reqd=["host-uuid"];
optn=[];
help="Instruct host to leave an existing pool.";
implementation=With_fd Cli_operations.pool_eject;
flags=[];
};
"pool-dump-database",
{
reqd=["file-name"];
optn=[];
help="Download a dump of the pool database.";
implementation=With_fd Cli_operations.pool_dump_db;
flags=[];
};
"pool-restore-database",
{
reqd=["file-name"];
optn=["dry-run"];
help="Restore a dump of the pool database to the server.";
implementation=With_fd Cli_operations.pool_restore_db;
flags=[];
};
"pool-enable-external-auth",
{
reqd=["auth-type"; "service-name";];
optn=["uuid"; "config:"];
help="Enables external authentication in all the hosts in a pool. Note that some values of auth-type will require particular config: values.";
implementation=No_fd Cli_operations.pool_enable_external_auth;
flags=[];
};
"pool-disable-external-auth",
{
reqd=[];
optn=["uuid"; "config:"];
help="Disables external authentication in all the hosts in a pool";
implementation=No_fd Cli_operations.pool_disable_external_auth;
flags=[];
};
"pool-initialize-wlb",
{
reqd=["wlb_url"; "wlb_username"; "wlb_password"; "xenserver_username"; "xenserver_password"];
optn=[];
help="Initialize workload balancing for the current pool with the target wlb server";
implementation=No_fd Cli_operations.pool_initialize_wlb;
flags=[];
};
"pool-deconfigure-wlb",
{
reqd=[];
optn=[];
help="Permanently remove the configuration for workload balancing";
implementation=No_fd Cli_operations.pool_deconfigure_wlb;
flags=[];
};
"pool-send-wlb-configuration",
{
reqd=[];
optn=["config:"];
help="Sets the pool optimization criteria for the workload balancing server";
implementation=No_fd Cli_operations.pool_send_wlb_configuration;
flags=[];
};
"pool-retrieve-wlb-configuration",
{
reqd=[];
optn=[];
help="Retrieves the pool optimization criteria from the workload balancing server";
implementation=No_fd Cli_operations.pool_retrieve_wlb_configuration;
flags=[];
};
"pool-retrieve-wlb-recommendations",
{
reqd=[];
optn=[];
help="Retrieves vm migrate recommendations for the pool from the workload balancing server";
implementation=No_fd Cli_operations.pool_retrieve_wlb_recommendations;
flags=[];
};
"pool-retrieve-wlb-report",
{
reqd=["report"];
optn=["filename"];
help="";
implementation=With_fd Cli_operations.pool_retrieve_wlb_report;
flags=[Neverforward];
};
"pool-retrieve-wlb-diagnostics",
{
reqd=[];
optn=["filename"];
help="";
implementation=With_fd Cli_operations.pool_retrieve_wlb_diagnostics;
flags=[Neverforward];
};
"pool-send-test-post",
{
reqd=["dest-host"; "dest-port"; "body"];
optn=[];
help="Send the given body to the given host and port, using HTTPS, and print the response. This is used for debugging the SSL layer.";
implementation=No_fd Cli_operations.pool_send_test_post;
flags=[];
};
"pool-certificate-install",
{
reqd=["filename"];
optn=[];
help="Install an SSL certificate, pool-wide.";
implementation=With_fd Cli_operations.pool_certificate_install;
flags=[];
};
"pool-certificate-uninstall",
{
reqd=["name"];
optn=[];
help="Uninstall an SSL certificate.";
implementation=No_fd Cli_operations.pool_certificate_uninstall;
flags=[];
};
"pool-certificate-list",
{
reqd=[];
optn=[];
help="List all installed SSL certificates.";
implementation=No_fd Cli_operations.pool_certificate_list;
flags=[];
};
"pool-crl-install",
{
reqd=["filename"];
optn=[];
help="Install an SSL certificate revocation list, pool-wide.";
implementation=With_fd Cli_operations.pool_crl_install;
flags=[];
};
"pool-crl-uninstall",
{
reqd=["name"];
optn=[];
help="Uninstall an SSL certificate revocation list.";
implementation=No_fd Cli_operations.pool_crl_uninstall;
flags=[];
};
"pool-crl-list",
{
reqd=[];
optn=[];
help="List all installed SSL certificate revocation lists.";
implementation=No_fd Cli_operations.pool_crl_list;
flags=[];
};
"pool-certificate-sync",
{
reqd=[];
optn=[];
help="Sync SSL certificates and certificate revocation lists from master to slaves.";
implementation=No_fd Cli_operations.pool_certificate_sync;
flags=[];
};
"pool-set-vswitch-controller",
{
reqd=["address"];
optn=[];
help="Set the IP address of the vswitch controller.";
implementation=No_fd Cli_operations.pool_set_vswitch_controller;
flags=[Hidden];
};
"host-is-in-emergency-mode",
{
reqd=[];
optn=[];
help="Query the target host to discover if it is in emergency mode.";
implementation=No_fd_local_session Cli_operations.host_is_in_emergency_mode;
flags=[Neverforward];
};
"host-forget",
{
reqd=["uuid"];
optn=[];
help="Forget about the host without contacting it explicitly. WARNING: this call is useful if the host to 'forget' is dead; however, if the host is live and part of the pool, you should consider using pool-eject instead.";
implementation=With_fd Cli_operations.host_forget;
flags=[];
};
"host-disable",
{
reqd=[];
optn=[];
help="Disable the XE host.";
implementation=No_fd Cli_operations.host_disable;
flags=[Host_selectors];
};
"host-sync-data",
{
reqd=[];
optn=[];
help="Synchronise the non-database data stored on the pool master with the named XE host.";
implementation=No_fd Cli_operations.host_sync_data;
flags=[Host_selectors];
};
"host-enable",
{
reqd=[];
optn=[];
help="Enable the XE host.";
implementation=No_fd Cli_operations.host_enable;
flags=[Host_selectors];
};
"host-enable-local-storage-caching",
{
reqd=["sr-uuid"];
optn=[];
help="Enable local storage caching on the specified host";
implementation=No_fd Cli_operations.host_enable_local_storage_caching;
flags=[Host_selectors];
};
"host-disable-local-storage-caching",
{
reqd=[];
optn=[];
help="Disable local storage caching on the specified host";
implementation=No_fd Cli_operations.host_disable_local_storage_caching;
flags=[Host_selectors];
};
"pool-enable-local-storage-caching",
{
reqd=["uuid"];
optn=[];
help="Enable local storage caching across the pool";
implementation=No_fd Cli_operations.pool_enable_local_storage_caching;
flags=[];
};
"pool-disable-local-storage-caching",
{
reqd=["uuid"];
optn=[];
help="Disable local storage caching across the pool";
implementation=No_fd Cli_operations.pool_disable_local_storage_caching;
flags=[];
};
"host-shutdown",
{
reqd=[];
optn=[];
help="Shutdown the XE host.";
implementation=No_fd Cli_operations.host_shutdown;
flags=[Host_selectors];
};
"host-reboot",
{
reqd=[];
optn=[];
help="Reboot the XE host.";
implementation=No_fd Cli_operations.host_reboot;
flags=[Host_selectors];
};
"host-power-on",
{
reqd=[];
optn=[];
help="Power on the XE host.";
implementation=No_fd Cli_operations.host_power_on;
flags=[Host_selectors];
};
"host-dmesg",
{
reqd=[];
optn=[];
help="Get xen dmesg of the XE host.";
implementation=No_fd Cli_operations.host_dmesg;
flags=[Host_selectors];
};
"host-crashdump-upload",
{
reqd=["uuid"];
optn=["url";"http_proxy"];
help="Upload a host crash dump to the support website.";
implementation=No_fd Cli_operations.host_crash_upload;
flags=[];
};
"host-crashdump-destroy",
{
reqd=["uuid"];
optn=[];
help="Delete a host crashdump from the server.";
implementation=No_fd Cli_operations.host_crash_destroy;
flags=[];
};
"host-bugreport-upload",
{
reqd=[];
optn=["url"; "http_proxy"];
help="Upload the output of xen-bugtool --yestoall on a specific host to the support website.";
implementation=No_fd Cli_operations.host_bugreport_upload;
flags=[Host_selectors];
};
"host-backup",
{
reqd=["file-name"];
optn=[];
help="Download a backup of the host's control domain.";
implementation=With_fd Cli_operations.host_backup;
flags=[Host_selectors];
};
"host-restore",
{
reqd=["file-name"];
optn=[];
help="Upload a backup of the host's control domain.";
implementation=With_fd Cli_operations.host_restore;
flags=[Host_selectors];
};
"host-logs-download",
{
reqd=[];
optn=["file-name"];
help="Download a copy of the host logs.";
implementation=With_fd Cli_operations.host_logs_download;
flags=[Host_selectors];
};
"host-signal-networking-change",
{
reqd=[];
optn=[];
help="Signal that networking .";
implementation=No_fd_local_session Cli_operations.host_signal_networking_change;
flags=[Neverforward; Hidden];
};
"host-send-debug-keys",
{
reqd=["host-uuid"; "keys"];
optn=[];
help="Send specified hypervisor debug keys to specified host";
implementation=No_fd_local_session Cli_operations.host_send_debug_keys;
flags=[];
};
"host-notify",
{
reqd=["type"];
optn=["params"];
help="Notify some event.";
implementation=No_fd_local_session Cli_operations.host_notify;
flags=[Neverforward; Hidden];
};
"host-syslog-reconfigure",
{
reqd=["host-uuid"];
optn=[];
help="Reconfigure syslog daemon.";
implementation=No_fd Cli_operations.host_syslog_reconfigure;
flags=[];
};
"host-emergency-management-reconfigure",
{
reqd=["interface"];
optn=[];
help="Reconfigure the management interface of this node: only use if the node is in emergency mode.";
implementation=No_fd_local_session Cli_operations.host_emergency_management_reconfigure;
flags=[ Neverforward ];
};
"host-emergency-ha-disable",
{
reqd=[];
optn=["force"];
help="Disable HA on the local host. Only to be used to recover a pool with a broken HA setup.";
implementation=No_fd_local_session Cli_operations.host_emergency_ha_disable;
flags=[ Neverforward ];
};
"host-management-reconfigure",
{
reqd=["pif-uuid"];
optn=[];
help="Reconfigure the management interface of this node.";
implementation=No_fd Cli_operations.host_management_reconfigure;
flags=[];
};
"host-management-disable",
{
reqd=[];
optn=[];
help="Disable the management interface of this node.";
implementation=No_fd_local_session Cli_operations.host_management_disable;
flags=[ Neverforward ];
};
"host-compute-free-memory",
{
reqd=[];
optn=[];
help="Computes the amount of free memory on the host.";
implementation=No_fd Cli_operations.host_compute_free_memory;
flags=[Host_selectors];
};
"host-compute-memory-overhead",
{
reqd=[];
optn=[];
help="Computes the virtualization memory overhead of a host.";
implementation=No_fd Cli_operations.host_compute_memory_overhead;
flags=[Host_selectors];
};
"host-get-system-status-capabilities",
{
reqd=[];
optn=[];
help="";
implementation=No_fd_local_session Cli_operations.host_get_system_status_capabilities;
flags=[Neverforward; Host_selectors];
};
"host-get-system-status",
{
reqd=["filename"];
optn=["entries"; "output"];
help="Download system status into <filename>. Entries is a comma-separated list. Output may be 'tar', 'tar.bz2' (the default) or 'zip'.";
implementation=With_fd Cli_operations.host_get_system_status;
flags=[Host_selectors];
};
"host-set-hostname-live",
{
reqd=["host-uuid"; "host-name"];
optn=[];
help="Sets the host name to the specified string. Both the API and lower-level system hostname are changed.";
implementation=No_fd Cli_operations.host_set_hostname_live;
flags=[Host_selectors];
};
"host-set-power-on-mode",
{
reqd=["power-on-mode"];
optn=["power-on-config"];
help="Sets the power-on mode for the XE host";
implementation=No_fd Cli_operations.host_set_power_on_mode;
flags=[Host_selectors];
};
"host-call-plugin",
{
reqd=["host-uuid"; "plugin"; "fn"];
optn=["args:"];
help="Calls the function within the plugin on the given host with optional arguments.";
implementation=No_fd Cli_operations.host_call_plugin;
flags=[];
};
"host-retrieve-wlb-evacuate-recommendations",
{
reqd=["uuid"];
optn=[];
help="Retrieves recommended host migrations to perform when evacuating the host from the wlb server. If a vm cannot be migrated from the host the reason is listed instead of a recommendation.";
implementation=No_fd Cli_operations.host_retrieve_wlb_evacuate_recommendations;
flags=[];
};
"host-enable-external-auth",
{
reqd=["host-uuid"; "auth-type"; "service-name"];
optn=["config:"];
help="Enables external authentication in a host";
implementation=No_fd Cli_operations.host_enable_external_auth;
flags=[Hidden];
};
"host-disable-external-auth",
{
reqd=["host-uuid"];
optn=["config:"];
help="Disables external authentication in a host";
implementation=No_fd Cli_operations.host_disable_external_auth;
flags=[Hidden];
};
"host-refresh-pack-info",
{
reqd=["host-uuid"];
optn=[];
help="Refreshes Host.software_version";
implementation=No_fd Cli_operations.host_refresh_pack_info;
flags=[Hidden];
};
"host-cpu-info",
{
reqd=[];
optn=["uuid"];
help="Lists information about the host's physical CPUs.";
implementation=No_fd Cli_operations.host_cpu_info;
flags=[];
};
"host-get-cpu-features",
{
reqd=[];
optn=["uuid"];
help="Prints a hexadecimal representation of the host's physical-CPU features.";
implementation=No_fd Cli_operations.host_get_cpu_features;
flags=[];
};
"host-set-cpu-features",
{
reqd=["features"];
optn=["uuid"];
help="Attempts to mask the host's physical-CPU features to match the given features. The given string must be a 32-digit hexadecimal number (optionally containing spaces), as given by host-get-cpu-features.";
implementation=No_fd Cli_operations.host_set_cpu_features;
flags=[];
};
"host-reset-cpu-features",
{
reqd=[];
optn=["uuid"];
help="Removes the feature mask of the host's physical CPU (if any).";
implementation=No_fd Cli_operations.host_reset_cpu_features;
flags=[];
};
"patch-upload",
{
reqd=["file-name"];
optn=[];
help="Upload a patch file to the server.";
implementation=With_fd Cli_operations.patch_upload;
flags=[];
};
"patch-destroy",
{
reqd=["uuid"];
optn=[];
help="Remove an unapplied patch record and files from the server.";
implementation=No_fd Cli_operations.patch_destroy;
flags=[];
};
"update-upload",
{
reqd=["file-name"; "host-uuid"];
optn=[];
help="Stream new update to the server.";
implementation=With_fd Cli_operations.update_upload;
flags=[];
};
"patch-precheck",
{
reqd=["uuid"; "host-uuid"];
optn=[];
help="Run the prechecks contained within the patch previously uploaded to the specified host.";
implementation=No_fd Cli_operations.patch_precheck;
flags=[];
};
"patch-apply",
{
reqd=["uuid"; "host-uuid"];
optn=[];
help="Apply the previously uploaded patch to the specified host.";
implementation=No_fd Cli_operations.patch_apply;
flags=[];
};
"patch-pool-apply",
{
reqd=["uuid"];
optn=[];
help="Apply the previously uploaded patch to all hosts in the pool.";
implementation=No_fd Cli_operations.patch_pool_apply;
flags=[];
};
"patch-clean",
{
reqd=["uuid"];
optn=[];
help="Delete a previously uploaded patch file.";
implementation=No_fd Cli_operations.patch_clean;
flags=[];
};
"patch-pool-clean",
{
reqd=["uuid"];
optn=[];
help="Delete a previously uploaded patch file on all hosts in the pool.";
implementation=No_fd Cli_operations.patch_pool_clean;
flags=[];
};
"user-password-change",
{
reqd=["new"];
optn=["old"];
help="Change a user's login password.";
implementation=No_fd Cli_operations.user_password_change;
flags=[];
};
"vm-compute-memory-overhead",
{
reqd=[];
optn=[];
help="Computes the virtualization memory overhead of a VM.";
implementation=No_fd Cli_operations.vm_compute_memory_overhead;
flags=[Vm_selectors];
};
"vm-memory-balloon",
{
reqd=["target"];
optn=[];
help="Set the memory target for a running VM. The given value must be within the "^
"range defined by the VM's memory_dynamic_min and memory_dynamic_max values.";
implementation=No_fd Cli_operations.vm_memory_target_set;
flags=[Deprecated ["vm-memory-dynamic-range-set"]; Vm_selectors; Hidden];
};
"vm-memory-dynamic-range-set",
{
reqd=["min"; "max"];
optn=[];
help="Configure the dynamic memory range of a VM. The dynamic memory \
range defines soft lower and upper limits for a VM's memory. It's \
possible to change these fields when a VM is running or halted. The \
dynamic range must fit within the static range.";
implementation=No_fd Cli_operations.vm_memory_dynamic_range_set;
flags=[Vm_selectors];
};
"vm-memory-static-range-set",
{
reqd=["min"; "max"];
optn=[];
help="Configure the static memory range of a VM. The static memory \
range defines hard lower and upper limits for a VM's memory. It's \
possible to change these fields only when a VM is halted. The static \
range must encompass the dynamic range.";
implementation=No_fd Cli_operations.vm_memory_static_range_set;
flags=[Vm_selectors];
};
"vm-memory-limits-set",
{
reqd=["static-min"; "static-max"; "dynamic-min"; "dynamic-max"];
optn=[];
help="Configure the memory limits of a VM.";
implementation=No_fd Cli_operations.vm_memory_limits_set;
flags=[Vm_selectors];
};
"vm-memory-target-set",
{
reqd=["target"];
optn=[];
help="Set the memory target for a halted or running VM. The given \
value must be within the range defined by the VM's memory_static_min \
and memory_static_max values.";
implementation=No_fd Cli_operations.vm_memory_target_set;
flags=[Vm_selectors];
};
"vm-memory-target-wait",
{
reqd=[];
optn=[];
help="Wait for a running VM to reach its current memory target.";
implementation=No_fd Cli_operations.vm_memory_target_wait;
flags=[Vm_selectors; Hidden];
};
"vm-data-source-list",
{
reqd=[];
optn=[];
help="List the data sources that can be recorded for a VM.";
implementation=No_fd Cli_operations.vm_data_source_list;
flags=[Vm_selectors];
};
"vm-data-source-record",
{
reqd=["data-source"];
optn=[];
help="Record the specified data source for a VM.";
implementation=No_fd Cli_operations.vm_data_source_record;
flags=[Vm_selectors];
};
"vm-data-source-query",
{
reqd=["data-source"];
optn=[];
help="Query the last value read from a VM data source.";
implementation=No_fd Cli_operations.vm_data_source_query;
flags=[Vm_selectors];
};
"vm-data-source-forget",
{
reqd=["data-source"];
optn=[];
help="Stop recording the specified data source for a VM, and forget all of the recorded data.";
implementation=No_fd Cli_operations.vm_data_source_forget;
flags=[Vm_selectors];
};
"vm-memory-shadow-multiplier-set",
{
reqd=["multiplier"];
optn=[];
help="Set the shadow memory multiplier of a VM which may be running.";
implementation=No_fd Cli_operations.vm_memory_shadow_multiplier_set;
flags=[Vm_selectors];
};
"vm-clone",
{
reqd=["new-name-label"];
optn=["new-name-description"];
help="Clone an existing VM, using storage-level fast disk clone operation where available.";
implementation=No_fd Cli_operations.vm_clone;
flags=[Standard; Vm_selectors];
};
"vm-snapshot",
{
reqd=["new-name-label"];
optn=["new-name-description"];
help="Snapshot an existing VM, using storage-level fast disk snapshot operation where available.";
implementation=No_fd Cli_operations.vm_snapshot;
flags=[Standard; Vm_selectors];
};