forked from nushell/nu_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
virsh-completions.nu
2164 lines (1854 loc) · 65.7 KB
/
virsh-completions.nu
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
# Specify hypervisor connection URI
extern "virsh" [
...args
]
# Attach device from an XML file
extern "virsh attach-device" [
--persistent # Make live change persistent
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Attach disk device
extern "virsh attach-disk" [
--targetbus # Target bus of disk device
--driver # Driver of disk device
--subdriver # Subdriver of disk device
--iothread # IOThread to be used by supported device
--cache # Cache mode of disk device
--io # IO policy of disk device
--type # Target device type
--mode # Mode of device reading and writing
--serial # Serial of disk device
--wwn # Wwn of disk device
--rawio # Needs rawio capability
--address # Address of disk device
--multifunction # Use multifunction pci under specified address
--print-xml # Print XML document rather than attach the disk
--persistent # Make live change persistent
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Attach network interface
extern "virsh attach-interface" [
--target # Target network name
--mac # MAC address
--script # Script used to bridge network interface
--model # Model type
--inbound # Control domain's incoming traffics
--outbound # Control domain's outgoing traffics
--persistent # Make live change persistent
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
--print-xml # Print XML document rather than attach the interface
--managed # Libvirt will automatically detach/attach the device from/to host
...args
]
# Autostart a domain
extern "virsh autostart" [
--disable # Disable autostarting
--disable # Disable autostarting
--disable # Disable autostarting
...args
]
# Set or query a block device I/O tuning parameters
extern "virsh blkdeviotune" [
--total-bytes-sec # Total throughput limit, as scaled integer (default bytes)
--read-bytes-sec # Read throughput limit, as scaled integer (default bytes)
--write-bytes-sec # Write throughput limit, as scaled integer (default bytes)
--total-iops-sec # Total I/O operations limit per second
--read-iops-sec # Read I/O operations limit per second
--write-iops-sec # Write I/O operations limit per second
--total-bytes-sec-max # Total max, as scaled integer (default bytes)
--read-bytes-sec-max # Read max, as scaled integer (default bytes)
--write-bytes-sec-max # Write max, as scaled integer (default bytes)
--total-iops-sec-max # Total I/O operations max
--read-iops-sec-max # Read I/O operations max
--write-iops-sec-max # Write I/O operations max
--size-iops-sec # I/O size in bytes
--group-name # Group name to share I/O quota between multiple drives
--total-bytes-sec-max-length # Duration in seconds to allow total max bytes
--read-bytes-sec-max-length # Duration in seconds to allow read max bytes
--write-bytes-sec-max-length # Duration in seconds to allow write max bytes
--total-iops-sec-max-length # Duration in seconds to allow total I/O operations max
--read-iops-sec-max-length # Duration in seconds to allow read I/O operations max
--write-iops-sec-max-length # Duration in seconds to allow write I/O operations max
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Get or set blkio parameters
extern "virsh blkiotune" [
--weight # IO Weight
--device-weights # Per-device IO Weights, in the form of /path/to/device,weight,...
--device-read-iops-sec # Per-device read I/O limit per second, in the form of /path/to/device,read_iops_sec,...
--device-write-iops-sec # Per-device write I/O limit per second, in the form of /path/to/device,write_iops_sec,...
--device-read-bytes-sec # Per-device bytes read per second, in the form of /path/to/device,read_bytes_sec,...
--device-write-bytes-sec # Per-device bytes wrote per second, in the form of /path/to/device,write_bytes_sec,...
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Start a block commit operation
extern "virsh blockcommit" [
--bandwidth # Bandwidth limit in MiB/s
--base # Path of base file to commit into (default bottom of chain)
--shallow # Use backing file of top as base
--top # Path of top file to commit from (default top of chain)
--active # Trigger two-stage active commit of top file
--delete # Delete files that were successfully committed
--wait # Wait for job to complete (with --active, wait for job to sync)
--verbose # With --wait, display the progress
--timeout # Implies --wait, abort if copy exceeds timeout (in seconds)
--pivot # Implies --active --wait, pivot when commit is synced
--keep-overlay # Implies --active --wait, quit when commit is synced
--async # With --wait, don't wait for cancel to finish
--keep-relative # Keep the backing chain relatively referenced
--bytes # The bandwidth limit is in bytes/s rather than MiB/s
...args
]
# Start a block copy operation
extern "virsh blockcopy" [
--dest # Path of the copy to create
--bandwidth # Bandwidth limit in MiB/s
--shallow # Make the copy share a backing chain
--reuse-external # Reuse existing destination
--blockdev # Copy destination is block device instead of regular file
--wait # Wait for job to reach mirroring phase
--verbose # With --wait, display the progress
--timeout # Implies --wait, abort if copy exceeds timeout (in seconds)
--pivot # Implies --wait, pivot when mirroring starts
--finish # Implies --wait, quit when mirroring starts
--async # With --wait, don't wait for cancel to finish
--xml # Filename containing XML description of the copy destination
--format # Format of the destination file
--granularity # Power-of-two granularity to use during the copy
--buf-size # Maximum amount of in-flight data during the copy
--bytes # The bandwidth limit is in bytes/s rather than MiB/s
--transient-job # The copy job is not persisted if VM is turned off
...args
]
# Manage active block operations
extern "virsh blockjob" [
--abort # Abort the active job on the specified disk
--async # Implies --abort; request but don't wait for job end
--pivot # Implies --abort; conclude and pivot a copy or commit job
--info # Get active job information for the specified disk
--bytes # Get/set bandwidth in bytes rather than MiB/s
--raw # Implies --info; output details rather than human summary
--bandwidth # Set the bandwidth limit in MiB/s
...args
]
# Populate a disk from its backing image
extern "virsh blockpull" [
--bandwidth # Bandwidth limit in MiB/s
--base # Path of backing file in chain for a partial pull
--wait # Wait for job to finish
--verbose # With --wait, display the progress
--timeout # With --wait, abort if pull exceeds timeout (in seconds)
--async # With --wait, don't wait for cancel to finish
--keep-relative # Keep the backing chain relatively referenced
--bytes # The bandwidth limit is in bytes/s rather than MiB/s
...args
]
# Resize block device of domain
extern "virsh blockresize" [
...args
]
# Change media of CD or floppy drive
extern "virsh change-media" [
--source # Source of the media
--eject # Eject the media
--insert # Insert the media
--update # Update the media
--current # Alter live or persistent configuration of domain depending on hypervisor driver
--live # Alter live configuration of running domain
--config # Alter persistent configuration, effect observed on next boot
--force # Force media changing
--print-xml # Print XML document rather than change media
--block # Source media is a block device
...args
]
# Connect to the guest console
extern "virsh console" [
--devname # Character device name
--force # Force console connection (disconnect already connected sessions)
--safe # Only connect if safe console handling is supported
...args
]
# Compute baseline CPU
extern "virsh cpu-baseline" [
--features # Show features that are part of the CPU model type
--migratable # Do not include features that block migration
...args
]
# Compare host CPU with a CPU described by an XML file
extern "virsh cpu-compare" [
--error # Report error if CPUs are incompatible
...args
]
# Show domain cpu statistics
extern "virsh cpu-stats" [
--total # Show total statistics only
--start # Show statistics from this CPU
--count # Number of shown CPUs at most
...args
]
# Create a domain from an XML file
extern "virsh create" [
--console # Attach to console after creation
--paused # Leave the guest paused after creation
--autodestroy # Automatically destroy the guest when virsh disconnects
--pass-fds # Pass file descriptors N,M,... to the guest
--validate # Validate the XML against the schema
--xmlfile # Domain snapshot XML
--redefine # Redefine metadata for existing snapshot
--current # With redefine, set current snapshot
--no-metadata # Take snapshot but create no metadata
--halt # Halt domain after snapshot is created
--disk-only # Capture disk state but not vm state
--reuse-external # Reuse any existing external files
--quiesce # Quiesce guest's file systems
--atomic # Require atomic operation
--live # Take a live snapshot
--name # Name of snapshot
--description # Description of snapshot
--print-xml # Print XML document rather than create
--no-metadata # Take snapshot but create no metadata
--halt # Halt domain after snapshot is created
--disk-only # Capture disk state but not vm state
--reuse-external # Reuse any existing external files
--quiesce # Quiesce guest's file systems
--atomic # Require atomic operation
--live # Take a live snapshot
--memspec # Memory attributes: [file=]name[,snapshot=type]
--print-xml # Print XML document, but don't define/create
--source-host # Source-host for underlying storage
--source-path # Source path for underlying storage
--source-dev # Source device for underlying storage
--source-name # Source name for underlying storage
--target # Target for underlying storage
--source-format # Format for underlying storage
--auth-type # Auth type to be used for underlying storage
--auth-username # Auth username to be used for underlying storage
--secret-usage # Auth secret usage to be used for underlying storage
--secret-uuid # Auth secret UUID to be used for underlying storage
--adapter-name # Adapter name to be used for underlying storage
--adapter-wwnn # Adapter wwnn to be used for underlying storage
--adapter-wwpn # Adapter wwpn to be used for underlying storage
--adapter-parent # Adapter parent to be used for underlying storage
--build # Build the pool as normal
--no-overwrite # Do not overwrite any existing data
--overwrite # Overwrite any existing data
--build # Build the pool as normal
--no-overwrite # Do not overwrite any existing data
--overwrite # Overwrite any existing data
--allocation # Initial allocation size, as scaled integer (default bytes)
--format # File format type raw,bochs,qcow,qcow2,qed,vmdk
--backing-vol # The backing volume if taking a snapshot
--backing-vol-format # Format of backing volume if taking a snapshot
--prealloc-metadata # Preallocate metadata (for qcow2 instead of full allocation)
--print-xml # Print XML document, but don't define/create
--prealloc-metadata # Preallocate metadata (for qcow2 instead of full allocation)
--inputpool # Pool name or UUID of the input volume's pool
--prealloc-metadata # Preallocate metadata (for qcow2 instead of full allocation)
--reflink # Use btrfs COW lightweight copy
...args
]
# Define (but don't start) a domain
extern "virsh define" [
--validate # Validate the XML against the schema
--running # Set domain to be running on start
--paused # Set domain to be paused on start
--running # Set domain to be running on restore
--paused # Set domain to be paused on restore
--managed-save # Remove domain managed state file
--storage # Remove associated storage volumes
--remove-all-storage # Remove all associated storage volumes
--delete-snapshots # Delete snapshots associated with volume(s)
--wipe-storage # Wipe data on the removed volumes
--snapshots-metadata # Remove all domain snapshot metadata, if inactive
--nvram # Remove nvram file, if inactive
--keep-nvram # Keep nvram file, if inactive
--print-xml # Print XML document, but don't define/create
--source-host # Source-host for underlying storage
--source-path # Source path for underlying storage
--source-dev # Source device for underlying storage
--source-name # Source name for underlying storage
--target # Target for underlying storage
--source-format # Format for underlying storage
--auth-type # Auth type to be used for underlying storage
--auth-username # Auth username to be used for underlying storage
--secret-usage # Auth secret usage to be used for underlying storage
--secret-uuid # Auth secret UUID to be used for underlying storage
--adapter-name # Adapter name to be used for underlying storage
--adapter-wwnn # Adapter wwnn to be used for underlying storage
--adapter-wwpn # Adapter wwpn to be used for underlying storage
--adapter-parent # Adapter parent to be used for underlying storage
...args
]
# Show or set domain's description or title
extern "virsh desc" [
--live # Modify/get running state
--config # Modify/get persistent configuration
--current # Modify/get current state configuration
--title # Modify/get the title instead of description
--edit # Open an editor to modify the description
...args
]
# Destroy (stop) a domain
extern "virsh destroy" [
--graceful # Terminate gracefully
...args
]
# Detach device from an XML file
extern "virsh detach-device" [
--persistent # Make live change persistent
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Detach disk device
extern "virsh detach-disk" [
--persistent # Make live change persistent
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Detach network interface
extern "virsh detach-interface" [
--mac # MAC address
--persistent # Make live change persistent
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Domain display connection URI
extern "virsh domdisplay" [
--include-password # Includes the password into the connection URI if available
--type # Select particular graphical display (e.g. "vnc", "spice", "rdp")
--all # Show all possible graphical displays
...args
]
# Freeze domain's mounted filesystems
extern "virsh domfsfreeze" [
...args
]
# Thaw domain's mounted filesystems
extern "virsh domfsthaw" [
...args
]
# Get information of domain's mounted filesystems
extern "virsh domfsinfo" [
...args
]
# Invoke fstrim on domain's mounted filesystems
extern "virsh domfstrim" [
--minimum # Just a hint to ignore contiguous free ranges smaller than this (Bytes)
--mountpoint # Which mount point to trim
...args
]
# Print the domain's hostname
extern "virsh domhostname" [
...args
]
# Convert a domain name or UUID to domain id
extern "virsh domid" [
...args
]
# Set link state of a virtual interface
extern "virsh domif-setlink" [
--config # Affect next boot
...args
]
# Get/set parameters of a virtual interface
extern "virsh domiftune" [
--inbound # Control domain's incoming traffics
--outbound # Control domain's outgoing traffics
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Abort active domain job
extern "virsh domjobabort" [
...args
]
# Domain job information
extern "virsh domjobinfo" [
--completed # Return statistics of a recently completed job
...args
]
# Convert a domain id or UUID to domain name
extern "virsh domname" [
...args
]
# Rename a domain
extern "virsh domrename" [
...args
]
# Suspend a domain gracefully using power management functions
extern "virsh dompmsuspend" [
--duration # Duration in seconds
...args
]
# Wakeup a domain from pmsuspended state
extern "virsh dompmwakeup" [
...args
]
# Convert a domain name or id to domain UUID
extern "virsh domuuid" [
...args
]
# Convert native config to domain XML
extern "virsh domxml-from-native" [
...args
]
# Convert domain XML to native config
extern "virsh domxml-to-native" [
--domain # Domain name, id or UUID
--xml # Xml data file to export from
...args
]
# Dump the core of a domain to a file for analysis
extern "virsh dump" [
--live # Perform a live core dump if supported
--crash # Crash the domain after core dump
--bypass-cache # Avoid file system cache when dumping
--reset # Reset the domain after core dump
--verbose # Display the progress of dump
--memory-only # Dump domain's memory only
--format # Specify the format of memory-only dump
--inactive # Show inactive defined XML
--security-info # Include security sensitive information in XML dump
--update-cpu # Update guest CPU according to host CPU
--migratable # Provide XML suitable for migrations
--security-info # Include security sensitive information in XML dump
--security-info # Include security sensitive information in XML dump
--inactive # Show inactive defined XML
--inactive # Show inactive defined XML
--security-info # Include security sensitive information in XML dump
--inactive # Show inactive defined XML
--pool # Pool name or UUID
...args
]
# Domain information in XML
extern "virsh dumpxml" [
--inactive # Show inactive defined XML
--security-info # Include security sensitive information in XML dump
--update-cpu # Update guest CPU according to host CPU
--migratable # Provide XML suitable for migrations
--security-info # Include security sensitive information in XML dump
--security-info # Include security sensitive information in XML dump
--inactive # Show inactive defined XML
--inactive # Show inactive defined XML
--security-info # Include security sensitive information in XML dump
--inactive # Show inactive defined XML
--pool # Pool name or UUID
...args
]
# Edit XML configuration for a domain
extern "virsh edit" [
--skip-validate # Skip validation of the XML against the schema
--running # Set domain to be running on start
--paused # Set domain to be paused on start
--running # Set domain to be running on restore
--paused # Set domain to be paused on restore
--snapshotname # Snapshot name
--current # Also set edited snapshot as current
--rename # Allow renaming an existing snapshot
--clone # Allow cloning to new name
...args
]
# Domain Events
extern "virsh event" [
--domain # Filter by domain name, id, or UUID
--event # Which event type to wait for
--all # Wait for all events instead of just one type
--loop # Loop until timeout or interrupt, rather than one-shot
--timeout # Timeout seconds
--list # List valid event types
--timestamp # Show timestamp for each printed event
--domain # Filter by domain name, id or UUID
--event # Filter by event name
--pretty # Pretty-print any JSON output
--loop # Loop until timeout or interrupt, rather than one-shot
--timeout # Timeout seconds
--regex # Treat event as a regex rather than literal filter
--no-case # Treat event case-insensitively
--timestamp # Show timestamp for each printed event
--event # Which event type to wait for
--loop # Loop until timeout or interrupt, rather than one-shot
--timeout # Timeout seconds
--list # List valid event types
--timestamp # Show timestamp for each printed event
--device # Filter by node device name
--event # Which event type to wait for
--loop # Loop until timeout or interrupt, rather than one-shot
--timeout # Timeout seconds
--list # List valid event types
--timestamp # Show timestamp for each printed event
--secret # Filter by secret name or UUID
--event # Which event type to wait for
--loop # Loop until timeout or interrupt, rather than one-shot
--timeout # Timeout seconds
--list # List valid event types
--timestamp # Show timestamp for each printed event
--pool # Filter by storage pool name or UUID
--event # Which event type to wait for
--loop # Loop until timeout or interrupt, rather than one-shot
--timeout # Timeout seconds
--list # List valid event types
--timestamp # Show timestamp for each printed event
...args
]
# Inject NMI to the guest
extern "virsh inject-nmi" [
...args
]
# View domain IOThreads
extern "virsh iothreadinfo" [
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Control domain IOThread affinity
extern "virsh iothreadpin" [
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Add an IOThread to the guest domain
extern "virsh iothreadadd" [
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Delete an IOThread from the guest domain
extern "virsh iothreaddel" [
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Send keycodes to the guest
extern "virsh send-key" [
--codeset # The codeset of keycodes, default:linux
--holdtime # The time (in milliseconds) how long the keys will be held
...args
]
# Send signals to processes
extern "virsh send-process-signal" [
...args
]
# LXC Guest Enter Namespace
extern "virsh lxc-enter-namespace" [
--noseclabel # Do not change process security label
...args
]
# Managed save of a domain state
extern "virsh managedsave" [
--bypass-cache # Avoid file system cache when saving
--running # Set domain to be running on next start
--paused # Set domain to be paused on next start
--verbose # Display the progress of save
--running # Set domain to be running on start
--paused # Set domain to be paused on start
--security-info # Include security sensitive information in XML dump
--running # Set domain to be running on start
--paused # Set domain to be paused on start
...args
]
# Remove managed save of a domain
extern "virsh managedsave-remove" [
...args
]
# Edit XML for a domain's managed save state file
extern "virsh managedsave-edit" [
--running # Set domain to be running on start
--paused # Set domain to be paused on start
...args
]
# Domain information of managed save state file in XML
extern "virsh managedsave-dumpxml" [
--security-info # Include security sensitive information in XML dump
...args
]
# Redefine the XML for a domain's managed save state file
extern "virsh managedsave-define" [
--running # Set domain to be running on start
--paused # Set domain to be paused on start
...args
]
# Get or set memory parameters
extern "virsh memtune" [
--hard-limit # Max memory, as scaled integer (default KiB)
--soft-limit # Memory during contention, as scaled integer (default KiB)
--swap-hard-limit # Max memory plus swap, as scaled integer (default KiB)
--min-guarantee # Min guaranteed memory, as scaled integer (default KiB)
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Get or set perf event
extern "virsh perf" [
--enable # Perf events which will be enabled
--disable # Perf events which will be disabled
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Show or set domain's custom XML metadata
extern "virsh metadata" [
--live # Modify/get running state
--config # Modify/get persistent configuration
--current # Modify/get current state configuration
--edit # Use an editor to change the metadata
--key # Key to be used as a namespace identifier
--set # New metadata to set
--remove # Remove the metadata corresponding to an uri
...args
]
# Migrate domain to another host
extern "virsh migrate" [
--live # Live migration
--offline # Offline migration
--p2p # Peer-2-peer migration
--direct # Direct migration
--tunnelled # Tunnelled migration
--persistent # Persist VM on destination
--undefinesource # Undefine VM on source
--suspend # Do not restart the domain on the destination host
--copy-storage-all # Migration with non-shared storage with full disk copy
--copy-storage-inc # Migration with non-shared storage with incremental copy
--change-protection # Prevent any configuration changes to domain until migration ends
--unsafe # Force migration even if it may be unsafe
--verbose # Display the progress of migration
--compressed # Compress repeated pages during live migration
--auto-converge # Force convergence during live migration
--rdma-pin-all # Pin all memory before starting RDMA live migration
--abort-on-error # Abort on soft errors during migration
--postcopy # Enable post-copy migration; switch to it using migrate-postcopy command
--postcopy-after-precopy # Automatically switch to post-copy migration after one pass of pre-copy
--migrateuri # Migration URI, usually can be omitted
--graphicsuri # Graphics URI to be used for seamless graphics migration
--listen-address # Listen address that destination should bind to for incoming migration
--dname # Rename to new name during migration
--timeout # Run action specified by --timeout-* if live migration exceeds timeout
--timeout-suspend # Suspend the guest after timeout
--timeout-postcopy # Switch to post-copy after timeout
--xml # Filename containing updated XML for the target
--migrate-disks # Comma separated list of disks to be migrated
--disks-port # Port to use by target server for incoming disks migration
--comp-methods # Comma separated list of compression methods to be used
--comp-mt-level # Compress level for multithread compression
--comp-mt-threads # Number of compression threads for multithread compression
--comp-mt-dthreads # Number of decompression threads for multithread compression
--comp-xbzrle-cache # Page cache size for xbzrle compression
--auto-converge-initial # Initial CPU throttling rate for auto-convergence
--auto-converge-increment # CPU throttling rate increment for auto-convergence
--persistent-xml # Filename containing updated persistent XML for the target
--tls # Use TLS for migration
--size # Requested size of the cache (in bytes) used for compression
...args
]
# Set maximum tolerable downtime
extern "virsh migrate-setmaxdowntime" [
...args
]
# Get maximum tolerable downtime
extern "virsh migrate-getmaxdowntime" [
...args
]
# Get/set compression cache size
extern "virsh migrate-compcache" [
--size # Requested size of the cache (in bytes) used for compression
...args
]
# Set the maximum migration bandwidth
extern "virsh migrate-setspeed" [
...args
]
# Get the maximum migration bandwidth
extern "virsh migrate-getspeed" [
...args
]
# Switch running migration from pre-copy to post-copy
extern "virsh migrate-postcopy" [
...args
]
# Get or set numa parameters
extern "virsh numatune" [
--mode # NUMA mode, one of strict, preferred and interleave
--nodeset # NUMA node selections to set
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# QEMU Attach
extern "virsh qemu-attach" [
...args
]
# QEMU Monitor Command
extern "virsh qemu-monitor-command" [
--hmp # Command is in human monitor protocol
--pretty # Pretty-print any qemu monitor protocol output
...args
]
# QEMU Monitor Events
extern "virsh qemu-monitor-event" [
--domain # Filter by domain name, id or UUID
--event # Filter by event name
--pretty # Pretty-print any JSON output
--loop # Loop until timeout or interrupt, rather than one-shot
--timeout # Timeout seconds
--regex # Treat event as a regex rather than literal filter
--no-case # Treat event case-insensitively
--timestamp # Show timestamp for each printed event
...args
]
# QEMU Guest Agent Command
extern "virsh qemu-agent-command" [
--timeout # Timeout seconds. must be positive
--async # Execute command without waiting for timeout
--block # Execute command without timeout
--pretty # Pretty-print the output
...args
]
# Reboot a domain
extern "virsh reboot" [
...args
]
# Reset a domain
extern "virsh reset" [
...args
]
# Restore a domain from a saved state in a file
extern "virsh restore" [
--bypass-cache # Avoid file system cache when restoring
--xml # Filename containing updated XML for the target
--running # Restore domain into running state
--paused # Restore domain into paused state
...args
]
# Resume a domain
extern "virsh resume" [
...args
]
# Save a domain state to a file
extern "virsh save" [
--bypass-cache # Avoid file system cache when saving
--running # Set domain to be running on next start
--paused # Set domain to be paused on next start
--verbose # Display the progress of save
--running # Set domain to be running on start
--paused # Set domain to be paused on start
--security-info # Include security sensitive information in XML dump
--running # Set domain to be running on start
--paused # Set domain to be paused on start
--bypass-cache # Avoid file system cache when saving
--xml # Filename containing updated XML for the target
--running # Set domain to be running on restore
--paused # Set domain to be paused on restore
--verbose # Display the progress of save
--running # Set domain to be running on restore
--paused # Set domain to be paused on restore
--security-info # Include security sensitive information in XML dump
--running # Set domain to be running on restore
--paused # Set domain to be paused on restore
...args
]
# Redefine the XML for a domain's saved state file
extern "virsh save-image-define" [
--running # Set domain to be running on restore
--paused # Set domain to be paused on restore
...args
]
# Saved state domain information in XML
extern "virsh save-image-dumpxml" [
--security-info # Include security sensitive information in XML dump
...args
]
# Edit XML for a domain's saved state file
extern "virsh save-image-edit" [
--running # Set domain to be running on restore
--paused # Set domain to be paused on restore
...args
]
# Show/set scheduler parameters
extern "virsh schedinfo" [
--weight # Weight for XEN_CREDIT
--cap # Cap for XEN_CREDIT
--current # Get/set current scheduler info
--config # Get/set value to be used on next boot
--live # Get/set value from running domain
...args
]
# Take a screenshot of a current domain console and store it into a file
extern "virsh screenshot" [
--file # Where to store the screenshot
--screen # ID of a screen to take screenshot of
...args
]
# Change lifecycle actions
extern "virsh set-lifecycle-action" [
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Set the user password inside the domain
extern "virsh set-user-password" [
--encrypted # The password is already encrypted
...args
]
# Change maximum memory limit
extern "virsh setmaxmem" [
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Change memory allocation
extern "virsh setmem" [
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
...args
]
# Change number of virtual CPUs
extern "virsh setvcpus" [
--maximum # Set maximum limit on next boot
--config # Affect next boot
--live # Affect running domain
--current # Affect current domain
--guest # Modify cpu state in the guest
--hotpluggable # Make added vcpus hot(un)pluggable
...args
]
# Gracefully shutdown a domain
extern "virsh shutdown" [
...args
]
# Start a (previously defined) inactive domain
extern "virsh start" [
--disable # Disable autostarting
--console # Attach to console after creation
--paused # Leave the guest paused after creation
--autodestroy # Automatically destroy the guest when virsh disconnects
--bypass-cache # Avoid file system cache when loading
--force-boot # Force fresh boot by discarding any managed save
--pass-fds # Pass file descriptors N,M,... to the guest
--disable # Disable autostarting
--disable # Disable autostarting
--build # Build the pool as normal
--no-overwrite # Do not overwrite any existing data
--overwrite # Overwrite any existing data
...args
]
# Suspend a domain
extern "virsh suspend" [
--duration # Duration in seconds
...args
]
# TTY console
extern "virsh ttyconsole" [
...args
]
# Undefine a domain
extern "virsh undefine" [
--managed-save # Remove domain managed state file
--storage # Remove associated storage volumes
--remove-all-storage # Remove all associated storage volumes
--delete-snapshots # Delete snapshots associated with volume(s)
--wipe-storage # Wipe data on the removed volumes
--snapshots-metadata # Remove all domain snapshot metadata, if inactive