~serge-hallyn/ubuntu/raring/libvirt/libvirt-hugepages

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.el \{\
.    de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "VIRSH 1"
.TH VIRSH 1 "2012-06-28" "libvirt-0.9.13" "Virtualization Support"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
virsh \- management user interface
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
\&\fBvirsh\fR [\fI\s-1OPTION\s0\fR]... [\fI\s-1COMMAND_STRING\s0\fR]
.PP
\&\fBvirsh\fR [\fI\s-1OPTION\s0\fR]... \fI\s-1COMMAND\s0\fR [\fI\s-1ARG\s0\fR]...
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
The \fBvirsh\fR program is the main interface for managing virsh guest
domains. The program can be used to create, pause, and shutdown
domains. It can also be used to list current domains. Libvirt is a C
toolkit to interact with the virtualization capabilities of recent
versions of Linux (and other OSes). It is free software available
under the \s-1GNU\s0 Lesser General Public License. Virtualization of the
Linux Operating System means the ability to run multiple instances of
Operating Systems concurrently on a single hardware system where the
basic resources are driven by a Linux instance. The library aims at
providing a long term stable C \s-1API\s0.  It currently supports Xen, QEmu,
\&\s-1KVM\s0, \s-1LXC\s0, OpenVZ, VirtualBox and VMware \s-1ESX\s0.
.PP
The basic structure of most virsh usage is:
.PP
.Vb 1
\&  virsh [OPTION]... <command> <domain\-id> [ARG]...
.Ve
.PP
Where \fIcommand\fR is one of the commands listed below, \fIdomain-id\fR
is the numeric domain id, or the domain name (which will be internally
translated to domain id), and \fI\s-1ARGS\s0\fR are command specific
options.  There are a few exceptions to this rule in the cases where
the command in question acts on all domains, the entire machine,
or directly on the xen hypervisor.  Those exceptions will be clear for
each of those commands.
.PP
The \fBvirsh\fR program can be used either to run one \fI\s-1COMMAND\s0\fR by giving the
command and its arguments on the shell command line, or a \fI\s-1COMMAND_STRING\s0\fR
which is a single shell argument consisting of multiple \fI\s-1COMMAND\s0\fR actions
and their arguments joined with whitespace, and separated by semicolons
between commands.  Within \fI\s-1COMMAND_STRING\s0\fR, virsh understands the
same single, double, and backslash escapes as the shell, although you must
add another layer of shell escaping in creating the single shell argument.
If no command is given in the command line, \fBvirsh\fR will then start a minimal
interpreter waiting for your commands, and the \fBquit\fR command will then exit
the program.
.PP
The \fBvirsh\fR program understands the following \fI\s-1OPTIONS\s0\fR.
.IP "\fB\-h\fR, \fB\-\-help\fR" 4
.IX Item "-h, --help"
Ignore all other arguments, and behave as if the \fBhelp\fR command were
given instead.
.IP "\fB\-v\fR, \fB\-\-version[=short]\fR" 4
.IX Item "-v, --version[=short]"
Ignore all other arguments, and prints the version of the libvirt library
virsh is coming from
.IP "\fB\-V\fR, \fB\-\-version=long\fR" 4
.IX Item "-V, --version=long"
Ignore all other arguments, and prints the version of the libvirt library
virsh is coming from and which options and driver are compiled in.
.IP "\fB\-c\fR, \fB\-\-connect\fR \fI\s-1URI\s0\fR" 4
.IX Item "-c, --connect URI"
Connect to the specified \fI\s-1URI\s0\fR, as if by the \fBconnect\fR command,
instead of the default connection.
.IP "\fB\-d\fR, \fB\-\-debug\fR \fI\s-1LEVEL\s0\fR" 4
.IX Item "-d, --debug LEVEL"
Enable debug messages at integer \fI\s-1LEVEL\s0\fR and above.  \fI\s-1LEVEL\s0\fR can
range from 0 to 4 (default).  See the documentation of \fB\s-1VIRSH_DEBUG\s0\fR
environment variable below for the description of each \fI\s-1LEVEL\s0\fR.
.IP "\fB\-l\fR, \fB\-\-log\fR \fI\s-1FILE\s0\fR" 4
.IX Item "-l, --log FILE"
Output logging details to \fI\s-1FILE\s0\fR.
.IP "\fB\-q\fR, \fB\-\-quiet\fR" 4
.IX Item "-q, --quiet"
Avoid extra informational messages.
.IP "\fB\-r\fR, \fB\-\-readonly\fR" 4
.IX Item "-r, --readonly"
Make the initial connection read-only, as if by the \fI\-\-readonly\fR
option of the \fBconnect\fR command.
.IP "\fB\-t\fR, \fB\-\-timing\fR" 4
.IX Item "-t, --timing"
Output elapsed time information for each command.
.IP "\fB\-e\fR, \fB\-\-escape\fR \fIstring\fR" 4
.IX Item "-e, --escape string"
Set alternative escape sequence for \fIconsole\fR command. By default,
telnet's \fB^]\fR is used. Allowed characters when using hat notation are:
alphabetic character, @, [, ], \e, ^, _.
.SH "NOTES"
.IX Header "NOTES"
Most \fBvirsh\fR operations rely upon the libvirt library being able to
connect to an already running libvirtd service.  This can usually be
done using the command \fBservice libvirtd start\fR.
.PP
Most \fBvirsh\fR commands require root privileges to run due to the
communications channels used to talk to the hypervisor.  Running as
non root will return an error.
.PP
Most \fBvirsh\fR commands act synchronously, except maybe shutdown,
setvcpus and setmem. In those cases the fact that the \fBvirsh\fR
program returned, may not mean the action is complete and you
must poll periodically to detect that the guest completed the
operation.
.PP
\&\fBvirsh\fR strives for backward compatibility.  Although the \fBhelp\fR
command only lists the preferred usage of a command, if an older
version of \fBvirsh\fR supported an alternate spelling of a command or
option (such as \fI\-\-tunnelled\fR instead of \fI\-\-tunneled\fR), then
scripts using that older spelling will continue to work.
.PP
Several \fBvirsh\fR commands take an optionally scaled integer; if no
scale is provided, then the default is listed in the command (for
historical reasons, some commands default to bytes, while other
commands default to kibibytes).  The following case-insensitive
suffixes can be used to select a specfic scale:
  b, byte  byte      1
  \s-1KB\s0       kilobyte  1,000
  k, KiB   kibibyte  1,024
  \s-1MB\s0       megabyte  1,000,000
  M, MiB   mebibyte  1,048,576
  \s-1GB\s0       gigabyte  1,000,000,000
  G, GiB   gibibyte  1,073,741,824
  \s-1TB\s0       terabyte  1,000,000,000,000
  T, TiB   tebibyte  1,099,511,627,776
  \s-1PB\s0       petabyte  1,000,000,000,000,000
  P, PiB   pebibyte  1,125,899,906,842,624
  \s-1EB\s0       exabyte   1,000,000,000,000,000,000
  E, EiB   exbibyte  1,152,921,504,606,846,976
.SH "GENERIC COMMANDS"
.IX Header "GENERIC COMMANDS"
The following commands are generic i.e. not specific to a domain.
.IP "\fBhelp\fR [\fIcommand-or-group\fR]" 4
.IX Item "help [command-or-group]"
This lists each of the virsh commands.  When used without options, all
commands are listed, one per line, grouped into related categories,
displaying the keyword for each group.
.Sp
To display only commands for a specific group, give the keyword for that
group as an option.  For example:
.Sp
.Vb 1
\& virsh # help host
\&
\&  Host and Hypervisor (help keyword \*(Aqhost\*(Aq):
\&     capabilities                   capabilities
\&     connect                        (re)connect to hypervisor
\&     freecell                       NUMA free memory
\&     hostname                       print the hypervisor hostname
\&     qemu\-attach                    Attach to existing QEMU process
\&     qemu\-monitor\-command           QEMU Monitor Command
\&     sysinfo                        print the hypervisor sysinfo
\&     uri                            print the hypervisor canonical URI
.Ve
.Sp
To display detailed information for a specific command, give its name as the
option instead.  For example:
.Sp
.Vb 3
\& virsh # help list
\&   NAME
\&     list \- list domains
\&
\&   SYNOPSIS
\&     list [\-\-inactive] [\-\-all]
\&
\&   DESCRIPTION
\&     Returns list of domains.
\&
\&   OPTIONS
\&     \-\-inactive       list inactive domains
\&     \-\-all            list inactive & active domains
.Ve
.IP "\fBquit\fR, \fBexit\fR" 4
.IX Item "quit, exit"
quit this interactive terminal
.IP "\fBversion\fR" 4
.IX Item "version"
Will print out the major version info about what this built from.
.RS 4
.Sp
.RS 4
\&\fBExample\fR
.Sp
\&\fBvirsh\fR version
.Sp
Compiled against library: libvir 0.0.6
.Sp
Using library: libvir 0.0.6
.Sp
Using \s-1API:\s0 Xen 3.0.0
.Sp
Running hypervisor: Xen 3.0.0
.RE
.RE
.RS 4
.RE
.IP "\fBcd\fR [\fIdirectory\fR]" 4
.IX Item "cd [directory]"
Will change current directory to \fIdirectory\fR.  The default directory
for the \fBcd\fR command is the home directory or, if there is no \fI\s-1HOME\s0\fR
variable in the environment, the root directory.
.Sp
This command is only available in interactive mode.
.IP "\fBpwd\fR" 4
.IX Item "pwd"
Will print the current directory.
.IP "\fBconnect\fR \fI\s-1URI\s0\fR [\fI\-\-readonly\fR]" 4
.IX Item "connect URI [--readonly]"
(Re)\-Connect to the hypervisor. When the shell is first started, this
is automatically run with the \fI\s-1URI\s0\fR parameter requested by the \f(CW\*(C`\-c\*(C'\fR
option on the command line. The \fI\s-1URI\s0\fR parameter specifies how to
connect to the hypervisor. The documentation page at
<http://libvirt.org/uri.html> list the values supported, but the most
common are:
.RS 4
.IP "xen:///" 4
.IX Item "xen:///"
this is used to connect to the local Xen hypervisor, this is the default
.IP "qemu:///system" 4
.IX Item "qemu:///system"
connect locally as root to the daemon supervising QEmu and \s-1KVM\s0 domains
.IP "qemu:///session" 4
.IX Item "qemu:///session"
connect locally as a normal user to his own set of QEmu and \s-1KVM\s0 domains
.IP "lxc:///" 4
.IX Item "lxc:///"
connect to a local linux container
.RE
.RS 4
.Sp
For remote access see the documentation page at
<http://libvirt.org/uri.html> on how to make URIs.
The \fI\-\-readonly\fR option allows for read-only connection
.RE
.IP "\fBuri\fR" 4
.IX Item "uri"
Prints the hypervisor canonical \s-1URI\s0, can be useful in shell mode.
.IP "\fBhostname\fR" 4
.IX Item "hostname"
Print the hypervisor hostname.
.IP "\fBsysinfo\fR" 4
.IX Item "sysinfo"
Print the \s-1XML\s0 representation of the hypervisor sysinfo, if available.
.IP "\fBnodeinfo\fR" 4
.IX Item "nodeinfo"
Returns basic information about the node, like number and type of \s-1CPU\s0,
and size of the physical memory. The output corresponds to virNodeInfo
structure. Specifically, the \*(L"\s-1CPU\s0 socket(s)\*(R" field means number of \s-1CPU\s0
sockets per \s-1NUMA\s0 cell.
.IP "\fBnodecpustats\fR [\fIcpu\fR] [\fI\-\-percent\fR]" 4
.IX Item "nodecpustats [cpu] [--percent]"
Returns cpu stats of the node.
If \fIcpu\fR is specified, this will prints specified cpu statistics only.
If \fI\-\-percent\fR is specified, this will prints percentage of each kind of cpu
statistics during 1 second.
.IP "\fBnodememstats\fR [\fIcell\fR]" 4
.IX Item "nodememstats [cell]"
Returns memory stats of the node.
If \fIcell\fR is specified, this will prints specified cell statistics only.
.IP "\fBnodesuspend\fR [\fItarget\fR] [\fIduration\fR] [\fIflags\fR]" 4
.IX Item "nodesuspend [target] [duration] [flags]"
Puts the node (host machine) into a system-wide sleep state such as
Suspend-to-RAM, Suspend-to-Disk or Hybrid-Suspend and sets up a
Real-Time-Clock interrupt to fire (to wake up the node) after a time delay
specified by the 'duration' parameter.
.IP "\fBcapabilities\fR" 4
.IX Item "capabilities"
Print an \s-1XML\s0 document describing the capabilities of the hypervisor
we are currently connected to. This includes a section on the host
capabilities in terms of \s-1CPU\s0 and features, and a set of description
for each kind of guest which can be virtualized. For a more complete
description see:
  <http://libvirt.org/formatcaps.html>
The \s-1XML\s0 also show the \s-1NUMA\s0 topology information if available.
.IP "\fBinject-nmi\fR \fIdomain-id\fR" 4
.IX Item "inject-nmi domain-id"
Inject \s-1NMI\s0 to the guest.
.IP "\fBlist\fR [\fI\-\-inactive\fR | \fI\-\-all\fR] [\fI\-\-managed\-save\fR] [\fI\-\-title\fR] { [\fI\-\-table\fR] | \fI\-\-name\fR | \fI\-\-uuid\fR } [\fI\-\-persistent\fR] [\fI\-\-transient\fR] [\fI\-\-with\-managed\-save\fR] [\fI\-\-without\-managed\-save\fR] [\fI\-\-autostart\fR] [\fI\-\-no\-autostart\fR] [\fI\-\-with\-snapshot\fR] [\fI\-\-without\-snapshot\fR] [\fI\-\-state\-running\fR] [\fI\-\-state\-paused\fR] [\fI\-\-state\-shutoff\fR] [\fI\-\-state\-other\fR]" 4
.IX Item "list [--inactive | --all] [--managed-save] [--title] { [--table] | --name | --uuid } [--persistent] [--transient] [--with-managed-save] [--without-managed-save] [--autostart] [--no-autostart] [--with-snapshot] [--without-snapshot] [--state-running] [--state-paused] [--state-shutoff] [--state-other]"
Prints information about existing domains.  If no options are
specified it prints out information about running domains.
.Sp
An example format for the list is as follows:
.Sp
\&\fBvirsh\fR list
  Id    Name                           State
 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  0     Domain\-0                       running
  2     fedora                         paused
.Sp
Name is the name of the domain.  \s-1ID\s0 the domain numeric id.
State is the run state (see below).
.Sp
\&\fB\s-1STATES\s0\fR
.Sp
The State field lists 8 states for a domain, and which ones the
current domain is in.
.RS 4
.IP "\fBrunning\fR" 4
.IX Item "running"
The domain is currently running on a \s-1CPU\s0
.IP "\fBidle\fR" 4
.IX Item "idle"
The domain is idle, and not running or runnable.  This can be caused
because the domain is waiting on \s-1IO\s0 (a traditional wait state) or has
gone to sleep because there was nothing else for it to do.
.IP "\fBpaused\fR" 4
.IX Item "paused"
The domain has been paused, usually occurring through the administrator
running \fBvirsh suspend\fR.  When in a paused state the domain will still
consume allocated resources like memory, but will not be eligible for
scheduling by the hypervisor.
.IP "\fBshutdown\fR" 4
.IX Item "shutdown"
The domain is in the process of shutting down, i.e. the guest operating system
has been notified and should be in the process of stopping its operations
gracefully.
.IP "\fBshut off\fR" 4
.IX Item "shut off"
The domain is not running.  Usually this indicates the domain has been
shut down completely, or has not been started.
.IP "\fBcrashed\fR" 4
.IX Item "crashed"
The domain has crashed, which is always a violent ending.  Usually
this state can only occur if the domain has been configured not to
restart on crash.
.IP "\fBdying\fR" 4
.IX Item "dying"
The domain is in process of dying, but hasn't completely shutdown or
crashed.
.IP "\fBpmsuspended\fR" 4
.IX Item "pmsuspended"
The domain has been suspended by guest power management, e.g. entered
into s3 state.
.RE
.RS 4
.Sp
Normally only active domains are listed. To list inactive domains specify
\&\fI\-\-inactive\fR or \fI\-\-all\fR to list both active and inactive domains.
.Sp
To filter the list of domains present on the hypervisor you may specify one or
more of filtering flags supported by the \fBlist\fR command.  These flags are
grouped by function. Specifying one or more flags from a group enables the
filter group. Supported filtering flags and groups:
.IP "\fBPersistence\fR" 4
.IX Item "Persistence"
Flag \fI\-\-persistent\fR is used to include persistent domains in the returned
list. To include transient domains specify \fI\-\-transient\fR.
.IP "\fBExistence of managed save image\fR" 4
.IX Item "Existence of managed save image"
To list domains having a managed save image specify flag
\&\fI\-\-with\-managed\-save\fR. For domains that don't have a managed save image
specify \fI\-\-without\-managed\-save\fR.
.IP "\fBDomain state\fR" 4
.IX Item "Domain state"
The following filter flags select a domain by its state:
\&\fI\-\-state\-running\fR for running domains, \fI\-\-state\-paused\fR  for paused domains,
\&\fI\-\-state\-shutoff\fR for turned off domains and \fI\-\-state\-other\fR for all
other states as a fallback.
.IP "\fBAutostarting domains\fR" 4
.IX Item "Autostarting domains"
To list autostarting domains use the flag \fI\-\-autostart\fR. To list domains with
this feature disabled use \fI\-\-no\-autostart\fR.
.IP "\fBSnapshot existence\fR" 4
.IX Item "Snapshot existence"
Domains that have snapshot images can be listed using flag \fI\-\-with\-snapshot\fR,
domains without a snapshot \fI\-\-without\-snapshot\fR.
.RE
.RS 4
.Sp
When talking to older servers, this command is forced to use a series of \s-1API\s0
calls with an inherent race, where a domain might not be listed or might appear
more than once if it changed state between calls while the list was being
collected.  Newer servers do not have this problem.
.Sp
If \fI\-\-managed\-save\fR is specified, then domains that have managed save state
(only possible if they are in the \fBshut off\fR state, so you need to specify
\&\fI\-\-inactive\fR or \fI\-\-all\fR to actually list them) will instead show as \fBsaved\fR
in the listing. This flag is usable only with the default \fI\-\-table\fR output.
Note that this flag does not filter the list of domains.
.Sp
If \fI\-\-name\fR is specified, domain names are printed instead of the table
formatted one per line. If \fI\-\-uuid\fR is specified domain's \s-1UUID\s0's are printed
instead of names. Flag \fI\-\-table\fR specifies that the legacy table-formatted
output should be used. This is the default. All of these are mutually
exclusive.
.Sp
If \fI\-\-title\fR is specified, then the short domain description (title) is
printed in an extra column. This flag is usable only with the default
\&\fI\-\-table\fR output.
.Sp
Example:
.Sp
\&\fBvirsh\fR list \-\-title
  Id    Name                           State      Title
 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
  0     Domain\-0                       running    Mailserver 1
  2     fedora                         paused
.RE
.IP "\fBfreecell\fR [{ [\fI\-\-cellno\fR] \fBcellno\fR | \fI\-\-all\fR }]" 4
.IX Item "freecell [{ [--cellno] cellno | --all }]"
Prints the available amount of memory on the machine or within a \s-1NUMA\s0
cell.  The freecell command can provide one of three different
displays of available memory on the machine depending on the options
specified.  With no options, it displays the total free memory on the
machine.  With the \-\-all option, it displays the free memory in each
cell and the total free memory on the machine.  Finally, with a
numeric argument or with \-\-cellno plus a cell number it will display
the free memory for the specified cell only.
.IP "\fBcpu-baseline\fR \fI\s-1FILE\s0\fR" 4
.IX Item "cpu-baseline FILE"
Compute baseline \s-1CPU\s0 which will be supported by all host CPUs given in <file>.
The list of host CPUs is built by extracting all <cpu> elements from the
<file>. Thus, the <file> can contain either a set of <cpu> elements separated
by new lines or even a set of complete <capabilities> elements printed by
\&\fBcapabilities\fR command.
.IP "\fBcpu-compare\fR \fI\s-1FILE\s0\fR" 4
.IX Item "cpu-compare FILE"
Compare \s-1CPU\s0 definition from \s-1XML\s0 <file> with host \s-1CPU\s0. The \s-1XML\s0 <file> may
contain either host or guest \s-1CPU\s0 definition. The host \s-1CPU\s0 definition is the
<cpu> element and its contents as printed by \fBcapabilities\fR command. The
guest \s-1CPU\s0 definition is the <cpu> element and its contents from domain \s-1XML\s0
definition. For more information on guest \s-1CPU\s0 definition see:
<http://libvirt.org/formatdomain.html#elementsCPU>
.IP "\fBecho\fR [\fI\-\-shell\fR] [\fI\-\-xml\fR] [\fIarg\fR...]" 4
.IX Item "echo [--shell] [--xml] [arg...]"
Echo back each \fIarg\fR, separated by space.  If \fI\-\-shell\fR is
specified, then the output will be single-quoted where needed, so that
it is suitable for reuse in a shell context.  If \fI\-\-xml\fR is
specified, then the output will be escaped for use in \s-1XML\s0.
.SH "DOMAIN COMMANDS"
.IX Header "DOMAIN COMMANDS"
The following commands manipulate domains directly, as stated
previously most commands take domain-id as the first parameter. The
\&\fIdomain-id\fR can be specified as a short integer, a name or a full \s-1UUID\s0.
.IP "\fBautostart\fR [\fI\-\-disable\fR] \fIdomain-id\fR" 4
.IX Item "autostart [--disable] domain-id"
Configure a domain to be automatically started at boot.
.Sp
The option \fI\-\-disable\fR disables autostarting.
.IP "\fBconsole\fR \fIdomain-id\fR [\fIdevname\fR] [\fI\-\-safe\fR] [\fI\-\-force\fR]" 4
.IX Item "console domain-id [devname] [--safe] [--force]"
Connect the virtual serial console for the guest. The optional
\&\fIdevname\fR parameter refers to the device alias of an alternate
console, serial or parallel device configured for the guest.
If omitted, the primary console will be opened.
.Sp
If the flag \fI\-\-safe\fR is specified, the connection is only attempted
if the driver supports safe console handling. This flag specifies that
the server has to ensure exclusive access to console devices. Optionally
the \fI\-\-force\fR flag may be specified, requesting to disconnect any existing
sessions, such as in a case of a broken connection.
.IP "\fBcreate\fR \fI\s-1FILE\s0\fR [\fI\-\-console\fR] [\fI\-\-paused\fR] [\fI\-\-autodestroy\fR]" 4
.IX Item "create FILE [--console] [--paused] [--autodestroy]"
Create a domain from an \s-1XML\s0 <file>. An easy way to create the \s-1XML\s0
<file> is to use the \fBdumpxml\fR command to obtain the definition of a
pre-existing guest.  The domain will be paused if the \fI\-\-paused\fR option
is used and supported by the driver; otherwise it will be running.
If \fI\-\-console\fR is requested, attach to the console after creation.
If \fI\-\-autodestroy\fR is requested, then the guest will be automatically
destroyed when virsh closes its connection to libvirt, or otherwise
exits.
.Sp
\&\fBExample\fR
.Sp
.Vb 3
\& virsh dumpxml <domain\-id> > domain.xml
\& vi domain.xml (or make changes with your other text editor)
\& virsh create < domain.xml
.Ve
.IP "\fBdefine\fR \fI\s-1FILE\s0\fR" 4
.IX Item "define FILE"
Define a domain from an \s-1XML\s0 <file>. The domain definition is registered
but not started.  If domain is already running, the changes will take
effect on the next boot.
.IP "\fBdesc\fR \fIdomain-id\fR [[\fI\-\-live\fR] [\fI\-\-config\fR] | [\fI\-\-current\fR]] [\fI\-\-title\fR] [\fI\-\-edit\fR] [\fI\-\-new\-desc\fR New description or title message]" 4
.IX Item "desc domain-id [[--live] [--config] | [--current]] [--title] [--edit] [--new-desc New description or title message]"
Show or modify description and title of a domain. These values are user
fields that allow to store arbitrary textual data to allow easy
identification of domains. Title should be short, although it's not enforced.
.Sp
Flags \fI\-\-live\fR or \fI\-\-config\fR select whether this command works on live
or persistent definitions of the domain. If both \fI\-\-live\fR and \fI\-\-config\fR
are specified, the \fI\-\-config\fR option takes precedence on getting the current
description and both live configuration and config are updated while setting
the description. \fI\-\-current\fR is exclusive and implied if none of these was
specified.
.Sp
Flag \fI\-\-edit\fR specifies that an editor with the contents of current
description or title should be opened and the contents saved back afterwards.
.Sp
Flag \fI\-\-title\fR selects operation on the title field instead of description.
.Sp
If neither of \fI\-\-edit\fR and \fI\-\-new\-desc\fR are specified the note or description
is displayed instead of being modified.
.IP "\fBdestroy\fR \fIdomain-id\fR [\fI\-\-graceful\fR]" 4
.IX Item "destroy domain-id [--graceful]"
Immediately terminate the domain domain-id.  This doesn't give the domain
\&\s-1OS\s0 any chance to react, and it's the equivalent of ripping the power
cord out on a physical machine.  In most cases you will want to use
the \fBshutdown\fR command instead.  However, this does not delete any
storage volumes used by the guest, and if the domain is persistent, it
can be restarted later.
.Sp
If \fIdomain-id\fR is transient, then the metadata of any snapshots will
be lost once the guest stops running, but the snapshot contents still
exist, and a new domain with the same name and \s-1UUID\s0 can restore the
snapshot metadata with \fBsnapshot-create\fR.
.Sp
If \fI\-\-graceful\fR is specified, don't resort to extreme measures
(e.g. \s-1SIGKILL\s0) when the guest doesn't stop after a reasonable timeout;
return an error instead.
.IP "\fBdomblkstat\fR \fIdomain\fR \fIblock-device\fR [\fI\-\-human\fR]" 4
.IX Item "domblkstat domain block-device [--human]"
Get device block stats for a running domain.  A \fIblock-device\fR corresponds
to a unique target name (<target dev='name'/>) or source file (<source
file='name'/>) for one of the disk devices attached to \fIdomain\fR (see
also \fBdomblklist\fR for listing these names).
.Sp
Use \fI\-\-human\fR for a more human readable output.
.Sp
Availability of these fields depends on hypervisor. Unsupported fields are
missing from the output. Other fields may appear if communicating with a newer
version of libvirtd.
.Sp
\&\fBExplanation of fields\fR (fields appear in the folowing order):
  rd_req            \- count of read operations
  rd_bytes          \- count of read bytes
  wr_req            \- count of write operations
  wr_bytes          \- count of written bytes
  errs              \- error count
  flush_operations  \- count of flush operations
  rd_total_times    \- total time read operations took (ns)
  wr_total_times    \- total time write operations took (ns)
  flush_total_times \- total time flush operations took (ns)
    <\-\- other fields provided by hypervisor \-\->
.IP "\fBdomifstat\fR \fIdomain\fR \fIinterface-device\fR" 4
.IX Item "domifstat domain interface-device"
Get network interface stats for a running domain.
.IP "\fBdomif-setlink\fR \fIdomain\fR \fIinterface-device\fR \fIstate\fR [\fI\-\-config\fR]" 4
.IX Item "domif-setlink domain interface-device state [--config]"
Modify link state of the domain's virtual interface. Possible values for
state are \*(L"up\*(R" and "down. If \fI\-\-config\fR is specified, only the persistent
configuration of the domain is modified, for compatibility purposes,
\&\fI\-\-persistent\fR is alias of \fI\-\-config\fR.
\&\fIinterface-device\fR can be the interface's target name or the \s-1MAC\s0 address.
.IP "\fBdomif-getlink\fR \fIdomain\fR \fIinterface-device\fR [\fI\-\-config\fR]" 4
.IX Item "domif-getlink domain interface-device [--config]"
Query link state of the domain's virtual interface. If \fI\-\-config\fR
is specified, query the persistent configuration, for compatibility
purposes, \fI\-\-persistent\fR is alias of \fI\-\-config\fR.
.Sp
\&\fIinterface-device\fR can be the interface's target name or the \s-1MAC\s0 address.
.IP "\fBdomiftune\fR \fIdomain\fR \fIinterface-device\fR [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]] [\fI\-\-inbound average,peak,burst\fR] [\fI\-\-outbound average,peak,burst\fR]" 4
.IX Item "domiftune domain interface-device [[--config] [--live] | [--current]] [--inbound average,peak,burst] [--outbound average,peak,burst]"
Set or query the domain's network interface's bandwidth parameters.
\&\fIinterface-device\fR can be the interface's target name (<target dev='name'/>),
or the \s-1MAC\s0 address.
.Sp
If no \fI\-\-inbound\fR or \fI\-\-outbound\fR is specified, this command will
query and show the bandwidth settings. Otherwise, it will set the
inbound or outbound bandwidth. \fIaverage,peak,burst\fR is the same as
in command \fIattach-interface\fR.
.Sp
If \fI\-\-live\fR is specified, affect a running guest.
If \fI\-\-config\fR is specified, affect the next boot of a persistent guest.
If \fI\-\-current\fR is specified, affect the current guest state.
Both \fI\-\-live\fR and \fI\-\-current\fR flags may be given, but \fI\-\-current\fR is
exclusive. If no flag is specified, behavior is different depending
on hypervisor.
.IP "\fBdommemstat\fR \fIdomain\fR" 4
.IX Item "dommemstat domain"
Get memory stats for a running domain.
.IP "\fBdomblkerror\fR \fIdomain-id\fR" 4
.IX Item "domblkerror domain-id"
Show errors on block devices.  This command usually comes handy when
\&\fBdomstate\fR command says that a domain was paused due to I/O error.
The \fBdomblkerror\fR command lists all block devices in error state and
the error seen on each of them.
.IP "\fBdomblkinfo\fR \fIdomain\fR \fIblock-device\fR" 4
.IX Item "domblkinfo domain block-device"
Get block device size info for a domain.  A \fIblock-device\fR corresponds
to a unique target name (<target dev='name'/>) or source file (<source
file='name'/>) for one of the disk devices attached to \fIdomain\fR (see
also \fBdomblklist\fR for listing these names).
.IP "\fBdomblklist\fR \fIdomain\fR [\fI\-\-inactive\fR] [\fI\-\-details\fR]" 4
.IX Item "domblklist domain [--inactive] [--details]"
Print a table showing the brief information of all block devices
associated with \fIdomain\fR. If \fI\-\-inactive\fR is specified, query the
block devices that will be used on the next boot, rather than those
currently in use by a running domain. If \fI\-\-details\fR is specified,
disk type and device value will also be printed. Other contexts
that require a block device name (such as \fIdomblkinfo\fR or
\&\fIsnapshot-create\fR for disk snapshots) will accept either target
or unique source names printed by this command.
.IP "\fBdomiflist\fR \fIdomain\fR [\fI\-\-inactive\fR]" 4
.IX Item "domiflist domain [--inactive]"
Print a table showing the brief information of all virtual interfaces
associated with \fIdomain\fR. If \fI\-\-inactive\fR is specified, query the
virtual interfaces that will be used on the next boot, rather than those
currently in use by a running domain. Other contexts that require a \s-1MAC\s0
address of virtual interface (such as \fIdetach-interface\fR or
\&\fIdomif-setlink\fR) will accept the \s-1MAC\s0 address printed by this command.
.IP "\fBblockcopy\fR \fIdomain\fR \fIpath\fR \fIdest\fR [\fIbandwidth\fR] [\fI\-\-shallow\fR] [\fI\-\-reuse\-external\fR] [\fI\-\-raw\fR] [\fI\-\-wait\fR [\fI\-\-verbose] [{\fI\-\-pivot\fI | \fI\-\-finish\fI}] [\fI\-\-timeout\fI \f(BIseconds\fI] [\fI\-\-async\fI]]\fR" 4
.IX Item "blockcopy domain path dest [bandwidth] [--shallow] [--reuse-external] [--raw] [--wait [--verbose] [{--pivot | --finish}] [--timeout seconds] [--async]]"
Copy a disk backing image chain to \fIdest\fR. By default, this command
flattens the entire chain; but if \fI\-\-shallow\fR is specified, the copy
shares the backing chain.
.Sp
If \fI\-\-reuse\-external\fR is specified, then \fIdest\fR must exist and have
contents identical to the resulting backing file (that is, it must
start with contents matching the backing file \fIdisk\fR if \fI\-\-shallow\fR
is used, otherwise it must start empty); this option is typically used
to set up a relative backing file name in the destination.
.Sp
The format of the destination is determined by the first match in the
following list: if \fI\-\-raw\fR is specified, it will be raw; if
\&\fI\-\-reuse\-external\fR is specified, the existing destination is probed
for a format; and in all other cases, the destination format will
match the source format.
.Sp
By default, the copy job runs in the background, and consists of two
phases.  Initially, the job must copy all data from the source, and
during this phase, the job can only be canceled to revert back to the
source disk, with no guarantees about the destination.  After this phase
completes, both the source and the destination remain mirrored until a
call to \fBblockjob\fR with the \fI\-\-abort\fR and \fI\-\-pivot\fR flags pivots over
to the copy, or a call without \fI\-\-pivot\fR leaves the destination as a
faithful copy of that point in time.  However, if \fI\-\-wait\fR is specified,
then this command will block until the mirroring phase begins, or cancel
the operation if the optional \fItimeout\fR in seconds elapses or \s-1SIGINT\s0 is
sent (usually with \f(CW\*(C`Ctrl\-C\*(C'\fR).  Using \fI\-\-verbose\fR along with \fI\-\-wait\fR
will produce periodic status updates.  Using \fI\-\-pivot\fR or \fI\-\-finish\fR
along with \fI\-\-wait\fR will additionally end the job cleanly rather than
leaving things in the mirroring phase.  If job cancellation is triggered,
\&\fI\-\-async\fR will return control to the user as fast as possible, otherwise
the command may continue to block a little while longer until the job
is done cleaning up.
.Sp
\&\fIpath\fR specifies fully-qualified path of the disk.
\&\fIbandwidth\fR specifies copying bandwidth limit in Mbps.
.IP "\fBblockpull\fR \fIdomain\fR \fIpath\fR [\fIbandwidth\fR] [\fIbase\fR] [\fI\-\-wait\fR [\fI\-\-verbose\fR] [\fI\-\-timeout\fR \fBseconds\fR] [\fI\-\-async]]\fR" 4
.IX Item "blockpull domain path [bandwidth] [base] [--wait [--verbose] [--timeout seconds] [--async]]"
Populate a disk from its backing image chain. By default, this command
flattens the entire chain; but if \fIbase\fR is specified, containing the
name of one of the backing files in the chain, then that file becomes
the new backing file and only the intermediate portion of the chain is
pulled.  Once all requested data from the backing image chain has been
pulled, the disk no longer depends on that portion of the backing chain.
.Sp
By default, this command returns as soon as possible, and data for
the entire disk is pulled in the background; the progress of the
operation can be checked with \fBblockjob\fR.  However, if \fI\-\-wait\fR is
specified, then this command will block until the operation completes,
or cancel the operation if the optional \fItimeout\fR in seconds elapses
or \s-1SIGINT\s0 is sent (usually with \f(CW\*(C`Ctrl\-C\*(C'\fR).  Using \fI\-\-verbose\fR along
with \fI\-\-wait\fR will produce periodic status updates.  If job cancellation
is triggered, \fI\-\-async\fR will return control to the user as fast as
possible, otherwise the command may continue to block a little while
longer until the job is done cleaning up.
.Sp
\&\fIpath\fR specifies fully-qualified path of the disk; it corresponds
to a unique target name (<target dev='name'/>) or source file (<source
file='name'/>) for one of the disk devices attached to \fIdomain\fR (see
also \fBdomblklist\fR for listing these names).
\&\fIbandwidth\fR specifies copying bandwidth limit in Mbps.
.IP "\fBblkdeviotune\fR \fIdomain\fR \fIdevice\fR [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]] [[\fItotal-bytes-sec\fR] | [\fIread-bytes-sec\fR] [\fIwrite-bytes-sec\fR]] [[\fItotal-iops-sec\fR] | [\fIread-iops-sec\fR] [\fIwrite-iops-sec\fR]]" 4
.IX Item "blkdeviotune domain device [[--config] [--live] | [--current]] [[total-bytes-sec] | [read-bytes-sec] [write-bytes-sec]] [[total-iops-sec] | [read-iops-sec] [write-iops-sec]]"
Set or query the block disk io parameters for a block device of \fIdomain\fR.
\&\fIdevice\fR specifies a unique target name (<target dev='name'/>) or source
file (<source file='name'/>) for one of the disk devices attached to
\&\fIdomain\fR (see also \fBdomblklist\fR for listing these names).
.Sp
If no limit is specified, it will query current I/O limits setting.
Otherwise, alter the limits with these flags:
\&\fI\-\-total\-bytes\-sec\fR specifies total throughput limit in bytes per second.
\&\fI\-\-read\-bytes\-sec\fR specifies read throughput limit in bytes per second.
\&\fI\-\-write\-bytes\-sec\fR specifies write throughput limit in bytes per second.
\&\fI\-\-total\-iops\-sec\fR specifies total I/O operations limit per second.
\&\fI\-\-read\-iops\-sec\fR specifies read I/O operations limit per second.
\&\fI\-\-write\-iops\-sec\fR specifies write I/O operations limit per second.
.Sp
Older versions of virsh only accepted these options with underscore
instead of dash, as in \fI\-\-total_bytes_sec\fR.
.Sp
Bytes and iops values are independent, but setting only one value (such
as \-\-read\-bytes\-sec) resets the other two in that category to unlimited.
An explicit 0 also clears any limit.  A non-zero value for a given total
cannot be mixed with non-zero values for read or write.
.Sp
If \fI\-\-live\fR is specified, affect a running guest.
If \fI\-\-config\fR is specified, affect the next boot of a persistent guest.
If \fI\-\-current\fR is specified, affect the current guest state.
Both \fI\-\-live\fR and \fI\-\-current\fR flags may be given, but \fI\-\-current\fR is
exclusive. If no flag is specified, behavior is different depending
on hypervisor.
.IP "\fBblockjob\fR \fIdomain\fR \fIpath\fR { [\fI\-\-abort\fR] [\fI\-\-async\fR] [\fI\-\-pivot\fR] | [\fI\-\-info\fR] | [\fIbandwidth\fR] }" 4
.IX Item "blockjob domain path { [--abort] [--async] [--pivot] | [--info] | [bandwidth] }"
Manage active block operations.  There are three modes: \fI\-\-info\fR,
\&\fIbandwidth\fR, and \fI\-\-abort\fR; \fI\-\-info\fR is default except that \fI\-\-async\fR
or \fI\-\-pivot\fR implies \fI\-\-abort\fR.
.Sp
\&\fIpath\fR specifies fully-qualified path of the disk; it corresponds
to a unique target name (<target dev='name'/>) or source file (<source
file='name'/>) for one of the disk devices attached to \fIdomain\fR (see
also \fBdomblklist\fR for listing these names).
.Sp
If \fI\-\-abort\fR is specified, the active job on the specified disk will
be aborted.  If \fI\-\-async\fR is also specified, this command will return
immediately, rather than waiting for the cancelation to complete.  If
\&\fI\-\-pivot\fR is specified, this requests that an active copy job
be pivoted over to the new copy.
If \fI\-\-info\fR is specified, the active job information on the specified
disk will be printed.
\&\fIbandwidth\fR can be used to set bandwidth limit for the active job.
.IP "\fBblockresize\fR \fIdomain\fR \fIpath\fR \fIsize\fR" 4
.IX Item "blockresize domain path size"
Resize a block device of domain while the domain is running, \fIpath\fR
specifies the absolute path of the block device; it corresponds
to a unique target name (<target dev='name'/>) or source file (<source
file='name'/>) for one of the disk devices attached to \fIdomain\fR (see
also \fBdomblklist\fR for listing these names).
.Sp
\&\fIsize\fR is a scaled integer (see \fB\s-1NOTES\s0\fR above) which defaults to KiB
(blocks of 1024 bytes) if there is no suffix.  You must use a suffix of
\&\*(L"B\*(R" to get bytes (note that for historical reasons, this differs from
\&\fBvol-resize\fR which defaults to bytes without a suffix).
.IP "\fBdomdisplay\fR \fIdomain-id\fR [\fI\-\-include\-password\fR]" 4
.IX Item "domdisplay domain-id [--include-password]"
Output a \s-1URI\s0 which can be used to connect to the graphical display of the
domain via \s-1VNC\s0, \s-1SPICE\s0 or \s-1RDP\s0. If \fI\-\-include\-password\fR is specified, the
\&\s-1SPICE\s0 channel password will be included in the \s-1URI\s0.
.IP "\fBdominfo\fR \fIdomain-id\fR" 4
.IX Item "dominfo domain-id"
Returns basic information about the domain.
.IP "\fBdomuuid\fR \fIdomain-name-or-id\fR" 4
.IX Item "domuuid domain-name-or-id"
Convert a domain name or id to domain \s-1UUID\s0
.IP "\fBdomid\fR \fIdomain-name-or-uuid\fR" 4
.IX Item "domid domain-name-or-uuid"
Convert a domain name (or \s-1UUID\s0) to a domain id
.IP "\fBdomjobabort\fR \fIdomain-id-or-uuid\fR" 4
.IX Item "domjobabort domain-id-or-uuid"
Abort the currently running domain job.
.IP "\fBdomjobinfo\fR \fIdomain-id-or-uuid\fR" 4
.IX Item "domjobinfo domain-id-or-uuid"
Returns information about jobs running on a domain.
.IP "\fBdomname\fR \fIdomain-id-or-uuid\fR" 4
.IX Item "domname domain-id-or-uuid"
Convert a domain Id (or \s-1UUID\s0) to domain name
.IP "\fBdomstate\fR \fIdomain-id\fR [\fI\-\-reason\fR]" 4
.IX Item "domstate domain-id [--reason]"
Returns state about a domain.  \fI\-\-reason\fR tells virsh to also print
reason for the state.
.IP "\fBdomcontrol\fR \fIdomain-id\fR" 4
.IX Item "domcontrol domain-id"
Returns state of an interface to \s-1VMM\s0 used to control a domain.  For
states other than \*(L"ok\*(R" or \*(L"error\*(R" the command also prints number of
seconds elapsed since the control interface entered its current state.
.IP "\fBdomxml-from-native\fR \fIformat\fR \fIconfig\fR" 4
.IX Item "domxml-from-native format config"
Convert the file \fIconfig\fR in the native guest configuration format
named by \fIformat\fR to a domain \s-1XML\s0 format. For \s-1QEMU/KVM\s0 hypervisor,
the \fIformat\fR argument must be \fBqemu-argv\fR. For Xen hypervisor, the
\&\fIformat\fR argument may be \fBxen-xm\fR or \fBxen-sxpr\fR.
.IP "\fBdomxml-to-native\fR \fIformat\fR \fIxml\fR" 4
.IX Item "domxml-to-native format xml"
Convert the file \fIxml\fR in domain \s-1XML\s0 format to the native guest
configuration format named by \fIformat\fR. For \s-1QEMU/KVM\s0 hypervisor,
the \fIformat\fR argument must be \fBqemu-argv\fR. For Xen hypervisor, the
\&\fIformat\fR argument may be \fBxen-xm\fR or \fBxen-sxpr\fR.
.IP "\fBdump\fR \fIdomain-id\fR \fIcorefilepath\fR [\fI\-\-bypass\-cache\fR] { [\fI\-\-live\fR] | [\fI\-\-crash\fR] | [\fI\-\-reset\fR] } [\fI\-\-verbose\fR] [\fI\-\-memory\-only\fR]" 4
.IX Item "dump domain-id corefilepath [--bypass-cache] { [--live] | [--crash] | [--reset] } [--verbose] [--memory-only]"
Dumps the core of a domain to a file for analysis.
If \fI\-\-live\fR is specified, the domain continues to run until the core
dump is complete, rather than pausing up front.
If \fI\-\-crash\fR is specified, the domain is halted with a crashed status,
rather than merely left in a paused state.
If \fI\-\-reset\fR is specified, the domain is reset after successful dump.
Note, these three switches are mutually exclusive.
If \fI\-\-bypass\-cache\fR is specified, the save will avoid the file system
cache, although this may slow down the operation.
If \fI\-\-memory\-only\fR is specified, the file is elf file, and will only
include domain's memory and cpu common register value. It is very
useful if the domain uses host devices directly.
.Sp
The progress may be monitored using \fBdomjobinfo\fR virsh command and canceled
with \fBdomjobabort\fR command (sent by another virsh instance). Another option
is to send \s-1SIGINT\s0 (usually with \f(CW\*(C`Ctrl\-C\*(C'\fR) to the virsh process running
\&\fBdump\fR command. \fI\-\-verbose\fR displays the progress of dump.
.Sp
\&\s-1NOTE:\s0 Some hypervisors may require the user to manually ensure proper
permissions on file and path specified by argument \fIcorefilepath\fR.
.IP "\fBdumpxml\fR \fIdomain-id\fR [\fI\-\-inactive\fR] [\fI\-\-security\-info\fR] [\fI\-\-update\-cpu\fR]" 4
.IX Item "dumpxml domain-id [--inactive] [--security-info] [--update-cpu]"
Output the domain information as an \s-1XML\s0 dump to stdout, this format can be used
by the \fBcreate\fR command. Additional options affecting the \s-1XML\s0 dump may be
used. \fI\-\-inactive\fR tells virsh to dump domain configuration that will be used
on next start of the domain as opposed to the current domain configuration.
Using \fI\-\-security\-info\fR will also include security sensitive information
in the \s-1XML\s0 dump. \fI\-\-update\-cpu\fR updates domain \s-1CPU\s0 requirements according to
host \s-1CPU\s0.
.IP "\fBedit\fR \fIdomain-id\fR" 4
.IX Item "edit domain-id"
Edit the \s-1XML\s0 configuration file for a domain, which will affect the
next boot of the guest.
.Sp
This is equivalent to:
.Sp
.Vb 3
\& virsh dumpxml \-\-inactive \-\-security\-info domain > domain.xml
\& vi domain.xml (or make changes with your other text editor)
\& virsh define domain.xml
.Ve
.Sp
except that it does some error checking.
.Sp
The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment
variables, and defaults to \f(CW\*(C`vi\*(C'\fR.
.IP "\fBmanagedsave\fR \fIdomain-id\fR [\fI\-\-bypass\-cache\fR] [{\fI\-\-running\fR | \fI\-\-paused\fR}] [\fI\-\-verbose\fR]" 4
.IX Item "managedsave domain-id [--bypass-cache] [{--running | --paused}] [--verbose]"
Save and destroy (stop) a running domain, so it can be restarted from the same
state at a later time.  When the virsh \fBstart\fR command is next run for
the domain, it will automatically be started from this saved state.
If \fI\-\-bypass\-cache\fR is specified, the save will avoid the file system
cache, although this may slow down the operation.
.Sp
The progress may be monitored using \fBdomjobinfo\fR virsh command and canceled
with \fBdomjobabort\fR command (sent by another virsh instance). Another option
is to send \s-1SIGINT\s0 (usually with \f(CW\*(C`Ctrl\-C\*(C'\fR) to the virsh process running
\&\fBmanagedsave\fR command. \fI\-\-verbose\fR displays the progress of save.
.Sp
Normally, starting a managed save will decide between running or paused
based on the state the domain was in when the save was done; passing
either the \fI\-\-running\fR or \fI\-\-paused\fR flag will allow overriding which
state the \fBstart\fR should use.
.Sp
The \fBdominfo\fR command can be used to query whether a domain currently
has any managed save image.
.IP "\fBmanagedsave-remove\fR \fIdomain-id\fR" 4
.IX Item "managedsave-remove domain-id"
Remove the \fBmanagedsave\fR state file for a domain, if it exists.  This
ensures the domain will do a full boot the next time it is started.
.IP "\fBmaxvcpus\fR [\fItype\fR]" 4
.IX Item "maxvcpus [type]"
Provide the maximum number of virtual CPUs supported for a guest \s-1VM\s0 on
this connection.  If provided, the \fItype\fR parameter must be a valid
type attribute for the <domain> element of \s-1XML\s0.
.IP "\fBcpu-stats\fR \fIdomain\fR [\fI\-\-total\fR] [\fIstart\fR] [\fIcount\fR]" 4
.IX Item "cpu-stats domain [--total] [start] [count]"
Provide cpu statistics information of a domain. The domain should
be running. Default it shows stats for all CPUs, and a total. Use
\&\fI\-\-total\fR for only the total stats, \fIstart\fR for only the per-cpu
stats of the CPUs from \fIstart\fR, \fIcount\fR for only \fIcount\fR CPUs'
stats.
.IP "\fBmigrate\fR [\fI\-\-live\fR] [\fI\-\-direct\fR] [\fI\-\-p2p\fR [\fI\-\-tunnelled\fR]] [\fI\-\-persistent\fR] [\fI\-\-undefinesource\fR] [\fI\-\-suspend\fR] [\fI\-\-copy\-storage\-all\fR] [\fI\-\-copy\-storage\-inc\fR] [\fI\-\-change\-protection\fR] [\fI\-\-unsafe\fR] [\fI\-\-verbose\fR] \fIdomain-id\fR \fIdesturi\fR [\fImigrateuri\fR] [\fIdname\fR] [\fI\-\-timeout\fR \fBseconds\fR] [\fI\-\-xml\fR \fBfile\fR]" 4
.IX Item "migrate [--live] [--direct] [--p2p [--tunnelled]] [--persistent] [--undefinesource] [--suspend] [--copy-storage-all] [--copy-storage-inc] [--change-protection] [--unsafe] [--verbose] domain-id desturi [migrateuri] [dname] [--timeout seconds] [--xml file]"
Migrate domain to another host.  Add \fI\-\-live\fR for live migration; \fI\-\-p2p\fR
for peer\-2\-peer migration; \fI\-\-direct\fR for direct migration; or \fI\-\-tunnelled\fR
for tunnelled migration.  \fI\-\-persistent\fR leaves the domain persistent on
destination host, \fI\-\-undefinesource\fR undefines the domain on the source host,
and \fI\-\-suspend\fR leaves the domain paused on the destination host.
\&\fI\-\-copy\-storage\-all\fR indicates migration with non-shared storage with full
disk copy, \fI\-\-copy\-storage\-inc\fR indicates migration with non-shared storage
with incremental copy (same base image shared between source and destination).
In both cases the disk images have to exist on destination host, the
\&\fI\-\-copy\-storage\-...\fR options only tell libvirt to transfer data from the
images on source host to the images found at the same place on the destination
host. \fI\-\-change\-protection\fR enforces that no incompatible configuration
changes will be made to the domain while the migration is underway; this flag
is implicitly enabled when supported by the hypervisor, but can be explicitly
used to reject the migration if the hypervisor lacks change protection
support.  \fI\-\-verbose\fR displays the progress of migration.
.Sp
In some cases libvirt may refuse to migrate the domain because doing so may
lead to potential problems such as data corruption, and thus the migration is
considered unsafe. For \s-1QEMU\s0 domain, this may happen if the domain uses disks
without explicitly setting cache mode to \*(L"none\*(R". Migrating such domains is
unsafe unless the disk images are stored on coherent clustered filesystem,
such as \s-1GFS2\s0 or \s-1GPFS\s0. If you are sure the migration is safe or you just do not
care, use \fI\-\-unsafe\fR to force the migration.
.Sp
The \fIdesturi\fR is the connection \s-1URI\s0 of the destination host, and
\&\fImigrateuri\fR is the migration \s-1URI\s0, which usually can be omitted.
\&\fIdname\fR is used for renaming the domain to new name during migration, which
also usually can be omitted.  Likewise, \fI\-\-xml\fR \fBfile\fR is usually
omitted, but can be used to supply an alternative \s-1XML\s0 file for use on
the destination to supply a larger set of changes to any host-specific
portions of the domain \s-1XML\s0, such as accounting for naming differences
between source and destination in accessing underlying storage.
.Sp
\&\fI\-\-timeout\fR \fBseconds\fR forces guest to suspend when live migration exceeds
that many seconds, and
then the migration will complete offline. It can only be used with \fI\-\-live\fR.
.Sp
Running migration can be canceled by interrupting virsh (usually using
\&\f(CW\*(C`Ctrl\-C\*(C'\fR) or by \fBdomjobabort\fR command sent from another virsh instance.
.Sp
\&\fBNote\fR: The \fIdesturi\fR parameter for normal migration and peer2peer migration
has different semantics:
.RS 4
.IP "\(bu" 4
normal migration: the \fIdesturi\fR is an address of the target host as
seen from the client machine.
.IP "\(bu" 4
peer2peer migration: the \fIdesturi\fR is an address of the target host as
seen from the source machine.
.RE
.RS 4
.RE
.IP "\fBmigrate-setmaxdowntime\fR \fIdomain-id\fR \fIdowntime\fR" 4
.IX Item "migrate-setmaxdowntime domain-id downtime"
Set maximum tolerable downtime for a domain which is being live-migrated to
another host.  The \fIdowntime\fR is a number of milliseconds the guest is allowed
to be down at the end of live migration.
.IP "\fBmigrate-setspeed\fR \fIdomain-id\fR \fIbandwidth\fR" 4
.IX Item "migrate-setspeed domain-id bandwidth"
Set the maximum migration bandwidth (in Mbps) for a domain which is being
migrated to another host.
.IP "\fBmigrate-getspeed\fR \fIdomain-id\fR" 4
.IX Item "migrate-getspeed domain-id"
Get the maximum migration bandwidth (in Mbps) for a domain.
.IP "\fBnumatune\fR \fIdomain\fR [\fI\-\-mode\fR \fBmode\fR] [\fI\-\-nodeset\fR \fBnodeset\fR] [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4
.IX Item "numatune domain [--mode mode] [--nodeset nodeset] [[--config] [--live] | [--current]]"
Set or get a domain's numa parameters, corresponding to the <numatune>
element of domain \s-1XML\s0.  Without flags, the current settings are
displayed.
.Sp
\&\fImode\fR can be one of `strict', `interleave' and `preferred'.  For a
running domain, the mode can't be changed, and the nodeset can be
changed only if the domain was started with a mode of `strict'.
.Sp
\&\fInodeset\fR is a list of numa nodes used by the host for running the domain.
Its syntax is a comma separated list, with '\-' for ranges and '^' for
excluding a node.
.Sp
If \fI\-\-live\fR is specified, set scheduler information of a running guest.
If \fI\-\-config\fR is specified, affect the next boot of a persistent guest.
If \fI\-\-current\fR is specified, affect the current guest state.
.IP "\fBreboot\fR \fIdomain-id\fR [\fI\-\-mode acpi|agent\fR]" 4
.IX Item "reboot domain-id [--mode acpi|agent]"
Reboot a domain.  This acts just as if the domain had the \fBreboot\fR
command run from the console.  The command returns as soon as it has
executed the reboot action, which may be significantly before the
domain actually reboots.
.Sp
The exact behavior of a domain when it reboots is set by the
\&\fIon_reboot\fR parameter in the domain's \s-1XML\s0 definition.
.Sp
By default the hypervisor will try to pick a suitable shutdown
method. To specify an alternative method, the \fI\-\-mode\fR parameter
can specify \f(CW\*(C`acpi\*(C'\fR or \f(CW\*(C`agent\*(C'\fR.
.IP "\fBreset\fR \fIdomain-id\fR" 4
.IX Item "reset domain-id"
Reset a domain immediately without any guest shutdown. \fBreset\fR
emulates the power reset button on a machine, where all guest
hardware sees the \s-1RST\s0 line set and reinitializes internal state.
.Sp
\&\fBNote\fR: Reset without any guest \s-1OS\s0 shutdown risks data loss.
.IP "\fBrestore\fR \fIstate-file\fR [\fI\-\-bypass\-cache\fR] [\fI\-\-xml\fR \fBfile\fR] [{\fI\-\-running\fR | \fI\-\-paused\fR}]" 4
.IX Item "restore state-file [--bypass-cache] [--xml file] [{--running | --paused}]"
Restores a domain from a \fBvirsh save\fR state file. See \fIsave\fR for more info.
.Sp
If \fI\-\-bypass\-cache\fR is specified, the restore will avoid the file system
cache, although this may slow down the operation.
.Sp
\&\fI\-\-xml\fR \fBfile\fR is usually omitted, but can be used to supply an
alternative \s-1XML\s0 file for use on the restored guest with changes only
in the host-specific portions of the domain \s-1XML\s0.  For example, it can
be used to account for file naming differences in underlying storage
due to disk snapshots taken after the guest was saved.
.Sp
Normally, restoring a saved image will use the state recorded in the
save image to decide between running or paused; passing either the
\&\fI\-\-running\fR or \fI\-\-paused\fR flag will allow overriding which state the
domain should be started in.
.Sp
\&\fBNote\fR: To avoid corrupting file system contents within the domain, you
should not reuse the saved state file for a second \fBrestore\fR unless you
have also reverted all storage volumes back to the same contents as when
the state file was created.
.IP "\fBsave\fR \fIdomain-id\fR \fIstate-file\fR [\fI\-\-bypass\-cache\fR] [\fI\-\-xml\fR \fBfile\fR] [{\fI\-\-running\fR | \fI\-\-paused\fR}] [\fI\-\-verbose\fR]" 4
.IX Item "save domain-id state-file [--bypass-cache] [--xml file] [{--running | --paused}] [--verbose]"
Saves a running domain (\s-1RAM\s0, but not disk state) to a state file so that
it can be restored
later.  Once saved, the domain will no longer be running on the
system, thus the memory allocated for the domain will be free for
other domains to use.  \fBvirsh restore\fR restores from this state file.
If \fI\-\-bypass\-cache\fR is specified, the save will avoid the file system
cache, although this may slow down the operation.
.Sp
The progress may be monitored using \fBdomjobinfo\fR virsh command and canceled
with \fBdomjobabort\fR command (sent by another virsh instance). Another option
is to send \s-1SIGINT\s0 (usually with \f(CW\*(C`Ctrl\-C\*(C'\fR) to the virsh process running
\&\fBsave\fR command. \fI\-\-verbose\fR displays the progress of save.
.Sp
This is roughly equivalent to doing a hibernate on a running computer,
with all the same limitations.  Open network connections may be
severed upon restore, as \s-1TCP\s0 timeouts may have expired.
.Sp
\&\fI\-\-xml\fR \fBfile\fR is usually omitted, but can be used to supply an
alternative \s-1XML\s0 file for use on the restored guest with changes only
in the host-specific portions of the domain \s-1XML\s0.  For example, it can
be used to account for file naming differences that are planned to
be made via disk snapshots of underlying storage after the guest is saved.
.Sp
Normally, restoring a saved image will decide between running or paused
based on the state the domain was in when the save was done; passing
either the \fI\-\-running\fR or \fI\-\-paused\fR flag will allow overriding which
state the \fBrestore\fR should use.
.Sp
Domain saved state files assume that disk images will be unchanged
between the creation and restore point.  For a more complete system
restore point, where the disk state is saved alongside the memory
state, see the \fBsnapshot\fR family of commands.
.IP "\fBsave-image-define\fR \fIfile\fR \fIxml\fR [{\fI\-\-running\fR | \fI\-\-paused\fR}]" 4
.IX Item "save-image-define file xml [{--running | --paused}]"
Update the domain \s-1XML\s0 that will be used when \fIfile\fR is later
used in the \fBrestore\fR command.  The \fIxml\fR argument must be a file
name containing the alternative \s-1XML\s0, with changes only in the
host-specific portions of the domain \s-1XML\s0.  For example, it can
be used to account for file naming differences resulting from creating
disk snapshots of underlying storage after the guest was saved.
.Sp
The save image records whether the domain should be restored to a
running or paused state.  Normally, this command does not alter the
recorded state; passing either the \fI\-\-running\fR or \fI\-\-paused\fR flag
will allow overriding which state the \fBrestore\fR should use.
.IP "\fBsave-image-dumpxml\fR \fIfile\fR [\fI\-\-security\-info\fR]" 4
.IX Item "save-image-dumpxml file [--security-info]"
Extract the domain \s-1XML\s0 that was in effect at the time the saved state
file \fIfile\fR was created with the \fBsave\fR command.  Using
\&\fI\-\-security\-info\fR will also include security sensitive information.
.IP "\fBsave-image-edit\fR \fIfile\fR [{\fI\-\-running\fR | \fI\-\-paused\fR}]" 4
.IX Item "save-image-edit file [{--running | --paused}]"
Edit the \s-1XML\s0 configuration associated with a saved state file \fIfile\fR
created by the \fBsave\fR command.
.Sp
The save image records whether the domain should be restored to a
running or paused state.  Normally, this command does not alter the
recorded state; passing either the \fI\-\-running\fR or \fI\-\-paused\fR flag
will allow overriding which state the \fBrestore\fR should use.
.Sp
This is equivalent to:
.Sp
.Vb 3
\& virsh save\-image\-dumpxml state\-file > state\-file.xml
\& vi state\-file.xml (or make changes with your other text editor)
\& virsh save\-image\-define state\-file state\-file\-xml
.Ve
.Sp
except that it does some error checking.
.Sp
The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment
variables, and defaults to \f(CW\*(C`vi\*(C'\fR.
.IP "\fBschedinfo\fR [\fI\-\-set\fR \fBparameter=value\fR] \fIdomain-id\fR [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4
.IX Item "schedinfo [--set parameter=value] domain-id [[--config] [--live] | [--current]]"
.PD 0
.IP "\fBschedinfo\fR [\fI\-\-weight\fR \fBnumber\fR] [\fI\-\-cap\fR \fBnumber\fR] \fIdomain-id\fR" 4
.IX Item "schedinfo [--weight number] [--cap number] domain-id"
.PD
Allows you to show (and set) the domain scheduler parameters. The parameters
available for each hypervisor are:
.Sp
\&\s-1LXC\s0 (posix scheduler) : cpu_shares
.Sp
\&\s-1QEMU/KVM\s0 (posix scheduler): cpu_shares, vcpu_period, vcpu_quota
.Sp
Xen (credit scheduler): weight, cap
.Sp
\&\s-1ESX\s0 (allocation scheduler): reservation, limit, shares
.Sp
If \fI\-\-live\fR is specified, set scheduler information of a running guest.
If \fI\-\-config\fR is specified, affect the next boot of a persistent guest.
If \fI\-\-current\fR is specified, affect the current guest state.
.Sp
\&\fBNote\fR: The cpu_shares parameter has a valid value range of 0\-262144; Negative
values are wrapped to positive, and larger values are capped at the maximum.
Therefore, \-1 is a useful shorthand for 262144. On the Linux kernel, the
values 0 and 1 are automatically converted to a minimal value of 2.
.Sp
\&\fBNote\fR: The weight and cap parameters are defined only for the
\&\s-1XEN_CREDIT\s0 scheduler and are now \fI\s-1DEPRECATED\s0\fR.
.Sp
\&\fBNote\fR: The vcpu_period parameter has a valid value range of 1000\-1000000 or
0, and the vcpu_quota parameter has a valid value range of
1000\-18446744073709551 or less than 0. The value 0 for either parameter is
the same as not specifying that parameter.
.IP "\fBscreenshot\fR \fIdomain-id\fR [\fIimagefilepath\fR] [\fI\-\-screen\fR \fBscreenID\fR]" 4
.IX Item "screenshot domain-id [imagefilepath] [--screen screenID]"
Takes a screenshot of a current domain console and stores it into a file.
Optionally, if hypervisor supports more displays for a domain, \fIscreenID\fR
allows to specify which screen will be captured. It is the sequential number
of screen. In case of multiple graphics cards, heads are enumerated before
devices, e.g. having two graphics cards, both with four heads, screen \s-1ID\s0 5
addresses the second head on the second card.
.IP "\fBsend-key\fR \fIdomain-id\fR [\fI\-\-codeset\fR \fBcodeset\fR] [\fI\-\-holdtime\fR \fBholdtime\fR] \fIkeycode\fR..." 4
.IX Item "send-key domain-id [--codeset codeset] [--holdtime holdtime] keycode..."
Parse the \fIkeycode\fR sequence as keystrokes to send to \fIdomain-id\fR.
Each \fIkeycode\fR can either be a numeric value or a symbolic name from
the corresponding codeset.  If \fI\-\-holdtime\fR is given, each keystroke
will be held for that many milliseconds.  The default codeset is
\&\fBlinux\fR, but use of the \fI\-\-codeset\fR option allows other codesets to
be chosen.
.RS 4
.IP "\fBlinux\fR" 4
.IX Item "linux"
The numeric values are those defined by the Linux generic input
event subsystem. The symbolic names match the corresponding
Linux key constant macro names.
.IP "\fBxt\fR" 4
.IX Item "xt"
The numeric values are those defined by the original \s-1XT\s0 keyboard
controller. No symbolic names are provided
.IP "\fBatset1\fR" 4
.IX Item "atset1"
The numeric values are those defined by the \s-1AT\s0 keyboard controller,
set 1 (aka \s-1XT\s0 compatible set). Extended keycoes from \fBatset1\fR
may differ from extended keycodes in the \fBxt\fR codeset. No symbolic
names are provided
.IP "\fBatset2\fR" 4
.IX Item "atset2"
The numeric values are those defined by the \s-1AT\s0 keyboard controller,
set 2. No symbolic names are provided
.IP "\fBatset3\fR" 4
.IX Item "atset3"
The numeric values are those defined by the \s-1AT\s0 keyboard controller,
set 3 (aka \s-1PS/2\s0 compatible set). No symbolic names are provided
.IP "\fBos_x\fR" 4
.IX Item "os_x"
The numeric values are those defined by the OS-X keyboard input
subsystem. The symbolic names match the corresponding OS-X key
constant macro names
.IP "\fBxt_kbd\fR" 4
.IX Item "xt_kbd"
The numeric values are those defined by the Linux \s-1KBD\s0 device.
These are a variant on the original \s-1XT\s0 codeset, but often with
different encoding for extended keycodes. No symbolic names are
provided.
.IP "\fBwin32\fR" 4
.IX Item "win32"
The numeric values are those defined by the Win32 keyboard input
subsystem. The symbolic names match the corresponding Win32 key
constant macro names
.IP "\fBusb\fR" 4
.IX Item "usb"
The numeric values are those defined by the \s-1USB\s0 \s-1HID\s0 specification
for keyboard input. No symbolic names are provided
.IP "\fBrfb\fR" 4
.IX Item "rfb"
The numeric values are those defined by the \s-1RFB\s0 extension for sending
raw keycodes. These are a variant on the \s-1XT\s0 codeset, but extended
keycodes have the low bit of the second byte set, instead of the high
bit of the first byte. No symbolic names are provided.
.RE
.RS 4
.Sp
\&\fBExamples\fR
  # send three strokes 'k', 'e', 'y', using xt codeset
  virsh send-key dom \-\-codeset xt 37 18 21
  # send one stroke 'right\-ctrl+C'
  virsh send-key dom \s-1KEY_RIGHTCTRL\s0 \s-1KEY_C\s0
  # send a tab, held for 1 second
  virsh send-key \-\-holdtime 1000 0xf
.RE
.IP "\fBsetmem\fR \fIdomain-id\fR \fBsize\fR [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4
.IX Item "setmem domain-id size [[--config] [--live] | [--current]]"
Change the memory allocation for a guest domain.
If \fI\-\-live\fR is specified, perform a memory balloon of a running guest.
If \fI\-\-config\fR is specified, affect the next boot of a persistent guest.
If \fI\-\-current\fR is specified, affect the current guest state.
Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given, but \fI\-\-current\fR is
exclusive. If no flag is specified, behavior is different depending
on hypervisor.
.Sp
\&\fIsize\fR is a scaled integer (see \fB\s-1NOTES\s0\fR above); it defaults to kibibytes
(blocks of 1024 bytes) unless you provide a suffix (and the older option
name \fI\-\-kilobytes\fR is available as a deprecated synonym) .  Libvirt rounds
up to the nearest kibibyte.  Some hypervisors require a larger granularity
than KiB, and requests that are not an even multiple will be rounded up.
For example, vSphere/ESX rounds the parameter up to mebibytes (1024 kibibytes).
.Sp
For Xen, you can only adjust the memory of a running domain if the domain is
paravirtualized or running the \s-1PV\s0 balloon driver.
.IP "\fBsetmaxmem\fR \fIdomain-id\fR \fBsize\fR [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4
.IX Item "setmaxmem domain-id size [[--config] [--live] | [--current]]"
Change the maximum memory allocation limit for a guest domain.
If \fI\-\-live\fR is specified, affect a running guest.
If \fI\-\-config\fR is specified, affect the next boot of a persistent guest.
If \fI\-\-current\fR is specified, affect the current guest state.
Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given, but \fI\-\-current\fR is
exclusive. If no flag is specified, behavior is different depending
on hypervisor.
.Sp
This command works for at least the Xen, \s-1QEMU/KVM\s0 and vSphere/ESX hypervisors.
.Sp
\&\fIsize\fR is a scaled integer (see \fB\s-1NOTES\s0\fR above); it defaults to kibibytes
(blocks of 1024 bytes) unless you provide a suffix (and the older option
name \fI\-\-kilobytes\fR is available as a deprecated synonym) .  Libvirt rounds
up to the nearest kibibyte.  Some hypervisors require a larger granularity
than KiB, and requests that are not an even multiple will be rounded up.
For example, vSphere/ESX rounds the parameter up to mebibytes (1024 kibibytes).
.IP "\fBmemtune\fR \fIdomain-id\fR [\fI\-\-hard\-limit\fR \fBsize\fR] [\fI\-\-soft\-limit\fR \fBsize\fR] [\fI\-\-swap\-hard\-limit\fR \fBsize\fR] [\fI\-\-min\-guarantee\fR \fBsize\fR] [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4
.IX Item "memtune domain-id [--hard-limit size] [--soft-limit size] [--swap-hard-limit size] [--min-guarantee size] [[--config] [--live] | [--current]]"
Allows you to display or set the domain memory parameters. Without
flags, the current settings are displayed; with a flag, the
appropriate limit is adjusted if supported by the hypervisor.  \s-1LXC\s0 and
\&\s-1QEMU/KVM\s0 support \fI\-\-hard\-limit\fR, \fI\-\-soft\-limit\fR, and \fI\-\-swap\-hard\-limit\fR.
\&\fI\-\-min\-guarantee\fR is supported only by \s-1ESX\s0 hypervisor.  Each of these
limits are scaled integers (see \fB\s-1NOTES\s0\fR above), with a default of
kibibytes (blocks of 1024 bytes) if no suffix is present.
.Sp
If \fI\-\-live\fR is specified, affect a running guest.
If \fI\-\-config\fR is specified, affect the next boot of a persistent guest.
If \fI\-\-current\fR is specified, affect the current guest state.
Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given, but \fI\-\-current\fR is
exclusive. If no flag is specified, behavior is different depending
on hypervisor.
.Sp
For \s-1QEMU/KVM\s0, the parameters are applied to the \s-1QEMU\s0 process as a whole.
Thus, when counting them, one needs to add up guest \s-1RAM\s0, guest video \s-1RAM\s0, and
some memory overhead of \s-1QEMU\s0 itself.  The last piece is hard to determine so
one needs guess and try.
.RS 4
.IP "\fI\-\-hard\-limit\fR" 4
.IX Item "--hard-limit"
The maximum memory the guest can use.
.IP "\fI\-\-soft\-limit\fR" 4
.IX Item "--soft-limit"
The memory limit to enforce during memory contention.
.IP "\fI\-\-swap\-hard\-limit\fR" 4
.IX Item "--swap-hard-limit"
The maximum memory plus swap the guest can use.  This has to be more
than hard-limit value provided.
.IP "\fI\-\-min\-guarantee\fR" 4
.IX Item "--min-guarantee"
The guaranteed minimum memory allocation for the guest.
.RE
.RS 4
.Sp
Specifying \-1 as a value for these limits is interpreted as unlimited.
.RE
.IP "\fBblkiotune\fR \fIdomain-id\fR [\fI\-\-weight\fR \fBweight\fR] [\fI\-\-device\-weights\fR \fBdevice-weights\fR] [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4
.IX Item "blkiotune domain-id [--weight weight] [--device-weights device-weights] [[--config] [--live] | [--current]]"
Display or set the blkio parameters. \s-1QEMU/KVM\s0 supports \fI\-\-weight\fR.
\&\fI\-\-weight\fR is in range [100, 1000].
.Sp
\&\fBdevice-weights\fR is a single string listing one or more device/weight
pairs, in the format of /path/to/device,weight,/path/to/device,weight.
Each weight is in the range [100, 1000], or the value 0 to remove that
device from per-device listings.  Only the devices listed in the string
are modified; any existing per-device weights for other devices remain
unchanged.
.Sp
If \fI\-\-live\fR is specified, affect a running guest.
If \fI\-\-config\fR is specified, affect the next boot of a persistent guest.
If \fI\-\-current\fR is specified, affect the current guest state.
Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given, but \fI\-\-current\fR is
exclusive. If no flag is specified, behavior is different depending
on hypervisor.
.IP "\fBsetvcpus\fR \fIdomain-id\fR \fIcount\fR [\fI\-\-maximum\fR] [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4
.IX Item "setvcpus domain-id count [--maximum] [[--config] [--live] | [--current]]"
Change the number of virtual CPUs active in a guest domain.  By default,
this command works on active guest domains.  To change the settings for an
inactive guest domain, use the \fI\-\-config\fR flag.
.Sp
The \fIcount\fR value may be limited by host, hypervisor, or a limit coming
from the original description of the guest domain. For Xen, you can only
adjust the virtual CPUs of a running domain if the domain is paravirtualized.
.Sp
If the \fI\-\-config\fR flag is specified, the change is made to the stored \s-1XML\s0
configuration for the guest domain, and will only take effect when the guest
domain is next started.
.Sp
If \fI\-\-live\fR is specified, the guest domain must be active, and the change
takes place immediately.  Both the \fI\-\-config\fR and \fI\-\-live\fR flags may be
specified together if supported by the hypervisor.
.Sp
If \fI\-\-current\fR is specified, affect the current guest state.
.Sp
When no flags are given, the \fI\-\-live\fR
flag is assumed and the guest domain must be active.  In this situation it
is up to the hypervisor whether the \fI\-\-config\fR flag is also assumed, and
therefore whether the \s-1XML\s0 configuration is adjusted to make the change
persistent.
.Sp
The \fI\-\-maximum\fR flag controls the maximum number of virtual cpus that can
be hot-plugged the next time the domain is booted.  As such, it must only be
used with the \fI\-\-config\fR flag, and not with the \fI\-\-live\fR flag.
.IP "\fBshutdown\fR \fIdomain-id\fR [\fI\-\-mode acpi|agent\fR]" 4
.IX Item "shutdown domain-id [--mode acpi|agent]"
Gracefully shuts down a domain.  This coordinates with the domain \s-1OS\s0
to perform graceful shutdown, so there is no guarantee that it will
succeed, and may take a variable length of time depending on what
services must be shutdown in the domain.
.Sp
The exact behavior of a domain when it shuts down is set by the
\&\fIon_shutdown\fR parameter in the domain's \s-1XML\s0 definition.
.Sp
If \fIdomain-id\fR is transient, then the metadata of any snapshots will
be lost once the guest stops running, but the snapshot contents still
exist, and a new domain with the same name and \s-1UUID\s0 can restore the
snapshot metadata with \fBsnapshot-create\fR.
.Sp
By default the hypervisor will try to pick a suitable shutdown
method. To specify an alternative method, the \fI\-\-mode\fR parameter
can specify \f(CW\*(C`acpi\*(C'\fR or \f(CW\*(C`agent\*(C'\fR.
.IP "\fBstart\fR \fIdomain-name\fR [\fI\-\-console\fR] [\fI\-\-paused\fR] [\fI\-\-autodestroy\fR] [\fI\-\-bypass\-cache\fR] [\fI\-\-force\-boot\fR]" 4
.IX Item "start domain-name [--console] [--paused] [--autodestroy] [--bypass-cache] [--force-boot]"
Start a (previously defined) inactive domain, either from the last
\&\fBmanagedsave\fR state, or via a fresh boot if no managedsave state is
present.  The domain will be paused if the \fI\-\-paused\fR option is
used and supported by the driver; otherwise it will be running.
If \fI\-\-console\fR is requested, attach to the console after creation.
If \fI\-\-autodestroy\fR is requested, then the guest will be automatically
destroyed when virsh closes its connection to libvirt, or otherwise
exits.  If \fI\-\-bypass\-cache\fR is specified, and managedsave state exists,
the restore will avoid the file system cache, although this may slow
down the operation.  If \fI\-\-force\-boot\fR is specified, then any
managedsave state is discarded and a fresh boot occurs.
.IP "\fBsuspend\fR \fIdomain-id\fR" 4
.IX Item "suspend domain-id"
Suspend a running domain. It is kept in memory but won't be scheduled
anymore.
.IP "\fBresume\fR \fIdomain-id\fR" 4
.IX Item "resume domain-id"
Moves a domain out of the suspended state.  This will allow a previously
suspended domain to now be eligible for scheduling by the underlying
hypervisor.
.IP "\fBdompmsuspend\fR \fIdomain-id\fR \fItarget\fR" 4
.IX Item "dompmsuspend domain-id target"
Suspend a running domain into one of these states (possible \fItarget\fR
values):
    mem equivallent of S3 \s-1ACPI\s0 state
    disk equivallent of S4 \s-1ACPI\s0 state
    hybrid \s-1RAM\s0 is saved to disk but not powered off
.IP "\fBdompmwakeup\fR \fIdomain-id\fR" 4
.IX Item "dompmwakeup domain-id"
Wakeup a domain suspended by dompmsuspend command. Injects a wakeup
into the guest that previously used dompmsuspend, rather than waiting
for the previously requested duration (if any) to elapse.
.IP "\fBttyconsole\fR \fIdomain-id\fR" 4
.IX Item "ttyconsole domain-id"
Output the device used for the \s-1TTY\s0 console of the domain. If the information
is not available the processes will provide an exit code of 1.
.IP "\fBundefine\fR \fIdomain-id\fR [\fI\-\-managed\-save\fR] [\fI\-\-snapshots\-metadata\fR] [ {\fI\-\-storage\fR \fBvolumes\fR | \fI\-\-remove\-all\-storage\fR} \fI\-\-wipe\-storage\fR]" 4
.IX Item "undefine domain-id [--managed-save] [--snapshots-metadata] [ {--storage volumes | --remove-all-storage} --wipe-storage]"
Undefine a domain. If the domain is running, this converts it to a
transient domain, without stopping it. If the domain is inactive,
the domain configuration is removed.
.Sp
The \fI\-\-managed\-save\fR flag guarantees that any managed save image (see
the \fBmanagedsave\fR command) is also cleaned up.  Without the flag, attempts
to undefine a domain with a managed save image will fail.
.Sp
The \fI\-\-snapshots\-metadata\fR flag guarantees that any snapshots (see the
\&\fBsnapshot-list\fR command) are also cleaned up when undefining an inactive
domain.  Without the flag, attempts to undefine an inactive domain with
snapshot metadata will fail.  If the domain is active, this flag is
ignored.
.Sp
The \fI\-\-storage\fR flag takes a parameter \fBvolumes\fR, which is a comma separated
list of volume target names or source paths of storage volumes to be removed
along with the undefined domain. Volumes can be undefined and thus removed only
on inactive domains. Volume deletion is only attempted after the domain is
undefined; if not all of the requested volumes could be deleted, the
error message indicates what still remains behind. If a volume path is not
found in the domain definition, it's treated as if the volume was successfully
deleted.
(See \fBdomblklist\fR for list of target names associated to a domain).
Example: \-\-storage vda,/path/to/storage.img
.Sp
The \fI\-\-remove\-all\-storage\fR flag specifies that all of the domain's storage
volumes should be deleted.
.Sp
The flag \fI\-\-wipe\-storage\fR specifies that the storage volumes should be
wiped before removal.
.Sp
\&\s-1NOTE:\s0 For an inactive domain, the domain name or \s-1UUID\s0 must be used as the
\&\fIdomain-id\fR.
.IP "\fBvcpucount\fR \fIdomain-id\fR  [{\fI\-\-maximum\fR | \fI\-\-active\fR} {\fI\-\-config\fR | \fI\-\-live\fR | \fI\-\-current\fR}]" 4
.IX Item "vcpucount domain-id  [{--maximum | --active} {--config | --live | --current}]"
Print information about the virtual cpu counts of the given
\&\fIdomain-id\fR.  If no flags are specified, all possible counts are
listed in a table; otherwise, the output is limited to just the
numeric value requested.  For historical reasons, the table
lists the label \*(L"current\*(R" on the rows that can be queried in isolation
via the \fI\-\-active\fR flag, rather than relating to the \fI\-\-current\fR flag.
.Sp
\&\fI\-\-maximum\fR requests information on the maximum cap of vcpus that a
domain can add via \fBsetvcpus\fR, while \fI\-\-active\fR shows the current
usage; these two flags cannot both be specified.  \fI\-\-config\fR
requires a persistent domain and requests information regarding the next
time the domain will be booted, \fI\-\-live\fR requires a running domain and
lists current values, and \fI\-\-current\fR queries according to the current
state of the domain (corresponding to \fI\-\-live\fR if running, or
\&\fI\-\-config\fR if inactive); these three flags are mutually exclusive.
Thus, this command always takes exactly zero or two flags.
.IP "\fBvcpuinfo\fR \fIdomain-id\fR" 4
.IX Item "vcpuinfo domain-id"
Returns basic information about the domain virtual CPUs, like the number of
vCPUs, the running time, the affinity to physical processors.
.IP "\fBvcpupin\fR \fIdomain-id\fR [\fIvcpu\fR] [\fIcpulist\fR] [[\fI\-\-live\fR] [\fI\-\-config\fR] | [\fI\-\-current\fR]]" 4
.IX Item "vcpupin domain-id [vcpu] [cpulist] [[--live] [--config] | [--current]]"
Query or change the pinning of domain VCPUs to host physical CPUs.  To
pin a single \fIvcpu\fR, specify \fIcpulist\fR; otherwise, you can query one
\&\fIvcpu\fR or omit \fIvcpu\fR to list all at once.
.Sp
\&\fIcpulist\fR is a list of physical \s-1CPU\s0 numbers. Its syntax is a comma
separated list and a special markup using '\-' and '^' (ex. '0\-4', '0\-3,^2') can
also be allowed. The '\-' denotes the range and the '^' denotes exclusive.
If you want to reset vcpupin setting, that is, to pin vcpu all physical cpus,
simply specify 'r' as a cpulist.
If \fI\-\-live\fR is specified, affect a running guest.
If \fI\-\-config\fR is specified, affect the next boot of a persistent guest.
If \fI\-\-current\fR is specified, affect the current guest state.
Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given if \fIcpulist\fR is present,
but \fI\-\-current\fR is exclusive.
If no flag is specified, behavior is different depending on hypervisor.
.Sp
\&\fBNote\fR: The expression is sequentially evaluated, so \*(L"0\-15,^8\*(R" is
identical to \*(L"9\-14,0\-7,15\*(R" but not identical to \*(L"^8,0\-15\*(R".
.IP "\fBvncdisplay\fR \fIdomain-id\fR" 4
.IX Item "vncdisplay domain-id"
Output the \s-1IP\s0 address and port number for the \s-1VNC\s0 display. If the information
is not available the processes will provide an exit code of 1.
.SH "DEVICE COMMANDS"
.IX Header "DEVICE COMMANDS"
The following commands manipulate devices associated to domains.
The domain-id can be specified as a short integer, a name or a full \s-1UUID\s0.
To better understand the values allowed as options for the command
reading the documentation at <http://libvirt.org/formatdomain.html> on the
format of the device sections to get the most accurate set of accepted values.
.IP "\fBattach-device\fR \fIdomain-id\fR \fI\s-1FILE\s0\fR [\fI\-\-config\fR]" 4
.IX Item "attach-device domain-id FILE [--config]"
Attach a device to the domain, using a device definition in an \s-1XML\s0
file using a device definition element such as <disk> or <interface>
as the top-level element.  See the documentation at
<http://libvirt.org/formatdomain.html#elementsDevices> to learn about
libvirt \s-1XML\s0 format for a device.  If \fI\-\-config\fR is specified the
command alters the persistent domain configuration with the device
attach taking effect the next time libvirt starts the domain.  For
compatibility purposes, \fI\-\-persistent\fR is an alias of \fI\-\-config\fR.
For cdrom and floppy devices, this command only replaces the media
within an existing device; consider using \fBupdate-device\fR for this
usage.  For passthrough host devices, see also \fBnodedev-detach\fR,
needed if the device does not use managed mode.
.IP "\fBattach-disk\fR \fIdomain-id\fR \fIsource\fR \fItarget\fR [\fI\-\-driver driver\fR] [\fI\-\-subdriver subdriver\fR] [\fI\-\-cache cache\fR] [\fI\-\-type type\fR] [\fI\-\-mode mode\fR] [\fI\-\-config\fR] [\fI\-\-sourcetype soucetype\fR] [\fI\-\-serial serial\fR] [\fI\-\-shareable\fR] [\fI\-\-rawio\fR] [\fI\-\-address address\fR] [\fI\-\-multifunction\fR]" 4
.IX Item "attach-disk domain-id source target [--driver driver] [--subdriver subdriver] [--cache cache] [--type type] [--mode mode] [--config] [--sourcetype soucetype] [--serial serial] [--shareable] [--rawio] [--address address] [--multifunction]"
Attach a new disk device to the domain.
\&\fIsource\fR is path for the files and devices. \fItarget\fR controls the bus or
device under which the disk is exposed to the guest \s-1OS\s0. It indicates the
\&\*(L"logical\*(R" device name.  \fIdriver\fR can be \fIfile\fR, \fItap\fR or \fIphy\fR for the Xen
hypervisor depending on the kind of access; or \fIqemu\fR for the \s-1QEMU\s0 emulator.
\&\fItype\fR can indicate \fIlun\fR, \fIcdrom\fR or \fIfloppy\fR as alternative to the disk default,
although this use only replaces the media within the existing virtual cdrom or
floppy device; consider using \fBupdate-device\fR for this usage instead.
\&\fImode\fR can specify the two specific mode \fIreadonly\fR or \fIshareable\fR.
\&\fI\-\-config\fR indicates the changes will affect the next boot of the domain,
for compatibility purposes, \fI\-\-persistent\fR is alias of \fI\-\-config\fR.
\&\fIsourcetype\fR can indicate the type of source (block|file)
\&\fIcache\fR can be one of \*(L"default\*(R", \*(L"none\*(R", \*(L"writethrough\*(R", \*(L"writeback\*(R",
\&\*(L"directsync\*(R" or \*(L"unsafe\*(R".
\&\fIserial\fR is the serial of disk device. \fIshareable\fR indicates the disk device
is shareable between domains.
\&\fIrawio\fR indicates the disk needs rawio capability.
\&\fIaddress\fR is the address of disk device in the form of pci:domain.bus.slot.function,
scsi:controller.bus.unit or ide:controller.bus.unit.
\&\fImultifunction\fR indicates specified pci address is a multifunction pci device
address.
.IP "\fBattach-interface\fR \fIdomain-id\fR \fItype\fR \fIsource\fR [\fI\-\-target target\fR] [\fI\-\-mac mac\fR] [\fI\-\-script script\fR] [\fI\-\-model model\fR] [\fI\-\-config\fR] [\fI\-\-inbound average,peak,burst\fR] [\fI\-\-outbound average,peak,burst\fR]" 4
.IX Item "attach-interface domain-id type source [--target target] [--mac mac] [--script script] [--model model] [--config] [--inbound average,peak,burst] [--outbound average,peak,burst]"
Attach a new network interface to the domain.
\&\fItype\fR can be either \fInetwork\fR to indicate a physical network device or
\&\fIbridge\fR to indicate a bridge to a device.
\&\fIsource\fR indicates the source device.
\&\fItarget\fR allows to indicate the target device in the guest. Names starting
with 'vnet' are considered as auto-generated an hence blanked out.
\&\fImac\fR allows to specify the \s-1MAC\s0 address of the network interface.
\&\fIscript\fR allows to specify a path to a script handling a bridge instead of
the default one.
\&\fImodel\fR allows to specify the model type.
\&\fI\-\-config\fR indicates the changes will affect the next boot of the domain,
for compatibility purposes, \fI\-\-persistent\fR is alias of \fI\-\-config\fR.
\&\fIinbound\fR and \fIoutbound\fR control the bandwidth of the interface. \fIpeak\fR
and \fIburst\fR are optional, so \*(L"average,peak\*(R", \*(L"average,,burst\*(R" and
\&\*(L"average\*(R" are also legal.
.Sp
\&\fBNote\fR: the optional target value is the name of a device to be created
as the back-end on the node. If not provided a device named \*(L"vnetN\*(R" or \*(L"vifN\*(R"
will be created automatically.
.IP "\fBdetach-device\fR \fIdomain-id\fR \fI\s-1FILE\s0\fR [\fI\-\-config\fR]" 4
.IX Item "detach-device domain-id FILE [--config]"
Detach a device from the domain, takes the same kind of \s-1XML\s0 descriptions
as command \fBattach-device\fR.
If \fI\-\-config\fR is specified, alter persistent configuration, effect observed
on next boot, for compatibility purposes, \fI\-\-persistent\fR is alias of
\&\fI\-\-config\fR.
For passthrough host devices, see also \fBnodedev-reattach\fR, needed if
the device does not use managed mode.
.IP "\fBdetach-disk\fR \fIdomain-id\fR \fItarget\fR [\fI\-\-config\fR]" 4
.IX Item "detach-disk domain-id target [--config]"
Detach a disk device from a domain. The \fItarget\fR is the device as seen
from the domain.
If \fI\-\-config\fR is specified, alter persistent configuration, effect observed
on next boot, for compatibility purposes, \fI\-\-persistent\fR is alias of
\&\fI\-\-config\fR.
.IP "\fBdetach-interface\fR \fIdomain-id\fR \fItype\fR [\fI\-\-mac mac\fR] [\fI\-\-config\fR]" 4
.IX Item "detach-interface domain-id type [--mac mac] [--config]"
Detach a network interface from a domain.
\&\fItype\fR can be either \fInetwork\fR to indicate a physical network device or
\&\fIbridge\fR to indicate a bridge to a device. It is recommended to use the
\&\fImac\fR option to distinguish between the interfaces if more than one are
present on the domain.
If \fI\-\-config\fR is specified, alter persistent configuration, effect observed
on next boot, for compatibility purposes, \fI\-\-persistent\fR is alias of
\&\fI\-\-config\fR.
.IP "\fBupdate-device\fR \fIdomain-id\fR \fIfile\fR [\fI\-\-config\fR] [\fI\-\-force\fR]" 4
.IX Item "update-device domain-id file [--config] [--force]"
Update the characteristics of a device associated with \fIdomain-id\fR,
based on the device definition in an \s-1XML\s0 \fIfile\fR.  If the \fI\-\-config\fR
option is used, the changes will take affect the next time libvirt
starts the domain.  For compatibility purposes, \fI\-\-persistent\fR is
alias of \fI\-\-config\fR.  The \fI\-\-force\fR option can be used to force
device update, e.g., to eject a CD-ROM even if it is locked/mounted in
the domain. See the documentation at
<http://libvirt.org/formatdomain.html#elementsDevices> to learn about
libvirt \s-1XML\s0 format for a device.
.IP "\fBchange-media\fR \fIdomain-id\fR \fIpath\fR [\fI\-\-eject\fR] [\fI\-\-insert\fR] [\fI\-\-update\fR] [\fIsource\fR] [\fI\-\-force\fR] [[\fI\-\-live\fR] [\fI\-\-config\fR] | [\fI\-\-current\fR]]" 4
.IX Item "change-media domain-id path [--eject] [--insert] [--update] [source] [--force] [[--live] [--config] | [--current]]"
Change media of \s-1CDROM\s0 or floppy drive. \fIpath\fR can be the fully-qualified path
or the unique target name (<target dev='hdc'>) of the disk device. \fIsource\fR
specifies the path of the media to be inserted or updated.
.Sp
\&\fI\-\-eject\fR indicates the media will be ejected.
\&\fI\-\-insert\fR indicates the media will be inserted. \fIsource\fR must be specified.
If the device has source (e.g. <source file='media'>), and \fIsource\fR is not
specified, \fI\-\-update\fR is equal to \fI\-\-eject\fR. If the device has no source,
and \fIsource\fR is specified, \fI\-\-update\fR is equal to \fI\-\-insert\fR. If the device
has source, and \fIsource\fR is specified, \fI\-\-update\fR behaves like combination
of \fI\-\-eject\fR and \fI\-\-insert\fR.
If none of \fI\-\-eject\fR, \fI\-\-insert\fR, and \fI\-\-update\fR is specified, \fI\-\-update\fR
is used by default.
The \fI\-\-force\fR option can be used to force media changing.
If \fI\-\-live\fR is specified, alter live configuration of running guest.
If \fI\-\-config\fR is specified, alter persistent configuration, effect observed
on next boot.
\&\fI\-\-current\fR can be either or both of \fIlive\fR and \fIconfig\fR, depends on
the hypervisor's implementation.
Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given, but \fI\-\-current\fR is
exclusive. If no flag is specified, behavior is different depending
on hypervisor.
.SH "NODEDEV COMMANDS"
.IX Header "NODEDEV COMMANDS"
The following commands manipulate host devices that are intended to be
passed through to guest domains via <hostdev> elements in a domain's
<devices> section.  A node device key is generally specified by the bus
name followed by its address, using underscores between all components,
such as pci_0000_00_02_1, usb_1_5_3, or net_eth1_00_27_13_6a_fe_00.
The \fBnodedev-list\fR gives the full list of host devices that are known
to libvirt, although this includes devices that cannot be assigned to
a guest (for example, attempting to detach the \s-1PCI\s0 device that controls
the host's hard disk controller where the guest's disk images live could
cause the host system to lock up or reboot).
.PP
For more information on node device definition see:
<http://libvirt.org/formatnode.html>.
.PP
Passthrough devices cannot be simultaneously used by the host and its
guest domains, nor by multiple active guests at once.  If the
<hostdev> description includes the attribute \fBmanaged='yes'\fR, and the
hypervisor driver supports it, then the device is in managed mode, and
attempts to use that passthrough device in an active guest will
automatically behave as if \fBnodedev-detach\fR (guest start, device
hot-plug) and \fBnodedev-reattach\fR (guest stop, device hot-unplug) were
called at the right points (currently, qemu does this for \s-1PCI\s0 devices,
but not \s-1USB\s0).  If a device is not marked as managed, then it must
manually be detached before guests can use it, and manually reattached
to be returned to the host.  Also, if a device is manually detached,
then the host does not regain control of the device without a matching
reattach, even if the guests use the device in managed mode.
.IP "\fBnodedev-create\fR \fI\s-1FILE\s0\fR" 4
.IX Item "nodedev-create FILE"
Create a device on the host node that can then be assigned to virtual
machines. Normally, libvirt is able to automatically determine which
host nodes are available for use, but this allows registration of
host hardware that libvirt did not automatically detect.  \fIfile\fR
contains xml for a top-level <device> description of a node device.
.IP "\fBnodedev-destroy\fR \fInodedev\fR" 4
.IX Item "nodedev-destroy nodedev"
Destroy (stop) a device on the host.  Note that this makes libvirt
quit managing a host device, and may even make that device unusable
by the rest of the physical host until a reboot.
.IP "\fBnodedev-detach\fR \fInodedev\fR" 4
.IX Item "nodedev-detach nodedev"
Detach \fInodedev\fR from the host, so that it can safely be used by
guests via <hostdev> passthrough.  This is reversed with
\&\fBnodedev-reattach\fR, and is done automatically for managed devices.
For compatibility purposes, this command can also be spelled
\&\fBnodedev-dettach\fR.
.IP "\fBnodedev-dumpxml\fR \fInodedev\fR" 4
.IX Item "nodedev-dumpxml nodedev"
Dump a <device> \s-1XML\s0 representation for the given node device, including
such information as the device name, which bus owns the device, the
vendor and product id, and any capabilities of the device usable by
libvirt (such as whether device reset is supported).
.IP "\fBnodedev-list\fR \fIcap\fR \fI\-\-tree\fR" 4
.IX Item "nodedev-list cap --tree"
List all of the devices available on the node that are known by libvirt.
If \fIcap\fR is used, the list is filtered to show only the nodes that
include the given capability.  If \fI\-\-tree\fR is used, the output is
formatted in a tree representing parents of each node.
.IP "\fBnodedev-reattach\fR \fInodedev\fR" 4
.IX Item "nodedev-reattach nodedev"
Declare that \fInodedev\fR is no longer in use by any guests, and that
the host can resume normal use of the device.  This is done
automatically for devices in managed mode, but must be done explicitly
to match any explicit \fBnodedev-detach\fR.
.IP "\fBnodedev-reset\fR \fInodedev\fR" 4
.IX Item "nodedev-reset nodedev"
Trigger a device reset for \fInodedev\fR, useful prior to transferring
a node device between guest passthrough or the host.  Libvirt will
often do this action implicitly when required, but this command
allows an explicit reset when needed.
.SH "VIRTUAL NETWORK COMMANDS"
.IX Header "VIRTUAL NETWORK COMMANDS"
The following commands manipulate networks. Libvirt has the capability to
define virtual networks which can then be used by domains and linked to
actual network devices. For more detailed information about this feature
see the documentation at <http://libvirt.org/formatnetwork.html> . Many
of the commands for virtual networks are similar to the ones used for domains,
but the way to name a virtual network is either by its name or \s-1UUID\s0.
.IP "\fBnet-autostart\fR \fInetwork\fR [\fI\-\-disable\fR]" 4
.IX Item "net-autostart network [--disable]"
Configure a virtual network to be automatically started at boot.
The \fI\-\-disable\fR option disable autostarting.
.IP "\fBnet-create\fR \fIfile\fR" 4
.IX Item "net-create file"
Create a virtual network from an \s-1XML\s0 \fIfile\fR, see the documentation at
<http://libvirt.org/formatnetwork.html> to get a description of the
\&\s-1XML\s0 network format used by libvirt.
.IP "\fBnet-define\fR \fIfile\fR" 4
.IX Item "net-define file"
Define a virtual network from an \s-1XML\s0 \fIfile\fR, the network is just defined but
not instantiated.
.IP "\fBnet-destroy\fR \fInetwork\fR" 4
.IX Item "net-destroy network"
Destroy (stop) a given virtual network specified by its name or \s-1UUID\s0. This
takes effect immediately.
.IP "\fBnet-dumpxml\fR \fInetwork\fR [\fI\-\-inactive\fR]" 4
.IX Item "net-dumpxml network [--inactive]"
Output the virtual network information as an \s-1XML\s0 dump to stdout.
If \fI\-\-inactive\fR is specified, then physical functions are not
expanded into their associated virtual functions.
.IP "\fBnet-edit\fR \fInetwork\fR" 4
.IX Item "net-edit network"
Edit the \s-1XML\s0 configuration file for a network.
.Sp
This is equivalent to:
.Sp
.Vb 3
\& virsh net\-dumpxml \-\-inactive network > network.xml
\& vi network.xml (or make changes with your other text editor)
\& virsh net\-define network.xml
.Ve
.Sp
except that it does some error checking.
.Sp
The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment
variables, and defaults to \f(CW\*(C`vi\*(C'\fR.
.IP "\fBnet-info\fR \fInetwork\fR" 4
.IX Item "net-info network"
Returns basic information about the \fInetwork\fR object.
.IP "\fBnet-list\fR [\fI\-\-inactive\fR | \fI\-\-all\fR]" 4
.IX Item "net-list [--inactive | --all]"
Returns the list of active networks, if \fI\-\-all\fR is specified this will also
include defined but inactive networks, if \fI\-\-inactive\fR is specified only the
inactive ones will be listed.
.IP "\fBnet-name\fR \fInetwork-UUID\fR" 4
.IX Item "net-name network-UUID"
Convert a network \s-1UUID\s0 to network name.
.IP "\fBnet-start\fR \fInetwork\fR" 4
.IX Item "net-start network"
Start a (previously defined) inactive network.
.IP "\fBnet-undefine\fR \fInetwork\fR" 4
.IX Item "net-undefine network"
Undefine the configuration for an inactive network.
.IP "\fBnet-uuid\fR \fInetwork-name\fR" 4
.IX Item "net-uuid network-name"
Convert a network name to network \s-1UUID\s0.
.SH "INTERFACE COMMANDS"
.IX Header "INTERFACE COMMANDS"
The following commands manipulate host interfaces.  Often, these host
interfaces can then be used by name within domain <interface> elements
(such as a system-created bridge interface), but there is no
requirement that host interfaces be tied to any particular guest
configuration \s-1XML\s0 at all.
.PP
Many of the commands for host interfaces are similar to the ones used
for domains, and the way to name an interface is either by its name or
its \s-1MAC\s0 address.  However, using a \s-1MAC\s0 address for an \fIiface\fR
argument only works when that address is unique (if an interface and a
bridge share the same \s-1MAC\s0 address, which is often the case, then using
that \s-1MAC\s0 address results in an error due to ambiguity, and you must
resort to a name instead).
.IP "\fBiface-bridge\fR \fIinterface\fR \fIbridge\fR [\fI\-\-no\-stp\fR] [\fIdelay\fR] [\fI\-\-no\-start\fR]" 4
.IX Item "iface-bridge interface bridge [--no-stp] [delay] [--no-start]"
Create a bridge device named \fIbridge\fR, and attach the existing
network device \fIinterface\fR to the new bridge.  The new bridge
defaults to starting immediately, with \s-1STP\s0 enabled and a delay of 0;
these settings can be altered with \fI\-\-no\-stp\fR, \fI\-\-no\-start\fR, and an
integer number of seconds for \fIdelay\fR. All \s-1IP\s0 address configuration
of \fIinterface\fR will be moved to the new bridge device.
.Sp
See also \fBiface-unbridge\fR for undoing this operation.
.IP "\fBiface-define\fR \fIfile\fR" 4
.IX Item "iface-define file"
Define a host interface from an \s-1XML\s0 \fIfile\fR, the interface is just defined but
not started.
.IP "\fBiface-destroy\fR \fIinterface\fR" 4
.IX Item "iface-destroy interface"
Destroy (stop) a given host interface, such as by running \*(L"if-down\*(R" to
disable that interface from active use. This takes effect immediately.
.IP "\fBiface-dumpxml\fR \fIinterface\fR [\fI\-\-inactive\fR]" 4
.IX Item "iface-dumpxml interface [--inactive]"
Output the host interface information as an \s-1XML\s0 dump to stdout.  If
\&\fI\-\-inactive\fR is specified, then the output reflects the persistent
state of the interface that will be used the next time it is started.
.IP "\fBiface-edit\fR \fIinterface\fR" 4
.IX Item "iface-edit interface"
Edit the \s-1XML\s0 configuration file for a host interface.
.Sp
This is equivalent to:
.Sp
.Vb 3
\& virsh iface\-dumpxml iface > iface.xml
\& vi iface.xml (or make changes with your other text editor)
\& virsh iface\-define iface.xml
.Ve
.Sp
except that it does some error checking.
.Sp
The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment
variables, and defaults to \f(CW\*(C`vi\*(C'\fR.
.IP "\fBiface-list\fR [\fI\-\-inactive\fR | \fI\-\-all\fR]" 4
.IX Item "iface-list [--inactive | --all]"
Returns the list of active host interfaces.  If \fI\-\-all\fR is specified
this will also include defined but inactive interfaces.  If
\&\fI\-\-inactive\fR is specified only the inactive ones will be listed.
.IP "\fBiface-name\fR \fIinterface\fR" 4
.IX Item "iface-name interface"
Convert a host interface \s-1MAC\s0 to interface name, if the \s-1MAC\s0 address is unique
among the host's interfaces.
.Sp
\&\fIinterface\fR specifies the interface \s-1MAC\s0 address.
.IP "\fBiface-mac\fR \fIinterface\fR" 4
.IX Item "iface-mac interface"
Convert a host interface name to \s-1MAC\s0 address.
.Sp
\&\fIinterface\fR specifies the interface name.
.IP "\fBiface-start\fR \fIinterface\fR" 4
.IX Item "iface-start interface"
Start a (previously defined) host interface, such as by running \*(L"if-up\*(R".
.IP "\fBiface-unbridge\fR \fIbridge\fR [\fI\-\-no\-start\fR]" 4
.IX Item "iface-unbridge bridge [--no-start]"
Tear down a bridge device named \fIbridge\fR, releasing its underlying
interface back to normal usage, and moving all \s-1IP\s0 address
configuration from the bridge device to the underlying device.  The
underlying interface is restarted unless \fI\-\-no\-start\fR is present;
this flag is present for symmetry, but generally not recommended.
.Sp
See also \fBiface-bridge\fR for creating a bridge.
.IP "\fBiface-undefine\fR \fIinterface\fR" 4
.IX Item "iface-undefine interface"
Undefine the configuration for an inactive host interface.
.IP "\fBiface-begin\fR" 4
.IX Item "iface-begin"
Create a snapshot of current host interface settings, which can later
be committed (\fIiface-commit\fR) or restored (\fIiface-rollback\fR).  If a
snapshot already exists, then this command will fail until the
previous snapshot has been committed or restored.  Undefined behavior
results if any external changes are made to host interfaces outside of
the libvirt \s-1API\s0 between the beginning of a snapshot and its eventual
commit or rollback.
.IP "\fBiface-commit\fR" 4
.IX Item "iface-commit"
Declare all changes since the last \fIiface-begin\fR as working, and
delete the rollback point.  If no interface snapshot has already been
started, then this command will fail.
.IP "\fBiface-rollback\fR" 4
.IX Item "iface-rollback"
Revert all host interface settings back to the state recorded in the
last \fIiface-begin\fR.  If no interface snapshot has already been
started, then this command will fail.  Rebooting the host also serves
as an implicit rollback point.
.SH "STORAGE POOL COMMANDS"
.IX Header "STORAGE POOL COMMANDS"
The following commands manipulate storage pools. Libvirt has the
capability to manage various storage solutions, including files, raw
partitions, and domain-specific formats, used to provide the storage
volumes visible as devices within virtual machines. For more detailed
information about this feature, see the documentation at
<http://libvirt.org/formatstorage.html> . Many of the commands for
pools are similar to the ones used for domains.
.IP "\fBfind-storage-pool-sources\fR \fItype\fR [\fIsrcSpec\fR]" 4
.IX Item "find-storage-pool-sources type [srcSpec]"
Returns \s-1XML\s0 describing all storage pools of a given \fItype\fR that could
be found.  If \fIsrcSpec\fR is provided, it is a file that contains \s-1XML\s0
to further restrict the query for pools.
.IP "\fBfind-storage-pool-sources-as\fR \fItype\fR [\fIhost\fR] [\fIport\fR] [\fIinitiator\fR]" 4
.IX Item "find-storage-pool-sources-as type [host] [port] [initiator]"
Returns \s-1XML\s0 describing all storage pools of a given \fItype\fR that could
be found.  If \fIhost\fR, \fIport\fR, or \fIinitiator\fR are provided, they control
where the query is performed.
.IP "\fBpool-autostart\fR \fIpool-or-uuid\fR [\fI\-\-disable\fR]" 4
.IX Item "pool-autostart pool-or-uuid [--disable]"
Configure whether \fIpool\fR should automatically start at boot.
.IP "\fBpool-build\fR \fIpool-or-uuid\fR [\fI\-\-overwrite\fR] [\fI\-\-no\-overwrite\fR]" 4
.IX Item "pool-build pool-or-uuid [--overwrite] [--no-overwrite]"
Build a given pool.
.Sp
Options \fI\-\-overwrite\fR and \fI\-\-no\-overwrite\fR can only be used for
\&\fBpool-build\fR a filesystem pool. If neither of them is specified,
\&\fBpool-build\fR on a filesystem pool only makes the directory; If
\&\fI\-\-no\-overwrite\fR is specified, it probes to determine if a
filesystem already exists on the target device, returning an error
if exists, or using mkfs to format the target device if not; If
\&\fI\-\-overwrite\fR is specified, mkfs is always executed, any existed
data on the target device is overwritten unconditionally.
.IP "\fBpool-create\fR \fIfile\fR" 4
.IX Item "pool-create file"
Create and start a pool object from the \s-1XML\s0 \fIfile\fR.
.IP "\fBpool-create-as\fR \fIname\fR \fI\-\-print\-xml\fR \fItype\fR [\fIsource-host\fR] [\fIsource-path\fR] [\fIsource-dev\fR] [\fIsource-name\fR] [<target>] [\fI\-\-source\-format format\fR]" 4
.IX Item "pool-create-as name --print-xml type [source-host] [source-path] [source-dev] [source-name] [<target>] [--source-format format]"
Create and start a pool object \fIname\fR from the raw parameters.  If
\&\fI\-\-print\-xml\fR is specified, then print the \s-1XML\s0 of the pool object
without creating the pool.  Otherwise, the pool has the specified
\&\fItype\fR.
.IP "\fBpool-define\fR \fIfile\fR" 4
.IX Item "pool-define file"
Create, but do not start, a pool object from the \s-1XML\s0 \fIfile\fR.
.IP "\fBpool-define-as\fR \fIname\fR \fI\-\-print\-xml\fR \fItype\fR [\fIsource-host\fR] [\fIsource-path\fR] [\fIsource-dev\fR] [\fIsource-name\fR] [<target>] [\fI\-\-source\-format format\fR]" 4
.IX Item "pool-define-as name --print-xml type [source-host] [source-path] [source-dev] [source-name] [<target>] [--source-format format]"
Create, but do not start, a pool object \fIname\fR from the raw parameters.  If
\&\fI\-\-print\-xml\fR is specified, then print the \s-1XML\s0 of the pool object
without defining the pool.  Otherwise, the pool has the specified
\&\fItype\fR.
.IP "\fBpool-destroy\fR \fIpool-or-uuid\fR" 4
.IX Item "pool-destroy pool-or-uuid"
Destroy (stop) a given \fIpool\fR object. Libvirt will no longer manage the
storage described by the pool object, but the raw data contained in
the pool is not changed, and can be later recovered with
\&\fBpool-create\fR.
.IP "\fBpool-delete\fR \fIpool-or-uuid\fR" 4
.IX Item "pool-delete pool-or-uuid"
Destroy the resources used by a given \fIpool\fR object. This operation
is non-recoverable.  The \fIpool\fR object will still exist after this
command, ready for the creation of new storage volumes.
.IP "\fBpool-dumpxml\fR [\fI\-\-inactive\fR] \fIpool-or-uuid\fR" 4
.IX Item "pool-dumpxml [--inactive] pool-or-uuid"
Returns the \s-1XML\s0 information about the \fIpool\fR object.
\&\fI\-\-inactive\fR tells virsh to dump pool configuration that will be used
on next start of the pool as opposed to the current pool configuration.
.IP "\fBpool-edit\fR \fIpool-or-uuid\fR" 4
.IX Item "pool-edit pool-or-uuid"
Edit the \s-1XML\s0 configuration file for a storage pool.
.Sp
This is equivalent to:
.Sp
.Vb 3
\& virsh pool\-dumpxml pool > pool.xml
\& vi pool.xml (or make changes with your other text editor)
\& virsh pool\-define pool.xml
.Ve
.Sp
except that it does some error checking.
.Sp
The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment
variables, and defaults to \f(CW\*(C`vi\*(C'\fR.
.IP "\fBpool-info\fR \fIpool-or-uuid\fR" 4
.IX Item "pool-info pool-or-uuid"
Returns basic information about the \fIpool\fR object.
.IP "\fBpool-list\fR [\fI\-\-inactive\fR | \fI\-\-all\fR] [\fI\-\-details\fR]" 4
.IX Item "pool-list [--inactive | --all] [--details]"
List pool objects known to libvirt.  By default, only pools in use by
active domains are listed; \fI\-\-inactive\fR lists just the inactive
pools, and \fI\-\-all\fR lists all pools. The \fI\-\-details\fR option instructs
virsh to additionally display pool persistence and capacity related
information where available.
.IP "\fBpool-name\fR \fIuuid\fR" 4
.IX Item "pool-name uuid"
Convert the \fIuuid\fR to a pool name.
.IP "\fBpool-refresh\fR \fIpool-or-uuid\fR" 4
.IX Item "pool-refresh pool-or-uuid"
Refresh the list of volumes contained in \fIpool\fR.
.IP "\fBpool-start\fR \fIpool-or-uuid\fR" 4
.IX Item "pool-start pool-or-uuid"
Start the storage \fIpool\fR, which is previously defined but inactive.
.IP "\fBpool-undefine\fR \fIpool-or-uuid\fR" 4
.IX Item "pool-undefine pool-or-uuid"
Undefine the configuration for an inactive \fIpool\fR.
.IP "\fBpool-uuid\fR \fIpool\fR" 4
.IX Item "pool-uuid pool"
Returns the \s-1UUID\s0 of the named \fIpool\fR.
.SH "VOLUME COMMANDS"
.IX Header "VOLUME COMMANDS"
.IP "\fBvol-create\fR \fIpool-or-uuid\fR \fI\s-1FILE\s0\fR" 4
.IX Item "vol-create pool-or-uuid FILE"
Create a volume from an \s-1XML\s0 <file>.
\&\fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool to create the volume in.
\&\fI\s-1FILE\s0\fR is the \s-1XML\s0 <file> with the volume definition. An easy way to create the
\&\s-1XML\s0 <file> is to use the \fBvol-dumpxml\fR command to obtain the definition of a
pre-existing volume.
.Sp
\&\fBExample\fR
.Sp
.Vb 3
\& virsh vol\-dumpxml \-\-pool storagepool1 appvolume1 > newvolume.xml
\& vi newvolume.xml (or make changes with your other text editor)
\& virsh vol\-create differentstoragepool newvolume.xml
.Ve
.IP "\fBvol-create-from\fR \fIpool-or-uuid\fR \fI\s-1FILE\s0\fR [\fI\-\-inputpool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key-or-path\fR" 4
.IX Item "vol-create-from pool-or-uuid FILE [--inputpool pool-or-uuid] vol-name-or-key-or-path"
Create a volume, using another volume as input.
\&\fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool to create the volume in.
\&\fI\s-1FILE\s0\fR is the \s-1XML\s0 <file> with the volume definition.
\&\fI\-\-inputpool\fR \fIpool-or-uuid\fR is the name or uuid of the storage pool the
source volume is in.
\&\fIvol-name-or-key-or-path\fR is the name or key or path of the source volume.
.IP "\fBvol-create-as\fR \fIpool-or-uuid\fR \fIname\fR \fIcapacity\fR [\fI\-\-allocation\fR \fIsize\fR] [\fI\-\-format\fR \fIstring\fR] [\fI\-\-backing\-vol\fR \fIvol-name-or-key-or-path\fR] [\fI\-\-backing\-vol\-format\fR \fIstring\fR]" 4
.IX Item "vol-create-as pool-or-uuid name capacity [--allocation size] [--format string] [--backing-vol vol-name-or-key-or-path] [--backing-vol-format string]"
Create a volume from a set of arguments.
\&\fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool to create the volume
in.
\&\fIname\fR is the name of the new volume.
\&\fIcapacity\fR is the size of the volume to be created, as a scaled integer
(see \fB\s-1NOTES\s0\fR above), defaulting to bytes if there is no suffix.
\&\fI\-\-allocation\fR \fIsize\fR is the initial size to be allocated in the volume,
also as a scaled integer defaulting to bytes.
\&\fI\-\-format\fR \fIstring\fR is used in file based storage pools to specify the volume
file format to use; raw, bochs, qcow, qcow2, vmdk, qed.
\&\fI\-\-backing\-vol\fR \fIvol-name-or-key-or-path\fR is the source backing
volume to be used if taking a snapshot of an existing volume.
\&\fI\-\-backing\-vol\-format\fR \fIstring\fR is the format of the snapshot backing volume;
raw, bochs, qcow, qcow2, qed, vmdk, host_device. These are, however, meant for
file based storage pools.
.IP "\fBvol-clone\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key-or-path\fR \fIname\fR" 4
.IX Item "vol-clone [--pool pool-or-uuid] vol-name-or-key-or-path name"
Clone an existing volume.  Less powerful, but easier to type, version of
\&\fBvol-create-from\fR.
\&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool to create
the volume in.
\&\fIvol-name-or-key-or-path\fR is the name or key or path of the source volume.
\&\fIname\fR is the name of the new volume.
.IP "\fBvol-delete\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key-or-path\fR" 4
.IX Item "vol-delete [--pool pool-or-uuid] vol-name-or-key-or-path"
Delete a given volume.
\&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume
is in.
\&\fIvol-name-or-key-or-path\fR is the name or key or path of the volume to delete.
.IP "\fBvol-upload\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] [\fI\-\-offset\fR \fIbytes\fR] [\fI\-\-length\fR \fIbytes\fR] \fIvol-name-or-key-or-path\fR \fIlocal-file\fR" 4
.IX Item "vol-upload [--pool pool-or-uuid] [--offset bytes] [--length bytes] vol-name-or-key-or-path local-file"
Upload the contents of \fIlocal-file\fR to a storage volume.
\&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume
is in.
\&\fIvol-name-or-key-or-path\fR is the name or key or path of the volume to wipe.
\&\fI\-\-offset\fR is the position in the storage volume at which to start writing
the data. \fI\-\-length\fR is an upper bound of the amount of data to be uploaded.
An error will occurr if the \fIlocal-file\fR is greater than the specified length.
.IP "\fBvol-download\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] [\fI\-\-offset\fR \fIbytes\fR] [\fI\-\-length\fR \fIbytes\fR] \fIvol-name-or-key-or-path\fR \fIlocal-file\fR" 4
.IX Item "vol-download [--pool pool-or-uuid] [--offset bytes] [--length bytes] vol-name-or-key-or-path local-file"
Download the contents of \fIlocal-file\fR from a storage volume.
\&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume
is in.
\&\fIvol-name-or-key-or-path\fR is the name or key or path of the volume to wipe.
\&\fI\-\-offset\fR is the position in the storage volume at which to start reading
the data. \fI\-\-length\fR is an upper bound of the amount of data to be downloaded.
.IP "\fBvol-wipe\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] [\fI\-\-algorithm\fR \fIalgorithm\fR] \fIvol-name-or-key-or-path\fR" 4
.IX Item "vol-wipe [--pool pool-or-uuid] [--algorithm algorithm] vol-name-or-key-or-path"
Wipe a volume, ensure data previously on the volume is not accessible to
future reads. \fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage
pool the volume is in.
\&\fIvol-name-or-key-or-path\fR is the name or key or path of the volume to wipe.
It is possible to choose different wiping algorithms instead of re-writing
volume with zeroes. This can be done via \fI\-\-algorithm\fR switch.
.Sp
\&\fBSupported algorithms\fR
  zero       \- 1\-pass all zeroes
  nnsa       \- 4\-pass \s-1NNSA\s0 Policy Letter \s-1NAP\-14\s0.1\-C (\s-1XVI\-8\s0) for
               sanitizing removable and non-removable hard disks:
               random x2, 0x00, verify.
  dod        \- 4\-pass DoD 5220.22\-M section 8\-306 procedure for
               sanitizing removeable and non-removeable rigid
               disks: random, 0x00, 0xff, verify.
  bsi        \- 9\-pass method recommended by the German Center of
               Security in Information Technologies
               (http://www.bsi.bund.de): 0xff, 0xfe, 0xfd, 0xfb,
               0xf7, 0xef, 0xdf, 0xbf, 0x7f.
  gutmann    \- The canonical 35\-pass sequence described in
               Gutmann's paper.
  schneier   \- 7\-pass method described by Bruce Schneier in
               \*(L"Applied Cryptography\*(R" (1996): 0x00, 0xff,
               random x5.
  pfitzner7  \- Roy Pfitzner's 7\-random\-pass method: random x7.
  pfitzner33 \- Roy Pfitzner's 33\-random\-pass method: random x33.
  random     \- 1\-pass pattern: random.
.Sp
\&\fBNote\fR: The availability of algorithms may be limited by the version
of the \f(CW\*(C`scrub\*(C'\fR binary installed on the host.
.IP "\fBvol-dumpxml\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key-or-path\fR" 4
.IX Item "vol-dumpxml [--pool pool-or-uuid] vol-name-or-key-or-path"
Output the volume information as an \s-1XML\s0 dump to stdout.
\&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume
is in. \fIvol-name-or-key-or-path\fR is the name or key or path of the volume
to output the \s-1XML\s0 of.
.IP "\fBvol-info\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key-or-path\fR" 4
.IX Item "vol-info [--pool pool-or-uuid] vol-name-or-key-or-path"
Returns basic information about the given storage volume.
\&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume
is in. \fIvol-name-or-key-or-path\fR is the name or key or path of the volume
to return information for.
.IP "\fBvol-list\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] [\fI\-\-details\fR]" 4
.IX Item "vol-list [--pool pool-or-uuid] [--details]"
Return the list of volumes in the given storage pool.
\&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool.
The \fI\-\-details\fR option instructs virsh to additionally display volume
type and capacity related information where available.
.IP "\fBvol-pool\fR [\fI\-\-uuid\fR] \fIvol-key-or-path\fR" 4
.IX Item "vol-pool [--uuid] vol-key-or-path"
Return the pool name or \s-1UUID\s0 for a given volume. By default, the pool name is
returned. If the \fI\-\-uuid\fR option is given, the pool \s-1UUID\s0 is returned instead.
\&\fIvol-key-or-path\fR is the key or path of the volume to return the pool
information for.
.IP "\fBvol-path\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key\fR" 4
.IX Item "vol-path [--pool pool-or-uuid] vol-name-or-key"
Return the path for a given volume.
\&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume
is in.
\&\fIvol-name-or-key\fR is the name or key of the volume to return the path for.
.IP "\fBvol-name\fR \fIvol-key-or-path\fR" 4
.IX Item "vol-name vol-key-or-path"
Return the name for a given volume.
\&\fIvol-key-or-path\fR is the key or path of the volume to return the name for.
.IP "\fBvol-key\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-path\fR" 4
.IX Item "vol-key [--pool pool-or-uuid] vol-name-or-path"
Return the volume key for a given volume.
\&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume
is in. \fIvol-name-or-path\fR is the name or path of the volume to return the
volume key for.
.IP "\fBvol-resize\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-path\fR \fIpool-or-uuid\fR \fIcapacity\fR [\fI\-\-allocate\fR] [\fI\-\-delta\fR] [\fI\-\-shrink\fR]" 4
.IX Item "vol-resize [--pool pool-or-uuid] vol-name-or-path pool-or-uuid capacity [--allocate] [--delta] [--shrink]"
Resize the capacity of the given volume, in bytes.
\&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume
is in. \fIvol-name-or-key-or-path\fR is the name or key or path of the volume
to resize.  The new capacity might be sparse unless \fI\-\-allocate\fR is
specified.  Normally, \fIcapacity\fR is the new size, but if \fI\-\-delta\fR
is present, then it is added to the existing size.  Attempts to shrink
the volume will fail unless \fI\-\-shrink\fR is present; \fIcapacity\fR cannot
be negative unless \fI\-\-shrink\fR is provided, but a negative sign is not
necessary. \fIcapacity\fR is a scaled integer (see \fB\s-1NOTES\s0\fR above), which
defaults to bytes if there is no suffix.  This command is only safe
for storage volumes not in use by an active guest; see also
\&\fBblockresize\fR for live resizing.
.SH "SECRET COMMMANDS"
.IX Header "SECRET COMMMANDS"
The following commands manipulate \*(L"secrets\*(R" (e.g. passwords, passphrases and
encryption keys).  Libvirt can store secrets independently from their use, and
other objects (e.g. volumes or domains) can refer to the secrets for encryption
or possibly other uses.  Secrets are identified using an \s-1UUID\s0.  See
<http://libvirt.org/formatsecret.html> for documentation of the \s-1XML\s0 format
used to represent properties of secrets.
.IP "\fBsecret-define\fR \fIfile\fR" 4
.IX Item "secret-define file"
Create a secret with the properties specified in \fIfile\fR, with no associated
secret value.  If \fIfile\fR does not specify a \s-1UUID\s0, choose one automatically.
If \fIfile\fR specifies an \s-1UUID\s0 of an existing secret, replace its properties by
properties defined in \fIfile\fR, without affecting the secret value.
.IP "\fBsecret-dumpxml\fR \fIsecret\fR" 4
.IX Item "secret-dumpxml secret"
Output properties of \fIsecret\fR (specified by its \s-1UUID\s0) as an \s-1XML\s0 dump to stdout.
.IP "\fBsecret-set-value\fR \fIsecret\fR \fIbase64\fR" 4
.IX Item "secret-set-value secret base64"
Set the value associated with \fIsecret\fR (specified by its \s-1UUID\s0) to the value
Base64\-encoded value \fIbase64\fR.
.IP "\fBsecret-get-value\fR \fIsecret\fR" 4
.IX Item "secret-get-value secret"
Output the value associated with \fIsecret\fR (specified by its \s-1UUID\s0) to stdout,
encoded using Base64.
.IP "\fBsecret-undefine\fR \fIsecret\fR" 4
.IX Item "secret-undefine secret"
Delete a \fIsecret\fR (specified by its \s-1UUID\s0), including the associated value, if
any.
.IP "\fBsecret-list\fR" 4
.IX Item "secret-list"
Output a list of UUIDs of known secrets to stdout.
.SH "SNAPSHOT COMMMANDS"
.IX Header "SNAPSHOT COMMMANDS"
The following commands manipulate domain snapshots.  Snapshots take the
disk, memory, and device state of a domain at a point-of-time, and save it
for future use.  They have many uses, from saving a \*(L"clean\*(R" copy of an \s-1OS\s0
image to saving a domain's state before a potentially destructive operation.
Snapshots are identified with a unique name.  See
<http://libvirt.org/formatsnapshot.html> for documentation of the \s-1XML\s0 format
used to represent properties of snapshots.
.IP "\fBsnapshot-create\fR \fIdomain\fR [\fIxmlfile\fR] {[\fI\-\-redefine\fR [\fI\-\-current\fR]] | [\fI\-\-no\-metadata\fR] [\fI\-\-halt\fR] [\fI\-\-disk\-only\fR] [\fI\-\-reuse\-external\fR] [\fI\-\-quiesce\fR] [\fI\-\-atomic\fR]}" 4
.IX Item "snapshot-create domain [xmlfile] {[--redefine [--current]] | [--no-metadata] [--halt] [--disk-only] [--reuse-external] [--quiesce] [--atomic]}"
Create a snapshot for domain \fIdomain\fR with the properties specified in
\&\fIxmlfile\fR.  Normally, the only properties settable for a domain snapshot
are the <name> and <description> elements, as well as <disks> if
\&\fI\-\-disk\-only\fR is given; the rest of the fields are
ignored, and automatically filled in by libvirt.  If \fIxmlfile\fR is
completely omitted, then libvirt will choose a value for all fields.
The new snapshot will become current, as listed by \fBsnapshot-current\fR.
.Sp
If \fI\-\-halt\fR is specified, the domain will be left in an inactive state
after the snapshot is created.
.Sp
If \fI\-\-disk\-only\fR is specified, the snapshot will only include disk
state rather than the usual system checkpoint with vm state.  Disk
snapshots are faster than full system checkpoints, but reverting to a
disk snapshot may require fsck or journal replays, since it is like
the disk state at the point when the power cord is abruptly pulled;
and mixing \fI\-\-halt\fR and \fI\-\-disk\-only\fR loses any data that was not
flushed to disk at the time.
.Sp
If \fI\-\-redefine\fR is specified, then all \s-1XML\s0 elements produced by
\&\fBsnapshot-dumpxml\fR are valid; this can be used to migrate snapshot
hierarchy from one machine to another, to recreate hierarchy for the
case of a transient domain that goes away and is later recreated with
the same name and \s-1UUID\s0, or to make slight alterations in the snapshot
metadata (such as host-specific aspects of the domain \s-1XML\s0 embedded in
the snapshot).  When this flag is supplied, the \fIxmlfile\fR argument
is mandatory, and the domain's current snapshot will not be altered
unless the \fI\-\-current\fR flag is also given.
.Sp
If \fI\-\-no\-metadata\fR is specified, then the snapshot data is created,
but any metadata is immediately discarded (that is, libvirt does not
treat the snapshot as current, and cannot revert to the snapshot
unless \fI\-\-redefine\fR is later used to teach libvirt about the
metadata again).
.Sp
If \fI\-\-reuse\-external\fR is specified, and the snapshot \s-1XML\s0 requests an
external snapshot with a destination of an existing file, then the
destination must exist, and is reused; otherwise, a snapshot is refused
to avoid losing contents of the existing files.
.Sp
If \fI\-\-quiesce\fR is specified, libvirt will try to use guest agent
to freeze and unfreeze domain's mounted file systems. However,
if domain has no guest agent, snapshot creation will fail.
Currently, this requires \fI\-\-disk\-only\fR to be passed as well.
.Sp
If \fI\-\-atomic\fR is specified, libvirt will guarantee that the snapshot
either succeeds, or fails with no changes; not all hypervisors support
this.  If this flag is not specified, then some hypervisors may fail
after partially performing the action, and \fBdumpxml\fR must be used to
see whether any partial changes occurred.
.Sp
Existence of snapshot metadata will prevent attempts to \fBundefine\fR
a persistent domain.  However, for transient domains, snapshot
metadata is silently lost when the domain quits running (whether
by command such as \fBdestroy\fR or by internal guest action).
.IP "\fBsnapshot-create-as\fR \fIdomain\fR {[\fI\-\-print\-xml\fR] | [\fI\-\-no\-metadata\fR] [\fI\-\-halt\fR] [\fI\-\-reuse\-external\fR]} [\fIname\fR] [\fIdescription\fR] [\fI\-\-disk\-only\fR [\fI\-\-quiesce\fR] [\fI\-\-atomic\fR] [[\fI\-\-diskspec\fR] \fBdiskspec\fR]...]" 4
.IX Item "snapshot-create-as domain {[--print-xml] | [--no-metadata] [--halt] [--reuse-external]} [name] [description] [--disk-only [--quiesce] [--atomic] [[--diskspec] diskspec]...]"
Create a snapshot for domain \fIdomain\fR with the given <name> and
<description>; if either value is omitted, libvirt will choose a
value.  If \fI\-\-print\-xml\fR is specified, then \s-1XML\s0 appropriate for
\&\fIsnapshot-create\fR is output, rather than actually creating a snapshot.
Otherwise, if \fI\-\-halt\fR is specified, the domain will be left in an
inactive state after the snapshot is created, and if \fI\-\-disk\-only\fR
is specified, the snapshot will not include vm state.
.Sp
The \fI\-\-disk\-only\fR flag is used to request a disk-only snapshot.  When
this flag is in use, the command can also take additional \fIdiskspec\fR
arguments to add <disk> elements to the xml.  Each <diskspec> is in the
form \fBdisk[,snapshot=type][,driver=type][,file=name]\fR.  To include a
literal comma in \fBdisk\fR or in \fBfile=name\fR, escape it with a second
comma.  A literal \fI\-\-diskspec\fR must preceed each \fBdiskspec\fR unless
all three of \fIdomain\fR, \fIname\fR, and \fIdescription\fR are also present.
For example, a diskspec of \*(L"vda,snapshot=external,file=/path/to,,new\*(R"
results in the following \s-1XML:\s0
  <disk name='vda' snapshot='external'>
    <source file='/path/to,new'/>
  </disk>
.Sp
If \fI\-\-reuse\-external\fR is specified, and the domain \s-1XML\s0 or \fIdiskspec\fR
option requests an external snapshot with a destination of an existing
file, then the destination must exist, and is reused; otherwise, a
snapshot is refused to avoid losing contents of the existing files.
.Sp
If \fI\-\-quiesce\fR is specified, libvirt will try to use guest agent
to freeze and unfreeze domain's mounted file systems. However,
if domain has no guest agent, snapshot creation will fail.
Currently, this requires \fI\-\-disk\-only\fR to be passed as well.
.Sp
If \fI\-\-no\-metadata\fR is specified, then the snapshot data is created,
but any metadata is immediately discarded (that is, libvirt does not
treat the snapshot as current, and cannot revert to the snapshot
unless \fBsnapshot-create\fR is later used to teach libvirt about the
metadata again).  This flag is incompatible with \fI\-\-print\-xml\fR.
.Sp
If \fI\-\-atomic\fR is specified, libvirt will guarantee that the snapshot
either succeeds, or fails with no changes; not all hypervisors support
this.  If this flag is not specified, then some hypervisors may fail
after partially performing the action, and \fBdumpxml\fR must be used to
see whether any partial changes occurred.
.IP "\fBsnapshot-current\fR \fIdomain\fR {[\fI\-\-name\fR] | [\fI\-\-security\-info\fR] | [\fIsnapshotname\fR]}" 4
.IX Item "snapshot-current domain {[--name] | [--security-info] | [snapshotname]}"
Without \fIsnapshotname\fR, this will output the snapshot \s-1XML\s0 for the domain's
current snapshot (if any).  If \fI\-\-name\fR is specified, just the
current snapshot name instead of the full xml.  Otherwise, using
\&\fI\-\-security\-info\fR will also include security sensitive information in
the \s-1XML\s0.
.Sp
With \fIsnapshotname\fR, this is a request to make the existing named
snapshot become the current snapshot, without reverting the domain.
.IP "\fBsnapshot-edit\fR \fIdomain\fR [\fIsnapshotname\fR] [\fI\-\-current\fR] {[\fI\-\-rename\fR] | [\fI\-\-clone\fR]}" 4
.IX Item "snapshot-edit domain [snapshotname] [--current] {[--rename] | [--clone]}"
Edit the \s-1XML\s0 configuration file for \fIsnapshotname\fR of a domain.  If
both \fIsnapshotname\fR and \fI\-\-current\fR are specified, also force the
edited snapshot to become the current snapshot.  If \fIsnapshotname\fR
is omitted, then \fI\-\-current\fR must be supplied, to edit the current
snapshot.
.Sp
This is equivalent to:
.Sp
.Vb 3
\& virsh snapshot\-dumpxml dom name > snapshot.xml
\& vi snapshot.xml (or make changes with your other text editor)
\& virsh snapshot\-create dom snapshot.xml \-\-redefine [\-\-current]
.Ve
.Sp
except that it does some error checking.
.Sp
The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment
variables, and defaults to \f(CW\*(C`vi\*(C'\fR.
.Sp
If \fI\-\-rename\fR is specified, then the edits can change the snapshot
name.  If \fI\-\-clone\fR is specified, then changing the snapshot name
will create a clone of the snapshot metadata.  If neither is specified,
then the edits must not change the snapshot name.  Note that changing
a snapshot name must be done with care, since the contents of some
snapshots, such as internal snapshots within a single qcow2 file, are
accessible only from the original name.
.IP "\fBsnapshot-info\fR \fIdomain\fR {\fIsnapshot\fR | \fI\-\-current\fR}" 4
.IX Item "snapshot-info domain {snapshot | --current}"
Output basic information about a named <snapshot>, or the current snapshot
with \fI\-\-current\fR.
.IP "\fBsnapshot-list\fR \fIdomain\fR [{\fI\-\-parent\fR | \fI\-\-roots\fR | \fI\-\-tree\fR}] [{[\fI\-\-from\fR] \fBsnapshot\fR | \fI\-\-current\fR} [\fI\-\-descendants\fR]] [\fI\-\-metadata\fR] [\fI\-\-no\-metadata\fR] [\fI\-\-leaves\fR] [\fI\-\-no\-leaves\fR]" 4
.IX Item "snapshot-list domain [{--parent | --roots | --tree}] [{[--from] snapshot | --current} [--descendants]] [--metadata] [--no-metadata] [--leaves] [--no-leaves]"
List all of the available snapshots for the given domain, defaulting
to show columns for the snapshot name, creation time, and domain state.
.Sp
If \fI\-\-parent\fR is specified, add a column to the output table giving
the name of the parent of each snapshot.  If \fI\-\-roots\fR is specified,
the list will be filtered to just snapshots that have no parents.
If \fI\-\-tree\fR is specified, the output will be in a tree format, listing
just snapshot names.  These three options are mutually exclusive.
.Sp
If \fI\-\-from\fR is provided, filter the list to snapshots which are
children of the given \fBsnapshot\fR; or if \fI\-\-current\fR is provided,
start at the current snapshot.  When used in isolation or with
\&\fI\-\-parent\fR, the list is limited to direct children unless
\&\fI\-\-descendants\fR is also present.  When used with \fI\-\-tree\fR, the
use of \fI\-\-descendants\fR is implied.  This option is not compatible
with \fI\-\-roots\fR.
.Sp
If \fI\-\-leaves\fR is specified, the list will be filtered to just
snapshots that have no children.  Likewise, if \fI\-\-no\-leaves\fR is
specified, the list will be filtered to just snapshots with
children.  (Note that omitting both options does no filtering,
while providing both options will either produce the same list
or error out depending on whether the server recognizes the flags).
These options are not compatible with \fI\-\-tree\fR.
.Sp
If \fI\-\-metadata\fR is specified, the list will be filtered to just
snapshots that involve libvirt metadata, and thus would prevent
\&\fBundefine\fR of a persistent domain, or be lost on \fBdestroy\fR of
a transient domain.  Likewise, if \fI\-\-no\-metadata\fR is specified,
the list will be filtered to just snapshots that exist without
the need for libvirt metadata.
.IP "\fBsnapshot-dumpxml\fR \fIdomain\fR \fIsnapshot\fR [\fI\-\-security\-info\fR]" 4
.IX Item "snapshot-dumpxml domain snapshot [--security-info]"
Output the snapshot \s-1XML\s0 for the domain's snapshot named \fIsnapshot\fR.
Using \fI\-\-security\-info\fR will also include security sensitive information.
Use \fBsnapshot-current\fR to easily access the \s-1XML\s0 of the current snapshot.
.IP "\fBsnapshot-parent\fR \fIdomain\fR {\fIsnapshot\fR | \fI\-\-current\fR}" 4
.IX Item "snapshot-parent domain {snapshot | --current}"
Output the name of the parent snapshot, if any, for the given
\&\fIsnapshot\fR, or for the current snapshot with \fI\-\-current\fR.
.IP "\fBsnapshot-revert\fR \fIdomain\fR {\fIsnapshot\fR | \fI\-\-current\fR} [{\fI\-\-running\fR | \fI\-\-paused\fR}] [\fI\-\-force\fR]" 4
.IX Item "snapshot-revert domain {snapshot | --current} [{--running | --paused}] [--force]"
Revert the given domain to the snapshot specified by \fIsnapshot\fR, or to
the current snapshot with \fI\-\-current\fR.  Be aware
that this is a destructive action; any changes in the domain since the last
snapshot was taken will be lost.  Also note that the state of the domain after
snapshot-revert is complete will be the state of the domain at the time
the original snapshot was taken.
.Sp
Normally, reverting to a snapshot leaves the domain in the state it was
at the time the snapshot was created, except that a disk snapshot with
no vm state leaves the domain in an inactive state.  Passing either the
\&\fI\-\-running\fR or \fI\-\-paused\fR flag will perform additional state changes
(such as booting an inactive domain, or pausing a running domain).  Since
transient domains cannot be inactive, it is required to use one of these
flags when reverting to a disk snapshot of a transient domain.
.Sp
There are two cases where a snapshot revert involves extra risk, which
requires the use of \fI\-\-force\fR to proceed.  One is the case of a
snapshot that lacks full domain information for reverting
configuration (such as snapshots created prior to libvirt 0.9.5);
since libvirt cannot prove that the current configuration matches what
was in use at the time of the snapshot, supplying \fI\-\-force\fR assures
libvirt that the snapshot is compatible with the current configuration
(and if it is not, the domain will likely fail to run).  The other is
the case of reverting from a running domain to an active state where a
new hypervisor has to be created rather than reusing the existing
hypervisor, because it implies drawbacks such as breaking any existing
\&\s-1VNC\s0 or Spice connections; this condition happens with an active
snapshot that uses a provably incompatible configuration, as well as
with an inactive snapshot that is combined with the \fI\-\-start\fR or
\&\fI\-\-pause\fR flag.
.IP "\fBsnapshot-delete\fR \fIdomain\fR {\fIsnapshot\fR | \fI\-\-current\fR} [\fI\-\-metadata\fR] [{\fI\-\-children\fR | \fI\-\-children\-only\fR}]" 4
.IX Item "snapshot-delete domain {snapshot | --current} [--metadata] [{--children | --children-only}]"
Delete the snapshot for the domain named \fIsnapshot\fR, or the current
snapshot with \fI\-\-current\fR.  If this snapshot
has child snapshots, changes from this snapshot will be merged into the
children.  If \fI\-\-children\fR is passed, then delete this snapshot and any
children of this snapshot.  If \fI\-\-children\-only\fR is passed, then delete
any children of this snapshot, but leave this snapshot intact.  These
two flags are mutually exclusive.
.Sp
If \fI\-\-metadata\fR is specified, then only delete the snapshot metadata
maintained by libvirt, while leaving the snapshot contents intact for
access by external tools; otherwise deleting a snapshot also removes
the data contents from that point in time.
.SH "NWFILTER COMMMANDS"
.IX Header "NWFILTER COMMMANDS"
The following commands manipulate network filters. Network filters allow
filtering of the network traffic coming from and going to virtual machines.
Individual network traffic filters are written in \s-1XML\s0 and may contain
references to other network filters, describe traffic filtering rules,
or contain both. Network filters are referenced by virtual machines
from within their interface description. A network filter may be referenced
by multiple virtual machines' interfaces.
.IP "\fBnwfilter-define\fR \fIxmlfile\fR" 4
.IX Item "nwfilter-define xmlfile"
Make a new network filter known to libvirt. If a network filter with
the same name already exists, it will be replaced with the new \s-1XML\s0.
Any running virtual machine referencing this network filter will have
its network traffic rules adapted. If for any reason the network traffic
filtering rules cannot be instantiated by any of the running virtual
machines, then the new \s-1XML\s0 will be rejected.
.IP "\fBnwfilter-undefine\fR \fInwfilter-name\fR" 4
.IX Item "nwfilter-undefine nwfilter-name"
Delete a network filter. The deletion will fail if any running virtual
machine is currently using this network filter.
.IP "\fBnwfilter-list\fR" 4
.IX Item "nwfilter-list"
List all of the available network filters.
.IP "\fBnwfilter-dumpxml\fR \fInwfilter-name\fR" 4
.IX Item "nwfilter-dumpxml nwfilter-name"
Output the network filter \s-1XML\s0.
.IP "\fBnwfilter-edit\fR \fInwfilter-name\fR" 4
.IX Item "nwfilter-edit nwfilter-name"
Edit the \s-1XML\s0 of a network filter.
.Sp
This is equivalent to:
.Sp
.Vb 3
\& virsh nwfilter\-dumpxml myfilter > myfilter.xml
\& vi myfilter.xml (or make changes with your other text editor)
\& virsh nwfilter\-define myfilter.xml
.Ve
.Sp
except that it does some error checking.
The new network filter may be rejected due to the same reason as
mentioned in \fInwfilter-define\fR.
.Sp
The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment
variables, and defaults to \f(CW\*(C`vi\*(C'\fR.
.SH "QEMU-SPECIFIC COMMANDS"
.IX Header "QEMU-SPECIFIC COMMANDS"
\&\s-1NOTE:\s0 Use of the following commands is \fBstrongly\fR discouraged.  They
can cause libvirt to become confused and do the wrong thing on subsequent
operations.  Once you have used this command, please do not report
problems to the libvirt developers; the reports will be ignored.
.IP "\fBqemu-attach\fR \fIpid\fR" 4
.IX Item "qemu-attach pid"
Attach an externally launched \s-1QEMU\s0 process to the libvirt \s-1QEMU\s0 driver.
The \s-1QEMU\s0 process must have been created with a monitor connection
using the \s-1UNIX\s0 driver. Ideally the process will also have had the
\&'\-name' argument specified.
.RS 4
.Sp
.Vb 6
\&     $ qemu\-kvm \-cdrom ~/demo.iso \e
\&         \-monitor unix:/tmp/demo,server,nowait \e
\&         \-name foo \e
\&         \-uuid cece4f9f\-dff0\-575d\-0e8e\-01fe380f12ea  &
\&     $ QEMUPID=$!
\&     $ virsh qemu\-attach $QEMUPID
.Ve
.RE
.RS 4
.Sp
Not all functions of libvirt are expected to work reliably after
attaching to an externally launched \s-1QEMU\s0 process. There may be
issues with the guest \s-1ABI\s0 changing upon migration, and hotunplug
may not work.
.RE
.IP "\fBqemu-monitor-command\fR \fIdomain\fR [\fI\-\-hmp\fR] \fIcommand\fR..." 4
.IX Item "qemu-monitor-command domain [--hmp] command..."
Send an arbitrary monitor command \fIcommand\fR to domain \fIdomain\fR through the
qemu monitor.  The results of the command will be printed on stdout.  If
\&\fI\-\-hmp\fR is passed, the command is considered to be a human monitor command
and libvirt will automatically convert it into \s-1QMP\s0 if needed.  In that case
the result will also be converted back from \s-1QMP\s0.  If more than one argument
is provided for \fIcommand\fR, they are concatenated with a space in between
before passing the single command to the monitor.
.SH "ENVIRONMENT"
.IX Header "ENVIRONMENT"
The following environment variables can be set to alter the behaviour
of \f(CW\*(C`virsh\*(C'\fR
.IP "VIRSH_DEBUG=<0 to 4>" 4
.IX Item "VIRSH_DEBUG=<0 to 4>"
Turn on verbose debugging of virsh commands. Valid levels are
.IP "* VIRSH_DEBUG=0" 4
.IX Item "* VIRSH_DEBUG=0"
\&\s-1DEBUG\s0 \- Messages at \s-1ALL\s0 levels get logged
.IP "* VIRSH_DEBUG=1" 4
.IX Item "* VIRSH_DEBUG=1"
\&\s-1INFO\s0 \- Logs messages at levels \s-1INFO\s0, \s-1NOTICE\s0, \s-1WARNING\s0 and \s-1ERROR\s0
.IP "* VIRSH_DEBUG=2" 4
.IX Item "* VIRSH_DEBUG=2"
\&\s-1NOTICE\s0 \- Logs messages at levels \s-1NOTICE\s0, \s-1WARNING\s0 and \s-1ERROR\s0
.IP "* VIRSH_DEBUG=3" 4
.IX Item "* VIRSH_DEBUG=3"
\&\s-1WARNING\s0 \- Logs messages at levels \s-1WARNING\s0 and \s-1ERROR\s0
.IP "* VIRSH_DEBUG=4" 4
.IX Item "* VIRSH_DEBUG=4"
\&\s-1ERROR\s0 \- Messages at only \s-1ERROR\s0 level gets logged.
.ie n .IP "VIRSH_LOG_FILE=""LOGFILE""" 4
.el .IP "VIRSH_LOG_FILE=\f(CWLOGFILE\fR" 4
.IX Item "VIRSH_LOG_FILE=LOGFILE"
The file to log virsh debug messages.
.IP "\s-1VIRSH_DEFAULT_CONNECT_URI\s0" 4
.IX Item "VIRSH_DEFAULT_CONNECT_URI"
The hypervisor to connect to by default. Set this to a \s-1URI\s0, in the same
format as accepted by the \fBconnect\fR option. This environment variable
is deprecated in favour of the global \fB\s-1LIBVIRT_DEFAULT_URI\s0\fR variable
which serves the same purpose.
.IP "\s-1LIBVIRT_DEFAULT_URI\s0" 4
.IX Item "LIBVIRT_DEFAULT_URI"
The hypervisor to connect to by default. Set this to a \s-1URI\s0, in the
same format as accepted by the \fBconnect\fR option. This overrides
the default \s-1URI\s0 set in any client config file and prevents libvirt
from probing for drivers.
.IP "\s-1VISUAL\s0" 4
.IX Item "VISUAL"
The editor to use by the \fBedit\fR and related options.
.IP "\s-1EDITOR\s0" 4
.IX Item "EDITOR"
The editor to use by the \fBedit\fR and related options, if \f(CW\*(C`VISUAL\*(C'\fR
is not set.
.IP "LIBVIRT_DEBUG=LEVEL" 4
.IX Item "LIBVIRT_DEBUG=LEVEL"
Turn on verbose debugging of all libvirt \s-1API\s0 calls. Valid levels are
.RS 4
.IP "\(bu" 4
LIBVIRT_DEBUG=1
.Sp
Messages at level \s-1DEBUG\s0 or above
.IP "\(bu" 4
LIBVIRT_DEBUG=2
.Sp
Messages at level \s-1INFO\s0 or above
.IP "\(bu" 4
LIBVIRT_DEBUG=3
.Sp
Messages at level \s-1WARNING\s0 or above
.IP "\(bu" 4
LIBVIRT_DEBUG=4
.Sp
Messages at level \s-1ERROR\s0 or above
.RE
.RS 4
.Sp
For further information about debugging options consult \f(CW\*(C`http://libvirt.org/logging.html\*(C'\fR
.RE
.SH "BUGS"
.IX Header "BUGS"
Report any bugs discovered to the libvirt community via the mailing
list \f(CW\*(C`http://libvirt.org/contact.html\*(C'\fR or bug tracker \f(CW\*(C`http://libvirt.org/bugs.html\*(C'\fR.
Alternatively report bugs to your software distributor / vendor.
.SH "AUTHORS"
.IX Header "AUTHORS"
.Vb 1
\&  Please refer to the AUTHORS file distributed with libvirt.
\&
\&  Based on the xm man page by:
\&  Sean Dague <sean at dague dot net>
\&  Daniel Stekloff <dsteklof at us dot ibm dot com>
.Ve
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (C) 2005, 2007\-2010 Red Hat, Inc., and the authors listed in the
libvirt \s-1AUTHORS\s0 file.
.SH "LICENSE"
.IX Header "LICENSE"
virsh is distributed under the terms of the \s-1GNU\s0 \s-1LGPL\s0 v2+.
This is free software; see the source for copying conditions. There
is \s-1NO\s0 warranty; not even for \s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0
\&\s-1PURPOSE\s0
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fIvirt\-install\fR\|(1), \fIvirt\-xml\-validate\fR\|(1), \fIvirt\-top\fR\|(1), \fIvirt\-df\fR\|(1),
<http://www.libvirt.org/>
.SH "POD ERRORS"
.IX Header "POD ERRORS"
Hey! \fBThe above document had some coding errors, which are explained below:\fR
.IP "Around line 687:" 4
.IX Item "Around line 687:"
Unterminated I<...> sequence
.IP "Around line 728:" 4
.IX Item "Around line 728:"
Unterminated I<...> sequence