mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-08-17 09:49:59 +03:00
Compare commits
1432 Commits
Author | SHA1 | Date | |
---|---|---|---|
4a824cdbc4 | |||
3d36b1a4b0 | |||
901f4b6b86 | |||
1f50730e44 | |||
790d364ca2 | |||
1c23ba286f | |||
b8a32e0e94 | |||
31f1f6bf4a | |||
93e5a1432d | |||
46532e3e8e | |||
38dd53e5ca | |||
c9d9cc5eae | |||
84c59ffaec | |||
99b92930d3 | |||
97278ab472 | |||
4f01d3d53b | |||
2cebf84867 | |||
f8d5119e4f | |||
702911496f | |||
02ed255e22 | |||
ce33422d35 | |||
889ce7460c | |||
e0622ca281 | |||
04172610c0 | |||
e064205936 | |||
f0aa4935d3 | |||
319ed26437 | |||
c29eafc890 | |||
d7a3700ee7 | |||
1b253a102f | |||
2eb54c74ff | |||
3dbabd29f5 | |||
c1509ab47e | |||
339bdd99a1 | |||
678e891380 | |||
7b35fd718d | |||
bbc663b1c3 | |||
2349d51fbe | |||
d200363ee6 | |||
4e4c6620e2 | |||
83b4137d41 | |||
3b35369c0f | |||
d4b7309a9c | |||
4db3fd7489 | |||
0eedb1d9bf | |||
6159710ca1 | |||
08cb0433c5 | |||
96e8565de6 | |||
5e556b60c9 | |||
a2b36ec5db | |||
50dc7015e5 | |||
e3818b2a9f | |||
79a003f9b0 | |||
87b4c10c6c | |||
987fd7db4f | |||
828820e2d3 | |||
14940b5eaa | |||
053e813a30 | |||
7b3a9f754e | |||
bf62e9953c | |||
4004977fbf | |||
3f46ce78fc | |||
d960d06fc0 | |||
9ff3876cc8 | |||
dd36cc3f97 | |||
73cdac3f72 | |||
2e774db80e | |||
31e0de1a85 | |||
7489a9c340 | |||
abbec81bd0 | |||
682c79c4f5 | |||
55bfd020d8 | |||
c9a85af319 | |||
23b9502bfc | |||
c58e1f4de2 | |||
a54f25a946 | |||
35c30522a5 | |||
618a5b33d4 | |||
770b4aa8f0 | |||
8363dbaea3 | |||
dd383b93ff | |||
0ce43ca4ab | |||
e2ea90ce26 | |||
50adf8271d | |||
3e8502165f | |||
ac5cb26a32 | |||
ff4eac595f | |||
9b90644e7d | |||
8164b0e804 | |||
2a5d14e206 | |||
8f7b75fbc3 | |||
5f579c0cda | |||
011d40059d | |||
9cc0f8d503 | |||
6c2e4c3856 | |||
28cd3dc40b | |||
8b55992f4e | |||
316ed4128b | |||
15666e026f | |||
751bb8ce99 | |||
05cc035189 | |||
e786b57889 | |||
1130fa3188 | |||
8d3aa09283 | |||
7479026b5c | |||
f4ece17665 | |||
074b6d45b0 | |||
1640fafc6a | |||
c72e327456 | |||
c8f79c9b29 | |||
790f912b46 | |||
27054e1217 | |||
31bee8572f | |||
8691551070 | |||
81621f3e6e | |||
25feed14db | |||
cb022b6bc7 | |||
458dd20da9 | |||
de78bf604c | |||
f52e9f1f4d | |||
c7805f4099 | |||
ec3e50644e | |||
7786233009 | |||
2e467de44a | |||
e982dacb45 | |||
9b2d2446af | |||
39e5173a3d | |||
a8fca0da06 | |||
54dd75fd97 | |||
5c13ed4f02 | |||
ffee627a4a | |||
f403bdc189 | |||
7d31dd6494 | |||
0cff3554f3 | |||
ea79a49f31 | |||
e44d240092 | |||
55599102b4 | |||
56fd513458 | |||
65fb9d49cc | |||
877dab6ccf | |||
7d480a4650 | |||
35ed25bde9 | |||
757e3d3af6 | |||
0e620e6669 | |||
da5a8aee2b | |||
4909bcbbc1 | |||
8571608924 | |||
7c959c61de | |||
20b19324e5 | |||
7b48d69207 | |||
d140e25949 | |||
b2621046c2 | |||
d54384187b | |||
d616254849 | |||
9a069f94ec | |||
99419bd11e | |||
0f6c46c3d7 | |||
5d9815b657 | |||
ed1384dc38 | |||
245d88251e | |||
ad9e110cae | |||
dfa88e6455 | |||
47e1767725 | |||
5c1a825167 | |||
c1eda06478 | |||
52947fe3ae | |||
7459cae9b0 | |||
f426ab08fb | |||
130cbf193a | |||
687554cd50 | |||
65aa3e3414 | |||
a69d7a00c4 | |||
31494974c4 | |||
0995b00084 | |||
dfb1022c72 | |||
9c9d4d32d3 | |||
bba93d40da | |||
325b02b5a3 | |||
79611c5968 | |||
e69a85cc2b | |||
d514d7773c | |||
4d4a8aa9ad | |||
6c7c7cabf9 | |||
39078bd4e0 | |||
e8cd571b2c | |||
a75d762fcd | |||
3f9d6c3566 | |||
761fc48136 | |||
dc350eabb3 | |||
b545f65d16 | |||
69218922e8 | |||
e397f658b0 | |||
8d63af22de | |||
0899322d61 | |||
2b1cd1f148 | |||
509eb51e7c | |||
8bc18eaac6 | |||
c6248f0484 | |||
0f45d8a263 | |||
159f59f34a | |||
af3262e26f | |||
4f85cfdfad | |||
584cd5c279 | |||
5d5c6ccc01 | |||
0b79971b84 | |||
2581270527 | |||
bbf1806f31 | |||
71da3b66a8 | |||
1bf661caf4 | |||
c726d9eca5 | |||
7ae3f2d53d | |||
7184af1364 | |||
688b3ecfe9 | |||
c308a9ae15 | |||
2ec48f7aa9 | |||
cc453bb548 | |||
3d1596b048 | |||
907a39e735 | |||
cf7ac00ebd | |||
14e3d7d2a4 | |||
a99bfb4b5e | |||
0eec69729d | |||
e1e94f2ed9 | |||
40541c2a6b | |||
d9a2a993dd | |||
e9f4c675e2 | |||
8c1e9be48f | |||
bccd4a8cbc | |||
19e285f1ae | |||
7db9ac8260 | |||
f488ddf4d8 | |||
24120066a4 | |||
04ac20df3f | |||
d3b05abfa9 | |||
bae47e4e30 | |||
2de152d20d | |||
832d140930 | |||
da77f04ed5 | |||
e763ad256d | |||
cf6f8811fb | |||
ef38965c30 | |||
c85e1dd71b | |||
6f736c83e5 | |||
766ace80d6 | |||
98de5f3e5d | |||
63f18f3786 | |||
bf1786b6d5 | |||
833e1493ed | |||
10370efb29 | |||
a2acdb3dd2 | |||
ed4bbe6bc4 | |||
a18d9012a2 | |||
6e1e26e9a7 | |||
e6d74d8db5 | |||
d0b8bc8565 | |||
bb19491cf5 | |||
054bbfcbaa | |||
e424220a0e | |||
c45fed8a63 | |||
321a7d53f3 | |||
a38dbf6673 | |||
4da3000c66 | |||
654c709baa | |||
49a1c16027 | |||
cd699ed150 | |||
8a883b0c1e | |||
439b72ecf5 | |||
b17409674e | |||
daa886b635 | |||
86007cba4c | |||
7a4bf34b56 | |||
9f2879d311 | |||
66b4693269 | |||
fc66c1603c | |||
29d37818fb | |||
e3a04455fa | |||
f8d478b6df | |||
ab2615237a | |||
4ecd7caf5c | |||
f2a4e5f176 | |||
daef7c9e9c | |||
7034531814 | |||
7cc522beb6 | |||
ae9874e471 | |||
aedfcce33e | |||
3b54b2e345 | |||
5a4af2a7d6 | |||
aafe41971c | |||
d507b97185 | |||
f587c27768 | |||
b7159dca8b | |||
fef8d1a010 | |||
0a5eaf0d59 | |||
798ff66790 | |||
3aa34af7a6 | |||
3c83df679e | |||
51811e4161 | |||
afc4631b63 | |||
1e8b4b5810 | |||
db2b6861dc | |||
d760255d01 | |||
014afe6501 | |||
5f669ea976 | |||
3fd121c170 | |||
18937c3ae0 | |||
24bcd8d45a | |||
a839dcb850 | |||
3e251af561 | |||
36ac6e37be | |||
2e0e1a91f7 | |||
185478af09 | |||
f36d83c441 | |||
4f1f9d91ab | |||
f0e4af91e4 | |||
198c992d26 | |||
038cffd831 | |||
68e7bc4561 | |||
a1fd56cb30 | |||
5ec4b22b77 | |||
cb854b8f61 | |||
462a69621e | |||
1279e421b2 | |||
278f87c4b5 | |||
535aed56a2 | |||
b9c57e7b0d | |||
d7ead3e19a | |||
ba72cb12fa | |||
731a5a4df7 | |||
709b0f37c5 | |||
4494b11f8f | |||
51b12b8cca | |||
346e43ecfd | |||
66a0664974 | |||
3c971c675a | |||
4c85421c6c | |||
d52add46ed | |||
54df702ed0 | |||
f5b654e33e | |||
b667125065 | |||
7ac12d84d0 | |||
0c6e95fe78 | |||
0527d6bd41 | |||
632c60edde | |||
66ff2ddc29 | |||
b7a443fcbb | |||
718af45895 | |||
62cc7b702b | |||
35562e01b4 | |||
b3f2b4ca5c | |||
83aca30f1e | |||
7a74eeaf06 | |||
91b749a0ac | |||
c898c7b3d8 | |||
fe915278c1 | |||
28224c4d2a | |||
ce753ec5d6 | |||
e2d7e7c61a | |||
a14768c9d3 | |||
8c5d2bad12 | |||
fec9822eeb | |||
7c36650699 | |||
08230dbd7d | |||
4f5c564939 | |||
f24404a324 | |||
556cf5f617 | |||
e861b31275 | |||
44f6ae27fe | |||
404174cad3 | |||
20463736cc | |||
88ba722c12 | |||
05dc8398dd | |||
fde9df8dcc | |||
226ad9815a | |||
f56c773bf8 | |||
3ddddd98c3 | |||
ab9b7ec2f6 | |||
936d95d347 | |||
6a095d0851 | |||
47cdbac47d | |||
ebc8db5189 | |||
30f3a005ff | |||
4d6050a8eb | |||
4857b9c3a9 | |||
f14b5bce73 | |||
4af71715be | |||
0f8454101d | |||
04d9510f50 | |||
2005f7b552 | |||
a27e4fbb72 | |||
f9c7020c1f | |||
da3d40c0eb | |||
c4bbaaf877 | |||
3b2e021a7b | |||
99c5545693 | |||
ac2797cf2a | |||
846770e5ff | |||
3e7890c8ef | |||
258208e1da | |||
622ceb34ff | |||
6e148567fd | |||
2b9c1b1b34 | |||
b370cd2978 | |||
dc068e35c0 | |||
012ff583fe | |||
1c212145a3 | |||
1eec6d447e | |||
32df483f1d | |||
b12a9cdedd | |||
7affb25be9 | |||
b72c97e732 | |||
8db1f2d228 | |||
392c192240 | |||
473011334c | |||
5411e7e176 | |||
aaf1636875 | |||
5cce9d28b0 | |||
1846b80be8 | |||
c25c18f71b | |||
2f4a139a4c | |||
5a217e84c4 | |||
0333180185 | |||
d60c7f75c2 | |||
4ed80c76c5 | |||
9d92bf1fd5 | |||
4b31da3478 | |||
cdfe739c97 | |||
7f193f1f78 | |||
bc5b270c44 | |||
ff93b865cd | |||
2628ad8368 | |||
96a108c993 | |||
4ad6a01330 | |||
a5efb31909 | |||
ed77abc58b | |||
af7ab7fc5d | |||
de858e3fa7 | |||
986c270dac | |||
8cacd8b4ea | |||
74a909fef1 | |||
d4e5359a1c | |||
83a9c93807 | |||
313669d1c1 | |||
95fef5f407 | |||
368e341ac1 | |||
a6cbdd7b81 | |||
570ad09ef9 | |||
df5928ea56 | |||
89c5a9d0e8 | |||
e89c68b8bb | |||
aae0fc2a92 | |||
347a712ab1 | |||
cab938c993 | |||
8b8fcdea6e | |||
41bd91f8ad | |||
4a9c179325 | |||
fb49ffc3bb | |||
1190a82469 | |||
77d3a80974 | |||
c17b16d1be | |||
ed6fc41b9c | |||
aa51202b72 | |||
09938bb3b0 | |||
4c993d8ab5 | |||
34ca568497 | |||
70743daeec | |||
0c94357f9d | |||
e3802e13df | |||
238dba0f9c | |||
9821f8f6cf | |||
11cfa28850 | |||
8d59a025bb | |||
c86f53d5b2 | |||
9cf8734e7c | |||
b4f20d07e2 | |||
2e59e1207a | |||
c0a8056ee2 | |||
b28fb61fd7 | |||
912a4e9c06 | |||
809473ba6c | |||
d66eb78667 | |||
d0d3e92d0b | |||
8d0e7eb4c1 | |||
d94b501b7b | |||
64f0e145c1 | |||
565d040f43 | |||
f14fdae368 | |||
eb8268a4f6 | |||
f234dc9366 | |||
74c0353e4f | |||
0e49b83912 | |||
ad39fd83a8 | |||
c57e3d8994 | |||
f199f75e9b | |||
41ac222e52 | |||
f6b5ed5ef0 | |||
32bef82a2d | |||
24643c780b | |||
dfba37048a | |||
f6bd0a8899 | |||
cc5c7f9865 | |||
7339bc4ced | |||
9a2f36ec04 | |||
b467e9323c | |||
f1f9a7ac7e | |||
ed0bfd04f8 | |||
a02579141e | |||
2745177b34 | |||
7fc06b0480 | |||
ab8d323319 | |||
96460a1987 | |||
9cdd9ea20e | |||
50897ffbb6 | |||
3f0010a673 | |||
64212ed20e | |||
a8c8685eaa | |||
7b97030ad4 | |||
d13155c20c | |||
a4e44e674e | |||
88bd1a644b | |||
cdf1a372c6 | |||
748f6dd0c3 | |||
08379dbd45 | |||
98e92ba83b | |||
e5d3ab5e21 | |||
6543a459ef | |||
c2fbb3c656 | |||
ae757743dc | |||
07d1b6b5b1 | |||
b697411ca0 | |||
7cdbacb472 | |||
67159f1c60 | |||
ec6474b245 | |||
7e5040bd20 | |||
ad9d8dbcae | |||
84f0a0b8f2 | |||
56494d2b57 | |||
6034ce3130 | |||
68c6d3dc31 | |||
880fcf6ab2 | |||
8ce9e2abc3 | |||
a912977a65 | |||
d5b2828763 | |||
07b64de505 | |||
8075687679 | |||
d648b05678 | |||
8b32c80df0 | |||
2d5cd1d724 | |||
71e30eff46 | |||
47c94b6563 | |||
31d21197d3 | |||
dc9d8d6810 | |||
fc19a00597 | |||
ab297becc1 | |||
8b7d187417 | |||
2dc5839a16 | |||
85b22f528f | |||
46b0c93332 | |||
84e27a6f2a | |||
d5c4783c64 | |||
b4f0c19eed | |||
592664c181 | |||
944705e28f | |||
a9bd9b94e1 | |||
9b4c03ae5d | |||
7abe342d96 | |||
766e0c91d7 | |||
4dc52e1e2f | |||
21e1bdeb3d | |||
45e6317158 | |||
6718b2d711 | |||
8b9bf7879b | |||
e5577872cb | |||
539d73dbf6 | |||
28de547997 | |||
3130541ebf | |||
989a427de8 | |||
790dfee5ea | |||
1c9a2fb1ae | |||
b718ded39a | |||
dfa1e1dd53 | |||
6856b93710 | |||
a33f4eae83 | |||
6c6c03dc0e | |||
ff33f80773 | |||
5114431396 | |||
fd54f1de53 | |||
705e67d40b | |||
d1f3d14974 | |||
b362938e57 | |||
35aa14fcd0 | |||
ad65d1e502 | |||
6910318798 | |||
5eb8a7ac4d | |||
ea1a9b5fdd | |||
935550c6d3 | |||
2edbd3d918 | |||
c748037f2a | |||
9ee809d60c | |||
8f218fbdfa | |||
149fa591c1 | |||
3bef4adf73 | |||
2215befc8b | |||
cab0cfd5cf | |||
501bfad194 | |||
ba06c1824b | |||
090eb35c0c | |||
1465876a04 | |||
b88b171731 | |||
313309261d | |||
79b8a56995 | |||
ae2163f852 | |||
8f9a69317d | |||
55dc872bd8 | |||
60f0f55ee4 | |||
258fb278f2 | |||
ab4139a493 | |||
3738cf41f1 | |||
bf72095954 | |||
8312435707 | |||
bc680e1381 | |||
05858b27d4 | |||
cc3548abe3 | |||
7243752694 | |||
5a608c3dee | |||
47e99e0d77 | |||
1cad5ebae6 | |||
cef78ed84a | |||
76c1fd33c8 | |||
cbb106f807 | |||
76d9f65644 | |||
dff4a753c4 | |||
c4ef575c97 | |||
a21f51121d | |||
07da0a6b54 | |||
3c465728bf | |||
d01e427e01 | |||
3d7f6649e8 | |||
ddd103d342 | |||
4f9af0857c | |||
e9d74a7a82 | |||
6c5c4b8d4d | |||
7aba113ca7 | |||
753ff83a50 | |||
bf402e77b6 | |||
719c2c7665 | |||
892582f9de | |||
6e1fc35546 | |||
8b235d4057 | |||
dc04b2a737 | |||
7730257db3 | |||
d5e8842538 | |||
f4ea67f5b3 | |||
d442ee23bd | |||
992ed55fea | |||
d9a52520c7 | |||
c51babd90e | |||
46c329bcc5 | |||
c0ee3d3b54 | |||
d521119c09 | |||
5049b53689 | |||
33f49f211a | |||
ebdbe25a97 | |||
b7aba48bca | |||
4738c2a7e7 | |||
012d69dff1 | |||
4ded3fb1c2 | |||
39ad0001ca | |||
89cf363061 | |||
7794e02c56 | |||
0361917619 | |||
34e5791332 | |||
924a6c7f6a | |||
7475ee0f75 | |||
28a6fd9396 | |||
cb02215252 | |||
d3337028f5 | |||
86727836c2 | |||
1d4f41fdbe | |||
47c724e54f | |||
6092fea93a | |||
bcbe646d92 | |||
0fbf3704fd | |||
856a482207 | |||
1a50ba2cb0 | |||
7a95eccc81 | |||
df33ecdd9e | |||
d671c0ed1b | |||
729acc23df | |||
4d4f371e09 | |||
2a596dac5e | |||
b6c37e5fb5 | |||
237629d204 | |||
8927c0eab6 | |||
ebb1ccb517 | |||
54f89ef1fc | |||
d74b03e51c | |||
7492276317 | |||
509ce9437f | |||
0584d6626b | |||
9d2bfc1ca7 | |||
43db9cf4ed | |||
68dceb635d | |||
e11daa2b60 | |||
7c5ba648f7 | |||
8e1f0c38fa | |||
ea2fec86dd | |||
a33d8fceee | |||
f999e2fdce | |||
3f6470f753 | |||
1b2ebf9502 | |||
f97a569944 | |||
c33c36d28f | |||
a2d2b80fbd | |||
7e5aa78d0f | |||
067e83ebee | |||
99a388e612 | |||
81efb13b4a | |||
2b121dbc10 | |||
bb2704e7b5 | |||
70f0bbe8e0 | |||
5efacd7813 | |||
a703566201 | |||
3d77b98ca6 | |||
fe910efd8a | |||
37db3f5dfe | |||
afbd96678e | |||
39064f0ff9 | |||
81d6c4defe | |||
a154f5f313 | |||
58a54dc373 | |||
03cd6e4ae8 | |||
89ad205f32 | |||
a615833664 | |||
f33e43c235 | |||
104650db3e | |||
f4ac06569a | |||
f0e72b2f5c | |||
bb2f621611 | |||
c5834ec148 | |||
e628dbfbef | |||
08c1435f05 | |||
cc244e2441 | |||
f2f9ae426a | |||
283aafdb29 | |||
37b415200d | |||
23e8b5d8e7 | |||
0b5617a607 | |||
0f9b6ee42d | |||
62711817db | |||
1d272e8f22 | |||
e9028f4b73 | |||
89204fca7f | |||
041b1ff26a | |||
9504ae5b67 | |||
47976b484c | |||
79caaf70ae | |||
516c12237b | |||
63158d586b | |||
96a02703da | |||
58110b4887 | |||
2bbe624e1d | |||
a0db65663c | |||
a2b3d7cff8 | |||
689b64d666 | |||
0c996c10e4 | |||
39c814ff46 | |||
37f7a1faf1 | |||
c780e9b882 | |||
a4c19459aa | |||
bf60b6b33f | |||
71d125620d | |||
bc4b433098 | |||
3782814d4a | |||
9f87247235 | |||
30f1bccf33 | |||
e5aab47ab3 | |||
e25a32f3da | |||
7a791677b0 | |||
86748976f1 | |||
9576afd110 | |||
fd723164c7 | |||
ab5e7d4977 | |||
b1c88c1476 | |||
02cf57c0d0 | |||
e0c469e58b | |||
e124f49890 | |||
9b5a514b31 | |||
d49adae2e2 | |||
2cd4d8e506 | |||
9d91a18ebf | |||
a08fc66d90 | |||
adb29a8869 | |||
5f63a5cb42 | |||
ff86b0c97b | |||
fb58f8e2a4 | |||
9c294e6f9a | |||
a95c9406a2 | |||
0f720ab35a | |||
77b93dbc3e | |||
ec02d49dfd | |||
b61eadf3c6 | |||
46325e5131 | |||
b27b712c24 | |||
0dac29d89f | |||
f569b87f51 | |||
b5fd404471 | |||
2a59a3d597 | |||
5f75bd4bbe | |||
2771f8b74c | |||
ec69ca14f9 | |||
d38b934c49 | |||
bafffe7a10 | |||
d0fc6dc831 | |||
de76cae971 | |||
e260e401a5 | |||
f9670bf8a4 | |||
4201a7ea1c | |||
e66bdbb784 | |||
a3e95abeb5 | |||
1c04f99970 | |||
0211fd6e04 | |||
fa16957ccd | |||
b6dbbae128 | |||
e87af617fc | |||
23ae3fe425 | |||
a3258c0eb9 | |||
f823089124 | |||
947230fb56 | |||
d055498d04 | |||
bd0cb27cf6 | |||
30b398d5ef | |||
1851a0c864 | |||
2b435c153e | |||
3d0130cbcc | |||
ba804d9fd1 | |||
2e03b08ead | |||
23d47b33a2 | |||
04ee70bfda | |||
d1236faa17 | |||
f32e3a2dd6 | |||
91b1c69f9f | |||
8cd327fa7f | |||
6fea88a119 | |||
6bf55a9752 | |||
eb0b42d80a | |||
5c731eb8a5 | |||
4dbd6e9654 | |||
ffa62d06a8 | |||
10c5212b10 | |||
ca043b8c06 | |||
037a49dc66 | |||
adaa7ab653 | |||
270a9fef37 | |||
0e7fd31fb5 | |||
7bafe009d9 | |||
7af929d065 | |||
f88b076d17 | |||
9af1b30da3 | |||
81af5336ac | |||
8f708761c0 | |||
bab7752c0c | |||
c047f54749 | |||
a047a24d11 | |||
34e8f63a32 | |||
cbd10126ed | |||
0b121614a2 | |||
23f5e74ed3 | |||
9a2975786b | |||
dd0a7040f7 | |||
5a3501be9e | |||
35c7701c64 | |||
8ee5073c1e | |||
c1eb38053d | |||
400ac797ef | |||
eaba79d22e | |||
edecd45c78 | |||
b3822ed04a | |||
6d264c9182 | |||
def31e4c58 | |||
4fbf322fe9 | |||
07049e4c39 | |||
2639949abe | |||
60f54f6146 | |||
246143b69f | |||
73ebd86d73 | |||
7083cdc7bd | |||
41bf06e96a | |||
61299a1c98 | |||
ab54581549 | |||
3cdf4dd49a | |||
caea10bf75 | |||
eba36a3878 | |||
d8aae15aa1 | |||
42bbd93e46 | |||
857f116871 | |||
e3ba67037b | |||
d34439c9e4 | |||
2f4c5338a6 | |||
0711c4b74d | |||
0111b409a3 | |||
1e7cd39511 | |||
012f9b19ef | |||
a6bd7c22ea | |||
bb81021bfe | |||
0039a32fca | |||
08842171d4 | |||
d39291d4c0 | |||
d804d35fac | |||
7ecc1d814a | |||
5a2e1185bd | |||
86e78667b8 | |||
cf9bced084 | |||
2f3e2c0c43 | |||
f6a2f97eb9 | |||
694d0c520b | |||
9785f2b6f2 | |||
767be8be72 | |||
add633bdf9 | |||
9b704ab823 | |||
b326765c80 | |||
662f8a2ab3 | |||
6ee0e23744 | |||
33eaebe48e | |||
23a4df886d | |||
2e99fa0385 | |||
77eff5eeb2 | |||
18d0632dc7 | |||
7146d41634 | |||
e58dfad4a4 | |||
2da776b1d6 | |||
8be88034bf | |||
d9d77bfa80 | |||
e0ad466983 | |||
b6ab7a067f | |||
508451e4ad | |||
b0f1ba47dd | |||
5828080f71 | |||
2143ced7f5 | |||
b62f9b99dd | |||
7fcf8d9d69 | |||
fe772f24a6 | |||
6f8a8b30c9 | |||
1cb1f9dabf | |||
78fab2770b | |||
a172dfbe2e | |||
2e43cb8e90 | |||
35a2f5bc52 | |||
0a220e2225 | |||
2cbc1fd892 | |||
3f38c7e3a9 | |||
67aea3fb78 | |||
38c4a9cc40 | |||
4d34c92947 | |||
5eaf605447 | |||
82507838e0 | |||
1fc9593271 | |||
35c74c1733 | |||
eac74c1f47 | |||
1246640b3d | |||
e5e8d5d082 | |||
09e7fb5e1f | |||
e2c41e4860 | |||
41e0edaf84 | |||
f772b3d91f | |||
7b21981cdb | |||
4492ef7f48 | |||
8d75e47ede | |||
9fcc5436d3 | |||
c324bad93a | |||
a605594f8e | |||
b7e9202401 | |||
47a7b93584 | |||
f1c7010040 | |||
54b8668b4d | |||
09f10a12be | |||
cc922fddc3 | |||
88cac66d92 | |||
998dc17da3 | |||
1916679506 | |||
ba63d8f7d8 | |||
837993d845 | |||
1e7ec88d9a | |||
740225a1cb | |||
40f58ca75d | |||
9943a7341c | |||
309f03db40 | |||
d37a3a1d6c | |||
89b63f0ad4 | |||
9f0e9cba27 | |||
01df6f2bff | |||
3143c81ca1 | |||
cb4f41b8d0 | |||
48bf62fde1 | |||
5ce6d95eed | |||
7bd744c401 | |||
d507f8f9b9 | |||
84912e9c91 | |||
381a339e98 | |||
3cfc3d7d2c | |||
0cc7925520 | |||
c298145344 | |||
8057c04e8d | |||
eca72d4759 | |||
60f96bfc88 | |||
819c8ce043 | |||
1c3fee6abc | |||
59952932f5 | |||
280b8c9e7c | |||
6676c1fc8f | |||
2cfa14bc8a | |||
ae368ebfcc | |||
7ba5defb5a | |||
a9e3b4f78e | |||
f81f0f2f1d | |||
6bde0a1a37 | |||
dc9d7a171c | |||
11c47d979c | |||
310945597c | |||
a2b80edbc6 | |||
3635b41e15 | |||
5378effd57 | |||
0df1a79089 | |||
a9bfe887f9 | |||
10f8a45deb | |||
60b176c3d0 | |||
f108944ae0 | |||
d04c53bc8b | |||
e1019e9e84 | |||
0801c14908 | |||
d78035d06a | |||
1e25c54f66 | |||
9674f2c637 | |||
f95560b3fe | |||
c0fab87106 | |||
13fefaf37f | |||
149c87b49d | |||
36f7dbf4dc | |||
bd1282d624 | |||
28f8dfdccc | |||
edc9269a2a | |||
059aff6b98 | |||
7bcc7278bf | |||
e658daeb58 | |||
893647671b | |||
297c704a1c | |||
d236f3fc38 | |||
e55ff49cbc | |||
76f5bcabe6 | |||
d0ea530b00 | |||
0ec6aebb64 | |||
3af8280baf | |||
4da9b2c163 | |||
fcfa4bfb16 | |||
69037428d7 | |||
ba96d277b0 | |||
43dbcb1541 | |||
b871830ac8 | |||
5a33366f5c | |||
9c74414ded | |||
60dea2c6bf | |||
c5eed5dc25 | |||
84a8917b8a | |||
844cdf22e6 | |||
2a1aaa609e | |||
7c035625f8 | |||
0b237296ef | |||
458c499841 | |||
5d692cc714 | |||
53d5ad94c0 | |||
283f1c4aef | |||
2832663f59 | |||
0821ea6b3c | |||
4bdc8606e6 | |||
a86c039d46 | |||
5468594f46 | |||
a9087ad16d | |||
fcd64772be | |||
eeb8c924ce | |||
2cd9093543 | |||
83aebf6de4 | |||
b893e7612f | |||
3b2cab7e1c | |||
0d0a7cdcf5 | |||
60469dd10f | |||
814a8deaa1 | |||
2b804cfafc | |||
0caccb58f0 | |||
e0316b5ebd | |||
0dddd680c2 | |||
cd1e8d1c47 | |||
9038ac65da | |||
13c69cd0b4 | |||
c5f162200c | |||
9e9ea3ead9 | |||
5fc663d8be | |||
aa696e1846 | |||
43e23c73af | |||
295bda40da | |||
89563efc02 | |||
8e122c2cdf | |||
72574808d6 | |||
2d0a777b3d | |||
7022b09111 | |||
f64303907b | |||
b073fe40db | |||
90af1babd4 | |||
e8fd8757c8 | |||
0225c566f4 | |||
96a1be95ef | |||
4764a6c5a3 | |||
2dd77cd1ff | |||
de29867e22 | |||
4c6be02a3e | |||
db488c7917 | |||
7ccc4d52bd | |||
416eca189b | |||
a5fa3322c8 | |||
ac707017e7 | |||
1b21351b93 | |||
c25746c216 | |||
364a77ff0f | |||
b785cec0dc | |||
2ccaa8e6ba | |||
3b565d3f46 | |||
c70a6154b6 | |||
2ecec6e206 | |||
3999372182 | |||
3dce0a829a | |||
1517099c7b | |||
de9be0ab4d | |||
ca58a1b06c | |||
ed769e1854 | |||
bd66c243b3 | |||
15ee6614f7 | |||
494e2f5cc2 | |||
85a7b5e1ce | |||
3887afbb6b | |||
362d04779c | |||
5cbb0d37d4 | |||
25f582e36a | |||
0b62c0736a | |||
8fd3823117 | |||
f1b4021b38 | |||
36c1fc189d | |||
371ddc9866 | |||
024879e5f6 | |||
3da355e8c4 | |||
adae5cf733 | |||
2020a9f9c7 | |||
9ca569dedf | |||
ac1c77f04d | |||
3521cd1c32 | |||
6a7b663203 | |||
639d5c4966 | |||
7307c3c00c | |||
dd0371764f | |||
09e0cb4218 | |||
9467ab6074 | |||
e5e2b65cf8 | |||
49ecf8b41f | |||
0fb58ef5cd | |||
cf470068a1 | |||
1532bd498a | |||
07cbb610ba | |||
35fe4e7e2e | |||
de7f0774c3 | |||
f6c2951566 | |||
bb1457012d | |||
d165c54d86 | |||
2b32735af4 | |||
f644361b1e | |||
f8fbeb50d5 | |||
72c1632d90 | |||
35616d6e7e | |||
49e5abb6a6 | |||
5cdcb75d45 | |||
f59e25e012 | |||
36ba0ee7b9 | |||
fca338a06c | |||
9ce64e6aae | |||
f8b08d0e96 | |||
db2aff6ada | |||
8125113cdb | |||
98be861b4d | |||
2b9189e8ad | |||
c15d893252 | |||
ab42772a46 | |||
1437ea6f48 | |||
8b6f831c8e | |||
1100f61074 | |||
fe7872827f | |||
cd4f01ea86 | |||
4ecb723b9e | |||
f743e0bf4b | |||
d4170dfad3 | |||
3b72650181 | |||
ff2d5a3d8a | |||
78f3666fe9 | |||
ec62a602bb | |||
94827a785d | |||
c33a922faa | |||
ede89aab64 | |||
740be0061a | |||
ea44626636 | |||
8c95290868 | |||
a5e8beef4f | |||
db8760ffe6 | |||
6a1b0e37af | |||
01ab659994 | |||
b95ad92e05 | |||
c88a4f2a46 | |||
1035c51f3b | |||
03da89d141 | |||
26cae4b4ce | |||
35a03a6623 | |||
fd66ea669c | |||
4bba6579cc | |||
e6bd3ce056 | |||
54106114a4 | |||
2f678bb10f | |||
9ac287f826 | |||
956ce7b472 | |||
5090c576e3 | |||
24f03aa8e4 | |||
2a72e54c95 | |||
587632ffeb | |||
0e13136a2c | |||
481dfbaed4 | |||
b1ba47ec54 | |||
e3b6b2be58 | |||
4cf974b674 | |||
6bdcef11e3 | |||
cd331650c0 | |||
1ce4922e72 | |||
d22f4badbc | |||
f36309d688 | |||
7a99b0abaf | |||
574b9bc66b | |||
76345dd43a | |||
5f7861ca3f | |||
1ccf22277b | |||
ede22e58ff | |||
1020a5041b | |||
6e73850b01 | |||
331934b296 | |||
facc1c0057 | |||
dbb7df1f81 | |||
85edb0c8bb | |||
ed23b10660 | |||
ef1e024df8 | |||
d239085e95 | |||
22acfdc7fc | |||
16d9a3df94 | |||
764bd8537a | |||
afe869819f | |||
58d372d441 | |||
fe2a0b027b | |||
f4b2dcf550 | |||
ee7d23ba4b | |||
75b198b3e7 | |||
f1a43a8e41 | |||
f970d8481e | |||
0fc89098a6 | |||
0831a5bade | |||
60b0284f24 | |||
4ed43d62f1 | |||
4c4c80df3f | |||
0e96fa5489 | |||
8268a24548 | |||
aaa8ab3e01 | |||
00792722fd | |||
12ad7435de | |||
d15d092cda | |||
473ee27e6a | |||
288f9b13ee | |||
867374079d | |||
7a236982fe | |||
9b096843cb | |||
f4c1efaa9a | |||
1483d79ce9 | |||
3f47ff8bb5 | |||
6498f76e31 | |||
aa20e97578 | |||
f5fb059a78 | |||
a3676b6cb6 | |||
c68cd62adb | |||
324bf8bfdc | |||
4230b6c102 | |||
c6a3be5dff | |||
14dd70cca2 | |||
637a1124ae | |||
731c911ceb | |||
a55a610b30 | |||
b4418464e1 | |||
6b07dff012 | |||
97a1f07681 | |||
5505cf96b0 | |||
fbf9aa12c7 | |||
4a8b7cba80 | |||
b7ff9e6960 | |||
ac89a611d4 | |||
1e2864c2cd | |||
615851dd19 | |||
67936d1301 | |||
9ed534f081 | |||
a62116de32 | |||
0f82f30612 | |||
4bc97d592f | |||
fb583a8f5b | |||
9b5c540096 | |||
4dced75e79 | |||
116e2facde | |||
c29ce35af6 | |||
beac09fd68 | |||
f4780c12dc | |||
985a321ac0 | |||
d2fdeb3b1e | |||
203ab129af | |||
1c9d485dda | |||
2d46f88d53 | |||
5b35cc532b | |||
aa81db3ff8 | |||
16e41ab656 | |||
51b708c63e | |||
9298bfbcb4 | |||
2387aa26c1 | |||
a20f06d9d9 | |||
cf5491e5ba | |||
4cf4120b82 | |||
748b6d8e90 | |||
babe7dada0 | |||
ec448fbf17 | |||
3c2e6472d8 | |||
a3cf061c82 | |||
65741d84ed | |||
f4af202f4e | |||
01fa1d7a5e | |||
f7e1a546f2 | |||
f36fadca10 | |||
984a73c0b3 | |||
0b2c40d455 | |||
24d7f3d534 | |||
819ea2084f | |||
d95606e3d8 | |||
48fea23ba5 | |||
3f3d2f9dfc | |||
01573bdf4f | |||
e73ff9763a | |||
3dcafffe17 | |||
9cc4270112 | |||
895913dd59 | |||
4a27ac1de1 | |||
f07034159e | |||
d3c6cabbac | |||
eff8a8dbb1 | |||
89a1df9b06 | |||
164c03d33b | |||
fa2e35a336 | |||
7e9548fce3 | |||
a4d7f4a0d9 | |||
7254a3670e | |||
a8bac1c0f3 | |||
a42eac601e | |||
aa7c4068a8 | |||
7038322991 | |||
892242519a | |||
3f685c4dd8 | |||
defa8b8589 | |||
bd172f1345 | |||
a4fd740561 | |||
48d112210d | |||
8d78fd04be | |||
1f490138ba | |||
e2a7f97b2b | |||
fc4115e8d6 | |||
afab4824eb | |||
51907779ee | |||
245cef9f97 | |||
972e914f59 | |||
3e250b3669 | |||
6cdf0aafc8 | |||
ddd8c3b995 | |||
f20b7dbe63 | |||
ccaf0beec8 | |||
b6a14aec5f | |||
9a6e57517b | |||
f299ddd6b1 | |||
9278578069 | |||
93a346d353 | |||
fc122e1a40 | |||
974a63305e | |||
f7eac4f722 | |||
cf45862817 | |||
c71f989bb5 | |||
17fd00888a | |||
84208a4a8b | |||
075c754af0 | |||
9e0ba44faf | |||
60d0ecdaa1 | |||
edc67a6f5d | |||
5d3b65f96b | |||
ae94cf2d13 | |||
98e732fc34 | |||
89810fc423 | |||
d51024aee6 | |||
c579d6b3d6 | |||
9f86fb9326 | |||
60efb60018 | |||
44342a0efe | |||
8386b304b0 | |||
965ccdd1bd | |||
95fbc83387 | |||
aa698a49dd | |||
15d2c9fad4 | |||
d74e5a4dfc | |||
afa67b7743 | |||
72f1f2206e | |||
03c42a4510 | |||
8675406cea | |||
00b81636c5 | |||
65c4ae93b5 | |||
b8216ec917 | |||
09cd8f2ddf | |||
63bfc59823 | |||
277a49bce7 | |||
5cc50ad7a4 | |||
54e99644bf | |||
67f83cd497 | |||
70e608918e | |||
b805e3428e | |||
c289ebacd6 | |||
a2145faef9 |
@ -14,4 +14,7 @@
|
||||
(nxml-mode . (
|
||||
(indent-tabs-mode . nil)
|
||||
))
|
||||
(perl-mode . (
|
||||
(indent-tabs-mode . nil)
|
||||
))
|
||||
)
|
||||
|
30
.gitignore
vendored
30
.gitignore
vendored
@ -17,7 +17,9 @@
|
||||
*.rej
|
||||
*.s
|
||||
*~
|
||||
.#*
|
||||
.deps
|
||||
.gdb_history
|
||||
.git
|
||||
.git-module-status
|
||||
.libs
|
||||
@ -25,6 +27,7 @@
|
||||
.memdump
|
||||
.sc-start-sc_*
|
||||
/ABOUT-NLS
|
||||
/AUTHORS
|
||||
/COPYING
|
||||
/ChangeLog
|
||||
/GNUmakefile
|
||||
@ -53,12 +56,14 @@
|
||||
/daemon/libvirtd.8.in
|
||||
/daemon/libvirtd.init
|
||||
/daemon/libvirtd.pod
|
||||
/daemon/libvirtd.policy
|
||||
/daemon/libvirtd.service
|
||||
/daemon/test_libvirtd.aug
|
||||
/docs/apibuild.py.stamp
|
||||
/docs/devhelp/libvirt.devhelp
|
||||
/docs/hvsupport.html.in
|
||||
/docs/libvirt-api.xml
|
||||
/docs/libvirt-lxc-*.xml
|
||||
/docs/libvirt-qemu-*.xml
|
||||
/docs/libvirt-refs.xml
|
||||
/docs/search.php
|
||||
@ -88,11 +93,15 @@
|
||||
/python/generated.stamp
|
||||
/python/generator.py.stamp
|
||||
/python/libvirt-export.c
|
||||
/python/libvirt-lxc-export.c
|
||||
/python/libvirt-lxc.[ch]
|
||||
/python/libvirt-qemu-export.c
|
||||
/python/libvirt-qemu.[ch]
|
||||
/python/libvirt.[ch]
|
||||
/python/libvirt.py
|
||||
/python/libvirt_lxc.py
|
||||
/python/libvirt_qemu.py
|
||||
/run
|
||||
/sc_*
|
||||
/src/.*.stamp
|
||||
/src/esx/*.generated.*
|
||||
@ -103,12 +112,15 @@
|
||||
/src/libvirt_*helper
|
||||
/src/libvirt_*probes.h
|
||||
/src/libvirt_lxc
|
||||
/src/locking/lock_daemon_dispatch_stubs.h
|
||||
/src/locking/lock_protocol.[ch]
|
||||
/src/locking/qemu-lockd.conf
|
||||
/src/locking/qemu-sanlock.conf
|
||||
/src/locking/test_libvirt_sanlock.aug
|
||||
/src/lxc/lxc_controller_dispatch.h
|
||||
/src/lxc/lxc_monitor_dispatch.h
|
||||
/src/lxc/lxc_protocol.c
|
||||
/src/lxc/lxc_protocol.h
|
||||
/src/lxc/lxc_monitor_protocol.c
|
||||
/src/lxc/lxc_monitor_protocol.h
|
||||
/src/lxc/test_libvirtd_lxc.aug
|
||||
/src/qemu/test_libvirtd_qemu.aug
|
||||
/src/remote/*_client_bodies.h
|
||||
@ -118,8 +130,11 @@
|
||||
/src/test_libvirt*.aug
|
||||
/src/util/virkeymaps.h
|
||||
/src/virt-aa-helper
|
||||
/src/virtlockd
|
||||
/src/virtlockd.init
|
||||
/tests/*.log
|
||||
/tests/*.pid
|
||||
/tests/*.trs
|
||||
/tests/*xml2*test
|
||||
/tests/commandhelper
|
||||
/tests/commandtest
|
||||
@ -140,12 +155,14 @@
|
||||
/tests/openvzutilstest
|
||||
/tests/qemuargv2xmltest
|
||||
/tests/qemuhelptest
|
||||
/tests/qemumonitorjsontest
|
||||
/tests/qemumonitortest
|
||||
/tests/qemuxmlnstest
|
||||
/tests/qparamtest
|
||||
/tests/reconnect
|
||||
/tests/secaatest
|
||||
/tests/seclabeltest
|
||||
/tests/securityselinuxlabeltest
|
||||
/tests/securityselinuxtest
|
||||
/tests/sexpr2xmltest
|
||||
/tests/shunloadtest
|
||||
@ -153,15 +170,20 @@
|
||||
/tests/ssh
|
||||
/tests/statstest
|
||||
/tests/storagebackendsheepdogtest
|
||||
/tests/sysinfotest
|
||||
/tests/utiltest
|
||||
/tests/viratomictest
|
||||
/tests/virauthconfigtest
|
||||
/tests/virbitmaptest
|
||||
/tests/virbuftest
|
||||
/tests/virdrivermoduletest
|
||||
/tests/virhashtest
|
||||
/tests/virkeyfiletest
|
||||
/tests/virlockspacetest
|
||||
/tests/virnet*test
|
||||
/tests/virportallocatortest
|
||||
/tests/virshtest
|
||||
/tests/virstringtest
|
||||
/tests/virtimetest
|
||||
/tests/viruritest
|
||||
/tests/vmx2xmltest
|
||||
@ -170,6 +192,7 @@
|
||||
/tools/*.[18]
|
||||
/tools/libvirt-guests.init
|
||||
/tools/libvirt-guests.service
|
||||
/tools/libvirt-guests.sh
|
||||
/tools/virsh
|
||||
/tools/virsh-*-edit.c
|
||||
/tools/virt-*-validate
|
||||
@ -180,11 +203,14 @@ Makefile.in
|
||||
TAGS
|
||||
coverage
|
||||
cscope.files
|
||||
cscope.in.out
|
||||
cscope.out
|
||||
cscope.po.out
|
||||
results.log
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
stamp-h1
|
||||
tags
|
||||
!/gnulib/lib/Makefile.am
|
||||
!/gnulib/tests/Makefile.am
|
||||
!/m4/virt-*.m4
|
||||
|
2
.gnulib
2
.gnulib
Submodule .gnulib updated: 271dd74fdf...61c7b1e32e
17
.mailmap
17
.mailmap
@ -3,7 +3,6 @@
|
||||
# Email consolidation:
|
||||
# <Preferred address in AUTHORS> <other alias used by same author>
|
||||
|
||||
<amy.griffis@hp.com> <aron.griffis@hp.com>
|
||||
<bozzolan@gmail.com> <redshift@gmx.com>
|
||||
<charles_duffy@messageone.com> <charles@dyfis.net>
|
||||
<dfj@redhat.com> <dfj@dfj.bne.redhat.com>
|
||||
@ -33,6 +32,10 @@
|
||||
<josh.durgin@inktank.com> <josh.durgin@dreamhost.com>
|
||||
<gerd@egidy.de> <lists@egidy.de>
|
||||
<gerd@egidy.de> <gerd.von.egidy@intra2net.com>
|
||||
<benoar@dolka.fr> <benjamin.cama@telecom-bretagne.eu>
|
||||
<zhlcindy@linux.vnet.ibm.com> <zhlcindy@gmail.com>
|
||||
<serge.hallyn@canonical.com> <serue@us.ibm.com>
|
||||
<pritesh.kothari@sun.com> <Pritesh.Kothari@Sun.COM>
|
||||
|
||||
# Name consolidation:
|
||||
# Preferred author spelling <preferred email>
|
||||
@ -41,3 +44,15 @@ Royce Lv <lvroyce@linux.vnet.ibm.com>
|
||||
Daniel J Walsh <dwalsh@redhat.com>
|
||||
Ján Tomko <jtomko@redhat.com>
|
||||
Gerd von Egidy <gerd@egidy.de>
|
||||
MATSUDA Daiki <matsudadik@intellilink.co.jp>
|
||||
Tang Chen <tangchen@cn.fujitsu.com>
|
||||
Peng Zhou <ailvpeng25@gmail.com>
|
||||
Dirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
|
||||
Thibault VINCENT <thibault.vincent@smartjog.com>
|
||||
Aurelien Rougemont <beorn@binaries.fr>
|
||||
Serge E. Hallyn <serge.hallyn@canonical.com>
|
||||
Henrik Persson E <henrik.e.persson@ericsson.com>
|
||||
Philipp Hahn <hahn@univention.de>
|
||||
Marco Bozzolan <bozzolan@gmail.com>
|
||||
Marco Bozzolan <redshift@gmx.com>
|
||||
Pritesh Kothari <pritesh.kothari@sun.com>
|
||||
|
273
AUTHORS
273
AUTHORS
@ -1,273 +0,0 @@
|
||||
libvirt Authors
|
||||
===============
|
||||
|
||||
The libvirt project was initiated by:
|
||||
|
||||
Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
|
||||
|
||||
The primary maintainers and people with commit access rights:
|
||||
|
||||
Daniel Veillard <veillard@redhat.com>
|
||||
Daniel Berrange <berrange@redhat.com>
|
||||
Richard W.M. Jones <rjones@redhat.com>
|
||||
Mark McLoughlin <markmc@redhat.com>
|
||||
Anthony Liguori <aliguori@us.ibm.com>
|
||||
Jim Meyering <meyering@redhat.com>
|
||||
Jim Fehlig <jfehlig@suse.com>
|
||||
Chris Lalancette <clalance@redhat.com>
|
||||
Cole Robinson <crobinso@redhat.com>
|
||||
Guido Günther <agx@sigxcpu.org>
|
||||
John Levon <john.levon@sun.com>
|
||||
Matthias Bolte <matthias.bolte@googlemail.com>
|
||||
Jiří Denemark <jdenemar@redhat.com>
|
||||
Dave Allan <dallan@redhat.com>
|
||||
Laine Stump <laine@redhat.com>
|
||||
Stefan Berger <stefanb@us.ibm.com>
|
||||
Eric Blake <eblake@redhat.com>
|
||||
Justin Clift <jclift@redhat.com>
|
||||
Osier Yang <jyang@redhat.com>
|
||||
Wen Congyang <wency@cn.fujitsu.com>
|
||||
Michal Prívozník <mprivozn@redhat.com>
|
||||
Peter Krempa <pkrempa@redhat.com>
|
||||
Christophe Fergeau <cfergeau@redhat.com>
|
||||
Alex Jia <ajia@redhat.com>
|
||||
Martin Kletzander <mkletzan@redhat.com>
|
||||
|
||||
Previous maintainers:
|
||||
Karel Zak <kzak@redhat.com>
|
||||
Atsushi SAKAI <sakaia@jp.fujitsu.com>
|
||||
Dave Leskovec <dlesko@linux.vnet.ibm.com>
|
||||
Dan Smith <danms@us.ibm.com>
|
||||
|
||||
Patches have also been contributed by:
|
||||
|
||||
David Lutterkort <dlutter@redhat.com>
|
||||
Andrew Puch <apuch@redhat.com>
|
||||
Philippe Berthault <philippe.berthault@Bull.net>
|
||||
Hugh Brock <hbrock@redhat.com>
|
||||
Michel Ponceau <michel.ponceau@bull.net>
|
||||
Jeremy Katz <katzj@redhat.com>
|
||||
Pete Vetere <pvetere@redhat.com>
|
||||
Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
|
||||
Saori Fukuta <fukuta.saori@jp.fujitsu.com>
|
||||
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
|
||||
Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
||||
Nobuhiro Itou <fj0873gn@aa.jp.fujitsu.com>
|
||||
Masayuki Sunou <fj1826dm@aa.jp.fujitsu.com>
|
||||
Mark Johnson <johnson.nh@gmail.com>
|
||||
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
|
||||
Shuveb Hussain <shuveb@binarykarma.com>
|
||||
Jim Paris <jim@jtan.com>
|
||||
Daniel Hokka Zakrisson <daniel@hozac.com>
|
||||
Mads Chr. Olesen <shiyee@shiyee.dk>
|
||||
Anton Protopopov <aspsk2@gmail.com>
|
||||
Stefan de Konink <dekonink@kinkrsoftware.nl>
|
||||
Kaitlin Rupert <kaitlin@linux.vnet.ibm.com>
|
||||
Evgeniy Sokolov <evg@openvz.org>
|
||||
David Lively <dlively@virtualiron.com>
|
||||
Charles Duffy <Charles_Duffy@messageone.com>
|
||||
Nguyen Anh Quynh <aquynh@gmail.com>
|
||||
James Morris <jmorris@namei.org>
|
||||
Chris Wright <chrisw@redhat.com>
|
||||
Ben Guthro <ben.guthro@gmail.com>
|
||||
Shigeki Sakamoto <fj0588di@aa.jp.fujitsu.com>
|
||||
Gerd von Egidy <gerd@egidy.de>
|
||||
Itamar Heim <iheim@redhat.com>
|
||||
Markus Armbruster <armbru@redhat.com>
|
||||
Ryota Ozaki <ozaki.ryota@gmail.com>
|
||||
Daniel J Walsh <dwalsh@redhat.com>
|
||||
Maximilian Wilhelm <max@rfc2324.org>
|
||||
Pritesh Kothari <Pritesh.Kothari@Sun.COM>
|
||||
Amit Shah <amit.shah@redhat.com>
|
||||
Florian Vichot <florian.vichot@diateam.net>
|
||||
Serge E. Hallyn <serue@us.ibm.com>
|
||||
Soren Hansen <soren@linux2go.dk>
|
||||
Abel Míguez Rodríguez<amiguezr@pdi.ucm.es>
|
||||
Doug Goldstein <cardoe@cardoe.com>
|
||||
Javier Fontan <jfontan@gmail.com>
|
||||
Federico Simoncelli <fsimonce@redhat.com>
|
||||
Amy Griffis <amy.griffis@hp.com>
|
||||
Henrik Persson E <henrik.e.persson@ericsson.com>
|
||||
Satoru SATOH <satoru.satoh@gmail.com>
|
||||
Paolo Bonzini <pbonzini@redhat.com>
|
||||
Miloslav Trmač <mitr@redhat.com>
|
||||
Jamie Strandboge <jamie@canonical.com>
|
||||
Gerhard Stenzel <gerhard.stenzel@de.ibm.com>
|
||||
Matthew Booth <mbooth@redhat.com>
|
||||
Diego Elio Pettenò <flameeyes@gmail.com>
|
||||
Adam Litke <agl@us.ibm.com>
|
||||
Steve Yarmie <steve.yarmie@gmail.com>
|
||||
Dan Kenigsberg <danken@redhat.com>
|
||||
Yuji NISHIDA <nishidy@nict.go.jp>
|
||||
Dustin Xiong <x_k_123@hotmail.com>
|
||||
Rolf Eike Beer <eike@sf-mail.de>
|
||||
Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
|
||||
Philipp Hahn <hahn@univention.de>
|
||||
Ed Swierk <eswierk@aristanetworks.com>
|
||||
Paolo Smiraglia <paolo.smiraglia@gmail.com>
|
||||
Sharadha Prabhakar <sharadha.prabhakar@citrix.com>
|
||||
Chris Wong <wongc-redhat@hoku.net>
|
||||
Daniel Berteaud <daniel@firewall-services.com>
|
||||
Dustin Kirkland <kirkland@canonical.com>
|
||||
Luiz Capitulino <lcapitulino@redhat.com>
|
||||
Ryan Harper <ryanh@us.ibm.com>
|
||||
Spencer Shimko <sshimko@tresys.com>
|
||||
Marco Bozzolan <bozzolan@gmail.com>
|
||||
Alex Williamson <alex.williamson@redhat.com>
|
||||
Ersek Laszlo <lacos@caesar.elte.hu>
|
||||
Kenneth Nagin <NAGIN@il.ibm.com>
|
||||
Klaus Ethgen <Klaus@Ethgen.de>
|
||||
Bryan Kearney <bkearney@redhat.com>
|
||||
Darry L. Pierce <dpierce@redhat.com>
|
||||
David Jorm <dfj@redhat.com>
|
||||
Eduardo Otubo <otubo@linux.vnet.ibm.com>
|
||||
Garry Dolley <gdolley@arpnetworks.com>
|
||||
Harshavardhana <harsha@gluster.com>
|
||||
Jonas Eriksson <jonas.j.eriksson@ericsson.com>
|
||||
Jun Koi <junkoi2004@gmail.com>
|
||||
Olivier Fourdan <ofourdan@redhat.com>
|
||||
Ron Yorston <rmy@tigress.co.uk>
|
||||
Shahar Klein <shaharklein@yahoo.com>
|
||||
Taizo ITO <taizo.ito@hde.co.jp>
|
||||
Thomas Treutner <thomas@scripty.at>
|
||||
Jean-Baptiste Rouault <jean-baptiste.rouault@diateam.net>
|
||||
Марк Коренберг <socketpair@gmail.com>
|
||||
Alan Pevec <apevec@redhat.com>
|
||||
Aurelien Rougemont <beorn@binaries.fr>
|
||||
Patrick Dignan <pat_dignan@dell.com>
|
||||
Serge Hallyn <serge.hallyn@canonical.com>
|
||||
Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
|
||||
Lai Jiangshan <laijs@cn.fujitsu.com>
|
||||
Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
|
||||
John Morrissey <jwm@horde.net>
|
||||
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
|
||||
Hu Tao <hutao@cn.fujitsu.com>
|
||||
Laurent Léonard <laurent@open-minds.org>
|
||||
MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
|
||||
Josh Durgin <josh.durgin@inktank.com>
|
||||
Roopa Prabhu <roprabhu@cisco.com>
|
||||
Paweł Krześniak <pawel.krzesniak@gmail.com>
|
||||
Kay Schubert <kayegypt@web.de>
|
||||
Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
Juerg Haefliger <juerg.haefliger@hp.com>
|
||||
Matthias Dahl <mdvirt@designassembly.de>
|
||||
Niels de Vos <ndevos@redhat.com>
|
||||
Davidlohr Bueso <dave@gnu.org>
|
||||
Alon Levy <alevy@redhat.com>
|
||||
Hero Phương <herophuong93@gmail.com>
|
||||
Zdenek Styblik <stybla@turnovfree.net>
|
||||
Gui Jianfeng <guijianfeng@cn.fujitsu.com>
|
||||
Michal Novotny <minovotn@redhat.com>
|
||||
Markus Groß <gross@univention.de>
|
||||
Phil Petty <phpetty@cisco.com>
|
||||
Taku Izumi <izumi.taku@jp.fujitsu.com>
|
||||
Minoru Usui <usui@mxm.nes.nec.co.jp>
|
||||
Tiziano Mueller <dev-zero@gentoo.org>
|
||||
Thibault VINCENT <thibault.vincent@smartjog.com>
|
||||
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
|
||||
Jesse Cook <code.crashenx@gmail.com>
|
||||
Alexander Todorov <atodorov@otb.bg>
|
||||
Richard Laager <rlaager@wiktel.com>
|
||||
Mark Wu <dwu@redhat.com>
|
||||
Yufang Zhang <yuzhang@redhat.com>
|
||||
Supriya Kannery <supriyak@linux.vnet.ibm.com>
|
||||
Dirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
|
||||
Taisuke Yamada <tai@rakugaki.org>
|
||||
Heath Petersen <HeathPetersen@Kandre.com>
|
||||
Neil Wilson <neil@aldur.co.uk>
|
||||
Ohad Levy <ohadlevy@gmail.com>
|
||||
Michael Chapman <mike@very.puzzling.org>
|
||||
Daniel Gollub <gollub@b1-systems.de>
|
||||
David S. Wang <dwang2@cisco.com>
|
||||
Ruben Kerkhof <ruben@rubenkerkhof.com>
|
||||
Scott Moser <smoser@ubuntu.com>
|
||||
Guannan Ren <gren@redhat.com>
|
||||
John Williams <john.williams@petalogix.com>
|
||||
Michael Santos <michael.santos@gmail.com>
|
||||
Oskari Saarenmaa <os@ohmu.fi>
|
||||
Nan Zhang <nzhang@redhat.com>
|
||||
Wieland Hoffmann <themineo@googlemail.com>
|
||||
Douglas Schilling Landgraf <dougsland@redhat.com>
|
||||
Tom Vijlbrief <tom.vijlbrief@xs4all.nl>
|
||||
Shradha Shah <sshah@solarflare.com>
|
||||
Steve Hodgson <shodgson@solarflare.com>
|
||||
Xu He Jie <xuhj@linux.vnet.ibm.com>
|
||||
Lei Li <lilei@linux.vnet.ibm.com>
|
||||
Matthias Witte <witte@netzquadrat.de>
|
||||
Tang Chen <tangchen@cn.fujitsu.com>
|
||||
Dan Horák <dan@danny.cz>
|
||||
Sage Weil <sage@newdream.net>
|
||||
David L Stevens <dlstevens@us.ibm.com>
|
||||
Tyler Coumbes <coumbes@gmail.com>
|
||||
Royce Lv <lvroyce@linux.vnet.ibm.com>
|
||||
Patrice LACHANCE <patlachance@gmail.com>
|
||||
Eli Qiao <taget@linux.vnet.ibm.com>
|
||||
Michael Wood <esiotrot@gmail.com>
|
||||
Bharata B Rao <bharata@linux.vnet.ibm.com>
|
||||
Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
|
||||
Chang Liu <lingjiao.lc@taobao.com>
|
||||
Lorin Hochstein <lorin@isi.edu>
|
||||
Christian Franke <nobody@nowhere.ws>
|
||||
Prerna Saxena <prerna@linux.vnet.ibm.com>
|
||||
Michael Ellerman <michael@ellerman.id.au>
|
||||
Rommer <rommer@active.by>
|
||||
Yuri Chornoivan <yurchor@ukr.net>
|
||||
Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
|
||||
Laszlo Ersek <lersek@redhat.com>
|
||||
Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
|
||||
Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
|
||||
Hendrik Schwartke <hendrik@os-t.de>
|
||||
Ansis Atteka <aatteka@nicira.com>
|
||||
Dan Wendlandt <dan@nicira.com>
|
||||
Kyle Mestery <kmestery@cisco.com>
|
||||
Lincoln Myers <lincoln_myers@yahoo.com>
|
||||
Peter Robinson <pbrobinson@gmail.com>
|
||||
Benjamin Cama <benoar@dolka.fr>
|
||||
Duncan Rance <libvirt@dunquino.com>
|
||||
Peng Zhou <ailvpeng25@gmail.com>
|
||||
Li Zhang <zhlcindy@linux.vnet.ibm.com>
|
||||
Stef Walter <stefw@gnome.org>
|
||||
Christian Benvenuti <benve@cisco.com>
|
||||
Ilja Livenson <ilja.livenson@gmail.com>
|
||||
Stefan Bader <stefan.bader@canonical.com>
|
||||
MATSUDA Daiki <matsudadik@intellilink.co.jp>
|
||||
Jan Kiszka <jan.kiszka@siemens.com>
|
||||
Ryan Woodsmall <rwoodsmall@gmail.com>
|
||||
Wido den Hollander <wido@widodh.nl>
|
||||
Eugen Feller <eugen.feller@inria.fr>
|
||||
Dmitry Guryanov <dguryanov@parallels.com>
|
||||
William Jon McCann <william.jon.mccann@gmail.com>
|
||||
David Weber <wb@munzinger.de>
|
||||
Marti Raudsepp <marti@juffo.org>
|
||||
Radu Caragea <dmns_serp@yahoo.com>
|
||||
Beat Jörg <Beat.Joerg@ssatr.ch>
|
||||
Gao feng <gaofeng@cn.fujitsu.com>
|
||||
Dipankar Sarma <dipankar@in.ibm.com>
|
||||
Gerd Hoffmann <kraxel@redhat.com>
|
||||
Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
|
||||
Thang Pham <thang.pham@us.ibm.com>
|
||||
Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com>
|
||||
Sascha Peilicke <saschpe@suse.de>
|
||||
Chuck Short <chuck.short@canonical.com>
|
||||
Sebastian Wiedenroth <wiedi@frubar.net>
|
||||
Ata E Husain Bohra <ata.husain@hotmail.com>
|
||||
Ján Tomko <jtomko@redhat.com>
|
||||
Richa Marwaha <rmarwah@linux.vnet.ibm.com>
|
||||
Peter Feiner <peter@gridcentric.ca>
|
||||
Frido Roose <frido.roose@gmail.com>
|
||||
Asad Saeed <asad.saeed@acidseed.com>
|
||||
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
|
||||
Thomas Woerner <twoerner@redhat.com>
|
||||
J.B. Joret <jb@linux.vnet.ibm.com>
|
||||
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
|
||||
Gene Czarcinski <gene@czarc.net>
|
||||
Nishank Trivedi <nistrive@cisco.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
The libvirt Logo was designed by Diana Fong
|
||||
|
||||
-- End
|
||||
;; Local Variables:
|
||||
;; coding: utf-8
|
||||
;; End:
|
92
AUTHORS.in
Normal file
92
AUTHORS.in
Normal file
@ -0,0 +1,92 @@
|
||||
libvirt Authors
|
||||
===============
|
||||
|
||||
The libvirt project was initiated by:
|
||||
|
||||
Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
|
||||
|
||||
The primary maintainers and people with commit access rights:
|
||||
|
||||
Alex Jia <ajia@redhat.com>
|
||||
Anthony Liguori <aliguori@us.ibm.com>
|
||||
Chris Lalancette <clalance@redhat.com>
|
||||
Christophe Fergeau <cfergeau@redhat.com>
|
||||
Claudio Bley <cbley@av-test.de>
|
||||
Cole Robinson <crobinso@redhat.com>
|
||||
Daniel Berrange <berrange@redhat.com>
|
||||
Daniel Veillard <veillard@redhat.com>
|
||||
Dave Allan <dallan@redhat.com>
|
||||
Doug Goldstein <cardoe@gentoo.org>
|
||||
Eric Blake <eblake@redhat.com>
|
||||
Guannan Ren <gren@redhat.com>
|
||||
Guido Günther <agx@sigxcpu.org>
|
||||
Ján Tomko <jtomko@redhat.com>
|
||||
Jim Fehlig <jfehlig@suse.com>
|
||||
Jim Meyering <meyering@redhat.com>
|
||||
Jiří Denemark <jdenemar@redhat.com>
|
||||
John Levon <john.levon@sun.com>
|
||||
Justin Clift <jclift@redhat.com>
|
||||
Laine Stump <laine@redhat.com>
|
||||
Mark McLoughlin <markmc@redhat.com>
|
||||
Martin Kletzander <mkletzan@redhat.com>
|
||||
Matthias Bolte <matthias.bolte@googlemail.com>
|
||||
Michal Prívozník <mprivozn@redhat.com>
|
||||
Osier Yang <jyang@redhat.com>
|
||||
Peter Krempa <pkrempa@redhat.com>
|
||||
Richard W.M. Jones <rjones@redhat.com>
|
||||
Stefan Berger <stefanb@us.ibm.com>
|
||||
Wen Congyang <wency@cn.fujitsu.com>
|
||||
|
||||
Previous maintainers:
|
||||
|
||||
Atsushi SAKAI <sakaia@jp.fujitsu.com>
|
||||
Dan Smith <danms@us.ibm.com>
|
||||
Dave Leskovec <dlesko@linux.vnet.ibm.com>
|
||||
Karel Zak <kzak@redhat.com>
|
||||
|
||||
Patches have also been contributed by:
|
||||
|
||||
Abel Míguez Rodríguez <amiguezr@pdi.ucm.es>
|
||||
Amit Shah <amit.shah@redhat.com>
|
||||
Andrew Puch <apuch@redhat.com>
|
||||
Anton Protopopov <aspsk2@gmail.com>
|
||||
Ben Guthro <ben.guthro@gmail.com>
|
||||
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
|
||||
Daniel Hokka Zakrisson <daniel@hozac.com>
|
||||
Dan Wendlandt <dan@nicira.com>
|
||||
David Lively <dlively@virtualiron.com>
|
||||
David Lutterkort <dlutter@redhat.com>
|
||||
Evgeniy Sokolov <evg@openvz.org>
|
||||
Hugh Brock <hbrock@redhat.com>
|
||||
Itamar Heim <iheim@redhat.com>
|
||||
James Morris <jmorris@namei.org>
|
||||
Javier Fontan <jfontan@gmail.com>
|
||||
Jeremy Katz <katzj@redhat.com>
|
||||
Kaitlin Rupert <kaitlin@linux.vnet.ibm.com>
|
||||
Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
|
||||
Mads Chr. Olesen <shiyee@shiyee.dk>
|
||||
Mark Johnson <johnson.nh@gmail.com>
|
||||
Markus Armbruster <armbru@redhat.com>
|
||||
Masayuki Sunou <fj1826dm@aa.jp.fujitsu.com>
|
||||
Matthias Witte <witte@netzquadrat.de>
|
||||
Michel Ponceau <michel.ponceau@bull.net>
|
||||
Nobuhiro Itou <fj0873gn@aa.jp.fujitsu.com>
|
||||
Pete Vetere <pvetere@redhat.com>
|
||||
Philippe Berthault <philippe.berthault@Bull.net>
|
||||
Saori Fukuta <fukuta.saori@jp.fujitsu.com>
|
||||
Shigeki Sakamoto <fj0588di@aa.jp.fujitsu.com>
|
||||
Shuveb Hussain <shuveb@binarykarma.com>
|
||||
Stefan de Konink <dekonink@kinkrsoftware.nl>
|
||||
Takahashi Tomohiro <takatom@jp.fujitsu.com>
|
||||
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
|
||||
|
||||
#authorslist#
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
The libvirt logo was designed by Diana Fong
|
||||
|
||||
-- End
|
||||
;; Local Variables:
|
||||
;; coding: utf-8
|
||||
;; End:
|
100
HACKING
100
HACKING
@ -1,5 +1,6 @@
|
||||
-*- buffer-read-only: t -*- vi: set ro:
|
||||
DO NOT EDIT THIS FILE! IT IS GENERATED AUTOMATICALLY!
|
||||
DO NOT EDIT THIS FILE! IT IS GENERATED AUTOMATICALLY
|
||||
from docs/hacking.html.in!
|
||||
|
||||
|
||||
|
||||
@ -13,7 +14,12 @@ General tips for contributing patches
|
||||
(1) Discuss any large changes on the mailing list first. Post patches early and
|
||||
listen to feedback.
|
||||
|
||||
(2) Post patches in unified diff format. A command similar to this should work:
|
||||
(2) Post patches in unified diff format, with git rename detection enabled. You
|
||||
need a one-time setup of:
|
||||
|
||||
git config diff.renames true
|
||||
|
||||
After that, a command similar to this should work:
|
||||
|
||||
diff -urp libvirt.orig/ libvirt.modified/ > libvirt-myfeature.patch
|
||||
|
||||
@ -21,7 +27,9 @@ or:
|
||||
|
||||
git diff > libvirt-myfeature.patch
|
||||
|
||||
However, the usual workflow of libvirt developer is:
|
||||
Also, for code motion patches, you may find that "git diff --patience"
|
||||
provides an easier-to-read patch. However, the usual workflow of libvirt
|
||||
developer is:
|
||||
|
||||
git checkout master
|
||||
git pull
|
||||
@ -32,11 +40,15 @@ Then, when you want to post your patches:
|
||||
|
||||
git pull --rebase
|
||||
(fix any conflicts)
|
||||
git send-email --cover-letter --no-chain-reply-to --annotate --to=libvir-list@redhat.com master
|
||||
git send-email --cover-letter --no-chain-reply-to --annotate \
|
||||
--to=libvir-list@redhat.com master
|
||||
|
||||
For a single patch you can omit "--cover-letter", but series of a two or more
|
||||
patches needs a cover letter. If you get tired of typing
|
||||
"--to=libvir-list@redhat.com" designation you can set it in git config:
|
||||
(Note that the "git send-email" subcommand may not be in the main git package
|
||||
and using it may require installion of a separate package, for example the
|
||||
"git-email" package in Fedora.) For a single patch you can omit
|
||||
"--cover-letter", but a series of two or more patches needs a cover letter. If
|
||||
you get tired of typing "--to=libvir-list@redhat.com" designation you can set
|
||||
it in git config:
|
||||
|
||||
git config sendemail.to libvir-list@redhat.com
|
||||
|
||||
@ -53,22 +65,37 @@ though).
|
||||
|
||||
|
||||
|
||||
(3) Split large changes into a series of smaller patches, self-contained if
|
||||
(3) In your commit message, make the summary line reasonably short (60 characters
|
||||
is typical), followed by a blank line, followed by any longer description of
|
||||
why your patch makes sense. If the patch fixes a regression, and you know what
|
||||
commit introduced the problem, mentioning that is useful. If the patch
|
||||
resolves a bugzilla report, mentioning the URL of the bug number is useful;
|
||||
but also summarize the issue rather than making all readers follow the link.
|
||||
You can use 'git shortlog -30' to get an idea of typical summary lines.
|
||||
Libvirt does not currently attach any meaning to Signed-off-by: lines, so it
|
||||
is up to you if you want to include or omit them in the commit message.
|
||||
|
||||
|
||||
|
||||
(4) Split large changes into a series of smaller patches, self-contained if
|
||||
possible, with an explanation of each patch and an explanation of how the
|
||||
sequence of patches fits together. Moreover, please keep in mind that it's
|
||||
required to be able to compile cleanly after each patch. A feature does not
|
||||
have to work until the end of a series, as long as intermediate patches don't
|
||||
cause test-suite failures.
|
||||
required to be able to compile cleanly (*including* "make check" and "make
|
||||
syntax-check") after each patch. A feature does not have to work until the end
|
||||
of a series, but intermediate patches must compile and not cause test-suite
|
||||
failures (this is to preserve the usefulness of "git bisect", among other
|
||||
things).
|
||||
|
||||
|
||||
|
||||
(4) Make sure your patches apply against libvirt GIT. Developers only follow GIT
|
||||
(5) Make sure your patches apply against libvirt GIT. Developers only follow GIT
|
||||
and don't care much about released versions.
|
||||
|
||||
(5) Run the automated tests on your code before submitting any changes. In
|
||||
particular, configure with compile warnings set to -Werror:
|
||||
(6) Run the automated tests on your code before submitting any changes. In
|
||||
particular, configure with compile warnings set to -Werror. This is done
|
||||
automatically for a git checkout; from a tarball, use:
|
||||
|
||||
./configure --enable-compile-warnings=error
|
||||
./configure --enable-werror
|
||||
|
||||
and run the tests:
|
||||
|
||||
@ -89,7 +116,13 @@ Also, individual tests can be run from inside the "tests/" directory, like:
|
||||
|
||||
./qemuxml2xmltest
|
||||
|
||||
(6) Update tests and/or documentation, particularly if you are adding a new
|
||||
There is also a "./run" script at the top level, to make it easier to run
|
||||
programs that have not yet been installed, as well as to wrap invocations of
|
||||
various tests under gdb or valgrind.
|
||||
|
||||
|
||||
|
||||
(7) Update tests and/or documentation, particularly if you are adding a new
|
||||
feature or changing the output of a program.
|
||||
|
||||
|
||||
@ -171,6 +204,37 @@ otherwise. For example, it is preferable to use "/* */" comments rather than
|
||||
declare them at the beginning of a scope, rather than immediately before use.
|
||||
|
||||
|
||||
Bracket spacing
|
||||
===============
|
||||
The keywords "if", "for", "while", and "switch" must have a single space
|
||||
following them before the opening bracket. E.g.
|
||||
|
||||
if(foo) // Bad
|
||||
if (foo) // Good
|
||||
|
||||
Function implementations mustnothave any whitespace between the function name and the opening bracket. E.g.
|
||||
|
||||
int foo (int wizz) // Bad
|
||||
int foo(int wizz) // Good
|
||||
|
||||
Function calls mustnothave any whitespace between the function name and the opening bracket. E.g.
|
||||
|
||||
bar = foo (wizz); // Bad
|
||||
bar = foo(wizz); // Good
|
||||
|
||||
Function typedefs mustnothave any whitespace between the closing bracket of the function name and
|
||||
opening bracket of the arg list. E.g.
|
||||
|
||||
typedef int (*foo) (int wizz); // Bad
|
||||
typedef int (*foo)(int wizz); // Good
|
||||
|
||||
There must not be any whitespace immediately following any opening bracket, or
|
||||
immediately prior to any closing bracket. E.g.
|
||||
|
||||
int foo( int wizz ); // Bad
|
||||
int foo(int wizz); // Good
|
||||
|
||||
|
||||
Curly braces
|
||||
============
|
||||
Omit the curly braces around an "if", "while", "for" etc. body only when that
|
||||
@ -453,7 +517,7 @@ File handling
|
||||
=============
|
||||
Usage of the "fdopen()", "close()", "fclose()" APIs is deprecated in libvirt
|
||||
code base to help avoiding double-closing of files or file descriptors, which
|
||||
is particulary dangerous in a multi-threaded applications. Instead of these
|
||||
is particularly dangerous in a multi-threaded application. Instead of these
|
||||
APIs, use the macros from virfile.h
|
||||
|
||||
- Open a file from a file descriptor:
|
||||
@ -625,7 +689,7 @@ stick to the following general plan for all *.c source files:
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if HAVE_NUMACTL Some system includes aren't supported
|
||||
#if WITH_NUMACTL Some system includes aren't supported
|
||||
# include <numa.h> everywhere so need these #if guards.
|
||||
#endif
|
||||
|
||||
|
25
Makefile.am
25
Makefile.am
@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Copyright (C) 2005-2011 Red Hat, Inc.
|
||||
## Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
LCOV = lcov
|
||||
@ -27,26 +27,28 @@ EXTRA_DIST = \
|
||||
autogen.sh \
|
||||
cfg.mk \
|
||||
examples/domain-events/events-python \
|
||||
run.in \
|
||||
AUTHORS.in \
|
||||
$(XML_EXAMPLES)
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libvirt.pc
|
||||
|
||||
NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html.in
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
|
||||
$(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl \
|
||||
$(top_srcdir)/docs/news.html.in \
|
||||
| perl -0777 -pe 's/\n\n+$$/\n/' \
|
||||
| perl -pe 's/[ \t]+$$//' \
|
||||
> $@-t && mv $@-t $@ ; fi );
|
||||
> $@-t && mv $@-t $@ ; fi
|
||||
|
||||
$(top_srcdir)/HACKING: $(top_srcdir)/docs/hacking1.xsl $(top_srcdir)/docs/hacking2.xsl \
|
||||
$(top_srcdir)/docs/wrapstring.xsl $(top_srcdir)/docs/hacking.html.in
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
|
||||
$(XSLTPROC) --nonet $(top_srcdir)/docs/hacking1.xsl $(top_srcdir)/docs/hacking.html.in | \
|
||||
$(XSLTPROC) --nonet $(top_srcdir)/docs/hacking2.xsl - \
|
||||
| perl -0777 -pe 's/\n\n+$$/\n/' \
|
||||
> $@-t && mv $@-t $@ ; fi );
|
||||
> $@-t && mv $@-t $@ ; fi;
|
||||
|
||||
rpm: clean
|
||||
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
|
||||
@ -77,16 +79,25 @@ MAINTAINERCLEANFILES = .git-module-status
|
||||
# disable this check
|
||||
distuninstallcheck:
|
||||
|
||||
dist-hook: gen-ChangeLog
|
||||
dist-hook: gen-ChangeLog gen-AUTHORS
|
||||
|
||||
# Generate the ChangeLog file (with all entries since the switch to git)
|
||||
# and insert it into the directory we're about to use to create a tarball.
|
||||
gen_start_date = 2009-07-04
|
||||
.PHONY: gen-ChangeLog
|
||||
gen-ChangeLog:
|
||||
if test -d .git; then \
|
||||
$(AM_V_GEN)if test -d .git; then \
|
||||
$(top_srcdir)/build-aux/gitlog-to-changelog \
|
||||
--since=$(gen_start_date) > $(distdir)/cl-t; \
|
||||
rm -f $(distdir)/ChangeLog; \
|
||||
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
||||
fi
|
||||
|
||||
.PHONY: gen-AUTHORS
|
||||
gen-AUTHORS:
|
||||
$(AM_V_GEN)if test -d $(srcdir)/.git; then \
|
||||
out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u`" && \
|
||||
perl -p -e "s/#authorslist#// and print '$$out'" \
|
||||
< $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
|
||||
mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
|
||||
fi
|
||||
|
22
autogen.sh
22
autogen.sh
@ -1,6 +1,8 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
set -e
|
||||
|
||||
srcdir=`dirname "$0"`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
@ -59,13 +61,27 @@ bootstrap_hash()
|
||||
# the required file po/Makevars.
|
||||
# Only run bootstrap from a git checkout, never from a tarball.
|
||||
if test -d .git; then
|
||||
curr_status=.git-module-status
|
||||
t=$(bootstrap_hash; git diff .gnulib)
|
||||
curr_status=.git-module-status t=
|
||||
if test -d .gnulib; then
|
||||
t=$(bootstrap_hash; git diff .gnulib)
|
||||
fi
|
||||
case $t:${CLEAN_SUBMODULE+set} in
|
||||
*:set) ;;
|
||||
*-dirty*)
|
||||
echo "error: gnulib submodule is dirty, please investigate" 2>&1
|
||||
echo "set env-var CLEAN_SUBMODULE to discard gnulib changes" 2>&1
|
||||
exit 1 ;;
|
||||
esac
|
||||
# Keep this test in sync with cfg.mk:_update_required
|
||||
if test "$t" = "$(cat $curr_status 2>/dev/null)" \
|
||||
&& test -f "po/Makevars"; then
|
||||
&& test -f "po/Makevars" && test -f AUTHORS; then
|
||||
# good, it's up to date, all we need is autoreconf
|
||||
autoreconf -if
|
||||
else
|
||||
if test ${CLEAN_SUBMODULE+set}; then
|
||||
echo cleaning up submodules...
|
||||
git submodule foreach 'git clean -dfqx && git reset --hard'
|
||||
fi
|
||||
echo running bootstrap$no_git...
|
||||
./bootstrap$no_git --bootstrap-sync && bootstrap_hash > $curr_status \
|
||||
|| { echo "Failed to bootstrap, please investigate."; exit 1; }
|
||||
|
17
bootstrap
17
bootstrap
@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2012-07-19.14; # UTC
|
||||
scriptversion=2012-12-28.10; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -889,20 +889,21 @@ find "$m4_base" "$source_base" \
|
||||
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
||||
-type l -xtype l -delete > /dev/null 2>&1
|
||||
|
||||
# Invoke autoreconf with --force --install to ensure upgrades of tools
|
||||
# such as ylwrap.
|
||||
AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS"
|
||||
|
||||
# Some systems (RHEL 5) are using ancient autotools, for which the
|
||||
# --no-recursive option had not been invented. Detect that lack and
|
||||
# omit the option when it's not supported. FIXME in 2017: remove this
|
||||
# hack when RHEL 5 autotools are updated, or when they become irrelevant.
|
||||
no_recursive=
|
||||
case $($AUTORECONF --help) in
|
||||
*--no-recursive*) no_recursive=--no-recursive;;
|
||||
*--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";;
|
||||
esac
|
||||
|
||||
# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
|
||||
echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
|
||||
"$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS"
|
||||
AUTOPOINT=true LIBTOOLIZE=true \
|
||||
$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \
|
||||
echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
|
||||
AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \
|
||||
|| die "autoreconf failed"
|
||||
|
||||
# Get some extra files from gnulib, overriding existing files.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2010-2012 Red Hat, Inc.
|
||||
# Copyright (C) 2010-2013 Red Hat, Inc.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
@ -13,13 +13,14 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, see
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
# gnulib modules used by this package.
|
||||
gnulib_modules='
|
||||
accept
|
||||
areadlink
|
||||
autobuild
|
||||
base64
|
||||
bind
|
||||
bitrotate
|
||||
@ -30,18 +31,22 @@ c-strcasestr
|
||||
calloc-posix
|
||||
canonicalize-lgpl
|
||||
chown
|
||||
clock-time
|
||||
close
|
||||
connect
|
||||
configmake
|
||||
count-one-bits
|
||||
crypto/md5
|
||||
crypto/sha256
|
||||
dirname-lgpl
|
||||
environ
|
||||
execinfo
|
||||
fclose
|
||||
fcntl
|
||||
fcntl-h
|
||||
fdatasync
|
||||
ffs
|
||||
ffsl
|
||||
fnmatch
|
||||
fsync
|
||||
func
|
||||
@ -66,9 +71,10 @@ listen
|
||||
localeconv
|
||||
maintainer-makefile
|
||||
manywarnings
|
||||
mkstemp
|
||||
mkstemps
|
||||
mkostemp
|
||||
mkostemps
|
||||
mktempd
|
||||
net_if
|
||||
netdb
|
||||
nonblocking
|
||||
openpty
|
||||
@ -219,8 +225,8 @@ if `(${PYTHON_CONFIG-python-config} --version;
|
||||
PYTHON_CONFIG=true
|
||||
fi
|
||||
|
||||
# Automake requires that ChangeLog exist.
|
||||
touch ChangeLog || exit 1
|
||||
# Automake requires that ChangeLog and AUTHORS exist.
|
||||
touch AUTHORS ChangeLog || exit 1
|
||||
|
||||
# Override bootstrap's list - we don't use mdate-sh or texinfo.tex.
|
||||
gnulib_extra_files="
|
||||
|
@ -14,7 +14,7 @@
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, see
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Authors:
|
||||
|
116
build-aux/bracket-spacing.pl
Executable file
116
build-aux/bracket-spacing.pl
Executable file
@ -0,0 +1,116 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# bracket-spacing.pl: Report any usage of 'function (..args..)'
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Authors:
|
||||
# Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $ret = 0;
|
||||
my $incomment = 0;
|
||||
|
||||
foreach my $file (@ARGV) {
|
||||
open FILE, $file;
|
||||
|
||||
while (defined (my $line = <FILE>)) {
|
||||
my $data = $line;
|
||||
|
||||
# Kill any quoted strongs
|
||||
$data =~ s,".*?","XXX",g;
|
||||
|
||||
# Kill any C++ style comments
|
||||
$data =~ s,//.*$,//,;
|
||||
|
||||
next if $data =~ /^#/;
|
||||
|
||||
# Kill contents of multi-line comments
|
||||
# and detect end of multi-line comments
|
||||
if ($incomment) {
|
||||
if ($data =~ m,\*/,) {
|
||||
$incomment = 0;
|
||||
$data =~ s,^.*\*/,*/,;
|
||||
} else {
|
||||
$data = "";
|
||||
}
|
||||
}
|
||||
|
||||
# Kill single line comments, and detect
|
||||
# start of multi-line comments
|
||||
if ($data =~ m,/\*.*\*/,) {
|
||||
$data =~ s,/\*.*\*/,/* */,;
|
||||
} elsif ($data =~ m,/\*,) {
|
||||
$incomment = 1;
|
||||
$data =~ s,/\*.*,/*,;
|
||||
}
|
||||
|
||||
# We need to match things like
|
||||
#
|
||||
# int foo (int bar, bool wizz);
|
||||
# foo (bar, wizz);
|
||||
#
|
||||
# but not match things like:
|
||||
#
|
||||
# typedef int (*foo)(bar wizz)
|
||||
#
|
||||
# we can't do this (efficiently) without
|
||||
# missing things like
|
||||
#
|
||||
# foo (*bar, wizz);
|
||||
#
|
||||
while ($data =~ /(\w+)\s\((?!\*)/) {
|
||||
my $kw = $1;
|
||||
|
||||
# Allow space after keywords only
|
||||
if ($kw =~ /^(if|for|while|switch|return)$/) {
|
||||
$data =~ s/($kw\s\()/XXX(/;
|
||||
} else {
|
||||
print "$file:$.: $line";
|
||||
$ret = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
# Require whitespace immediately after keywords,
|
||||
# but none after the opening bracket
|
||||
while ($data =~ /(if|for|while|switch|return)\(/ ||
|
||||
$data =~ /(if|for|while|switch|return)\s+\(\s/) {
|
||||
print "$file:$.: $line";
|
||||
$ret = 1;
|
||||
last;
|
||||
}
|
||||
|
||||
# Forbid whitespace between )( of a function typedef
|
||||
while ($data =~ /\(\*\w+\)\s+\(/) {
|
||||
print "$file:$.: $line";
|
||||
$ret = 1;
|
||||
last;
|
||||
}
|
||||
|
||||
# Forbid whitespace following ( or prior to )
|
||||
while ($data =~ /\S\s+\)/ ||
|
||||
$data =~ /\(\s+\S/) {
|
||||
print "$file:$.: $line";
|
||||
$ret = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
}
|
||||
|
||||
exit $ret;
|
122
cfg.mk
122
cfg.mk
@ -1,5 +1,5 @@
|
||||
# Customize Makefile.maint. -*- makefile -*-
|
||||
# Copyright (C) 2008-2012 Red Hat, Inc.
|
||||
# Copyright (C) 2008-2013 Red Hat, Inc.
|
||||
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@ -43,7 +43,6 @@ _test_script_regex = \<\(init\|test-lib\)\.sh\>
|
||||
# Tests not to run as part of "make distcheck".
|
||||
local-checks-to-skip = \
|
||||
changelog-check \
|
||||
check-AUTHORS \
|
||||
makefile-check \
|
||||
makefile_path_separator_check \
|
||||
patch-check \
|
||||
@ -94,11 +93,15 @@ VC_LIST_ALWAYS_EXCLUDE_REGEX = \
|
||||
|
||||
# Functions like free() that are no-ops on NULL arguments.
|
||||
useless_free_options = \
|
||||
--name=VBOX_UTF16_FREE \
|
||||
--name=VBOX_UTF8_FREE \
|
||||
--name=VBOX_COM_UNALLOC_MEM \
|
||||
--name=VIR_FREE \
|
||||
--name=qemuCapsFree \
|
||||
--name=qemuMigrationCookieFree \
|
||||
--name=qemuMigrationCookieGraphicsFree \
|
||||
--name=sexpr_free \
|
||||
--name=usbFreeDevice \
|
||||
--name=virBandwidthDefFree \
|
||||
--name=virBitmapFree \
|
||||
--name=virCPUDefFree \
|
||||
@ -303,6 +306,7 @@ sc_flags_usage:
|
||||
@test "$$(cat $(srcdir)/include/libvirt/libvirt.h.in \
|
||||
$(srcdir)/include/libvirt/virterror.h \
|
||||
$(srcdir)/include/libvirt/libvirt-qemu.h \
|
||||
$(srcdir)/include/libvirt/libvirt-lxc.h \
|
||||
| grep -c '\(long\|unsigned\) flags')" != 4 && \
|
||||
{ echo '$(ME): new API should use "unsigned int flags"' 1>&2; \
|
||||
exit 1; } || :
|
||||
@ -315,14 +319,14 @@ sc_flags_usage:
|
||||
|
||||
# Avoid functions that should only be called via macro counterparts.
|
||||
sc_prohibit_internal_functions:
|
||||
@prohibit='vir(Free|AllocN?|ReallocN|File(Close|Fclose|Fdopen)) *\(' \
|
||||
@prohibit='vir(Free|AllocN?|ReallocN|(Insert|Delete)ElementsN|File(Close|Fclose|Fdopen)) *\(' \
|
||||
halt='use VIR_ macros instead of internal functions' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Avoid raw malloc and free, except in documentation comments.
|
||||
sc_prohibit_raw_allocation:
|
||||
@prohibit='^.[^*].*\<((m|c|re)alloc|free) *\([^)]' \
|
||||
halt='use VIR_ macros from memory.h instead of malloc/free' \
|
||||
halt='use VIR_ macros from viralloc.h instead of malloc/free' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Avoid functions that can lead to double-close bugs.
|
||||
@ -340,6 +344,12 @@ sc_prohibit_fork_wrappers:
|
||||
halt='use virCommand for child processes' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Prefer mkostemp with O_CLOEXEC.
|
||||
sc_prohibit_mkstemp:
|
||||
@prohibit='[^"]\<mkstemps? *\(' \
|
||||
halt='use mkostemp with O_CLOEXEC instead of mkstemp' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# access with X_OK accepts directories, but we can't exec() those.
|
||||
# access with F_OK or R_OK is okay, though.
|
||||
sc_prohibit_access_xok:
|
||||
@ -353,18 +363,18 @@ snp_ = strncmp *\(.+\)
|
||||
sc_prohibit_strncmp:
|
||||
@prohibit='! *strncmp *\(|\<$(snp_) *[!=]=|[!=]= *$(snp_)' \
|
||||
exclude=':# *define STR(N?EQLEN|PREFIX)\(' \
|
||||
halt='$(ME): use STREQLEN or STRPREFIX instead of str''ncmp' \
|
||||
halt='use STREQLEN or STRPREFIX instead of str''ncmp' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# strtol and friends are too easy to misuse
|
||||
sc_prohibit_strtol:
|
||||
@prohibit='\bstrto(u?ll?|[ui]max) *\(' \
|
||||
exclude='exempt from syntax-check' \
|
||||
halt='$(ME): use virStrToLong_*, not strtol variants' \
|
||||
halt='use virStrToLong_*, not strtol variants' \
|
||||
$(_sc_search_regexp)
|
||||
@prohibit='\bstrto[df] *\(' \
|
||||
exclude='exempt from syntax-check' \
|
||||
halt='$(ME): use virStrToDouble, not strtod variants' \
|
||||
halt='use virStrToDouble, not strtod variants' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Use virAsprintf rather than as'printf since *strp is undefined on error.
|
||||
@ -387,7 +397,7 @@ sc_prohibit_sprintf:
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_readlink:
|
||||
@prohibit='readlink *\(' \
|
||||
@prohibit='\<readlink *\(' \
|
||||
halt='use virFileResolveLink, not readlink' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
@ -550,7 +560,7 @@ func_re := ($(func_or))
|
||||
sc_libvirt_unmarked_diagnostics:
|
||||
@prohibit='\<$(func_re) *\([^"]*"[^"]*[a-z]{3}' \
|
||||
exclude='_\(' \
|
||||
halt='$(ME): found unmarked diagnostic(s)' \
|
||||
halt='found unmarked diagnostic(s)' \
|
||||
$(_sc_search_regexp)
|
||||
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
||||
grep -A1 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
||||
@ -597,6 +607,15 @@ sc_prohibit_useless_translation:
|
||||
halt='no translations in tests or examples' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# When splitting a diagnostic across lines, ensure that there is a space
|
||||
# or \n on one side of the split.
|
||||
sc_require_whitespace_in_translation:
|
||||
@grep -n -A1 '"$$' $$($(VC_LIST_EXCEPT)) \
|
||||
| sed -ne ':l; /"$$/ {N;b l;}; s/"\n[^"]*"/""/g; s/\\n/ /g' \
|
||||
-e '/_(.*[^\ ]""[^\ ]/p' | grep . && \
|
||||
{ echo '$(ME): missing whitespace at line split' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Enforce recommended preprocessor indentation style.
|
||||
sc_preprocessor_indentation:
|
||||
@if cppi --version >/dev/null 2>&1; then \
|
||||
@ -607,6 +626,23 @@ sc_preprocessor_indentation:
|
||||
echo '$(ME): skipping test $@: cppi not installed' 1>&2; \
|
||||
fi
|
||||
|
||||
# Enforce similar spec file indentation style, by running cppi on a
|
||||
# (comment-only) C file that mirrors the same layout as the spec file.
|
||||
sc_spec_indentation:
|
||||
@if cppi --version >/dev/null 2>&1; then \
|
||||
for f in $$($(VC_LIST_EXCEPT) | grep '\.spec\.in$$'); do \
|
||||
sed -e 's|#|// #|; s|%ifn*\(arch\)* |#if a // |' \
|
||||
-e 's/%\(else\|endif\|define\)/#\1/' \
|
||||
-e 's/^\( *\)\1\1\1#/#\1/' \
|
||||
-e 's|^\( *[^#/ ]\)|// \1|; s|^\( */[^/]\)|// \1|' $$f \
|
||||
| cppi -a -c 2>&1 | sed "s|standard input|$$f|"; \
|
||||
done | { if grep . >&2; then false; else :; fi; } \
|
||||
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
|
||||
exit 1; }; \
|
||||
else \
|
||||
echo '$(ME): skipping test $@: cppi not installed' 1>&2; \
|
||||
fi
|
||||
|
||||
sc_copyright_format:
|
||||
@require='Copyright .*Red 'Hat', Inc\.' \
|
||||
containing='Copyright .*Red 'Hat \
|
||||
@ -641,6 +677,8 @@ sc_prohibit_cross_inclusion:
|
||||
@for dir in $(cross_dirs); do \
|
||||
case $$dir in \
|
||||
util/) safe="util";; \
|
||||
locking/) \
|
||||
safe="($$dir|util|conf|rpc)";; \
|
||||
cpu/ | locking/ | network/ | rpc/ | security/) \
|
||||
safe="($$dir|util|conf)";; \
|
||||
xenapi/ | xenxs/ ) safe="($$dir|util|conf|xen)";; \
|
||||
@ -677,11 +715,14 @@ ifeq (0,$(MAKELEVEL))
|
||||
# b653eda3ac4864de205419d9f41eec267cb89eeb .gnulib (v0.0-2286-gb653eda)
|
||||
# $ cat .git-module-status
|
||||
# b653eda3ac4864de205419d9f41eec267cb89eeb
|
||||
#
|
||||
# Keep this logic in sync with autogen.sh.
|
||||
_submodule_hash = sed 's/^[ +-]//;s/ .*//'
|
||||
_update_required := $(shell \
|
||||
cd '$(srcdir)'; \
|
||||
test -d .git || { echo 0; exit; }; \
|
||||
test -f po/Makevars || { echo 1; exit; }; \
|
||||
test -f AUTHORS || { echo 1; exit; }; \
|
||||
actual=$$(git submodule status | $(_submodule_hash); \
|
||||
git hash-object bootstrap.conf; \
|
||||
git ls-tree -d HEAD gnulib/local | awk '{print $$3}'; \
|
||||
@ -691,24 +732,11 @@ ifeq (0,$(MAKELEVEL))
|
||||
_clean_requested = $(filter %clean,$(MAKECMDGOALS))
|
||||
ifeq (1,$(_update_required)$(_clean_requested))
|
||||
$(info INFO: gnulib update required; running ./autogen.sh first)
|
||||
Makefile: _autogen
|
||||
$(shell touch $(srcdir)/AUTHORS $(srcdir)/ChangeLog)
|
||||
maint.mk Makefile: _autogen
|
||||
endif
|
||||
endif
|
||||
|
||||
# Give credit where due:
|
||||
# Ensure that each commit author email address (possibly mapped via
|
||||
# git log's .mailmap) appears in our AUTHORS file.
|
||||
sc_check_author_list:
|
||||
@fail=0; \
|
||||
for i in $$(git log --pretty=format:%aE%n|sort -u|grep -v '^$$'); do \
|
||||
sanitized=$$(echo "$$i"|LC_ALL=C sed 's/\([^a-zA-Z0-9_@-]\)/\\\1/g'); \
|
||||
grep -iq "<$$sanitized>" $(srcdir)/AUTHORS \
|
||||
|| { printf '%s\n' "$$i" >&2; fail=1; }; \
|
||||
done; \
|
||||
test $$fail = 1 \
|
||||
&& echo '$(ME): committer(s) not listed in AUTHORS' >&2; \
|
||||
test $$fail = 0
|
||||
|
||||
# It is necessary to call autogen any time gnulib changes. Autogen
|
||||
# reruns configure, then we regenerate all Makefiles at once.
|
||||
.PHONY: _autogen
|
||||
@ -717,7 +745,12 @@ _autogen:
|
||||
./config.status
|
||||
|
||||
# regenerate HACKING as part of the syntax-check
|
||||
syntax-check: $(top_srcdir)/HACKING
|
||||
syntax-check: $(top_srcdir)/HACKING bracket-spacing-check
|
||||
|
||||
bracket-spacing-check:
|
||||
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.c$$'`; \
|
||||
$(PERL) $(top_srcdir)/build-aux/bracket-spacing.pl $$files || \
|
||||
(echo $(ME): incorrect whitespace around brackets, see HACKING for rules && exit 1)
|
||||
|
||||
# sc_po_check can fail if generated files are not built first
|
||||
sc_po_check: \
|
||||
@ -734,7 +767,7 @@ $(srcdir)/src/remote/remote_client_bodies.h: $(srcdir)/src/remote/remote_protoco
|
||||
# List all syntax-check exemptions:
|
||||
exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.h$$
|
||||
|
||||
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(command|util)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller
|
||||
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(vircommand|virutil)|xen/xend_internal|rpc/virnetsocket|lxc/lxc_controller|locking/lock_daemon
|
||||
exclude_file_name_regexp--sc_avoid_write = \
|
||||
^(src/($(_src1))|daemon/libvirtd|tools/console|tests/(shunload|virnettlscontext)test)\.c$$
|
||||
|
||||
@ -746,20 +779,20 @@ exclude_file_name_regexp--sc_copyright_address = \
|
||||
exclude_file_name_regexp--sc_flags_usage = ^(docs/|src/util/virnetdevtap\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
|
||||
^src/rpc/gendispatch\.pl$$
|
||||
^(src/rpc/gendispatch\.pl$$|tests/)
|
||||
|
||||
exclude_file_name_regexp--sc_po_check = ^(docs/|src/rpc/gendispatch\.pl$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_VIR_ERR_NO_MEMORY = \
|
||||
^(include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virterror\.c)$$
|
||||
^(include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virerror\.c)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_access_xok = ^src/util/util\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_access_xok = ^src/util/virutil\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
|
||||
^python/(libvirt-(qemu-)?override|typewrappers)\.c$$
|
||||
^python/(libvirt-(lxc-|qemu-)?override|typewrappers)\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_asprintf = \
|
||||
^(bootstrap.conf$$|src/util/util\.c$$|examples/domain-events/events-c/event-test\.c$$)
|
||||
^(bootstrap.conf$$|src/util/virutil\.c$$|examples/domain-events/events-c/event-test\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_close = \
|
||||
(\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c)$$)
|
||||
@ -767,38 +800,38 @@ exclude_file_name_regexp--sc_prohibit_close = \
|
||||
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
|
||||
(^tests/(qemuhelp|nodeinfo)data/|\.(gif|ico|png|diff)$$)
|
||||
|
||||
_src2=src/(util/command|libvirt|lxc/lxc_controller)
|
||||
_src2=src/(util/vircommand|libvirt|lxc/lxc_controller|locking/lock_daemon)
|
||||
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
|
||||
(^($(_src2)|tests/testutils|daemon/libvirtd)\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/util\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/virutil\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_internal_functions = \
|
||||
^src/(util/(memory|util|virfile)\.[hc]|esx/esx_vi\.c)$$
|
||||
^src/(util/(viralloc|virutil|virfile)\.[hc]|esx/esx_vi\.c)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_newline_at_end_of_diagnostic = \
|
||||
^src/rpc/gendispatch\.pl$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_nonreentrant = \
|
||||
^((po|tests)/|docs/.*py$$|tools/(virsh|console)\.c$$)
|
||||
^((po|tests)/|docs/.*py|run.in$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_raw_allocation = \
|
||||
^(src/util/memory\.[ch]|examples/.*)$$
|
||||
^(src/util/viralloc\.[ch]|examples/.*|tests/securityselinuxhelper.c)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_readlink = \
|
||||
^src/(util/util|lxc/lxc_container)\.c$$
|
||||
^src/(util/virutil|lxc/lxc_container)\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/util\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/virutil\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_sprintf = \
|
||||
^(docs/hacking\.html\.in)|(examples/systemtap/.*stp)|(src/dtrace2systemtap\.pl)|(src/rpc/gensystemtap\.pl)$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/util\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virutil\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_strtol = \
|
||||
^src/(util/sexpr|(vbox|xen|xenxs)/.*)\.c$$
|
||||
^src/(util/virsexpr|(vbox|xen|xenxs)/.*)\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/xml\.c$$
|
||||
exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/virxml\.c$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_xmlURI = ^src/util/viruri\.c$$
|
||||
|
||||
@ -810,9 +843,14 @@ exclude_file_name_regexp--sc_require_config_h = ^(examples/|tools/virsh-$(_virsh
|
||||
exclude_file_name_regexp--sc_require_config_h_first = ^(examples/|tools/virsh-$(_virsh_includes)\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_trailing_blank = \
|
||||
(/qemuhelpdata/|\.(fig|gif|ico|png)$$)
|
||||
(/qemuhelpdata/|/sysinfodata/.*\.data|\.(fig|gif|ico|png)$$)
|
||||
|
||||
exclude_file_name_regexp--sc_unmarked_diagnostics = \
|
||||
^(docs/apibuild.py|tests/virt-aa-helper-test)$$
|
||||
|
||||
exclude_file_name_regexp--sc_size_of_brackets = cfg.mk
|
||||
|
||||
exclude_file_name_regexp--sc_correct_id_types = \
|
||||
(^src/locking/lock_protocol.x$$)
|
||||
|
||||
exclude_file_name_regexp--sc_m4_quote_check = m4/virt-lib.m4
|
||||
|
1195
configure.ac
1195
configure.ac
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
## Copyright (C) 2005-2012 Red Hat, Inc.
|
||||
## Copyright (C) 2005-2013 Red Hat, Inc.
|
||||
## See COPYING.LIB for the License of this software
|
||||
|
||||
INCLUDES = \
|
||||
@ -17,7 +17,9 @@ CLEANFILES =
|
||||
|
||||
DAEMON_GENERATED = \
|
||||
$(srcdir)/remote_dispatch.h \
|
||||
$(srcdir)/qemu_dispatch.h
|
||||
$(srcdir)/lxc_dispatch.h \
|
||||
$(srcdir)/qemu_dispatch.h \
|
||||
$(NULL)
|
||||
|
||||
DAEMON_SOURCES = \
|
||||
libvirtd.c libvirtd.h \
|
||||
@ -25,19 +27,21 @@ DAEMON_SOURCES = \
|
||||
remote.c remote.h \
|
||||
stream.c stream.h \
|
||||
../src/remote/remote_protocol.c \
|
||||
../src/remote/lxc_protocol.c \
|
||||
../src/remote/qemu_protocol.c \
|
||||
$(DAEMON_GENERATED)
|
||||
|
||||
DISTCLEANFILES =
|
||||
EXTRA_DIST = \
|
||||
remote_dispatch.h \
|
||||
lxc_dispatch.h \
|
||||
qemu_dispatch.h \
|
||||
libvirtd.conf \
|
||||
libvirtd.init.in \
|
||||
libvirtd.upstart \
|
||||
libvirtd.policy-0 \
|
||||
libvirtd.policy-1 \
|
||||
libvirtd.policy.in \
|
||||
libvirtd.sasl \
|
||||
libvirtd.service.in \
|
||||
libvirtd.sysconf \
|
||||
libvirtd.sysctl \
|
||||
libvirtd.aug \
|
||||
@ -54,6 +58,7 @@ EXTRA_DIST = \
|
||||
BUILT_SOURCES =
|
||||
|
||||
REMOTE_PROTOCOL = $(top_srcdir)/src/remote/remote_protocol.x
|
||||
LXC_PROTOCOL = $(top_srcdir)/src/remote/lxc_protocol.x
|
||||
QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x
|
||||
|
||||
$(srcdir)/remote_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
@ -61,6 +66,11 @@ $(srcdir)/remote_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b remote REMOTE \
|
||||
$(REMOTE_PROTOCOL) > $@
|
||||
|
||||
$(srcdir)/lxc_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
$(LXC_PROTOCOL)
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b lxc LXC \
|
||||
$(LXC_PROTOCOL) > $@
|
||||
|
||||
$(srcdir)/qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
|
||||
$(QEMU_PROTOCOL)
|
||||
$(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl -b qemu QEMU \
|
||||
@ -84,10 +94,10 @@ augeastests_DATA = test_libvirtd.aug
|
||||
CLEANFILES += test_libvirtd.aug
|
||||
|
||||
libvirtd.8: $(srcdir)/libvirtd.8.in
|
||||
sed \
|
||||
-e 's!SYSCONFDIR!$(sysconfdir)!g' \
|
||||
-e 's!LOCALSTATEDIR!$(localstatedir)!g' \
|
||||
< $< > $@-t
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd_SOURCES = $(DAEMON_SOURCES)
|
||||
@ -117,6 +127,7 @@ libvirtd_LDADD += ../src/libvirt_probes.lo
|
||||
endif
|
||||
|
||||
libvirtd_LDADD += \
|
||||
../src/libvirt-lxc.la \
|
||||
../src/libvirt-qemu.la
|
||||
|
||||
if ! WITH_DRIVER_MODULES
|
||||
@ -151,7 +162,7 @@ if WITH_NETWORK
|
||||
libvirtd_LDADD += ../src/libvirt_driver_network.la
|
||||
endif
|
||||
|
||||
if WITH_NETCF
|
||||
if WITH_INTERFACE
|
||||
libvirtd_LDADD += ../src/libvirt_driver_interface.la
|
||||
endif
|
||||
|
||||
@ -170,16 +181,23 @@ endif
|
||||
|
||||
libvirtd_LDADD += ../src/libvirt.la
|
||||
|
||||
if HAVE_POLKIT
|
||||
if HAVE_POLKIT0
|
||||
if WITH_POLKIT
|
||||
if WITH_POLKIT0
|
||||
policydir = $(datadir)/PolicyKit/policy
|
||||
policyfile = libvirtd.policy-0
|
||||
policyauth = auth_admin_keep_session
|
||||
else
|
||||
policydir = $(datadir)/polkit-1/actions
|
||||
policyfile = libvirtd.policy-1
|
||||
policyauth = auth_admin_keep
|
||||
endif
|
||||
endif
|
||||
|
||||
libvirtd.policy: libvirtd.policy.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN) sed \
|
||||
-e 's|[@]authaction[@]|$(policyauth)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
BUILT_SOURCES += libvirtd.policy
|
||||
|
||||
install-data-local: install-init-redhat install-init-systemd install-init-upstart \
|
||||
install-data-sasl install-data-polkit \
|
||||
install-logrotate install-sysctl
|
||||
@ -194,10 +212,10 @@ uninstall-local:: uninstall-init-redhat uninstall-init-systemd uninstall-init-up
|
||||
rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
|
||||
rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :
|
||||
|
||||
if HAVE_POLKIT
|
||||
if WITH_POLKIT
|
||||
install-data-polkit::
|
||||
$(MKDIR_P) $(DESTDIR)$(policydir)
|
||||
$(INSTALL_DATA) $(srcdir)/$(policyfile) $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
||||
$(INSTALL_DATA) libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
||||
uninstall-data-polkit::
|
||||
rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy
|
||||
rmdir $(DESTDIR)$(policydir) || :
|
||||
@ -215,26 +233,26 @@ LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
|
||||
BUILT_SOURCES += $(LOGROTATE_CONFS)
|
||||
|
||||
libvirtd.logrotate: libvirtd.logrotate.in
|
||||
sed \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
< $< > $@-t
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.qemu.logrotate: libvirtd.qemu.logrotate.in
|
||||
sed \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
< $< > $@-t
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.lxc.logrotate: libvirtd.lxc.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.uml.logrotate: libvirtd.uml.logrotate.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's![@]localstatedir[@]!$(localstatedir)!g' \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
@ -267,14 +285,16 @@ uninstall-sysconfig:
|
||||
rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
|
||||
|
||||
if WITH_SYSCTL
|
||||
# Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on
|
||||
# /usr/lib/sysctl.d/ even when libdir is /usr/lib64
|
||||
install-sysctl:
|
||||
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysctl.d
|
||||
$(MKDIR_P) $(DESTDIR)$(prefix)/lib/sysctl.d
|
||||
$(INSTALL_DATA) $(srcdir)/libvirtd.sysctl \
|
||||
$(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd
|
||||
$(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
||||
|
||||
uninstall-sysctl:
|
||||
rm -f $(DESTDIR)$(sysconfdir)/sysctl.d/libvirtd
|
||||
rmdir $(DESTDIR)$(sysconfdir)/sysctl.d || :
|
||||
rm -f $(DESTDIR)$(prefix)/lib/sysctl.d/libvirtd.conf
|
||||
rmdir $(DESTDIR)$(prefix)/lib/sysctl.d || :
|
||||
else
|
||||
install-sysctl:
|
||||
uninstall-sysctl:
|
||||
@ -314,7 +334,6 @@ uninstall-init-upstart:
|
||||
endif # LIBVIRT_INIT_SCRIPT_UPSTART
|
||||
|
||||
|
||||
EXTRA_DIST += libvirtd.service.in
|
||||
if LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
|
||||
SYSTEMD_UNIT_DIR = /lib/systemd/system
|
||||
@ -334,21 +353,20 @@ uninstall-init-systemd:
|
||||
endif # LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
|
||||
libvirtd.init: libvirtd.init.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN)sed \
|
||||
-e s!\@localstatedir\@!$(localstatedir)!g \
|
||||
-e s!\@sbindir\@!$(sbindir)!g \
|
||||
-e s!\@sysconfdir\@!$(sysconfdir)!g \
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
libvirtd.service: libvirtd.service.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN)sed \
|
||||
-e s!\@localstatedir\@!$(localstatedir)!g \
|
||||
-e s!\@sbindir\@!$(sbindir)!g \
|
||||
-e s!\@sysconfdir\@!$(sysconfdir)!g \
|
||||
< $< > $@-t && \
|
||||
chmod a+x $@-t && \
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
|
||||
-e 's|[@]sbindir[@]|$(sbindir)|g' \
|
||||
-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
|
||||
< $< > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
|
||||
@ -377,12 +395,13 @@ endif # WITH_LIBVIRTD
|
||||
POD2MAN = pod2man -c "Virtualization Support" \
|
||||
-r "$(PACKAGE)-$(VERSION)" -s 8
|
||||
|
||||
$(srcdir)/libvirtd.8.in: libvirtd.pod.in
|
||||
$(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@
|
||||
$(srcdir)/libvirtd.8.in: libvirtd.pod.in $(top_srcdir)/configure.ac
|
||||
$(AM_V_GEN)$(POD2MAN) --name LIBVIRTD $< $@ \
|
||||
&& if grep 'POD ERROR' $@ ; then rm $@; exit 1; fi
|
||||
|
||||
# This is needed for clients too, so can't wrap in
|
||||
# the WITH_LIBVIRTD conditional
|
||||
if HAVE_SASL
|
||||
if WITH_SASL
|
||||
install-data-sasl:
|
||||
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sasl2/
|
||||
$(INSTALL_DATA) $(srcdir)/libvirtd.sasl $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; If not, see
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
@ -24,10 +24,10 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "libvirtd-config.h"
|
||||
#include "conf.h"
|
||||
#include "memory.h"
|
||||
#include "virterror_internal.h"
|
||||
#include "logging.h"
|
||||
#include "virconf.h"
|
||||
#include "viralloc.h"
|
||||
#include "virerror.h"
|
||||
#include "virlog.h"
|
||||
#include "rpc/virnetserver.h"
|
||||
#include "configmake.h"
|
||||
#include "remote/remote_protocol.h"
|
||||
@ -45,7 +45,7 @@ remoteConfigGetStringList(virConfPtr conf, const char *key, char ***list_arg,
|
||||
const char *filename)
|
||||
{
|
||||
char **list;
|
||||
virConfValuePtr p = virConfGetValue (conf, key);
|
||||
virConfValuePtr p = virConfGetValue(conf, key);
|
||||
if (!p)
|
||||
return 0;
|
||||
|
||||
@ -57,7 +57,7 @@ remoteConfigGetStringList(virConfPtr conf, const char *key, char ***list_arg,
|
||||
key);
|
||||
return -1;
|
||||
}
|
||||
list[0] = strdup (p->str);
|
||||
list[0] = strdup(p->str);
|
||||
list[1] = NULL;
|
||||
if (list[0] == NULL) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
@ -88,7 +88,7 @@ remoteConfigGetStringList(virConfPtr conf, const char *key, char ***list_arg,
|
||||
VIR_FREE(list);
|
||||
return -1;
|
||||
}
|
||||
list[i] = strdup (pp->str);
|
||||
list[i] = strdup(pp->str);
|
||||
if (list[i] == NULL) {
|
||||
int j;
|
||||
for (j = 0 ; j < i ; j++)
|
||||
@ -119,15 +119,15 @@ remoteConfigGetStringList(virConfPtr conf, const char *key, char ***list_arg,
|
||||
|
||||
/* A helper function used by each of the following macros. */
|
||||
static int
|
||||
checkType (virConfValuePtr p, const char *filename,
|
||||
const char *key, virConfType required_type)
|
||||
checkType(virConfValuePtr p, const char *filename,
|
||||
const char *key, virConfType required_type)
|
||||
{
|
||||
if (p->type != required_type) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("remoteReadConfigFile: %s: %s: invalid type:"
|
||||
" got %s; expected %s"), filename, key,
|
||||
virConfTypeName (p->type),
|
||||
virConfTypeName (required_type));
|
||||
virConfTypeName(p->type),
|
||||
virConfTypeName(required_type));
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@ -139,12 +139,12 @@ checkType (virConfValuePtr p, const char *filename,
|
||||
failure), give a diagnostic and "goto" the cleanup-and-fail label. */
|
||||
#define GET_CONF_STR(conf, filename, var_name) \
|
||||
do { \
|
||||
virConfValuePtr p = virConfGetValue (conf, #var_name); \
|
||||
virConfValuePtr p = virConfGetValue(conf, #var_name); \
|
||||
if (p) { \
|
||||
if (checkType (p, filename, #var_name, VIR_CONF_STRING) < 0) \
|
||||
if (checkType(p, filename, #var_name, VIR_CONF_STRING) < 0) \
|
||||
goto error; \
|
||||
VIR_FREE(data->var_name); \
|
||||
if (!(data->var_name = strdup (p->str))) { \
|
||||
if (!(data->var_name = strdup(p->str))) { \
|
||||
virReportOOMError(); \
|
||||
goto error; \
|
||||
} \
|
||||
@ -154,9 +154,9 @@ checkType (virConfValuePtr p, const char *filename,
|
||||
/* Like GET_CONF_STR, but for integral values. */
|
||||
#define GET_CONF_INT(conf, filename, var_name) \
|
||||
do { \
|
||||
virConfValuePtr p = virConfGetValue (conf, #var_name); \
|
||||
virConfValuePtr p = virConfGetValue(conf, #var_name); \
|
||||
if (p) { \
|
||||
if (checkType (p, filename, #var_name, VIR_CONF_LONG) < 0) \
|
||||
if (checkType(p, filename, #var_name, VIR_CONF_LONG) < 0) \
|
||||
goto error; \
|
||||
data->var_name = p->l; \
|
||||
} \
|
||||
@ -166,11 +166,11 @@ checkType (virConfValuePtr p, const char *filename,
|
||||
static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, const char *filename) {
|
||||
virConfValuePtr p;
|
||||
|
||||
p = virConfGetValue (conf, key);
|
||||
p = virConfGetValue(conf, key);
|
||||
if (!p)
|
||||
return 0;
|
||||
|
||||
if (checkType (p, filename, key, VIR_CONF_STRING) < 0)
|
||||
if (checkType(p, filename, key, VIR_CONF_STRING) < 0)
|
||||
return -1;
|
||||
|
||||
if (!p->str)
|
||||
@ -178,7 +178,7 @@ static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, cons
|
||||
|
||||
if (STREQ(p->str, "none")) {
|
||||
*auth = VIR_NET_SERVER_SERVICE_AUTH_NONE;
|
||||
#if HAVE_SASL
|
||||
#if WITH_SASL
|
||||
} else if (STREQ(p->str, "sasl")) {
|
||||
*auth = VIR_NET_SERVER_SERVICE_AUTH_SASL;
|
||||
#endif
|
||||
@ -242,7 +242,7 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
||||
goto no_memory;
|
||||
|
||||
/* Only default to PolicyKit if running as root */
|
||||
#if HAVE_POLKIT
|
||||
#if WITH_POLKIT
|
||||
if (privileged) {
|
||||
data->auth_unix_rw = REMOTE_AUTH_POLKIT;
|
||||
data->auth_unix_ro = REMOTE_AUTH_POLKIT;
|
||||
@ -250,7 +250,7 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
||||
#endif
|
||||
data->auth_unix_rw = REMOTE_AUTH_NONE;
|
||||
data->auth_unix_ro = REMOTE_AUTH_NONE;
|
||||
#if HAVE_POLKIT
|
||||
#if WITH_POLKIT
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -263,7 +263,7 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
|
||||
!data->unix_sock_rw_perms)
|
||||
goto no_memory;
|
||||
|
||||
#if HAVE_SASL
|
||||
#if WITH_SASL
|
||||
data->auth_tcp = REMOTE_AUTH_SASL;
|
||||
#else
|
||||
data->auth_tcp = REMOTE_AUTH_NONE;
|
||||
@ -366,15 +366,15 @@ daemonConfigLoadOptions(struct daemonConfig *data,
|
||||
const char *filename,
|
||||
virConfPtr conf)
|
||||
{
|
||||
GET_CONF_INT (conf, filename, listen_tcp);
|
||||
GET_CONF_INT (conf, filename, listen_tls);
|
||||
GET_CONF_STR (conf, filename, tls_port);
|
||||
GET_CONF_STR (conf, filename, tcp_port);
|
||||
GET_CONF_STR (conf, filename, listen_addr);
|
||||
GET_CONF_INT(conf, filename, listen_tcp);
|
||||
GET_CONF_INT(conf, filename, listen_tls);
|
||||
GET_CONF_STR(conf, filename, tls_port);
|
||||
GET_CONF_STR(conf, filename, tcp_port);
|
||||
GET_CONF_STR(conf, filename, listen_addr);
|
||||
|
||||
if (remoteConfigGetAuth(conf, "auth_unix_rw", &data->auth_unix_rw, filename) < 0)
|
||||
goto error;
|
||||
#if HAVE_POLKIT
|
||||
#if WITH_POLKIT
|
||||
/* Change default perms to be wide-open if PolicyKit is enabled.
|
||||
* Admin can always override in config file
|
||||
*/
|
||||
@ -393,22 +393,22 @@ daemonConfigLoadOptions(struct daemonConfig *data,
|
||||
if (remoteConfigGetAuth(conf, "auth_tls", &data->auth_tls, filename) < 0)
|
||||
goto error;
|
||||
|
||||
GET_CONF_STR (conf, filename, unix_sock_group);
|
||||
GET_CONF_STR (conf, filename, unix_sock_ro_perms);
|
||||
GET_CONF_STR (conf, filename, unix_sock_rw_perms);
|
||||
GET_CONF_STR(conf, filename, unix_sock_group);
|
||||
GET_CONF_STR(conf, filename, unix_sock_ro_perms);
|
||||
GET_CONF_STR(conf, filename, unix_sock_rw_perms);
|
||||
|
||||
GET_CONF_STR (conf, filename, unix_sock_dir);
|
||||
GET_CONF_STR(conf, filename, unix_sock_dir);
|
||||
|
||||
GET_CONF_INT (conf, filename, mdns_adv);
|
||||
GET_CONF_STR (conf, filename, mdns_name);
|
||||
GET_CONF_INT(conf, filename, mdns_adv);
|
||||
GET_CONF_STR(conf, filename, mdns_name);
|
||||
|
||||
GET_CONF_INT (conf, filename, tls_no_sanity_certificate);
|
||||
GET_CONF_INT (conf, filename, tls_no_verify_certificate);
|
||||
GET_CONF_INT(conf, filename, tls_no_sanity_certificate);
|
||||
GET_CONF_INT(conf, filename, tls_no_verify_certificate);
|
||||
|
||||
GET_CONF_STR (conf, filename, key_file);
|
||||
GET_CONF_STR (conf, filename, cert_file);
|
||||
GET_CONF_STR (conf, filename, ca_file);
|
||||
GET_CONF_STR (conf, filename, crl_file);
|
||||
GET_CONF_STR(conf, filename, key_file);
|
||||
GET_CONF_STR(conf, filename, cert_file);
|
||||
GET_CONF_STR(conf, filename, ca_file);
|
||||
GET_CONF_STR(conf, filename, crl_file);
|
||||
|
||||
if (remoteConfigGetStringList(conf, "tls_allowed_dn_list",
|
||||
&data->tls_allowed_dn_list, filename) < 0)
|
||||
@ -420,28 +420,28 @@ daemonConfigLoadOptions(struct daemonConfig *data,
|
||||
goto error;
|
||||
|
||||
|
||||
GET_CONF_INT (conf, filename, min_workers);
|
||||
GET_CONF_INT (conf, filename, max_workers);
|
||||
GET_CONF_INT (conf, filename, max_clients);
|
||||
GET_CONF_INT(conf, filename, min_workers);
|
||||
GET_CONF_INT(conf, filename, max_workers);
|
||||
GET_CONF_INT(conf, filename, max_clients);
|
||||
|
||||
GET_CONF_INT (conf, filename, prio_workers);
|
||||
GET_CONF_INT(conf, filename, prio_workers);
|
||||
|
||||
GET_CONF_INT (conf, filename, max_requests);
|
||||
GET_CONF_INT (conf, filename, max_client_requests);
|
||||
GET_CONF_INT(conf, filename, max_requests);
|
||||
GET_CONF_INT(conf, filename, max_client_requests);
|
||||
|
||||
GET_CONF_INT (conf, filename, audit_level);
|
||||
GET_CONF_INT (conf, filename, audit_logging);
|
||||
GET_CONF_INT(conf, filename, audit_level);
|
||||
GET_CONF_INT(conf, filename, audit_logging);
|
||||
|
||||
GET_CONF_STR (conf, filename, host_uuid);
|
||||
GET_CONF_STR(conf, filename, host_uuid);
|
||||
|
||||
GET_CONF_INT (conf, filename, log_level);
|
||||
GET_CONF_STR (conf, filename, log_filters);
|
||||
GET_CONF_STR (conf, filename, log_outputs);
|
||||
GET_CONF_INT (conf, filename, log_buffer_size);
|
||||
GET_CONF_INT(conf, filename, log_level);
|
||||
GET_CONF_STR(conf, filename, log_filters);
|
||||
GET_CONF_STR(conf, filename, log_outputs);
|
||||
GET_CONF_INT(conf, filename, log_buffer_size);
|
||||
|
||||
GET_CONF_INT (conf, filename, keepalive_interval);
|
||||
GET_CONF_INT (conf, filename, keepalive_count);
|
||||
GET_CONF_INT (conf, filename, keepalive_required);
|
||||
GET_CONF_INT(conf, filename, keepalive_interval);
|
||||
GET_CONF_INT(conf, filename, keepalive_count);
|
||||
GET_CONF_INT(conf, filename, keepalive_required);
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; If not, see
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; If not, see
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
@ -33,27 +33,26 @@
|
||||
#include <locale.h>
|
||||
|
||||
#include "libvirt_internal.h"
|
||||
#include "virterror_internal.h"
|
||||
#include "virerror.h"
|
||||
#include "virfile.h"
|
||||
#include "virpidfile.h"
|
||||
#include "virprocess.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_QEMU
|
||||
|
||||
#include "libvirtd.h"
|
||||
#include "libvirtd-config.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "uuid.h"
|
||||
#include "virutil.h"
|
||||
#include "viruuid.h"
|
||||
#include "remote_driver.h"
|
||||
#include "memory.h"
|
||||
#include "conf.h"
|
||||
#include "viralloc.h"
|
||||
#include "virconf.h"
|
||||
#include "virnetlink.h"
|
||||
#include "virnetserver.h"
|
||||
#include "threads.h"
|
||||
#include "remote.h"
|
||||
#include "remote_driver.h"
|
||||
#include "hooks.h"
|
||||
#include "uuid.h"
|
||||
#include "virhook.h"
|
||||
#include "viraudit.h"
|
||||
#include "locking/lock_manager.h"
|
||||
|
||||
@ -78,8 +77,8 @@
|
||||
# ifdef WITH_NETWORK
|
||||
# include "network/bridge_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_NETCF
|
||||
# include "interface/netcf_driver.h"
|
||||
# ifdef WITH_INTERFACE
|
||||
# include "interface/interface_driver.h"
|
||||
# endif
|
||||
# ifdef WITH_STORAGE
|
||||
# include "storage/storage_driver.h"
|
||||
@ -97,11 +96,14 @@
|
||||
|
||||
#include "configmake.h"
|
||||
|
||||
#if HAVE_SASL
|
||||
#include "virdbus.h"
|
||||
|
||||
#if WITH_SASL
|
||||
virNetSASLContextPtr saslCtxt = NULL;
|
||||
#endif
|
||||
virNetServerProgramPtr remoteProgram = NULL;
|
||||
virNetServerProgramPtr qemuProgram = NULL;
|
||||
virNetServerProgramPtr lxcProgram = NULL;
|
||||
|
||||
enum {
|
||||
VIR_DAEMON_ERR_NONE = 0,
|
||||
@ -196,7 +198,7 @@ static int daemonForkIntoBackground(const char *argv0)
|
||||
VIR_FORCE_CLOSE(statuspipe[1]);
|
||||
|
||||
/* We wait to make sure the first child forked successfully */
|
||||
if (virPidWait(pid, NULL) < 0)
|
||||
if (virProcessWait(pid, NULL) < 0)
|
||||
goto error;
|
||||
|
||||
/* If we get here, then the grandchild was spawned, so we
|
||||
@ -382,7 +384,7 @@ static void daemonInitialize(void)
|
||||
# ifdef WITH_NWFILTER
|
||||
virDriverLoadModule("nwfilter");
|
||||
# endif
|
||||
# ifdef WITH_NETCF
|
||||
# ifdef WITH_INTERFACE
|
||||
virDriverLoadModule("interface");
|
||||
# endif
|
||||
# ifdef WITH_XEN
|
||||
@ -404,7 +406,7 @@ static void daemonInitialize(void)
|
||||
# ifdef WITH_NETWORK
|
||||
networkRegister();
|
||||
# endif
|
||||
# ifdef WITH_NETCF
|
||||
# ifdef WITH_INTERFACE
|
||||
interfaceRegister();
|
||||
# endif
|
||||
# ifdef WITH_STORAGE
|
||||
@ -448,7 +450,9 @@ static int daemonSetupNetworking(virNetServerPtr srv,
|
||||
virNetServerServicePtr svc = NULL;
|
||||
virNetServerServicePtr svcRO = NULL;
|
||||
virNetServerServicePtr svcTCP = NULL;
|
||||
#if WITH_GNUTLS
|
||||
virNetServerServicePtr svcTLS = NULL;
|
||||
#endif
|
||||
gid_t unix_sock_gid = 0;
|
||||
int unix_sock_ro_mask = 0;
|
||||
int unix_sock_rw_mask = 0;
|
||||
@ -473,9 +477,11 @@ static int daemonSetupNetworking(virNetServerPtr srv,
|
||||
unix_sock_rw_mask,
|
||||
unix_sock_gid,
|
||||
config->auth_unix_rw,
|
||||
#if WITH_GNUTLS
|
||||
NULL,
|
||||
#endif
|
||||
false,
|
||||
config->max_client_requests,
|
||||
NULL)))
|
||||
config->max_client_requests)))
|
||||
goto error;
|
||||
if (sock_path_ro) {
|
||||
VIR_DEBUG("Registering unix socket %s", sock_path_ro);
|
||||
@ -483,9 +489,11 @@ static int daemonSetupNetworking(virNetServerPtr srv,
|
||||
unix_sock_ro_mask,
|
||||
unix_sock_gid,
|
||||
config->auth_unix_ro,
|
||||
#if WITH_GNUTLS
|
||||
NULL,
|
||||
#endif
|
||||
true,
|
||||
config->max_client_requests,
|
||||
NULL)))
|
||||
config->max_client_requests)))
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -506,9 +514,11 @@ static int daemonSetupNetworking(virNetServerPtr srv,
|
||||
if (!(svcTCP = virNetServerServiceNewTCP(config->listen_addr,
|
||||
config->tcp_port,
|
||||
config->auth_tcp,
|
||||
#if WITH_GNUTLS
|
||||
NULL,
|
||||
#endif
|
||||
false,
|
||||
config->max_client_requests,
|
||||
NULL)))
|
||||
config->max_client_requests)))
|
||||
goto error;
|
||||
|
||||
if (virNetServerAddService(srv, svcTCP,
|
||||
@ -516,6 +526,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
|
||||
goto error;
|
||||
}
|
||||
|
||||
#if WITH_GNUTLS
|
||||
if (config->listen_tls) {
|
||||
virNetTLSContextPtr ctxt = NULL;
|
||||
|
||||
@ -545,9 +556,9 @@ static int daemonSetupNetworking(virNetServerPtr srv,
|
||||
virNetServerServiceNewTCP(config->listen_addr,
|
||||
config->tls_port,
|
||||
config->auth_tls,
|
||||
ctxt,
|
||||
false,
|
||||
config->max_client_requests,
|
||||
ctxt))) {
|
||||
config->max_client_requests))) {
|
||||
virObjectUnref(ctxt);
|
||||
goto error;
|
||||
}
|
||||
@ -558,13 +569,23 @@ static int daemonSetupNetworking(virNetServerPtr srv,
|
||||
|
||||
virObjectUnref(ctxt);
|
||||
}
|
||||
#else
|
||||
(void)privileged;
|
||||
if (config->listen_tls) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("This libvirtd build does not support TLS"));
|
||||
goto error;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if HAVE_SASL
|
||||
#if WITH_SASL
|
||||
if (config->auth_unix_rw == REMOTE_AUTH_SASL ||
|
||||
config->auth_unix_ro == REMOTE_AUTH_SASL ||
|
||||
config->auth_tcp == REMOTE_AUTH_SASL ||
|
||||
config->auth_tls == REMOTE_AUTH_SASL) {
|
||||
# if WITH_GNUTLS
|
||||
config->auth_tls == REMOTE_AUTH_SASL ||
|
||||
# endif
|
||||
config->auth_tcp == REMOTE_AUTH_SASL) {
|
||||
saslCtxt = virNetSASLContextNewServer(
|
||||
(const char *const*)config->sasl_allowed_username_list);
|
||||
if (!saslCtxt)
|
||||
@ -575,7 +596,9 @@ static int daemonSetupNetworking(virNetServerPtr srv,
|
||||
return 0;
|
||||
|
||||
error:
|
||||
#if WITH_GNUTLS
|
||||
virObjectUnref(svcTLS);
|
||||
#endif
|
||||
virObjectUnref(svcTCP);
|
||||
virObjectUnref(svc);
|
||||
virObjectUnref(svcRO);
|
||||
@ -583,16 +606,6 @@ error:
|
||||
}
|
||||
|
||||
|
||||
static int daemonShutdownCheck(virNetServerPtr srv ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (virStateActive())
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set up the logging environment
|
||||
* By default if daemonized all errors go to the logfile libvirtd.log,
|
||||
@ -635,7 +648,24 @@ daemonSetupLogging(struct daemonConfig *config,
|
||||
virLogParseOutputs(config->log_outputs);
|
||||
|
||||
/*
|
||||
* If no defined outputs, then direct to libvirtd.log when running
|
||||
* If no defined outputs, and either running
|
||||
* as daemon or not on a tty, then first try
|
||||
* to direct it to the systemd journal
|
||||
* (if it exists)....
|
||||
*/
|
||||
if (virLogGetNbOutputs() == 0 &&
|
||||
(godaemon || !isatty(STDIN_FILENO))) {
|
||||
char *tmp;
|
||||
if (access("/run/systemd/journal/socket", W_OK) >= 0) {
|
||||
if (virAsprintf(&tmp, "%d:journald", virLogGetDefaultPriority()) < 0)
|
||||
goto no_memory;
|
||||
virLogParseOutputs(tmp);
|
||||
VIR_FREE(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* otherwise direct to libvirtd.log when running
|
||||
* as daemon. Otherwise the default output is stderr.
|
||||
*/
|
||||
if (virLogGetNbOutputs() == 0) {
|
||||
@ -695,23 +725,23 @@ error:
|
||||
static void
|
||||
daemonVersion(const char *argv0)
|
||||
{
|
||||
printf ("%s (%s) %s\n", argv0, PACKAGE_NAME, PACKAGE_VERSION);
|
||||
printf("%s (%s) %s\n", argv0, PACKAGE_NAME, PACKAGE_VERSION);
|
||||
}
|
||||
|
||||
#ifdef __sun
|
||||
static int
|
||||
daemonSetupPrivs(void)
|
||||
{
|
||||
chown ("/var/run/libvirt", SYSTEM_UID, SYSTEM_UID);
|
||||
chown("/var/run/libvirt", SYSTEM_UID, SYSTEM_UID);
|
||||
|
||||
if (__init_daemon_priv (PU_RESETGROUPS | PU_CLEARLIMITSET,
|
||||
SYSTEM_UID, SYSTEM_UID, PRIV_XVM_CONTROL, NULL)) {
|
||||
if (__init_daemon_priv(PU_RESETGROUPS | PU_CLEARLIMITSET,
|
||||
SYSTEM_UID, SYSTEM_UID, PRIV_XVM_CONTROL, NULL)) {
|
||||
VIR_ERROR(_("additional privileges are required"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (priv_set (PRIV_OFF, PRIV_ALLSETS, PRIV_FILE_LINK_ANY, PRIV_PROC_INFO,
|
||||
PRIV_PROC_SESSION, PRIV_PROC_EXEC, PRIV_PROC_FORK, NULL)) {
|
||||
if (priv_set(PRIV_OFF, PRIV_ALLSETS, PRIV_FILE_LINK_ANY, PRIV_PROC_INFO,
|
||||
PRIV_PROC_SESSION, PRIV_PROC_EXEC, PRIV_PROC_FORK, NULL)) {
|
||||
VIR_ERROR(_("failed to set reduced privileges"));
|
||||
return -1;
|
||||
}
|
||||
@ -754,24 +784,128 @@ static int daemonSetupSignals(virNetServerPtr srv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void daemonInhibitCallback(bool inhibit, void *opaque)
|
||||
{
|
||||
virNetServerPtr srv = opaque;
|
||||
|
||||
if (inhibit)
|
||||
virNetServerAddShutdownInhibition(srv);
|
||||
else
|
||||
virNetServerRemoveShutdownInhibition(srv);
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
static DBusConnection *sessionBus;
|
||||
static DBusConnection *systemBus;
|
||||
|
||||
static void daemonStopWorker(void *opaque)
|
||||
{
|
||||
virNetServerPtr srv = opaque;
|
||||
|
||||
VIR_DEBUG("Begin stop srv=%p", srv);
|
||||
|
||||
ignore_value(virStateStop());
|
||||
|
||||
VIR_DEBUG("Completed stop srv=%p", srv);
|
||||
|
||||
/* Exit libvirtd cleanly */
|
||||
virNetServerQuit(srv);
|
||||
}
|
||||
|
||||
|
||||
/* We do this in a thread to not block the main loop */
|
||||
static void daemonStop(virNetServerPtr srv)
|
||||
{
|
||||
virThread thr;
|
||||
virObjectRef(srv);
|
||||
if (virThreadCreate(&thr, false, daemonStopWorker, srv) < 0)
|
||||
virObjectUnref(srv);
|
||||
}
|
||||
|
||||
|
||||
static DBusHandlerResult
|
||||
handleSessionMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED,
|
||||
DBusMessage *message,
|
||||
void *opaque)
|
||||
{
|
||||
virNetServerPtr srv = opaque;
|
||||
|
||||
VIR_DEBUG("srv=%p", srv);
|
||||
|
||||
if (dbus_message_is_signal(message,
|
||||
DBUS_INTERFACE_LOCAL,
|
||||
"Disconnected"))
|
||||
daemonStop(srv);
|
||||
|
||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
}
|
||||
|
||||
|
||||
static DBusHandlerResult
|
||||
handleSystemMessageFunc(DBusConnection *connection ATTRIBUTE_UNUSED,
|
||||
DBusMessage *message,
|
||||
void *opaque)
|
||||
{
|
||||
virNetServerPtr srv = opaque;
|
||||
|
||||
VIR_DEBUG("srv=%p", srv);
|
||||
|
||||
if (dbus_message_is_signal(message,
|
||||
"org.freedesktop.login1.Manager",
|
||||
"PrepareForShutdown"))
|
||||
daemonStop(srv);
|
||||
|
||||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static void daemonRunStateInit(void *opaque)
|
||||
{
|
||||
virNetServerPtr srv = opaque;
|
||||
|
||||
/* Since driver initialization can take time inhibit daemon shutdown until
|
||||
we're done so clients get a chance to connect */
|
||||
daemonInhibitCallback(true, srv);
|
||||
|
||||
/* Start the stateful HV drivers
|
||||
* This is deliberately done after telling the parent process
|
||||
* we're ready, since it can take a long time and this will
|
||||
* seriously delay OS bootup process */
|
||||
if (virStateInitialize(virNetServerIsPrivileged(srv)) < 0) {
|
||||
if (virStateInitialize(virNetServerIsPrivileged(srv),
|
||||
daemonInhibitCallback,
|
||||
srv) < 0) {
|
||||
VIR_ERROR(_("Driver state initialization failed"));
|
||||
/* Ensure the main event loop quits */
|
||||
kill(getpid(), SIGTERM);
|
||||
virObjectUnref(srv);
|
||||
return;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
/* Tie the non-priviledged libvirtd to the session/shutdown lifecycle */
|
||||
if (!virNetServerIsPrivileged(srv)) {
|
||||
|
||||
sessionBus = virDBusGetSessionBus();
|
||||
if (sessionBus != NULL)
|
||||
dbus_connection_add_filter(sessionBus,
|
||||
handleSessionMessageFunc, srv, NULL);
|
||||
|
||||
systemBus = virDBusGetSystemBus();
|
||||
if (systemBus != NULL) {
|
||||
dbus_connection_add_filter(systemBus,
|
||||
handleSystemMessageFunc, srv, NULL);
|
||||
dbus_bus_add_match(systemBus,
|
||||
"type='signal',sender='org.freedesktop.login1', interface='org.freedesktop.login1.Manager'",
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* Only now accept clients from network */
|
||||
virNetServerUpdateServices(srv, true);
|
||||
cleanup:
|
||||
daemonInhibitCallback(false, srv);
|
||||
virObjectUnref(srv);
|
||||
}
|
||||
|
||||
@ -866,42 +1000,43 @@ static int migrateProfile(void)
|
||||
static void
|
||||
daemonUsage(const char *argv0, bool privileged)
|
||||
{
|
||||
fprintf (stderr,
|
||||
_("\n\
|
||||
Usage:\n\
|
||||
%s [options]\n\
|
||||
\n\
|
||||
Options:\n\
|
||||
-v | --verbose Verbose messages.\n\
|
||||
-d | --daemon Run as a daemon & write PID file.\n\
|
||||
-l | --listen Listen for TCP/IP connections.\n\
|
||||
-t | --timeout <secs> Exit after timeout period.\n\
|
||||
-f | --config <file> Configuration file.\n\
|
||||
| --version Display version information.\n\
|
||||
-p | --pid-file <file> Change name of PID file.\n\
|
||||
\n\
|
||||
libvirt management daemon:\n"), argv0);
|
||||
fprintf(stderr,
|
||||
_("\n"
|
||||
"Usage:\n"
|
||||
" %s [options]\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -v | --verbose Verbose messages.\n"
|
||||
" -d | --daemon Run as a daemon & write PID file.\n"
|
||||
" -l | --listen Listen for TCP/IP connections.\n"
|
||||
" -t | --timeout <secs> Exit after timeout period.\n"
|
||||
" -f | --config <file> Configuration file.\n"
|
||||
" | --version Display version information.\n"
|
||||
" -p | --pid-file <file> Change name of PID file.\n"
|
||||
"\n"
|
||||
"libvirt management daemon:\n"),
|
||||
argv0);
|
||||
|
||||
if (privileged) {
|
||||
fprintf(stderr,
|
||||
_("\n\
|
||||
Default paths:\n\
|
||||
\n\
|
||||
Configuration file (unless overridden by -f):\n\
|
||||
%s/libvirt/libvirtd.conf\n\
|
||||
\n\
|
||||
Sockets:\n\
|
||||
%s/run/libvirt/libvirt-sock\n\
|
||||
%s/run/libvirt/libvirt-sock-ro\n\
|
||||
\n\
|
||||
TLS:\n\
|
||||
CA certificate: %s/pki/CA/caert.pem\n\
|
||||
Server certificate: %s/pki/libvirt/servercert.pem\n\
|
||||
Server private key: %s/pki/libvirt/private/serverkey.pem\n\
|
||||
\n\
|
||||
PID file (unless overridden by -p):\n\
|
||||
%s/run/libvirtd.pid\n\
|
||||
\n"),
|
||||
_("\n"
|
||||
" Default paths:\n"
|
||||
"\n"
|
||||
" Configuration file (unless overridden by -f):\n"
|
||||
" %s/libvirt/libvirtd.conf\n"
|
||||
"\n"
|
||||
" Sockets:\n"
|
||||
" %s/run/libvirt/libvirt-sock\n"
|
||||
" %s/run/libvirt/libvirt-sock-ro\n"
|
||||
"\n"
|
||||
" TLS:\n"
|
||||
" CA certificate: %s/pki/CA/caert.pem\n"
|
||||
" Server certificate: %s/pki/libvirt/servercert.pem\n"
|
||||
" Server private key: %s/pki/libvirt/private/serverkey.pem\n"
|
||||
"\n"
|
||||
" PID file (unless overridden by -p):\n"
|
||||
" %s/run/libvirtd.pid\n"
|
||||
"\n"),
|
||||
SYSCONFDIR,
|
||||
LOCALSTATEDIR,
|
||||
LOCALSTATEDIR,
|
||||
@ -910,24 +1045,24 @@ libvirt management daemon:\n"), argv0);
|
||||
SYSCONFDIR,
|
||||
LOCALSTATEDIR);
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"%s", _("\n\
|
||||
Default paths:\n\
|
||||
\n\
|
||||
Configuration file (unless overridden by -f):\n\
|
||||
$XDG_CONFIG_HOME/libvirt/libvirtd.conf\n\
|
||||
\n\
|
||||
Sockets:\n\
|
||||
$XDG_RUNTIME_DIR/libvirt/libvirt-sock (in UNIX abstract namespace)\n\
|
||||
\n\
|
||||
TLS:\n\
|
||||
CA certificate: $HOME/.pki/libvirt/cacert.pem\n\
|
||||
Server certificate: $HOME/.pki/libvirt/servercert.pem\n\
|
||||
Server private key: $HOME/.pki/libvirt/serverkey.pem\n\
|
||||
\n\
|
||||
PID file:\n\
|
||||
$XDG_RUNTIME_DIR/libvirt/libvirtd.pid\n\
|
||||
\n"));
|
||||
fprintf(stderr, "%s",
|
||||
_("\n"
|
||||
" Default paths:\n"
|
||||
"\n"
|
||||
" Configuration file (unless overridden by -f):\n"
|
||||
" $XDG_CONFIG_HOME/libvirt/libvirtd.conf\n"
|
||||
"\n"
|
||||
" Sockets:\n"
|
||||
" $XDG_RUNTIME_DIR/libvirt/libvirt-sock\n"
|
||||
"\n"
|
||||
" TLS:\n"
|
||||
" CA certificate: $HOME/.pki/libvirt/cacert.pem\n"
|
||||
" Server certificate: $HOME/.pki/libvirt/servercert.pem\n"
|
||||
" Server private key: $HOME/.pki/libvirt/serverkey.pem\n"
|
||||
"\n"
|
||||
" PID file:\n"
|
||||
" $XDG_RUNTIME_DIR/libvirt/libvirtd.pid\n"
|
||||
"\n"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -967,17 +1102,14 @@ int main(int argc, char **argv) {
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
if (setlocale (LC_ALL, "") == NULL ||
|
||||
bindtextdomain (PACKAGE, LOCALEDIR) == NULL ||
|
||||
if (setlocale(LC_ALL, "") == NULL ||
|
||||
bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
|
||||
textdomain(PACKAGE) == NULL ||
|
||||
virInitialize() < 0) {
|
||||
fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* initialize early logging */
|
||||
virLogSetFromEnv();
|
||||
|
||||
if (strstr(argv[0], "lt-libvirtd") ||
|
||||
strstr(argv[0], "/daemon/.libs/libvirtd")) {
|
||||
char *tmp = strrchr(argv[0], '/');
|
||||
@ -1066,7 +1198,7 @@ int main(int argc, char **argv) {
|
||||
default:
|
||||
VIR_ERROR(_("%s: internal error: unknown flag: %c"),
|
||||
argv[0], c);
|
||||
exit (EXIT_FAILURE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1204,6 +1336,7 @@ int main(int argc, char **argv) {
|
||||
!!config->keepalive_required,
|
||||
config->mdns_adv ? config->mdns_name : NULL,
|
||||
remoteClientInitHook,
|
||||
NULL,
|
||||
remoteClientFreeFunc,
|
||||
NULL))) {
|
||||
ret = VIR_DAEMON_ERR_INIT;
|
||||
@ -1238,6 +1371,18 @@ int main(int argc, char **argv) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!(lxcProgram = virNetServerProgramNew(LXC_PROGRAM,
|
||||
LXC_PROTOCOL_VERSION,
|
||||
lxcProcs,
|
||||
lxcNProcs))) {
|
||||
ret = VIR_DAEMON_ERR_INIT;
|
||||
goto cleanup;
|
||||
}
|
||||
if (virNetServerAddProgram(srv, lxcProgram) < 0) {
|
||||
ret = VIR_DAEMON_ERR_INIT;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!(qemuProgram = virNetServerProgramNew(QEMU_PROGRAM,
|
||||
QEMU_PROTOCOL_VERSION,
|
||||
qemuProcs,
|
||||
@ -1253,9 +1398,7 @@ int main(int argc, char **argv) {
|
||||
if (timeout != -1) {
|
||||
VIR_DEBUG("Registering shutdown timeout %d", timeout);
|
||||
virNetServerAutoShutdown(srv,
|
||||
timeout,
|
||||
daemonShutdownCheck,
|
||||
NULL);
|
||||
timeout);
|
||||
}
|
||||
|
||||
if ((daemonSetupSignals(srv)) < 0) {
|
||||
@ -1345,6 +1488,7 @@ int main(int argc, char **argv) {
|
||||
cleanup:
|
||||
virNetlinkEventServiceStopAll();
|
||||
virObjectUnref(remoteProgram);
|
||||
virObjectUnref(lxcProgram);
|
||||
virObjectUnref(qemuProgram);
|
||||
virNetServerClose(srv);
|
||||
virObjectUnref(srv);
|
||||
@ -1370,5 +1514,7 @@ cleanup:
|
||||
|
||||
daemonConfigFree(config);
|
||||
|
||||
virStateCleanup();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -251,7 +251,7 @@
|
||||
|
||||
# The minimum limit sets the number of workers to start up
|
||||
# initially. If the number of active clients exceeds this,
|
||||
# then more threads are spawned, upto max_workers limit.
|
||||
# then more threads are spawned, up to max_workers limit.
|
||||
# Typically you'd want max_workers to equal maximum number
|
||||
# of clients allowed
|
||||
#min_workers = 5
|
||||
@ -267,7 +267,7 @@
|
||||
# at least as large as max_workers. Beyond this, RPC requests
|
||||
# will be read into memory and queued. This directly impact
|
||||
# memory usage, currently each request requires 256 KB of
|
||||
# memory. So by default upto 5 MB of memory is used
|
||||
# memory. So by default up to 5 MB of memory is used
|
||||
#
|
||||
# XXX this isn't actually enforced yet, only the per-client
|
||||
# limit is used so far
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; If not, see
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
@ -32,10 +32,11 @@
|
||||
# include <rpc/types.h>
|
||||
# include <rpc/xdr.h>
|
||||
# include "remote_protocol.h"
|
||||
# include "lxc_protocol.h"
|
||||
# include "qemu_protocol.h"
|
||||
# include "logging.h"
|
||||
# include "threads.h"
|
||||
# if HAVE_SASL
|
||||
# include "virlog.h"
|
||||
# include "virthread.h"
|
||||
# if WITH_SASL
|
||||
# include "virnetsaslcontext.h"
|
||||
# endif
|
||||
# include "virnetserverprogram.h"
|
||||
@ -52,7 +53,7 @@ struct daemonClientPrivate {
|
||||
|
||||
int domainEventCallbackID[VIR_DOMAIN_EVENT_ID_LAST];
|
||||
|
||||
# if HAVE_SASL
|
||||
# if WITH_SASL
|
||||
virNetSASLSessionPtr sasl;
|
||||
# endif
|
||||
|
||||
@ -66,7 +67,7 @@ struct daemonClientPrivate {
|
||||
bool keepalive_supported;
|
||||
};
|
||||
|
||||
# if HAVE_SASL
|
||||
# if WITH_SASL
|
||||
extern virNetSASLContextPtr saslCtxt;
|
||||
# endif
|
||||
extern virNetServerProgramPtr remoteProgram;
|
||||
|
@ -1,42 +0,0 @@
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
|
||||
<!--
|
||||
Policy definitions for libvirt daemon
|
||||
|
||||
Copyright (c) 2007 Daniel P. Berrange <berrange redhat com>
|
||||
|
||||
libvirt is licensed to you under the GNU Lesser General Public License
|
||||
version 2. See COPYING for details.
|
||||
|
||||
NOTE: If you make changes to this file, make sure to validate the file
|
||||
using the polkit-policy-file-validate(1) tool. Changes made to this
|
||||
file are instantly applied.
|
||||
-->
|
||||
|
||||
<policyconfig>
|
||||
<action id="org.libvirt.unix.monitor">
|
||||
<description>Monitor local virtualized systems</description>
|
||||
<message>System policy prevents monitoring of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Any program can use libvirt in read-only mode for monitoring,
|
||||
even if not part of a session -->
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
||||
<action id="org.libvirt.unix.manage">
|
||||
<description>Manage local virtualized systems</description>
|
||||
<message>System policy prevents management of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Only a program in the active host session can use libvirt in
|
||||
read-write mode for management, and we require user password -->
|
||||
<allow_any>auth_admin</allow_any>
|
||||
<allow_inactive>auth_admin</allow_inactive>
|
||||
<allow_active>auth_admin_keep_session</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
</policyconfig>
|
@ -1,42 +0,0 @@
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
|
||||
<!--
|
||||
Policy definitions for libvirt daemon
|
||||
|
||||
Copyright (c) 2007 Daniel P. Berrange <berrange redhat com>
|
||||
|
||||
libvirt is licensed to you under the GNU Lesser General Public License
|
||||
version 2. See COPYING for details.
|
||||
|
||||
NOTE: If you make changes to this file, make sure to validate the file
|
||||
using the polkit-policy-file-validate(1) tool. Changes made to this
|
||||
file are instantly applied.
|
||||
-->
|
||||
|
||||
<policyconfig>
|
||||
<action id="org.libvirt.unix.monitor">
|
||||
<description>Monitor local virtualized systems</description>
|
||||
<message>System policy prevents monitoring of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Any program can use libvirt in read-only mode for monitoring,
|
||||
even if not part of a session -->
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
||||
<action id="org.libvirt.unix.manage">
|
||||
<description>Manage local virtualized systems</description>
|
||||
<message>System policy prevents management of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Only a program in the active host session can use libvirt in
|
||||
read-write mode for management, and we require user password -->
|
||||
<allow_any>auth_admin</allow_any>
|
||||
<allow_inactive>auth_admin</allow_inactive>
|
||||
<allow_active>auth_admin_keep</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
</policyconfig>
|
51
daemon/libvirtd.policy.in
Normal file
51
daemon/libvirtd.policy.in
Normal file
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
|
||||
<!--
|
||||
Policy definitions for libvirt daemon
|
||||
|
||||
Copyright (C) 2012 Red Hat, Inc.
|
||||
Copyright (C) 2007 Daniel P. Berrange <berrange redhat com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<policyconfig>
|
||||
<action id="org.libvirt.unix.monitor">
|
||||
<description>Monitor local virtualized systems</description>
|
||||
<message>System policy prevents monitoring of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Any program can use libvirt in read-only mode for monitoring,
|
||||
even if not part of a session -->
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
||||
<action id="org.libvirt.unix.manage">
|
||||
<description>Manage local virtualized systems</description>
|
||||
<message>System policy prevents management of local virtualized systems</message>
|
||||
<defaults>
|
||||
<!-- Any program can use libvirt in read/write mode if they
|
||||
provide the root password -->
|
||||
<allow_any>@authaction@</allow_any>
|
||||
<allow_inactive>@authaction@</allow_inactive>
|
||||
<allow_active>@authaction@</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
</policyconfig>
|
@ -18,9 +18,12 @@ mech_list: digest-md5
|
||||
# qemu+tcp://hostname/system?auth=sasl.gssapi
|
||||
#mech_list: digest-md5 gssapi
|
||||
|
||||
# MIT kerberos ignores this option & needs KRB5_KTNAME env var.
|
||||
# May be useful for other non-Linux OS though....
|
||||
keytab: /etc/libvirt/krb5.tab
|
||||
# Some older builds of MIT kerberos on Linux ignore this option &
|
||||
# instead need KRB5_KTNAME env var.
|
||||
# For modern Linux, and other OS, this should be sufficient
|
||||
#
|
||||
# There is no default value here, uncomment if you need this
|
||||
#keytab: /etc/libvirt/krb5.tab
|
||||
|
||||
# If using digest-md5 for username/passwds, then this is the file
|
||||
# containing the passwds. Use 'saslpasswd2 -a libvirt [username]'
|
||||
|
@ -7,6 +7,7 @@
|
||||
Description=Virtualization daemon
|
||||
Before=libvirt-guests.service
|
||||
After=network.target
|
||||
After=dbus.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/sysconfig/libvirtd
|
||||
|
641
daemon/remote.c
641
daemon/remote.c
@ -14,7 +14,7 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; If not, see
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Richard W.M. Jones <rjones@redhat.com>
|
||||
@ -22,9 +22,9 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "virterror_internal.h"
|
||||
#include "virerror.h"
|
||||
|
||||
#if HAVE_POLKIT0
|
||||
#if WITH_POLKIT0
|
||||
# include <polkit/polkit.h>
|
||||
# include <polkit-dbus/polkit-dbus.h>
|
||||
#endif
|
||||
@ -33,21 +33,24 @@
|
||||
#include "libvirtd.h"
|
||||
#include "libvirt_internal.h"
|
||||
#include "datatypes.h"
|
||||
#include "memory.h"
|
||||
#include "logging.h"
|
||||
#include "util.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
#include "virutil.h"
|
||||
#include "stream.h"
|
||||
#include "uuid.h"
|
||||
#include "viruuid.h"
|
||||
#include "libvirt/libvirt-qemu.h"
|
||||
#include "command.h"
|
||||
#include "libvirt/libvirt-lxc.h"
|
||||
#include "vircommand.h"
|
||||
#include "intprops.h"
|
||||
#include "virnetserverservice.h"
|
||||
#include "virnetserver.h"
|
||||
#include "virfile.h"
|
||||
#include "virtypedparam.h"
|
||||
#include "virdbus.h"
|
||||
#include "virprocess.h"
|
||||
#include "remote_protocol.h"
|
||||
#include "qemu_protocol.h"
|
||||
#include "lxc_protocol.h"
|
||||
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_RPC
|
||||
@ -103,6 +106,7 @@ remoteSerializeDomainDiskErrors(virDomainDiskErrorPtr errors,
|
||||
|
||||
#include "remote_dispatch.h"
|
||||
#include "qemu_dispatch.h"
|
||||
#include "lxc_dispatch.h"
|
||||
|
||||
|
||||
/* Prototypes */
|
||||
@ -536,6 +540,7 @@ static int remoteRelayDomainEventTrayChange(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
|
||||
static int remoteRelayDomainEventPMWakeup(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int reason ATTRIBUTE_UNUSED,
|
||||
void *opaque) {
|
||||
virNetServerClientPtr client = opaque;
|
||||
remote_domain_event_pmwakeup_msg data;
|
||||
@ -558,6 +563,7 @@ static int remoteRelayDomainEventPMWakeup(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
|
||||
static int remoteRelayDomainEventPMSuspend(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int reason ATTRIBUTE_UNUSED,
|
||||
void *opaque) {
|
||||
virNetServerClientPtr client = opaque;
|
||||
remote_domain_event_pmsuspend_msg data;
|
||||
@ -605,6 +611,30 @@ remoteRelayDomainEventBalloonChange(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
static int remoteRelayDomainEventPMSuspendDisk(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int reason ATTRIBUTE_UNUSED,
|
||||
void *opaque) {
|
||||
virNetServerClientPtr client = opaque;
|
||||
remote_domain_event_pmsuspend_disk_msg data;
|
||||
|
||||
if (!client)
|
||||
return -1;
|
||||
|
||||
VIR_DEBUG("Relaying domain %s %d system pmsuspend-disk", dom->name, dom->id);
|
||||
|
||||
/* build return data */
|
||||
memset(&data, 0, sizeof(data));
|
||||
make_nonnull_domain(&data.dom, dom);
|
||||
|
||||
remoteDispatchDomainEventSend(client, remoteProgram,
|
||||
REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND_DISK,
|
||||
(xdrproc_t)xdr_remote_domain_event_pmsuspend_disk_msg, &data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static virConnectDomainEventGenericCallback domainEventCallbacks[] = {
|
||||
VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventLifecycle),
|
||||
VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventReboot),
|
||||
@ -620,6 +650,7 @@ static virConnectDomainEventGenericCallback domainEventCallbacks[] = {
|
||||
VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventPMWakeup),
|
||||
VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventPMSuspend),
|
||||
VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventBalloonChange),
|
||||
VIR_DOMAIN_EVENT_CALLBACK(remoteRelayDomainEventPMSuspendDisk),
|
||||
};
|
||||
|
||||
verify(ARRAY_CARDINALITY(domainEventCallbacks) == VIR_DOMAIN_EVENT_ID_LAST);
|
||||
@ -956,8 +987,8 @@ remoteDeserializeTypedParameters(remote_typed_param *args_params_val,
|
||||
|
||||
cleanup:
|
||||
if (rv < 0) {
|
||||
virTypedParameterArrayClear(params, i);
|
||||
VIR_FREE(params);
|
||||
virTypedParamsFree(params, i);
|
||||
params = NULL;
|
||||
}
|
||||
return params;
|
||||
}
|
||||
@ -1006,8 +1037,7 @@ remoteDispatchDomainGetSchedulerParameters(virNetServerPtr server ATTRIBUTE_UNUS
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virTypedParameterArrayClear(params, nparams);
|
||||
VIR_FREE(params);
|
||||
virTypedParamsFree(params, nparams);
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
return rv;
|
||||
@ -1116,8 +1146,7 @@ remoteDispatchDomainGetSchedulerParametersFlags(virNetServerPtr server ATTRIBUTE
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virTypedParameterArrayClear(params, nparams);
|
||||
VIR_FREE(params);
|
||||
virTypedParamsFree(params, nparams);
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
return rv;
|
||||
@ -1305,8 +1334,7 @@ success:
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virTypedParameterArrayClear(params, nparams);
|
||||
VIR_FREE(params);
|
||||
virTypedParamsFree(params, nparams);
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
return rv;
|
||||
@ -1935,8 +1963,7 @@ success:
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virTypedParameterArrayClear(params, nparams);
|
||||
VIR_FREE(params);
|
||||
virTypedParamsFree(params, nparams);
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
return rv;
|
||||
@ -2000,8 +2027,7 @@ success:
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virTypedParameterArrayClear(params, nparams);
|
||||
VIR_FREE(params);
|
||||
virTypedParamsFree(params, nparams);
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
return rv;
|
||||
@ -2065,8 +2091,7 @@ success:
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virTypedParameterArrayClear(params, nparams);
|
||||
VIR_FREE(params);
|
||||
virTypedParamsFree(params, nparams);
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
return rv;
|
||||
@ -2327,8 +2352,7 @@ success:
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virTypedParameterArrayClear(params, nparams);
|
||||
VIR_FREE(params);
|
||||
virTypedParamsFree(params, nparams);
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
return rv;
|
||||
@ -2404,7 +2428,7 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_SASL
|
||||
#ifdef WITH_SASL
|
||||
/*
|
||||
* Initializes the SASL session in prepare for authentication
|
||||
* and gives the client a list of allowed mechanisms to choose
|
||||
@ -2436,6 +2460,7 @@ remoteDispatchAuthSaslInit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
if (!sasl)
|
||||
goto authfail;
|
||||
|
||||
# if WITH_GNUTLS
|
||||
/* Inform SASL that we've got an external SSF layer from TLS */
|
||||
if (virNetServerClientHasTLSSession(client)) {
|
||||
int ssf;
|
||||
@ -2449,6 +2474,7 @@ remoteDispatchAuthSaslInit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
if (virNetSASLSessionExtKeySize(sasl, ssf) < 0)
|
||||
goto authfail;
|
||||
}
|
||||
# endif
|
||||
|
||||
if (virNetServerClientIsSecure(client))
|
||||
/* If we've got TLS or UNIX domain sock, we don't care about SSF */
|
||||
@ -2772,7 +2798,7 @@ remoteDispatchAuthSaslStep(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
|
||||
|
||||
|
||||
#if HAVE_POLKIT1
|
||||
#if WITH_POLKIT1
|
||||
static int
|
||||
remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
@ -2830,7 +2856,7 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
|
||||
authdismissed = (pkout && strstr(pkout, "dismissed=true"));
|
||||
if (status != 0) {
|
||||
char *tmp = virCommandTranslateStatus(status);
|
||||
char *tmp = virProcessTranslateStatus(status);
|
||||
VIR_ERROR(_("Policy kit denied action %s from pid %lld, uid %d: %s"),
|
||||
action, (long long) callerPid, callerUid, NULLSTR(tmp));
|
||||
VIR_FREE(tmp);
|
||||
@ -2859,9 +2885,10 @@ error:
|
||||
if (authdismissed) {
|
||||
virReportError(VIR_ERR_AUTH_CANCELLED, "%s",
|
||||
_("authentication cancelled by user"));
|
||||
} else if (pkout && *pkout) {
|
||||
virReportError(VIR_ERR_AUTH_FAILED, _("polkit: %s"), pkout);
|
||||
} else {
|
||||
virReportError(VIR_ERR_AUTH_FAILED, "%s",
|
||||
pkout && *pkout ? pkout : _("authentication failed"));
|
||||
virReportError(VIR_ERR_AUTH_FAILED, "%s", _("authentication failed"));
|
||||
}
|
||||
|
||||
VIR_FREE(pkout);
|
||||
@ -2881,7 +2908,7 @@ authdeny:
|
||||
client, REMOTE_AUTH_POLKIT, ident);
|
||||
goto error;
|
||||
}
|
||||
#elif HAVE_POLKIT0
|
||||
#elif WITH_POLKIT0
|
||||
static int
|
||||
remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
@ -3025,7 +3052,7 @@ authdeny:
|
||||
goto error;
|
||||
}
|
||||
|
||||
#else /* !HAVE_POLKIT0 & !HAVE_POLKIT1*/
|
||||
#else /* !WITH_POLKIT0 & !HAVE_POLKIT1*/
|
||||
|
||||
static int
|
||||
remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
@ -3040,7 +3067,7 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetMessageSaveError(rerr);
|
||||
return -1;
|
||||
}
|
||||
#endif /* HAVE_POLKIT1 */
|
||||
#endif /* WITH_POLKIT1 */
|
||||
|
||||
|
||||
/***************************************************************
|
||||
@ -3828,8 +3855,7 @@ success:
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virTypedParameterArrayClear(params, nparams);
|
||||
VIR_FREE(params);
|
||||
virTypedParamsFree(params, nparams);
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
return rv;
|
||||
@ -3903,8 +3929,7 @@ success:
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virTypedParameterArrayClear(params, args->ncpus * args->nparams);
|
||||
VIR_FREE(params);
|
||||
virTypedParamsFree(params, args->ncpus * args->nparams);
|
||||
if (dom)
|
||||
virDomainFree(dom);
|
||||
return rv;
|
||||
@ -4099,6 +4124,544 @@ cleanup:
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchConnectListAllStoragePools(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_connect_list_all_storage_pools_args *args,
|
||||
remote_connect_list_all_storage_pools_ret *ret)
|
||||
{
|
||||
virStoragePoolPtr *pools = NULL;
|
||||
int npools = 0;
|
||||
int i;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv = virNetServerClientGetPrivateData(client);
|
||||
|
||||
if (!priv->conn) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((npools = virConnectListAllStoragePools(priv->conn,
|
||||
args->need_results ? &pools : NULL,
|
||||
args->flags)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (pools && npools) {
|
||||
if (VIR_ALLOC_N(ret->pools.pools_val, npools) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret->pools.pools_len = npools;
|
||||
|
||||
for (i = 0; i < npools; i++)
|
||||
make_nonnull_storage_pool(ret->pools.pools_val + i, pools[i]);
|
||||
} else {
|
||||
ret->pools.pools_len = 0;
|
||||
ret->pools.pools_val = NULL;
|
||||
}
|
||||
|
||||
ret->ret = npools;
|
||||
|
||||
rv = 0;
|
||||
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
if (pools) {
|
||||
for (i = 0; i < npools; i++)
|
||||
virStoragePoolFree(pools[i]);
|
||||
VIR_FREE(pools);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchStoragePoolListAllVolumes(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_storage_pool_list_all_volumes_args *args,
|
||||
remote_storage_pool_list_all_volumes_ret *ret)
|
||||
{
|
||||
virStorageVolPtr *vols = NULL;
|
||||
virStoragePoolPtr pool = NULL;
|
||||
int nvols = 0;
|
||||
int i;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv = virNetServerClientGetPrivateData(client);
|
||||
|
||||
if (!priv->conn) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!(pool = get_nonnull_storage_pool(priv->conn, args->pool)))
|
||||
goto cleanup;
|
||||
|
||||
if ((nvols = virStoragePoolListAllVolumes(pool,
|
||||
args->need_results ? &vols : NULL,
|
||||
args->flags)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (vols && nvols) {
|
||||
if (VIR_ALLOC_N(ret->vols.vols_val, nvols) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret->vols.vols_len = nvols;
|
||||
|
||||
for (i = 0; i < nvols; i++)
|
||||
make_nonnull_storage_vol(ret->vols.vols_val + i, vols[i]);
|
||||
} else {
|
||||
ret->vols.vols_len = 0;
|
||||
ret->vols.vols_val = NULL;
|
||||
}
|
||||
|
||||
ret->ret = nvols;
|
||||
|
||||
rv = 0;
|
||||
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
if (vols) {
|
||||
for (i = 0; i < nvols; i++)
|
||||
virStorageVolFree(vols[i]);
|
||||
VIR_FREE(vols);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchConnectListAllNetworks(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_connect_list_all_networks_args *args,
|
||||
remote_connect_list_all_networks_ret *ret)
|
||||
{
|
||||
virNetworkPtr *nets = NULL;
|
||||
int nnets = 0;
|
||||
int i;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv = virNetServerClientGetPrivateData(client);
|
||||
|
||||
if (!priv->conn) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((nnets = virConnectListAllNetworks(priv->conn,
|
||||
args->need_results ? &nets : NULL,
|
||||
args->flags)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (nets && nnets) {
|
||||
if (VIR_ALLOC_N(ret->nets.nets_val, nnets) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret->nets.nets_len = nnets;
|
||||
|
||||
for (i = 0; i < nnets; i++)
|
||||
make_nonnull_network(ret->nets.nets_val + i, nets[i]);
|
||||
} else {
|
||||
ret->nets.nets_len = 0;
|
||||
ret->nets.nets_val = NULL;
|
||||
}
|
||||
|
||||
ret->ret = nnets;
|
||||
|
||||
rv = 0;
|
||||
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
if (nets) {
|
||||
for (i = 0; i < nnets; i++)
|
||||
virNetworkFree(nets[i]);
|
||||
VIR_FREE(nets);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchConnectListAllInterfaces(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_connect_list_all_interfaces_args *args,
|
||||
remote_connect_list_all_interfaces_ret *ret)
|
||||
{
|
||||
virInterfacePtr *ifaces = NULL;
|
||||
int nifaces = 0;
|
||||
int i;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv = virNetServerClientGetPrivateData(client);
|
||||
|
||||
if (!priv->conn) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((nifaces = virConnectListAllInterfaces(priv->conn,
|
||||
args->need_results ? &ifaces : NULL,
|
||||
args->flags)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (ifaces && nifaces) {
|
||||
if (VIR_ALLOC_N(ret->ifaces.ifaces_val, nifaces) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret->ifaces.ifaces_len = nifaces;
|
||||
|
||||
for (i = 0; i < nifaces; i++)
|
||||
make_nonnull_interface(ret->ifaces.ifaces_val + i, ifaces[i]);
|
||||
} else {
|
||||
ret->ifaces.ifaces_len = 0;
|
||||
ret->ifaces.ifaces_val = NULL;
|
||||
}
|
||||
|
||||
ret->ret = nifaces;
|
||||
|
||||
rv = 0;
|
||||
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
if (ifaces) {
|
||||
for (i = 0; i < nifaces; i++)
|
||||
virInterfaceFree(ifaces[i]);
|
||||
VIR_FREE(ifaces);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchConnectListAllNodeDevices(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_connect_list_all_node_devices_args *args,
|
||||
remote_connect_list_all_node_devices_ret *ret)
|
||||
{
|
||||
virNodeDevicePtr *devices = NULL;
|
||||
int ndevices = 0;
|
||||
int i;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv = virNetServerClientGetPrivateData(client);
|
||||
|
||||
if (!priv->conn) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((ndevices = virConnectListAllNodeDevices(priv->conn,
|
||||
args->need_results ? &devices : NULL,
|
||||
args->flags)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (devices && ndevices) {
|
||||
if (VIR_ALLOC_N(ret->devices.devices_val, ndevices) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret->devices.devices_len = ndevices;
|
||||
|
||||
for (i = 0; i < ndevices; i++)
|
||||
make_nonnull_node_device(ret->devices.devices_val + i, devices[i]);
|
||||
} else {
|
||||
ret->devices.devices_len = 0;
|
||||
ret->devices.devices_val = NULL;
|
||||
}
|
||||
|
||||
ret->ret = ndevices;
|
||||
|
||||
rv = 0;
|
||||
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
if (devices) {
|
||||
for (i = 0; i < ndevices; i++)
|
||||
virNodeDeviceFree(devices[i]);
|
||||
VIR_FREE(devices);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchConnectListAllNWFilters(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_connect_list_all_nwfilters_args *args,
|
||||
remote_connect_list_all_nwfilters_ret *ret)
|
||||
{
|
||||
virNWFilterPtr *filters = NULL;
|
||||
int nfilters = 0;
|
||||
int i;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv = virNetServerClientGetPrivateData(client);
|
||||
|
||||
if (!priv->conn) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((nfilters = virConnectListAllNWFilters(priv->conn,
|
||||
args->need_results ? &filters : NULL,
|
||||
args->flags)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (filters && nfilters) {
|
||||
if (VIR_ALLOC_N(ret->filters.filters_val, nfilters) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret->filters.filters_len = nfilters;
|
||||
|
||||
for (i = 0; i < nfilters; i++)
|
||||
make_nonnull_nwfilter(ret->filters.filters_val + i, filters[i]);
|
||||
} else {
|
||||
ret->filters.filters_len = 0;
|
||||
ret->filters.filters_val = NULL;
|
||||
}
|
||||
|
||||
ret->ret = nfilters;
|
||||
|
||||
rv = 0;
|
||||
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
if (filters) {
|
||||
for (i = 0; i < nfilters; i++)
|
||||
virNWFilterFree(filters[i]);
|
||||
VIR_FREE(filters);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchConnectListAllSecrets(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_connect_list_all_secrets_args *args,
|
||||
remote_connect_list_all_secrets_ret *ret)
|
||||
{
|
||||
virSecretPtr *secrets = NULL;
|
||||
int nsecrets = 0;
|
||||
int i;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv = virNetServerClientGetPrivateData(client);
|
||||
|
||||
if (!priv->conn) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((nsecrets = virConnectListAllSecrets(priv->conn,
|
||||
args->need_results ? &secrets : NULL,
|
||||
args->flags)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (secrets && nsecrets) {
|
||||
if (VIR_ALLOC_N(ret->secrets.secrets_val, nsecrets) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret->secrets.secrets_len = nsecrets;
|
||||
|
||||
for (i = 0; i < nsecrets; i++)
|
||||
make_nonnull_secret(ret->secrets.secrets_val + i, secrets[i]);
|
||||
} else {
|
||||
ret->secrets.secrets_len = 0;
|
||||
ret->secrets.secrets_val = NULL;
|
||||
}
|
||||
|
||||
ret->ret = nsecrets;
|
||||
|
||||
rv = 0;
|
||||
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
if (secrets) {
|
||||
for (i = 0; i < nsecrets; i++)
|
||||
virSecretFree(secrets[i]);
|
||||
VIR_FREE(secrets);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchNodeGetMemoryParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_node_get_memory_parameters_args *args,
|
||||
remote_node_get_memory_parameters_ret *ret)
|
||||
{
|
||||
virTypedParameterPtr params = NULL;
|
||||
int nparams = args->nparams;
|
||||
unsigned int flags;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
virNetServerClientGetPrivateData(client);
|
||||
|
||||
if (!priv->conn) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
flags = args->flags;
|
||||
|
||||
if (nparams > REMOTE_NODE_MEMORY_PARAMETERS_MAX) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
|
||||
goto cleanup;
|
||||
}
|
||||
if (nparams && VIR_ALLOC_N(params, nparams) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
||||
if (virNodeGetMemoryParameters(priv->conn, params, &nparams, flags) < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* In this case, we need to send back the number of parameters
|
||||
* supported
|
||||
*/
|
||||
if (args->nparams == 0) {
|
||||
ret->nparams = nparams;
|
||||
goto success;
|
||||
}
|
||||
|
||||
if (remoteSerializeTypedParameters(params, nparams,
|
||||
&ret->params.params_val,
|
||||
&ret->params.params_len,
|
||||
args->flags) < 0)
|
||||
goto cleanup;
|
||||
|
||||
success:
|
||||
rv = 0;
|
||||
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virTypedParamsFree(params, nparams);
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchNodeGetCPUMap(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
remote_node_get_cpu_map_args *args,
|
||||
remote_node_get_cpu_map_ret *ret)
|
||||
{
|
||||
unsigned char *cpumap = NULL;
|
||||
unsigned int online = 0;
|
||||
unsigned int flags;
|
||||
int cpunum;
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
virNetServerClientGetPrivateData(client);
|
||||
|
||||
if (!priv->conn) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
flags = args->flags;
|
||||
|
||||
cpunum = virNodeGetCPUMap(priv->conn, args->need_map ? &cpumap : NULL,
|
||||
args->need_online ? &online : NULL, flags);
|
||||
if (cpunum < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* 'serialize' return cpumap */
|
||||
if (args->need_map) {
|
||||
ret->cpumap.cpumap_len = VIR_CPU_MAPLEN(cpunum);
|
||||
ret->cpumap.cpumap_val = (char *) cpumap;
|
||||
cpumap = NULL;
|
||||
}
|
||||
|
||||
ret->online = online;
|
||||
ret->ret = cpunum;
|
||||
|
||||
rv = 0;
|
||||
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
VIR_FREE(cpumap);
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
lxcDispatchDomainOpenNamespace(virNetServerPtr server ATTRIBUTE_UNUSED,
|
||||
virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
virNetMessagePtr msg ATTRIBUTE_UNUSED,
|
||||
virNetMessageErrorPtr rerr,
|
||||
lxc_domain_open_namespace_args *args)
|
||||
{
|
||||
int rv = -1;
|
||||
struct daemonClientPrivate *priv =
|
||||
virNetServerClientGetPrivateData(client);
|
||||
int *fdlist = NULL;
|
||||
int ret;
|
||||
virDomainPtr dom = NULL;
|
||||
size_t i;
|
||||
|
||||
if (!priv->conn) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!(dom = get_nonnull_domain(priv->conn, args->dom)))
|
||||
goto cleanup;
|
||||
|
||||
ret = virDomainLxcOpenNamespace(dom,
|
||||
&fdlist,
|
||||
args->flags);
|
||||
if (ret < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* We shouldn't have received any from the client,
|
||||
* but in case they're playing games with us, prevent
|
||||
* a resource leak
|
||||
*/
|
||||
for (i = 0 ; i < msg->nfds ; i++)
|
||||
VIR_FORCE_CLOSE(msg->fds[i]);
|
||||
VIR_FREE(msg->fds);
|
||||
msg->nfds = 0;
|
||||
|
||||
msg->fds = fdlist;
|
||||
msg->nfds = ret;
|
||||
|
||||
rv = 1;
|
||||
|
||||
cleanup:
|
||||
if (rv < 0)
|
||||
virNetMessageSaveError(rerr);
|
||||
virDomainFree(dom);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/*----- Helpers. -----*/
|
||||
|
||||
/* get_nonnull_domain and get_nonnull_network turn an on-wire
|
||||
@ -4134,14 +4697,16 @@ get_nonnull_interface(virConnectPtr conn, remote_nonnull_interface iface)
|
||||
static virStoragePoolPtr
|
||||
get_nonnull_storage_pool(virConnectPtr conn, remote_nonnull_storage_pool pool)
|
||||
{
|
||||
return virGetStoragePool(conn, pool.name, BAD_CAST pool.uuid);
|
||||
return virGetStoragePool(conn, pool.name, BAD_CAST pool.uuid,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
static virStorageVolPtr
|
||||
get_nonnull_storage_vol(virConnectPtr conn, remote_nonnull_storage_vol vol)
|
||||
{
|
||||
virStorageVolPtr ret;
|
||||
ret = virGetStorageVol(conn, vol.pool, vol.name, vol.key);
|
||||
ret = virGetStorageVol(conn, vol.pool, vol.name, vol.key,
|
||||
NULL, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; If not, see
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Richard W.M. Jones <rjones@redhat.com>
|
||||
@ -32,6 +32,9 @@
|
||||
extern virNetServerProgramProc remoteProcs[];
|
||||
extern size_t remoteNProcs;
|
||||
|
||||
extern virNetServerProgramProc lxcProcs[];
|
||||
extern size_t lxcNProcs;
|
||||
|
||||
extern virNetServerProgramProc qemuProcs[];
|
||||
extern size_t qemuNProcs;
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; If not, see
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
@ -25,10 +25,10 @@
|
||||
|
||||
#include "stream.h"
|
||||
#include "remote.h"
|
||||
#include "memory.h"
|
||||
#include "logging.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
#include "virnetserverclient.h"
|
||||
#include "virterror_internal.h"
|
||||
#include "virerror.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_STREAMS
|
||||
|
||||
@ -689,7 +689,7 @@ daemonStreamHandleWrite(virNetServerClientPtr client,
|
||||
|
||||
/*
|
||||
* Invoked when a stream is signalled as having data
|
||||
* available to read. This reads upto one message
|
||||
* available to read. This reads up to one message
|
||||
* worth of data, and then queues that for transmission
|
||||
* to the client.
|
||||
*
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; If not, see
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
|
@ -71,8 +71,14 @@ gif = \
|
||||
architecture.gif \
|
||||
node.gif
|
||||
|
||||
dot_html_in = $(notdir $(wildcard $(srcdir)/*.html.in)) todo.html.in hvsupport.html.in \
|
||||
$(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/internals/*.html.in))
|
||||
|
||||
internals_html_in = \
|
||||
$(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/internals/*.html.in))
|
||||
internals_html = $(internals_html_in:%.html.in=%.html)
|
||||
|
||||
dot_html_in = $(notdir $(wildcard $(srcdir)/*.html.in)) \
|
||||
todo.html.in \
|
||||
hvsupport.html.in
|
||||
dot_html = $(dot_html_in:%.html.in=%.html)
|
||||
|
||||
dot_php_in = $(notdir $(wildcard $(srcdir)/*.php.in))
|
||||
@ -89,8 +95,12 @@ qemu_xml = \
|
||||
libvirt-qemu-api.xml \
|
||||
libvirt-qemu-refs.xml
|
||||
|
||||
lxc_xml = \
|
||||
libvirt-lxc-api.xml \
|
||||
libvirt-lxc-refs.xml
|
||||
|
||||
apidir = $(pkgdatadir)/api
|
||||
api_DATA = libvirt-api.xml libvirt-qemu-api.xml
|
||||
api_DATA = libvirt-api.xml libvirt-qemu-api.xml libvirt-lxc-api.xml
|
||||
|
||||
fig = \
|
||||
libvirt-net-logical.fig \
|
||||
@ -110,8 +120,9 @@ EXTRA_DIST= \
|
||||
hacking1.xsl hacking2.xsl wrapstring.xsl \
|
||||
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
|
||||
$(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
|
||||
$(xml) $(qemu_xml) $(fig) $(png) $(css) \
|
||||
$(xml) $(qemu_xml) $(lxc_xml) $(fig) $(png) $(css) \
|
||||
$(patches) $(dot_php_in) $(dot_php_code_in) $(dot_php)\
|
||||
$(internals_html_in) $(internals_html) \
|
||||
sitemap.html.in \
|
||||
todo.pl hvsupport.pl todo.cfg-example
|
||||
|
||||
@ -119,14 +130,17 @@ MAINTAINERCLEANFILES = \
|
||||
$(addprefix $(srcdir)/,$(dot_html)) \
|
||||
$(addprefix $(srcdir)/,$(apihtml)) \
|
||||
$(addprefix $(srcdir)/,$(devhelphtml)) \
|
||||
$(addprefix $(srcdir)/,$(internals_html)) \
|
||||
$(addprefix $(srcdir)/,$(dot_php))
|
||||
|
||||
all-am: web
|
||||
|
||||
api: $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml
|
||||
qemu_api: $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
|
||||
lxc_api: $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
|
||||
|
||||
web: $(dot_html) html/index.html devhelp/index.html $(dot_php)
|
||||
web: $(dot_html) $(internals_html) html/index.html devhelp/index.html \
|
||||
$(dot_php)
|
||||
|
||||
todo.html.in: todo.pl
|
||||
if [ -f todo.cfg ]; then \
|
||||
@ -143,7 +157,8 @@ todo:
|
||||
$(MAKE) todo.html
|
||||
|
||||
hvsupport.html.in: $(srcdir)/hvsupport.pl $(srcdir)/../src/libvirt_public.syms \
|
||||
$(srcdir)/../src/libvirt_qemu.syms $(srcdir)/../src/driver.h
|
||||
$(srcdir)/../src/libvirt_qemu.syms $(srcdir)/../src/libvirt_lxc.syms \
|
||||
$(srcdir)/../src/driver.h
|
||||
$(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(srcdir)/../src > $@ || { rm $@ && exit 1; }
|
||||
|
||||
.PHONY: todo
|
||||
@ -186,10 +201,11 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
|
||||
|| { rm $@ && exit 1; }; fi
|
||||
|
||||
%.php: %.php.tmp %.php.code.in
|
||||
@echo "Scripting $@"; \
|
||||
sed -e '/<a id="php_placeholder"><\/a>/r '"$(srcdir)/$@.code.in" \
|
||||
-e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
|
||||
|| { rm $(srcdir)/$@ && exit 1; }
|
||||
@if [ -x $(XSLTPROC) ] ; then \
|
||||
echo "Scripting $@"; \
|
||||
sed -e '/<a id="php_placeholder"><\/a>/r '"$(srcdir)/$@.code.in" \
|
||||
-e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
|
||||
|| { rm $(srcdir)/$@ && exit 1; }; fi
|
||||
|
||||
html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
|
||||
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
|
||||
@ -210,12 +226,16 @@ $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
|
||||
|
||||
python_generated_files = \
|
||||
$(srcdir)/html/libvirt-libvirt.html \
|
||||
$(srcdir)/html/libvirt-libvirt-lxc.html \
|
||||
$(srcdir)/html/libvirt-libvirt-qemu.html \
|
||||
$(srcdir)/html/libvirt-virterror.html \
|
||||
$(srcdir)/libvirt-api.xml \
|
||||
$(srcdir)/libvirt-refs.xml \
|
||||
$(srcdir)/libvirt-lxc-api.xml \
|
||||
$(srcdir)/libvirt-lxc-refs.xml \
|
||||
$(srcdir)/libvirt-qemu-api.xml \
|
||||
$(srcdir)/libvirt-qemu-refs.xml
|
||||
$(srcdir)/libvirt-qemu-refs.xml \
|
||||
$(NULL)
|
||||
|
||||
APIBUILD=$(srcdir)/apibuild.py
|
||||
APIBUILD_STAMP=$(APIBUILD).stamp
|
||||
@ -225,11 +245,15 @@ $(python_generated_files): $(APIBUILD_STAMP)
|
||||
|
||||
$(APIBUILD_STAMP): $(srcdir)/apibuild.py \
|
||||
$(srcdir)/../include/libvirt/libvirt.h.in \
|
||||
$(srcdir)/../include/libvirt/libvirt-lxc.h \
|
||||
$(srcdir)/../include/libvirt/libvirt-qemu.h \
|
||||
$(srcdir)/../include/libvirt/virterror.h \
|
||||
$(srcdir)/../src/libvirt.c \
|
||||
$(srcdir)/../src/libvirt-lxc.c \
|
||||
$(srcdir)/../src/libvirt-qemu.c \
|
||||
$(srcdir)/../src/util/virterror.c
|
||||
$(srcdir)/../src/util/virerror.c \
|
||||
$(srcdir)/../src/util/virevent.c \
|
||||
$(srcdir)/../src/util/virtypedparam.c
|
||||
$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(APIBUILD)
|
||||
touch $@
|
||||
|
||||
@ -242,9 +266,10 @@ clean-local:
|
||||
maintainer-clean-local: clean-local
|
||||
rm -rf $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml todo.html.in hvsupport.html.in
|
||||
rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
|
||||
rm -rf $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
|
||||
rm -rf $(APIBUILD_STAMP)
|
||||
|
||||
rebuild: api qemu_api all
|
||||
rebuild: api qemu_api lxc_api all
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
||||
@ -255,6 +280,9 @@ install-data-local:
|
||||
$(INSTALL) -m 0644 $(srcdir)/$$h $(DESTDIR)$(HTML_DIR)/html; done
|
||||
for p in $(apipng); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$$p $(DESTDIR)$(HTML_DIR)/html; done
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/internals
|
||||
for f in $(internals_html); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$$f $(DESTDIR)$(HTML_DIR)/internals; done
|
||||
$(mkinstalldirs) $(DESTDIR)$(DEVHELP_DIR)
|
||||
for file in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
|
||||
|
@ -64,13 +64,13 @@
|
||||
<p> Most kind of object can also be named in various ways:</p>
|
||||
<ul>
|
||||
<li>by their <code>name</code>, an user friendly identifier but
|
||||
whose unicity cannot be garanteed between two nodes.</li>
|
||||
whose unicity cannot be guaranteed between two nodes.</li>
|
||||
<li>by their <code>ID</code>, which is a runtime unique identifier
|
||||
provided by the hypervisor for one given activation of the object,
|
||||
but it becomes invalid once the resource is deactivated.</li >
|
||||
<li>by their <code>UUID</code>, a 16 bytes unique identifier
|
||||
as defined in <a href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a>,
|
||||
which is garanteed to be unique for long term usage and across a
|
||||
which is guaranteed to be unique for long term usage and across a
|
||||
set of nodes.</li>
|
||||
</ul>
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
import os, sys
|
||||
import string
|
||||
import glob
|
||||
import re
|
||||
|
||||
quiet=True
|
||||
warnings=0
|
||||
@ -23,8 +24,9 @@ included_files = {
|
||||
"libvirt.h": "header with general libvirt API definitions",
|
||||
"virterror.h": "header with error specific API definitions",
|
||||
"libvirt.c": "Main interfaces for the libvirt library",
|
||||
"virterror.c": "implements error handling and reporting code for libvirt",
|
||||
"event.c": "event loop for monitoring file handles",
|
||||
"virerror.c": "implements error handling and reporting code for libvirt",
|
||||
"virevent.c": "event loop for monitoring file handles",
|
||||
"virtypedparam.c": "virTypedParameters APIs",
|
||||
}
|
||||
|
||||
qemu_included_files = {
|
||||
@ -32,6 +34,11 @@ qemu_included_files = {
|
||||
"libvirt-qemu.c": "Implementations for the QEMU specific APIs",
|
||||
}
|
||||
|
||||
lxc_included_files = {
|
||||
"libvirt-lxc.h": "header with LXC specific API definitions",
|
||||
"libvirt-lxc.c": "Implementations for the LXC specific APIs",
|
||||
}
|
||||
|
||||
ignored_words = {
|
||||
"ATTRIBUTE_UNUSED": (0, "macro keyword"),
|
||||
"ATTRIBUTE_SENTINEL": (0, "macro keyword"),
|
||||
@ -57,12 +64,15 @@ ignored_functions = {
|
||||
"virDomainMigratePrepareTunnel3": "private function for tunnelled migration",
|
||||
"virDrvSupportsFeature": "private function for remote access",
|
||||
"DllMain": "specific function for Win32",
|
||||
"virEventAddHandle": "internal function in event.c",
|
||||
"virEventUpdateHandle": "internal function in event.c",
|
||||
"virEventRemoveHandle": "internal function in event.c",
|
||||
"virEventAddTimeout": "internal function in event.c",
|
||||
"virEventUpdateTimeout": "internal function in event.c",
|
||||
"virEventRemoveTimeout": "internal function in event.c",
|
||||
"virEventAddHandle": "internal function in virevent.c",
|
||||
"virEventUpdateHandle": "internal function in virevent.c",
|
||||
"virEventRemoveHandle": "internal function in virevent.c",
|
||||
"virEventAddTimeout": "internal function in virevent.c",
|
||||
"virEventUpdateTimeout": "internal function in virevent.c",
|
||||
"virEventRemoveTimeout": "internal function in virevent.c",
|
||||
"virTypedParameterArrayValidate": "internal function in virtypedparam.c",
|
||||
"virTypedParameterAssign": "internal function in virtypedparam.c",
|
||||
"virTypedParameterAssignFromStr": "internal function in virtypedparam.c",
|
||||
}
|
||||
|
||||
ignored_macros = {
|
||||
@ -240,8 +250,6 @@ class index:
|
||||
self.includes[name] = d
|
||||
elif type == "struct":
|
||||
self.structs[name] = d
|
||||
elif type == "struct":
|
||||
self.structs[name] = d
|
||||
elif type == "union":
|
||||
self.unions[name] = d
|
||||
elif type == "enum":
|
||||
@ -656,27 +664,18 @@ class CParser:
|
||||
lines = string.split(comment, "\n")
|
||||
item = None
|
||||
for line in lines:
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
while line != "" and line[0] == '*':
|
||||
line = line[1:]
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
try:
|
||||
(it, line) = string.split(line, ":", 1)
|
||||
item = it
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
line = line.lstrip().lstrip('*').lstrip()
|
||||
|
||||
m = re.match('([_.a-zA-Z0-9]+):(.*)', line)
|
||||
if m:
|
||||
item = m.group(1)
|
||||
line = m.group(2).lstrip()
|
||||
|
||||
if item:
|
||||
if res.has_key(item):
|
||||
res[item] = res[item] + " " + line
|
||||
else:
|
||||
res[item] = line
|
||||
except:
|
||||
if item != None:
|
||||
if res.has_key(item):
|
||||
res[item] = res[item] + " " + line
|
||||
else:
|
||||
res[item] = line
|
||||
self.index.info = res
|
||||
|
||||
def strip_lead_star(self, line):
|
||||
@ -1759,6 +1758,7 @@ class CParser:
|
||||
"virDomainSetMaxMemory" : (False, ("memory")),
|
||||
"virDomainSetMemory" : (False, ("memory")),
|
||||
"virDomainSetMemoryFlags" : (False, ("memory")),
|
||||
"virDomainBlockCommit" : (False, ("bandwidth")),
|
||||
"virDomainBlockJobSetSpeed" : (False, ("bandwidth")),
|
||||
"virDomainBlockPull" : (False, ("bandwidth")),
|
||||
"virDomainBlockRebase" : (False, ("bandwidth")),
|
||||
@ -1954,6 +1954,8 @@ class docBuilder:
|
||||
self.includes = includes + included_files.keys()
|
||||
elif name == "libvirt-qemu":
|
||||
self.includes = includes + qemu_included_files.keys()
|
||||
elif name == "libvirt-lxc":
|
||||
self.includes = includes + lxc_included_files.keys()
|
||||
self.modules = {}
|
||||
self.headers = {}
|
||||
self.idx = index()
|
||||
@ -2472,8 +2474,8 @@ class docBuilder:
|
||||
|
||||
|
||||
def rebuild(name):
|
||||
if name not in ["libvirt", "libvirt-qemu"]:
|
||||
self.warning("rebuild() failed, unkown module %s") % name
|
||||
if name not in ["libvirt", "libvirt-qemu", "libvirt-lxc"]:
|
||||
self.warning("rebuild() failed, unknown module %s") % name
|
||||
return None
|
||||
builder = None
|
||||
srcdir = os.environ["srcdir"]
|
||||
@ -2515,6 +2517,7 @@ if __name__ == "__main__":
|
||||
else:
|
||||
rebuild("libvirt")
|
||||
rebuild("libvirt-qemu")
|
||||
rebuild("libvirt-lxc")
|
||||
if warnings > 0:
|
||||
sys.exit(2)
|
||||
else:
|
||||
|
@ -188,7 +188,7 @@
|
||||
A general purpose desktop management tool, able to manage
|
||||
virtual machines across both local and remotely accessed
|
||||
hypervisors. It is targeted at home and small office usage
|
||||
upto managing 10-20 hosts and their VMs.
|
||||
up to managing 10-20 hosts and their VMs.
|
||||
</dd>
|
||||
<dt><a href="http://virt-manager.org/">virt-viewer</a></dt>
|
||||
<dd>
|
||||
@ -212,6 +212,14 @@
|
||||
modular Web Services architecture.
|
||||
</dd>
|
||||
|
||||
<dt><a href="http://www.eucalyptus.com">Eucalyptus</a></dt>
|
||||
<dd>
|
||||
Eucalyptus is an on-premise Infrastructure as a Service cloud
|
||||
software platform that is open source and
|
||||
AWS-compatible. Eucalyptus uses libivrt virtualization API to
|
||||
directly interact with Xen and KVM hypervisors.
|
||||
</dd>
|
||||
|
||||
<dt><a href="http://www.nimbusproject.org">Nimbus</a></dt>
|
||||
<dd>
|
||||
Nimbus is an open-source toolkit focused on providing
|
||||
|
@ -25,7 +25,7 @@ for the authentication file using the following sequence:
|
||||
variable.</li>
|
||||
<li>The file path specified by the "authfile=/some/file" URI
|
||||
query parameter</li>
|
||||
<li>The file $XDG_CONFIG_DIR/libvirt/auth.conf</li>
|
||||
<li>The file $XDG_CONFIG_HOME/libvirt/auth.conf</li>
|
||||
<li>The file /etc/libvirt/auth.conf</li>
|
||||
</ol>
|
||||
|
||||
@ -233,7 +233,8 @@ The SASL mechanism configured by default is DIGEST-MD5, which provides a basic
|
||||
username+password style authentication. To enable Kerberos single-sign-on instead,
|
||||
the libvirt SASL configuration file must be changed. This is <code>/etc/sasl2/libvirt.conf</code>.
|
||||
The <code>mech_list</code> parameter must first be changed to <code>gssapi</code>
|
||||
instead of the default <code>digest-md5</code>. If SASL is enabled on the UNIX
|
||||
instead of the default <code>digest-md5</code>, and keytab should be set to
|
||||
<code>/etc/libvirt/krb5.tab</code> . If SASL is enabled on the UNIX
|
||||
and/or TLS sockets, Kerberos will also be used for them. Like DIGEST-MD5, the Kerberos
|
||||
mechanism provides data encryption of the session.
|
||||
</p>
|
||||
|
@ -101,18 +101,11 @@
|
||||
|
||||
<p>
|
||||
It is also possible to run virsh directly from the source tree
|
||||
using the ./run script (which sets some environment variables):
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ ./tools/virsh ....
|
||||
$ ./run ./tools/virsh ....
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
A normal configuration of libvirt will build hypervisor drivers
|
||||
as loadable modules. When running from a non-installed source
|
||||
tree, libvirtd will attempt to find the modules from the same
|
||||
source tree. If this is not possible though, you can explicitly
|
||||
set <code>LIBVIRT_DRIVER_DIR=/path/to/source/tree/src/.libs</code>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -29,6 +29,7 @@
|
||||
<li><strong><a href="drvvmware.html">VMware Workstation/Player</a></strong></li>
|
||||
<li><strong><a href="drvxen.html">Xen</a></strong></li>
|
||||
<li><strong><a href="drvhyperv.html">Microsoft Hyper-V</a></strong></li>
|
||||
<li><strong><a href="drvphyp.html">IBM PowerVM (phyp)</a></strong></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="storage">Storage drivers</a></h2>
|
||||
|
@ -2,10 +2,10 @@
|
||||
<h1>VMware ESX hypervisor driver</h1>
|
||||
<ul id="toc"></ul>
|
||||
<p>
|
||||
The libvirt VMware ESX driver can manage VMware ESX/ESXi 3.5/4.x and
|
||||
The libvirt VMware ESX driver can manage VMware ESX/ESXi 3.5/4.x/5.x and
|
||||
VMware GSX 2.0, also called VMware Server 2.0, and possibly later
|
||||
versions. <span class="since">Since 0.8.3</span> the driver can also
|
||||
connect to a VMware vCenter 2.5/4.x (VPX).
|
||||
connect to a VMware vCenter 2.5/4.x/5.x (VPX).
|
||||
</p>
|
||||
|
||||
<h2><a name="project">Project Links</a></h2>
|
||||
|
47
docs/drvphyp.html.in
Normal file
47
docs/drvphyp.html.in
Normal file
@ -0,0 +1,47 @@
|
||||
<html><body>
|
||||
<h1>IBM PowerVM hypervisor driver (phyp)</h1>
|
||||
<ul id="toc"></ul>
|
||||
<p>
|
||||
The IBM PowerVM driver can manage both HMC and IVM PowerVM
|
||||
guests. VIOS connections are tunneled through HMC.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="project">Project Links</a></h2>
|
||||
<ul>
|
||||
<li>
|
||||
The <a href="http://www-03.ibm.com/systems/power/software/virtualization/index.html">IBM
|
||||
PowerVM</a> hypervisor
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a name="uri">Connections to the PowerVM driver</a></h2>
|
||||
<p>
|
||||
Some example remote connection URIs for the driver are:
|
||||
</p>
|
||||
<pre>
|
||||
phyp://user@hmc/system (HMC connection)
|
||||
phyp://user@ivm/system (IVM connection)
|
||||
</pre>
|
||||
<p>
|
||||
<strong>Note</strong>: In contrast to other drivers, the
|
||||
PowerVM (or phyp) driver is a client-side-only driver,
|
||||
internally using ssh to connect to the specified hmc or ivm
|
||||
server. Therefore, the <a href="remote.html">remote transport
|
||||
mechanism</a> provided by the remote driver and libvirtd will
|
||||
not work, and you cannot use URIs like
|
||||
<code>phyp+ssh://example.com</code>.
|
||||
</p>
|
||||
|
||||
|
||||
<h3><a name="uriformat">URI Format</a></h3>
|
||||
<p>
|
||||
URIs have this general form (<code>[...]</code> marks an
|
||||
optional part, <code>{...|...}</code> marks a mandatory choice).
|
||||
</p>
|
||||
<pre>
|
||||
phyp://[username@]{hmc|ivm}/managed_system
|
||||
</pre>
|
||||
|
||||
</body></html>
|
@ -53,6 +53,14 @@
|
||||
the <code>/etc/xen</code> directory. It is important not to place
|
||||
any other non-config files in this directory.
|
||||
</li>
|
||||
<li>
|
||||
<strong>libxl</strong>: Starting with Xen 4.2, the legacy XenD/xm
|
||||
toolstack is deprecated in favor of libxl, also commonly called
|
||||
libxenlight. libvirt supports this new Xen toolstack via the
|
||||
libxl driver. If XenD is enabled, the legacy xen driver consisting
|
||||
of the above mentioned channels will be used. If XenD is disabled,
|
||||
the libxl driver will be used.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="uri">Connections to Xen driver</a></h2>
|
||||
|
@ -198,7 +198,7 @@ using an XML format. At a high level the format looks like this:
|
||||
</p>
|
||||
<p>The <code><rule></code> element is where all the interesting stuff
|
||||
happens. It has three attributes, an action, a traffic direction and an
|
||||
optional priority. eg:
|
||||
optional priority. E.g.:
|
||||
</p>
|
||||
<pre><rule action='drop' direction='out' priority='500'></pre>
|
||||
<p>Within the rule there are a wide variety of elements allowed, which
|
||||
@ -317,7 +317,7 @@ Bridge chain: PREROUTING, entries: 1, policy: ACCEPT
|
||||
|
||||
Bridge chain: POSTROUTING, entries: 1, policy: ACCEPT
|
||||
-o vnet0 -j libvirt-O-vnet0</pre>
|
||||
<p>To keep things managable and easy to follow, the driver will then
|
||||
<p>To keep things manageable and easy to follow, the driver will then
|
||||
create further sub-chains for each protocol then it needs to match
|
||||
against:
|
||||
</p>
|
||||
|
@ -105,7 +105,7 @@
|
||||
<boot dev='cdrom'/>
|
||||
<bootmenu enable='yes'/>
|
||||
<smbios mode='sysinfo'/>
|
||||
<bios useserial='yes'/>
|
||||
<bios useserial='yes' rebootTimeout='0'/>
|
||||
</os>
|
||||
...</pre>
|
||||
|
||||
@ -175,8 +175,13 @@
|
||||
Serial Graphics Adapter which allows users to see BIOS messages
|
||||
on a serial port. Therefore, one needs to have
|
||||
<a href="#elementCharSerial">serial port</a> defined.
|
||||
<span class="since">Since 0.9.4</span>
|
||||
</dd>
|
||||
<span class="since">Since 0.9.4</span>.
|
||||
<span class="since">Since 0.10.2 (QEMU only)</span> there is
|
||||
another attribute, <code>rebootTimeout</code> that controls
|
||||
whether and after how long the guest should start booting
|
||||
again in case the boot fails (according to BIOS). The value is
|
||||
in milliseconds with maximum of <code>65535</code> and special
|
||||
value <code>-1</code> disables the reboot.
|
||||
</dl>
|
||||
|
||||
<h4><a name="elementsOSBootloader">Host bootloader</a></h4>
|
||||
@ -352,8 +357,18 @@
|
||||
the maximum supported by the hypervisor. <span class="since">Since
|
||||
0.4.4</span>, this element can contain an optional
|
||||
<code>cpuset</code> attribute, which is a comma-separated
|
||||
list of physical CPU numbers that virtual CPUs can be pinned
|
||||
to. Each element in that list is either a single CPU number,
|
||||
list of physical CPU numbers that domain process and virtual CPUs
|
||||
can be pinned to by default. (NB: The pinning policy of domain
|
||||
process and virtual CPUs can be specified separately by
|
||||
<code>cputune</code>. If attribute <code>emulatorpin</code>
|
||||
of <code>cputune</code> is specified, <code>cpuset</code>
|
||||
specified by <code>vcpu</code> here will be ingored; Similarly,
|
||||
For virtual CPUs which has <code>vcpupin</code> specified,
|
||||
<code>cpuset</code> specified by <code>cpuset</code> here
|
||||
will be ignored; For virtual CPUs which doesn't have
|
||||
<code>vcpupin</code> specified, it will be pinned to the physical
|
||||
CPUs specified by <code>cpuset</code> here).
|
||||
Each element in that list is either a single CPU number,
|
||||
a range of CPU numbers, or a caret followed by a CPU number to
|
||||
be excluded from a previous range. <span class="since">Since
|
||||
0.8.5</span>, the optional attribute <code>current</code> can
|
||||
@ -369,8 +384,7 @@
|
||||
if it's specified. If both <code>cpuset</code> and <code>placement</code>
|
||||
are not specified, or if <code>placement</code> is "static", but no
|
||||
<code>cpuset</code> is specified, the domain process will be pinned to
|
||||
all the available physical CPUs. These settings are superseded
|
||||
by <a href="#elementsCPUTuning">CPU tuning</a>.
|
||||
all the available physical CPUs.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -406,23 +420,26 @@
|
||||
<dt><code>vcpupin</code></dt>
|
||||
<dd>
|
||||
The optional <code>vcpupin</code> element specifies which of host's
|
||||
physical CPUs the domain VCPU will be pinned to. This setting supersedes
|
||||
previous VCPU placement specified in <a href="#elementsCPUAllocation">CPU
|
||||
Allocation</a> using <code>vcpu</code> element. If this is omitted,
|
||||
each VCPU is pinned to all the physical CPUs by default. It contains two
|
||||
required attributes, the attribute <code>vcpu</code> specifies vcpu id,
|
||||
and the attribute <code>cpuset</code> is same as
|
||||
attribute <code>cpuset</code>
|
||||
of element <code>vcpu</code>. (NB: Only qemu driver support)
|
||||
physical CPUs the domain VCPU will be pinned to. If this is omitted,
|
||||
and attribute <code>cpuset</code> of element <code>vcpu</code> is
|
||||
not specified, the vCPU is pinned to all the physical CPUs by default.
|
||||
It contains two required attributes, the attribute <code>vcpu</code>
|
||||
specifies vcpu id, and the attribute <code>cpuset</code> is same as
|
||||
attribute <code>cpuset</code> of element <code>vcpu</code>.
|
||||
(NB: Only qemu driver support)
|
||||
<span class="since">Since 0.9.0</span>
|
||||
</dd>
|
||||
<dt><code>emulatorpin</code></dt>
|
||||
<dd>
|
||||
The optional <code>emulatorpin</code> element specifies which of host
|
||||
physical CPUs the "emulator", a subset of a domain not including vcpu,
|
||||
will be pinned to. If this is ommitted, "emulator" is pinned to all
|
||||
the physical CPUs by default. It contains one required attribute
|
||||
<code>cpuset</code> specifying which physical CPUs to pin to.
|
||||
will be pinned to. If this is omitted, and attribute
|
||||
<code>cpuset</code> of element <code>vcpu</code> is not specified,
|
||||
"emulator" is pinned to all the physical CPUs by default. It contains
|
||||
one required attribute <code>cpuset</code> specifying which physical
|
||||
CPUs to pin to. NB, <code>emulatorpin</code> is not allowed if
|
||||
attribute <code>placement</code> of element <code>vcpu</code> is
|
||||
"auto".
|
||||
</dd>
|
||||
<dt><code>shares</code></dt>
|
||||
<dd>
|
||||
@ -510,9 +527,15 @@
|
||||
However, the value will be rounded up to the nearest kibibyte
|
||||
by libvirt, and may be further rounded to the granularity
|
||||
supported by the hypervisor. Some hypervisors also enforce a
|
||||
minimum, such as
|
||||
4000KiB. <span class='since'><code>unit</code> since
|
||||
0.9.11</span></dd>
|
||||
minimum, such as 4000KiB.
|
||||
|
||||
In the case of crash, optional attribute <code>dumpCore</code>
|
||||
can be used to control whether the guest memory should be
|
||||
included in the generated coredump or not (values "on", "off").
|
||||
|
||||
<span class='since'><code>unit</code> since 0.9.11</span>,
|
||||
<span class='since'><code>dumpCore</code> since 0.10.2
|
||||
(QEMU only)</span></dd>
|
||||
<dt><code>currentMemory</code></dt>
|
||||
<dd>The actual allocation of memory for the guest. This value can
|
||||
be less than the maximum allocation, to allow for ballooning
|
||||
@ -896,15 +919,11 @@
|
||||
This guest NUMA specification is currently available only for QEMU/KVM.
|
||||
</p>
|
||||
|
||||
<h3><a name="elementsLifecycle">Lifecycle control</a></h3>
|
||||
<h3><a name="elementsEvents">Events configuration</a></h3>
|
||||
|
||||
<p>
|
||||
It is sometimes necessary to override the default actions taken
|
||||
when a guest OS triggers a lifecycle operation. The following
|
||||
collections of elements allow the actions to be specified. A
|
||||
common use case is to force a reboot to be treated as a poweroff
|
||||
when doing the initial OS installation. This allows the VM to be
|
||||
re-configured for the first post-install bootup.
|
||||
on various events.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@ -912,8 +931,16 @@
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<on_lockfailure>poweroff</on_lockfailure>
|
||||
...</pre>
|
||||
|
||||
<p>
|
||||
The following collections of elements allow the actions to be
|
||||
specified when a guest OS triggers a lifecycle operation. A
|
||||
common use case is to force a reboot to be treated as a poweroff
|
||||
when doing the initial OS installation. This allows the VM to be
|
||||
re-configured for the first post-install bootup.
|
||||
</p>
|
||||
<dl>
|
||||
<dt><code>on_poweroff</code></dt>
|
||||
<dd>The content of this element specifies the action to take when
|
||||
@ -960,6 +987,51 @@
|
||||
domain will be restarted with the same configuration</dd>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
The <code>on_lockfailure</code> element (<span class="since">since
|
||||
1.0.0</span>) may be used to configure what action should be
|
||||
taken when a lock manager loses resource locks. The following
|
||||
actions are recognized by libvirt, although not all of them need
|
||||
to be supported by individual lock managers. When no action is
|
||||
specified, each lock manager will take its default action.
|
||||
</p>
|
||||
<dl>
|
||||
<dt><code>poweroff</code></dt>
|
||||
<dd>The domain will be forcefully powered off.</dd>
|
||||
<dt><code>restart</code></dt>
|
||||
<dd>The domain will be powered off and started up again to
|
||||
reacquire its locks.</dd>
|
||||
<dt><code>pause</code></dt>
|
||||
<dd>The domain will be paused so that it can be manually resumed
|
||||
when lock issues are solved.</dd>
|
||||
<dt><code>ignore</code></dt>
|
||||
<dd>Keep the domain running as if nothing happened.</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsPowerManagement">Power Management</a></h3>
|
||||
|
||||
<p>
|
||||
<span class="since">Since 0.10.2</span> it is possible to
|
||||
forcibly enable or disable BIOS advertisements to the guest
|
||||
OS. (NB: Only qemu driver support)
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<pm>
|
||||
<suspend-to-disk enabled='no'/>
|
||||
<suspend-to-mem enabled='yes'/>
|
||||
</pm>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>pm</code></dt>
|
||||
<dd>These elements enable ('yes') or disable ('no') BIOS support
|
||||
for S3 (suspend-to-disk) and S4 (suspend-to-mem) ACPI sleep
|
||||
states. If nothing is specified, then the hypervisor will be
|
||||
left with its default value.</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsFeatures">Hypervisor features</a></h3>
|
||||
|
||||
<p>
|
||||
@ -975,6 +1047,10 @@
|
||||
<apic/>
|
||||
<hap/>
|
||||
<privnet/>
|
||||
<hyperv>
|
||||
<relaxed state='on'/>
|
||||
</hyperv>
|
||||
|
||||
</features>
|
||||
...</pre>
|
||||
|
||||
@ -994,6 +1070,13 @@
|
||||
<dd>ACPI is useful for power management, for example, with
|
||||
KVM guests it is required for graceful shutdown to work.
|
||||
</dd>
|
||||
<dt><code>apic</code></dt>
|
||||
<dd>APIC allows the use of programmable IRQ
|
||||
management. <span class="since">Since 0.10.2 (QEMU only)</span> there is
|
||||
an optional attribute <code>eoi</code> with values <code>on</code>
|
||||
and <code>off</code> which toggles the availability of EOI (End of
|
||||
Interrupt) for the guest.
|
||||
</dd>
|
||||
<dt><code>hap</code></dt>
|
||||
<dd>Enable use of Hardware Assisted Paging if available in
|
||||
the hardware.
|
||||
@ -1008,6 +1091,23 @@
|
||||
This feature is only relevant for container based
|
||||
virtualization drivers, such as LXC.
|
||||
</dd>
|
||||
<dt><code>hyperv</code></dt>
|
||||
<dd>Enable various features improving behavior of guests
|
||||
running Microsoft Windows.
|
||||
<table class="top_table">
|
||||
<tr>
|
||||
<th>Feature</th>
|
||||
<th>Description</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>relaxed</td>
|
||||
<td>Relax contstraints on timers</td>
|
||||
<td> on, off</td>
|
||||
</tr>
|
||||
</table>
|
||||
<span class="since">Since 1.0.0 (QEMU only)</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsTime">Time keeping</a></h3>
|
||||
@ -1264,6 +1364,7 @@
|
||||
<driver name='qemu' type='raw'/>
|
||||
<source dev='/dev/sda'/>
|
||||
<geometry cyls='16383' heads='16' secs='63' trans='lba'/>
|
||||
<blockio logical_block_size='512' physical_block_size='4096'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
</devices>
|
||||
@ -1294,7 +1395,18 @@
|
||||
rawio='yes', rawio capability will be enabled for all disks in
|
||||
the domain (because, in the case of QEMU, this capability can
|
||||
only be set on a per-process basis). This attribute is only
|
||||
valid when device is "lun".
|
||||
valid when device is "lun". NB, <code>rawio</code> intends to
|
||||
confine the capability per-device, however, current QEMU
|
||||
implementation gives the domain process broader capability
|
||||
than that (per-process basis, affects all the domain disks).
|
||||
To confine the capability as much as possible for QEMU driver
|
||||
as this stage, <code>sgio</code> is recommended, it's more
|
||||
secure than <code>rawio</code>.
|
||||
The optional <code>sgio</code> (<span class="since">since 1.0.2</span>)
|
||||
attribute indicates whether the kernel will filter unprivileged
|
||||
SG_IO commands for the disk, valid settings are "filtered" or
|
||||
"unfiltered". Defaults to "filtered". Similar to <code>rawio</code>,
|
||||
<code>sgio</code> is only valid for device 'lun'.
|
||||
The optional <code>snapshot</code> attribute indicates the default
|
||||
behavior of the disk during disk snapshots: "internal"
|
||||
requires a file format such as qcow2 that can store both the
|
||||
@ -1326,10 +1438,10 @@
|
||||
to the directory to use as the disk. If the disk <code>type</code>
|
||||
is "network", then the <code>protocol</code> attribute specifies
|
||||
the protocol to access to the requested image; possible values
|
||||
are "nbd", "rbd", and "sheepdog". If the <code>protocol</code>
|
||||
attribute is "rbd" or "sheepdog", an additional
|
||||
attribute <code>name</code> is mandatory to specify which
|
||||
image will be used. When the disk <code>type</code> is
|
||||
are "nbd", "rbd", "sheepdog" or "gluster". If the
|
||||
<code>protocol</code> attribute is "rbd", "sheepdog" or "gluster", an
|
||||
additional attribute <code>name</code> is mandatory to specify which
|
||||
volume/image will be used. When the disk <code>type</code> is
|
||||
"network", the <code>source</code> may have zero or
|
||||
more <code>host</code> sub-elements used to specify the hosts
|
||||
to connect.
|
||||
@ -1380,8 +1492,8 @@
|
||||
attribute specifies the type of disk device to emulate;
|
||||
possible values are driver specific, with typical values being
|
||||
"ide", "scsi", "virtio", "xen", "usb" or "sata". If omitted, the bus
|
||||
type is inferred from the style of the device name. eg, a device named
|
||||
'sda' will typically be exported using a SCSI bus. The optional
|
||||
type is inferred from the style of the device name (e.g. a device named
|
||||
'sda' will typically be exported using a SCSI bus). The optional
|
||||
attribute <code>tray</code> indicates the tray status of the
|
||||
removable disks (i.e. CDROM or Floppy disk), the value can be either
|
||||
"open" or "closed", defaults to "closed". NB, the value of
|
||||
@ -1530,7 +1642,7 @@
|
||||
<dt><code>readonly</code></dt>
|
||||
<dd>If present, this indicates the device cannot be modified by
|
||||
the guest. For now, this is the default for disks with
|
||||
attribute <code>type='cdrom'</code>.
|
||||
attribute <code>device='cdrom'</code>.
|
||||
</dd>
|
||||
<dt><code>shareable</code></dt>
|
||||
<dd>If present, this indicates the device is expected to be shared
|
||||
@ -1550,10 +1662,30 @@
|
||||
like <code><serial>WD-WMAP9A966149</serial></code>.
|
||||
<span class="since">Since 0.7.1</span>
|
||||
</dd>
|
||||
<dt><code>wwn</code></dt>
|
||||
<dd>If present, this element specifies the WWN (World Wide Name)
|
||||
of a virtual hard disk or CD-ROM drive. It must be composed
|
||||
of 16 hexadecimal digits.
|
||||
<span class='since'>Since 0.10.1</span>
|
||||
</dd>
|
||||
<dt><code>vendor</code></dt>
|
||||
<dd>If present, this element specifies the vendor of a virtual hard
|
||||
disk or CD-ROM device. It must not be longer than 8 printable
|
||||
characters.
|
||||
<span class='since'>Since 1.0.1</span>
|
||||
</dd>
|
||||
<dt><code>product</code></dt>
|
||||
<dd>If present, this element specifies the product of a virtual hard
|
||||
disk or CD-ROM device. It must not be longer than 16 printable
|
||||
characters.
|
||||
<span class='since'>Since 1.0.1</span>
|
||||
</dd>
|
||||
<dt><code>host</code></dt>
|
||||
<dd>The <code>host</code> element has two attributes "name" and "port",
|
||||
which specify the hostname and the port number. The meaning of this
|
||||
element and the number of the elements depend on the protocol attribute.
|
||||
<dd>The <code>host</code> element supports 4 attributes, viz. "name",
|
||||
"port", "transport" and "socket", which specify the hostname, the port
|
||||
number, transport type and path to socket, respectively. The meaning
|
||||
of this element and the number of the elements depend on the protocol
|
||||
attribute.
|
||||
<table class="top_table">
|
||||
<tr>
|
||||
<th> Protocol </th>
|
||||
@ -1575,7 +1707,15 @@
|
||||
<td> one of the sheepdog servers (default is localhost:7000) </td>
|
||||
<td> zero or one </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> gluster </td>
|
||||
<td> a server running glusterd daemon </td>
|
||||
<td> only one </td>
|
||||
</tr>
|
||||
</table>
|
||||
In case of gluster, valid values for transport attribute are tcp, rdma
|
||||
or unix. If nothing is specified, tcp is assumed. If transport is unix,
|
||||
socket attribute specifies path to unix socket.
|
||||
</dd>
|
||||
<dt><code>address</code></dt>
|
||||
<dd>If present, the <code>address</code> element ties the disk
|
||||
@ -1632,6 +1772,23 @@
|
||||
BIOS-Translation-Modus (none, lba or auto)</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><code>blockio</code></dt>
|
||||
<dd>If present, the <code>blockio</code> element allows
|
||||
to override any of the block device properties listed below.
|
||||
<span class="since">Since 0.10.2 (QEMU and KVM)</span>
|
||||
<dl>
|
||||
<dt><code>logical_block_size</code></dt>
|
||||
<dd>The logical block size the disk will report to the guest
|
||||
OS. For Linux this would be the value returned by the
|
||||
BLKSSZGET ioctl and describes the smallest units for disk
|
||||
I/O.
|
||||
<dt><code>physical_block_size</code></dt>
|
||||
<dd>The physical block size the disk will report to the guest
|
||||
OS. For Linux this would be the value returned by the
|
||||
BLKPBSZGET ioctl and describes the disk's hardware sector
|
||||
size which can be relevant for the alignment of disk data.
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4><a name="elementsFilesystems">Filesystems</a></h4>
|
||||
@ -1706,7 +1863,7 @@
|
||||
which gives the memory usage limit in kibibytes. Only used
|
||||
by LXC driver.
|
||||
<span class="since"> (since 0.9.13)</span></dd>
|
||||
<dt><code>type='bind'></code></dt>
|
||||
<dt><code>type='bind'</code></dt>
|
||||
<dd>
|
||||
A directory inside the guest will be bound to another
|
||||
directory inside the guest. Only used by LXC driver
|
||||
@ -1977,20 +2134,22 @@
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4><a name="elementsUSB">USB and PCI devices</a></h4>
|
||||
<h4><a name="elementsHostDev">Host device assignment</a></h4>
|
||||
|
||||
<h5><a href="elementsHostDevSubsys">USB / PCI devices</a></h5>
|
||||
|
||||
<p>
|
||||
USB and PCI devices attached to the host can be passed through
|
||||
to the guest using
|
||||
the <code>hostdev</code> element. <span class="since">since after
|
||||
0.4.4 for USB and 0.6.0 for PCI (KVM only)</span>:
|
||||
to the guest using the <code>hostdev</code> element.
|
||||
<span class="since">since after 0.4.4 for USB and 0.6.0 for PCI
|
||||
(KVM only)</span>:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<devices>
|
||||
<hostdev mode='subsystem' type='usb'>
|
||||
<source>
|
||||
<source startupPolicy='optional'>
|
||||
<vendor id='0x1234'/>
|
||||
<product id='0xbeef'/>
|
||||
</source>
|
||||
@ -2034,9 +2193,29 @@
|
||||
<dd>The source element describes the device as seen from the host.
|
||||
The USB device can either be addressed by vendor / product id using the
|
||||
<code>vendor</code> and <code>product</code> elements or by the device's
|
||||
address on the hosts using the <code>address</code> element.
|
||||
PCI devices on the other hand can only be described by their
|
||||
<code>address</code></dd>
|
||||
address on the hosts using the <code>address</code> element. PCI devices
|
||||
on the other hand can only be described by their <code>address</code>.
|
||||
|
||||
<span class="since">Since 1.0.0</span>, the <code>source</code> element
|
||||
of USB devices may contain <code>startupPolicy</code> attribute which can
|
||||
be used to define policy what to do if the specified host USB device is
|
||||
not found. The attribute accepts the following values:
|
||||
<table class="top_table">
|
||||
<tr>
|
||||
<td> mandatory </td>
|
||||
<td> fail if missing for any reason (the default) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> requisite </td>
|
||||
<td> fail if missing on boot up,
|
||||
drop if missing on migrate/restore/revert </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> optional </td>
|
||||
<td> drop if missing at any start attempt </td>
|
||||
</tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt><code>vendor</code>, <code>product</code></dt>
|
||||
<dd>The <code>vendor</code> and <code>product</code> elements each have an
|
||||
<code>id</code> attribute that specifies the USB vendor and product id.
|
||||
@ -2048,7 +2227,8 @@
|
||||
boot sequence. The per-device <code>boot</code> elements cannot be
|
||||
used together with general boot elements in
|
||||
<a href="#elementsOSBIOS">BIOS bootloader</a> section.
|
||||
<span class="since">Since 0.8.8</span></dd>
|
||||
<span class="since">Since 0.8.8</span> for PCI devices,
|
||||
<span class="since">Since 1.0.1</span> for USB devices.
|
||||
<dt><code>rom</code></dt>
|
||||
<dd>The <code>rom</code> element is used to change how a PCI
|
||||
device's ROM is presented to the guest. The optional <code>bar</code>
|
||||
@ -2080,6 +2260,51 @@
|
||||
more details on the address element.
|
||||
</dl>
|
||||
|
||||
|
||||
<h5><a href="elementsHostDevCaps">Block / character devices</a></h5>
|
||||
|
||||
<p>
|
||||
Block / character devices from the host can be passed through
|
||||
to the guest using the <code>hostdev</code> element. This is
|
||||
only possible with container based virtualization.
|
||||
<span class="since">since after 1.0.1 for LXC</span>:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<hostdev mode='capabilities' type='storage'>
|
||||
<source>
|
||||
<block>/dev/sdf1</block>
|
||||
</source>
|
||||
</hostdev>
|
||||
...
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<hostdev mode='capabilities' type='misc'>
|
||||
<source>
|
||||
<char>/dev/input/event3</char>
|
||||
</source>
|
||||
</hostdev>
|
||||
...
|
||||
</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>hostdev</code></dt>
|
||||
<dd>The <code>hostdev</code> element is the main container for describing
|
||||
host devices. For block/character device passthrough <code>mode</code> is
|
||||
always "capabilities" and <code>type</code> is "block" for a block
|
||||
device and "char" for a character device.
|
||||
</dd>
|
||||
<dt><code>source</code></dt>
|
||||
<dd>The source element describes the device as seen from the host.
|
||||
For block devices, the path to the block device in the host
|
||||
OS is provided in the nested "block" element, while for character
|
||||
devices the "char" element is used
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4><a name="elementsRedir">Redirected devices</a></h4>
|
||||
|
||||
<p>
|
||||
@ -2093,7 +2318,12 @@
|
||||
<devices>
|
||||
<redirdev bus='usb' type='tcp'>
|
||||
<source mode='connect' host='localhost' service='4000'/>
|
||||
<boot order='1'/>
|
||||
</redirdev>
|
||||
<redirfilter>
|
||||
<usbdev class='0x08' vendor='0x1234' product='0xbeef' version='2.00' allow='yes'/>
|
||||
<usbdev allow='no'/>
|
||||
</redirfilter>
|
||||
</devices>
|
||||
...</pre>
|
||||
|
||||
@ -2110,21 +2340,36 @@
|
||||
tunnel; <code>type='tcp'</code>
|
||||
or <code>type='spicevmc'</code> (which uses the usbredir
|
||||
channel of a <a href="#elementsGraphics">SPICE graphics
|
||||
device</a>) are typical.</dd>
|
||||
device</a>) are typical. The redirdev element has an optional
|
||||
sub-element <code><address></code> which can tie the
|
||||
device to a particular controller. Further sub-elements,
|
||||
such as <code><source></code>, may be required according
|
||||
to the given type, although a <code><target></code> sub-element
|
||||
is not required (since the consumer of the character device is
|
||||
the hypervisor itself, rather than a device visible in the guest).
|
||||
</dd>
|
||||
<dt><code>boot</code></dt>
|
||||
|
||||
<dd>Specifies that the device is bootable.
|
||||
The <code>order</code> attribute determines the order in which
|
||||
devices will be tried during boot sequence. The per-device
|
||||
<code>boot</code> elements cannot be used together with general
|
||||
boot elements in <a href="#elementsOSBIOS">BIOS bootloader</a> section.
|
||||
(<span class="since">Since 1.0.1</span>)
|
||||
</dd>
|
||||
<dt><code>redirfilter</code></dt>
|
||||
<dd>The<code> redirfilter </code>element is used for creating the
|
||||
filter rule to filter out certain devices from redirection.
|
||||
It uses sub-element <code><usbdev></code> to define each filter rule.
|
||||
<code>class</code> attribute is the USB Class code, for example,
|
||||
0x08 represents mass storage devices. The USB device can be addressed by
|
||||
vendor / product id using the <code>vendor</code> and <code>product</code> attributes.
|
||||
<code>version</code> is the bcdDevice value of USB device, such as 1.00, 1.10 and 2.00.
|
||||
These four attributes are optional and <code>-1</code> can be used to allow
|
||||
any value for them. <code>allow</code> attribute is mandatory,
|
||||
'yes' means allow, 'no' for deny.
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
The redirdev element has an optional sub-element
|
||||
<code><address></code> which can tie the device to a
|
||||
particular controller.
|
||||
</p>
|
||||
<p>
|
||||
Further sub-elements, such as <code><source></code>, may
|
||||
be required according to the given type, although
|
||||
a <code><target></code> sub-element is not required (since
|
||||
the consumer of the character device is the hypervisor itself,
|
||||
rather than a device visible in the guest).
|
||||
</p>
|
||||
|
||||
<h4><a name="elementsSmartcard">Smartcard devices</a></h4>
|
||||
|
||||
@ -2312,12 +2557,15 @@
|
||||
virtualport types (and also to leave out certain attributes); at
|
||||
domain startup time, a complete <code><virtualport></code>
|
||||
element will be constructed by merging together the type and
|
||||
attributes found in the which will be filled in from the network
|
||||
or portgroup <code><virtualport></code>)
|
||||
attributes defined in the network and the portgroup referenced
|
||||
by the interface. The newly-constructed virtualport is a combination
|
||||
of them. The attributes from lower virtualport can't make change
|
||||
on the ones defined in higher virtualport.
|
||||
Interface takes the highest priority, portgroup is lowest priority.
|
||||
(<span class="since">Since 0.10.0</span>). For example, in order
|
||||
to work properly with both an 802.1Qbh switch and an Open vSwitch
|
||||
switch, you may choose to specify no type, but both
|
||||
an <code>instanceid</code> (in case the switch is 802.1Qbh) and
|
||||
an <code>profileid</code> (in case the switch is 802.1Qbh) and
|
||||
an <code>interfaceid</code> (in case the switch is Open vSwitch)
|
||||
(you may also omit the other attributes, such as managerid,
|
||||
typeid, or profileid, to be filled in from the
|
||||
@ -2397,7 +2645,7 @@
|
||||
</interface>
|
||||
<interface type='bridge'>
|
||||
<source bridge='ovsbr'/>
|
||||
<virtualport type='openvswitch'/>
|
||||
<virtualport type='openvswitch'>
|
||||
<parameters profileid='menial' interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
|
||||
</virtualport>
|
||||
</interface>
|
||||
@ -2893,7 +3141,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<source network='default'/>
|
||||
<target dev='vnet0'/>
|
||||
<b><bandwidth>
|
||||
<inbound average='1000' peak='5000' burst='1024'/>
|
||||
<inbound average='1000' peak='5000' floor='200' burst='1024'/>
|
||||
<outbound average='128' peak='256' burst='256'/>
|
||||
</bandwidth></b>
|
||||
</interface>
|
||||
@ -2908,14 +3156,29 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
children element out result in no QoS applied on that traffic direction.
|
||||
So, when you want to shape only domain's incoming traffic, use
|
||||
<code>inbound</code> only, and vice versa. Each of these elements have one
|
||||
mandatory attribute <code>average</code>. It specifies average bit rate on
|
||||
interface being shaped. Then there are two optional attributes:
|
||||
mandatory attribute <code>average</code> (or <code>floor</code> as
|
||||
described below). <code>average</code> specifies average bit rate on
|
||||
the interface being shaped. Then there are two optional attributes:
|
||||
<code>peak</code>, which specifies maximum rate at which interface can send
|
||||
data, and <code>burst</code>, amount of bytes that can be burst at
|
||||
<code>peak</code> speed. Accepted values for attributes are integer
|
||||
numbers. The units for <code>average</code> and <code>peak</code> attributes
|
||||
are kilobytes per second, and for the <code>burst</code> just kilobytes.
|
||||
<span class="since">Since 0.9.4</span>
|
||||
<span class="since">Since 0.9.4</span> The <code>inbound</code> can
|
||||
optionally have <code>floor</code> attribute. This is there for
|
||||
guaranteeing minimal throughput for shaped interfaces. This, however,
|
||||
requires that all traffic goes through one point where QoS decisions can
|
||||
take place. That's why this attribute works only for virtual networks for
|
||||
now (that is <code><interface type='network'/></code> with a
|
||||
forward type of route, nat, or no forward at all). Moreover, the
|
||||
virtual network the interface is connected to is required to have at least
|
||||
inbound QoS set (<code>average</code> at least). Moreover, with
|
||||
<code>floor<code> attribute users don't need to specify
|
||||
<code>average</code>. However, <code>peak</code> and <code>burst</code>
|
||||
attributes still require <code>average</code>. Currently, linux kernel
|
||||
doesn't allow ingress qdiscs to have any classes therefore
|
||||
<code>floor</code> can be applied only on <code>inbound</code> and not
|
||||
</code>outbound</code>. <span class="since">Since 1.0.1</span>
|
||||
</p>
|
||||
|
||||
<h5><a name="elementVlanTag">Setting VLAN tag (on supported network types only)</a></h5>
|
||||
@ -2948,7 +3211,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
provide their own way (outside of libvirt) to tag guest traffic
|
||||
onto specific vlans.) To allow for specification of multiple
|
||||
tags (in the case of vlan trunking), a
|
||||
subelement, <code><tag%gt;</code>, specifies which vlan tag
|
||||
subelement, <code><tag></code>, specifies which vlan tag
|
||||
to use (for example: <code><tag id='42'/></code>. If an
|
||||
interface has more than one <code><vlan></code> element
|
||||
defined, it is assumed that the user wants to do VLAN trunking
|
||||
@ -3298,7 +3561,15 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
will add a default <code>video</code> according to the guest type.
|
||||
For a guest of type "kvm", the default <code>video</code> for it is:
|
||||
<code>type</code> with value "cirrus", <code>vram</code> with value
|
||||
"9216", and <code>heads</code> with value "1".
|
||||
"9216", and <code>heads</code> with value "1". By default, the first
|
||||
video device in domain xml is the primary one, but the optional
|
||||
attribute <code>primary</code> (<span class="since">since 1.0.2</span>)
|
||||
with value 'yes' can be used to mark the primary in cases of mutiple
|
||||
video device. The non-primary must be type of "qxl". The optional
|
||||
attribute <code>ram</code> (<span class="since">since
|
||||
1.0.2</span>) is allowed for "qxl" type only and specifies
|
||||
the size of the primary bar, while <code>vram</code> specifies the
|
||||
secondary bar size. If "ram" is not supplied a default value is used.
|
||||
</dd>
|
||||
|
||||
<dt><code>model</code></dt>
|
||||
@ -3368,6 +3639,14 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
configured by the <code>source</code> element.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The <code>source</code> element may contain an optional
|
||||
<code>seclabel</code> to override the way that labelling
|
||||
is done on the socket path. If this element is not present,
|
||||
the <a href="#seclabel">security label is inherited from
|
||||
the per-domain setting</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Each character device element has an optional
|
||||
sub-element <code><address></code> which can tie the
|
||||
@ -3416,7 +3695,14 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<p>
|
||||
<code>target</code> can have a <code>port</code> attribute, which
|
||||
specifies the port number. Ports are numbered starting from 0. There are
|
||||
usually 0, 1 or 2 serial ports.
|
||||
usually 0, 1 or 2 serial ports. There is also an optional
|
||||
<code>type</code> attribute <span class="since">since 1.0.2</span>
|
||||
which has two choices for its value, one is <code>isa-serial</code>,
|
||||
the other is <code>usb-serial</code>. If <code>type</code> is missing,
|
||||
<code>isa-serial</code> will be used by default. For <code>usb-serial</code>
|
||||
an optional sub-element <code><address></code> with
|
||||
<code>type='usb'</code> can tie the device to a particular controller,
|
||||
<a href="#elementsAddress">documented above</a>.
|
||||
</p>
|
||||
|
||||
<h6><a name="elementCharConsole">Console</a></h6>
|
||||
@ -3429,7 +3715,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>If no <code>targetType</code> attribue is set, then the default
|
||||
<li>If no <code>targetType</code> attribute is set, then the default
|
||||
device type is according to the hypervisor's rules. The default
|
||||
type will be added when re-querying the XML fed into libvirt.
|
||||
For fully virtualized guests, the default device type will usually
|
||||
@ -3443,6 +3729,12 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<li>Only the first <code>console</code> element may use a <code>targetType</code>
|
||||
of <code>serial</code>. Secondary consoles must all be paravirtualized.
|
||||
</li>
|
||||
<li>On s390, the <code>console</code> element may use a
|
||||
<code>targetType</code> of <code>sclp</code> or <code>sclplm</code>
|
||||
(line mode). SCLP is the native console type for s390. There's no
|
||||
controller associated to SCLP consoles.
|
||||
<span class="since">Since 1.0.2</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
@ -3468,6 +3760,17 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</devices>
|
||||
...</pre>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<devices>
|
||||
<!-- KVM s390 sclp console -->
|
||||
<console type='pty'>
|
||||
<source path='/dev/pts/1'/>
|
||||
<target type='sclp' port='0'/>
|
||||
</console>
|
||||
</devices>
|
||||
...</pre>
|
||||
|
||||
<p>
|
||||
If the console is presented as a serial port, the <code>target</code>
|
||||
element has the same attributes as for a serial port. There is usually
|
||||
@ -3661,7 +3964,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<serial type="dev">
|
||||
<source path="/dev/ttyS0"/>
|
||||
<target port="1"/>
|
||||
</serial>
|
||||
</serial>
|
||||
</devices>
|
||||
...</pre>
|
||||
|
||||
@ -4042,12 +4345,22 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<dt><code>label</code></dt>
|
||||
<dd>If static labelling is used, this must specify the full
|
||||
security label to assign to the virtual domain. The format
|
||||
of the content depends on the security driver in use
|
||||
of the content depends on the security driver in use:
|
||||
<ul>
|
||||
<li>SELinux: a SELinux context.</li>
|
||||
<li>AppArmor: an AppArmor profile.</li>
|
||||
<li>
|
||||
DAC: owner and group separated by colon. They can be
|
||||
defined both as user/group names or uid/gid. The driver will first
|
||||
try to parse these values as names, but a leading plus sign can
|
||||
used to force the driver to parse them as uid or gid.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt><code>baselabel</code></dt>
|
||||
<dd>If dynamic labelling is used, this can optionally be
|
||||
used to specify the base security label. The format
|
||||
of the content depends on the security driver in use
|
||||
of the content depends on the security driver in use.
|
||||
</dd>
|
||||
<dt><code>imagelabel</code></dt>
|
||||
<dd>This is an output only element, which shows the
|
||||
|
@ -33,7 +33,7 @@
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<network>
|
||||
<network ipv6='yes'>
|
||||
<name>default</name>
|
||||
<uuid>3e3fce45-4f53-4fa7-bb32-11f34168b82b</uuid>
|
||||
...</pre>
|
||||
@ -52,6 +52,12 @@
|
||||
The format must be RFC 4122 compliant, eg <code>3e3fce45-4f53-4fa7-bb32-11f34168b82b</code>.
|
||||
If omitted when defining/creating a new network, a random
|
||||
UUID is generated. <span class="since">Since 0.3.0</span></dd>
|
||||
<dt><code>ipv6='yes'</code></dt>
|
||||
<dd>The new, optional parameter <code>ipv6='yes'</code> enables
|
||||
a network definition with no IPv6 gateway addresses specified
|
||||
to have guest-to-guest communications. For further information,
|
||||
see the example below for the example with no gateway addresses.
|
||||
<span class="since">Since 1.0.1</span></dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsConnect">Connectivity</a></h3>
|
||||
@ -577,8 +583,10 @@
|
||||
dotted-decimal format, or an IPv6 address in standard
|
||||
colon-separated hexadecimal format, that will be configured on
|
||||
the bridge
|
||||
device associated with the virtual network. To the guests this
|
||||
address will be their default route. For IPv4 addresses, the <code>netmask</code>
|
||||
device associated with the virtual network. To the guests this IPv4
|
||||
address will be their IPv4 default route. For IPv6, the default route is
|
||||
established via Router Advertisement.
|
||||
For IPv4 addresses, the <code>netmask</code>
|
||||
attribute defines the significant bits of the network address,
|
||||
again specified in dotted-decimal format. For IPv6 addresses,
|
||||
and as an alternate method for IPv4 addresses, you can specify
|
||||
@ -587,10 +595,13 @@
|
||||
could also be given as <code>prefix='24'</code>. The <code>family</code>
|
||||
attribute is used to specify the type of address - 'ipv4' or 'ipv6'; if no
|
||||
<code>family</code> is given, 'ipv4' is assumed. A network can have more than
|
||||
one of each family of address defined, but only a single address can have a
|
||||
<code>dhcp</code> or <code>tftp</code> element. <span class="since">Since 0.3.0;
|
||||
one of each family of address defined, but only a single IPv4 address can have a
|
||||
<code>dhcp</code> or <code>tftp</code> element. <span class="since">Since 0.3.0 </span>
|
||||
IPv6, multiple addresses on a single network, <code>family</code>, and
|
||||
<code>prefix</code> since 0.8.7</span>
|
||||
<code>prefix</code> are support <span class="since">Since 0.8.7</span>.
|
||||
Similar to IPv4, one IPv6 address per network can also have
|
||||
a <code>dhcp</code> definition. <span class="since">Since 1.0.1</span>
|
||||
|
||||
<dl>
|
||||
<dt><code>tftp</code></dt>
|
||||
<dd>Immediately within
|
||||
@ -608,30 +619,44 @@
|
||||
optional <code>dhcp</code> element. The presence of this element
|
||||
enables DHCP services on the virtual network. It will further
|
||||
contain one or more <code>range</code> elements. The
|
||||
<code>dhcp</code> element is not supported for IPv6, and
|
||||
is only supported on a single IP address per network for IPv4.
|
||||
<span class="since">Since 0.3.0</span>
|
||||
<code>dhcp</code> element supported for both
|
||||
IPv4 <span class="since">Since 0.3.0</span>
|
||||
and IPv6 <span class="since">Since 1.0.1</span>, but
|
||||
only for one IP address of each type per network.
|
||||
<dl>
|
||||
<dt><code>range</code></dt>
|
||||
<dd>The <code>start</code> and <code>end</code> attributes on the
|
||||
<code>range</code> element specify the boundaries of a pool of
|
||||
IPv4 addresses to be provided to DHCP clients. These two addresses
|
||||
addresses to be provided to DHCP clients. These two addresses
|
||||
must lie within the scope of the network defined on the parent
|
||||
<code>ip</code> element. <span class="since">Since 0.3.0</span>
|
||||
<code>ip</code> element. There may be zero or more
|
||||
<code>range</code> elements specified.
|
||||
<span class="since">Since 0.3.0</span>
|
||||
<code>range</code> can be specified for one IPv4 address,
|
||||
one IPv6 address, or both. <span class="since">Since 1.0.1</span>
|
||||
</dd>
|
||||
<dt><code>host</code></dt>
|
||||
<dd>Within the <code>dhcp</code> element there may be zero or more
|
||||
<code>host</code> elements; these specify hosts which will be given
|
||||
<code>host</code> elements. These specify hosts which will be given
|
||||
names and predefined IP addresses by the built-in DHCP server. Any
|
||||
such element must specify the MAC address of the host to be assigned
|
||||
IPv4 <code>host</code> element must specify the MAC address of the host to be assigned
|
||||
a given name (via the <code>mac</code> attribute), the IP to be
|
||||
assigned to that host (via the <code>ip</code> attribute), and the
|
||||
name to be given that host by the DHCP server (via the
|
||||
<code>name</code> attribute). <span class="since">Since 0.4.5</span>
|
||||
An IPv6 <code>host</code> element differs slightly from that for IPv4:
|
||||
there is no <code>mac</code> attribute since a MAC address has no
|
||||
defined meaning in IPv6. Instead, the <code>name</code> attribute is
|
||||
used to identify the host to be assigned the IPv6 address. For DHCPv6,
|
||||
the name is the plain name of the client host sent by the
|
||||
client to the server. Note that this method of assigning a
|
||||
specific IP address can also be used instead of the <code>mac</code>
|
||||
attribute for IPv4. <span class="since">Since 1.0.1</span>
|
||||
</dd>
|
||||
<dt><code>bootp</code></dt>
|
||||
<dd>The optional <code>bootp</code>
|
||||
element specifies BOOTP options to be provided by the DHCP server.
|
||||
element specifies BOOTP options to be provided by the DHCP
|
||||
server for IPv4 only.
|
||||
Two attributes are supported: <code>file</code> is mandatory and
|
||||
gives the file to be used for the boot image; <code>server</code> is
|
||||
optional and gives the address of the TFTP server from which the boot
|
||||
@ -674,6 +699,29 @@
|
||||
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" />
|
||||
</network></pre>
|
||||
|
||||
|
||||
<p>
|
||||
Below is a variation of the above example which adds an IPv6
|
||||
dhcp range definition.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<network>
|
||||
<name>default6</name>
|
||||
<bridge name="virbr0" />
|
||||
<forward mode="nat"/>
|
||||
<ip address="192.168.122.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
<range start="192.168.122.2" end="192.168.122.254" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" >
|
||||
<dhcp>
|
||||
<range start="2001:db8:ca2:2:1::10" end="2001:db8:ca2:2:1::ff" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesRoute">Routed network config</a></h3>
|
||||
|
||||
<p>
|
||||
@ -698,6 +746,29 @@
|
||||
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" />
|
||||
</network></pre>
|
||||
|
||||
<p>
|
||||
Below is another IPv6 varition. Instead of a dhcp range being
|
||||
specified, this example has a couple of IPv6 host definitions.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<network>
|
||||
<name>local6</name>
|
||||
<bridge name="virbr1" />
|
||||
<forward mode="route" dev="eth1"/>
|
||||
<ip address="192.168.122.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
<range start="192.168.122.2" end="192.168.122.254" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" >
|
||||
<dhcp>
|
||||
<host name="paul" ip="2001:db8:ca2:2:3::1" />
|
||||
<host name="bob" ip="2001:db8:ca2:2:3::2" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesPrivate">Isolated network config</a></h3>
|
||||
|
||||
<p>
|
||||
@ -720,6 +791,24 @@
|
||||
<ip family="ipv6" address="2001:db8:ca2:3::1" prefix="64" />
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesPrivate6">Isolated IPv6 network config</a></h3>
|
||||
|
||||
<p>
|
||||
This variation of an isolated network defines only IPv6.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<network>
|
||||
<name>sixnet</name>
|
||||
<bridge name="virbr6" />
|
||||
<ip family="ipv6" address="2001:db8:ca2:6::1" prefix="64" >
|
||||
<dhcp>
|
||||
<host name="peter" ip="2001:db8:ca2:6:6::1" />
|
||||
<host name="dariusz" ip="2001:db8:ca2:6:6::2" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesBridge">Using an existing host bridge</a></h3>
|
||||
|
||||
<p>
|
||||
@ -773,5 +862,25 @@
|
||||
</forward>
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesNoGateway">Network config with no gateway addresses</a></h3>
|
||||
|
||||
<p>
|
||||
A valid network definition can contain no IPv4 or IPv6 addresses. Such a definition
|
||||
can be used for a "very private" or "very isolated" network since it will not be
|
||||
possible to communicate with the virtualization host via this network. However,
|
||||
this virtual network interface can be used for communication between virtual guest
|
||||
systems. This works for IPv4 and <span class="since">(Since 1.0.1)</span> IPv6.
|
||||
However, the new ipv6='yes' must be added for guest-to-guest IPv6
|
||||
communication.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<network ipv6='yes'>
|
||||
<name>nogw</name>
|
||||
<uuid>7a3b7497-1ec7-8aef-6d5c-38dff9109e93</uuid>
|
||||
<bridge name="virbr2" stp="on" delay="0" />
|
||||
<mac address='00:16:3E:5D:C7:9E'/>
|
||||
</network></pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -24,7 +24,7 @@
|
||||
since the snapshot in a single file) and external (the
|
||||
snapshot is one file, and the changes since the snapshot are
|
||||
in another file).</dd>
|
||||
<dt>VM state</dt>
|
||||
<dt>memory state (or VM state)</dt>
|
||||
<dd>Tracks only the state of RAM and all other resources in use
|
||||
by the VM. If the disks are unmodified between the time a VM
|
||||
state snapshot is taken and restored, then the guest will
|
||||
@ -33,7 +33,7 @@
|
||||
corruption.</dd>
|
||||
<dt>system checkpoint</dt>
|
||||
<dd>A combination of disk snapshots for all disks as well as VM
|
||||
state, which can be used to resume the guest from where it
|
||||
memory state, which can be used to resume the guest from where it
|
||||
left off with symptoms similar to hibernation (that is, TCP
|
||||
connections in the guest may have timed out, but no files or
|
||||
processes are lost).</dd>
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
<p>
|
||||
Libvirt can manage all three types of snapshots. For now, VM
|
||||
state snapshots are created only by
|
||||
state (memory) snapshots are created only by
|
||||
the <code>virDomainSave()</code>, <code>virDomainSaveFlags</code>,
|
||||
and <code>virDomainManagedSave()</code> functions, and restored
|
||||
via the <code>virDomainRestore()</code>,
|
||||
@ -106,6 +106,17 @@
|
||||
description is omitted when initially creating the snapshot,
|
||||
then this field will be empty.
|
||||
</dd>
|
||||
<dt><code>memory</code></dt>
|
||||
<dd>On input, this is an optional request for how to handle VM
|
||||
memory state. For an offline domain or a disk-only snapshot,
|
||||
attribute <code>snapshot</code> must be <code>no</code>, since
|
||||
there is no VM state saved; otherwise, the attribute can
|
||||
be <code>internal</code> if the memory state is piggy-backed with
|
||||
other internal disk state, or <code>external</code> along with
|
||||
a second attribute <code>file</code> giving the absolute path
|
||||
of the file holding the VM memory state. <span class="since">Since
|
||||
1.0.1</span>
|
||||
</dd>
|
||||
<dt><code>disks</code></dt>
|
||||
<dd>On input, this is an optional listing of specific
|
||||
instructions for disk snapshots; it is needed when making a
|
||||
@ -172,7 +183,7 @@
|
||||
to <code>virDomainRevertToSnapshot()</code>. Additionally,
|
||||
this field can be the value "disk-snapshot"
|
||||
(<span class="since">since 0.9.5</span>) when it represents
|
||||
only a disk snapshot (no VM state), and reverting to this
|
||||
only a disk snapshot (no VM memory state), and reverting to this
|
||||
snapshot will default to an inactive guest. Readonly.
|
||||
</dd>
|
||||
<dt><code>parent</code></dt>
|
||||
@ -222,6 +233,7 @@
|
||||
<parent>
|
||||
<name>bare-os-install</name>
|
||||
</parent>
|
||||
<memory snapshot='no'/>
|
||||
<disks>
|
||||
<disk name='vda' snapshot='external'>
|
||||
<driver type='qcow2'/>
|
||||
|
@ -4,7 +4,7 @@ body {
|
||||
padding: 0px;
|
||||
color: rgb(0,0,0);
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 80%;
|
||||
font-size: smaller;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
@ -64,8 +64,6 @@ h6 {
|
||||
dl dt {
|
||||
margin-left: 1em;
|
||||
margin-right: 2em;
|
||||
font-weight: bold;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
dl dd {
|
||||
|
@ -9,8 +9,12 @@
|
||||
<li>Discuss any large changes on the mailing list first. Post patches
|
||||
early and listen to feedback.</li>
|
||||
|
||||
<li><p>Post patches in unified diff format. A command similar to this
|
||||
should work:</p>
|
||||
<li><p>Post patches in unified diff format, with git rename
|
||||
detection enabled. You need a one-time setup of:</p>
|
||||
<pre>
|
||||
git config diff.renames true
|
||||
</pre>
|
||||
<p>After that, a command similar to this should work:</p>
|
||||
<pre>
|
||||
diff -urp libvirt.orig/ libvirt.modified/ > libvirt-myfeature.patch
|
||||
</pre>
|
||||
@ -18,9 +22,11 @@
|
||||
or:
|
||||
</p>
|
||||
<pre>
|
||||
git diff > libvirt-myfeature.patch
|
||||
git diff > libvirt-myfeature.patch
|
||||
</pre>
|
||||
<p>However, the usual workflow of libvirt developer is:</p>
|
||||
<p>Also, for code motion patches, you may find that <code>git
|
||||
diff --patience</code> provides an easier-to-read patch.
|
||||
However, the usual workflow of libvirt developer is:</p>
|
||||
<pre>
|
||||
git checkout master
|
||||
git pull
|
||||
@ -31,11 +37,16 @@
|
||||
<pre>
|
||||
git pull --rebase
|
||||
(fix any conflicts)
|
||||
git send-email --cover-letter --no-chain-reply-to --annotate --to=libvir-list@redhat.com master
|
||||
git send-email --cover-letter --no-chain-reply-to --annotate \
|
||||
--to=libvir-list@redhat.com master
|
||||
</pre>
|
||||
<p>For a single patch you can omit <code>--cover-letter</code>, but
|
||||
series of a two or more patches needs a cover letter. If you get tired
|
||||
of typing <code>--to=libvir-list@redhat.com</code> designation you can
|
||||
<p>(Note that the "git send-email" subcommand may not be in
|
||||
the main git package and using it may require installion of a
|
||||
separate package, for example the "git-email" package in
|
||||
Fedora.) For a single patch you can omit
|
||||
<code>--cover-letter</code>, but a series of two or more
|
||||
patches needs a cover letter. If you get tired of typing
|
||||
<code>--to=libvir-list@redhat.com</code> designation you can
|
||||
set it in git config:</p>
|
||||
<pre>
|
||||
git config sendemail.to libvir-list@redhat.com
|
||||
@ -54,21 +65,41 @@
|
||||
version if needed though).</p>
|
||||
</li>
|
||||
|
||||
<li><p>In your commit message, make the summary line reasonably
|
||||
short (60 characters is typical), followed by a blank line,
|
||||
followed by any longer description of why your patch makes
|
||||
sense. If the patch fixes a regression, and you know what
|
||||
commit introduced the problem, mentioning that is useful.
|
||||
If the patch resolves a bugzilla report, mentioning the URL
|
||||
of the bug number is useful; but also summarize the issue
|
||||
rather than making all readers follow the link. You can use
|
||||
'git shortlog -30' to get an idea of typical summary lines.
|
||||
Libvirt does not currently attach any meaning to
|
||||
Signed-off-by: lines, so it is up to you if you want to
|
||||
include or omit them in the commit message.
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li><p>Split large changes into a series of smaller patches,
|
||||
self-contained if possible, with an explanation of each patch and an
|
||||
explanation of how the sequence of patches fits together. Moreover,
|
||||
please keep in mind that it's required to be able to compile cleanly
|
||||
after each patch. A feature does not have to work until the end of a
|
||||
series, as long as intermediate patches don't cause test-suite
|
||||
failures.</p>
|
||||
self-contained if possible, with an explanation of each patch
|
||||
and an explanation of how the sequence of patches fits
|
||||
together. Moreover, please keep in mind that it's required to
|
||||
be able to compile cleanly (<b>including</b> <code>make
|
||||
check</code> and <code>make syntax-check</code>) after each
|
||||
patch. A feature does not have to work until the end of a
|
||||
series, but intermediate patches must compile and not cause
|
||||
test-suite failures (this is to preserve the usefulness
|
||||
of <code>git bisect</code>, among other things).</p>
|
||||
</li>
|
||||
|
||||
<li>Make sure your patches apply against libvirt GIT. Developers
|
||||
only follow GIT and don't care much about released versions.</li>
|
||||
<li><p>Run the automated tests on your code before submitting any changes.
|
||||
In particular, configure with compile warnings set to -Werror:</p>
|
||||
In particular, configure with compile warnings set to
|
||||
-Werror. This is done automatically for a git checkout; from a
|
||||
tarball, use:</p>
|
||||
<pre>
|
||||
./configure --enable-compile-warnings=error
|
||||
./configure --enable-werror
|
||||
</pre>
|
||||
<p>
|
||||
and run the tests:
|
||||
@ -100,7 +131,10 @@
|
||||
<pre>
|
||||
./qemuxml2xmltest
|
||||
</pre>
|
||||
|
||||
<p>There is also a <code>./run</code> script at the top level,
|
||||
to make it easier to run programs that have not yet been
|
||||
installed, as well as to wrap invocations of various tests
|
||||
under gdb or valgrind.</p>
|
||||
</li>
|
||||
<li>Update tests and/or documentation, particularly if you are adding
|
||||
a new feature or changing the output of a program.</li>
|
||||
@ -202,6 +236,55 @@
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="bracket_spacing">Bracket spacing</a></h2>
|
||||
|
||||
<p>
|
||||
The keywords <code>if</code>, <code>for</code>, <code>while</code>,
|
||||
and <code>switch</code> must have a single space following them
|
||||
before the opening bracket. e.g.
|
||||
</p>
|
||||
<pre>
|
||||
if(foo) // Bad
|
||||
if (foo) // Good
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Function implementations must <strong>not</strong> have any whitespace
|
||||
between the function name and the opening bracket. e.g.
|
||||
</p>
|
||||
<pre>
|
||||
int foo (int wizz) // Bad
|
||||
int foo(int wizz) // Good
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Function calls must <strong>not</strong> have any whitespace
|
||||
between the function name and the opening bracket. e.g.
|
||||
</p>
|
||||
<pre>
|
||||
bar = foo (wizz); // Bad
|
||||
bar = foo(wizz); // Good
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Function typedefs must <strong>not</strong> have any whitespace
|
||||
between the closing bracket of the function name and opening
|
||||
bracket of the arg list. e.g.
|
||||
</p>
|
||||
<pre>
|
||||
typedef int (*foo) (int wizz); // Bad
|
||||
typedef int (*foo)(int wizz); // Good
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
There must not be any whitespace immediately following any
|
||||
opening bracket, or immediately prior to any closing bracket. e.g.
|
||||
</p>
|
||||
<pre>
|
||||
int foo( int wizz ); // Bad
|
||||
int foo(int wizz); // Good
|
||||
</pre>
|
||||
|
||||
<h2><a name="curly_braces">Curly braces</a></h2>
|
||||
|
||||
<p>
|
||||
@ -342,7 +425,7 @@
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h2><a href="types">Preprocessor</a></h2>
|
||||
<h2><a name="preprocessor">Preprocessor</a></h2>
|
||||
|
||||
<p>
|
||||
For variadic macros, stick with C99 syntax:
|
||||
@ -360,7 +443,7 @@
|
||||
#endif
|
||||
</pre>
|
||||
|
||||
<h2><a href="types">C types</a></h2>
|
||||
<h2><a name="types">C types</a></h2>
|
||||
|
||||
<p>
|
||||
Use the right type.
|
||||
@ -544,8 +627,8 @@
|
||||
<p>
|
||||
Usage of the <code>fdopen()</code>, <code>close()</code>, <code>fclose()</code>
|
||||
APIs is deprecated in libvirt code base to help avoiding double-closing of files
|
||||
or file descriptors, which is particulary dangerous in a multi-threaded
|
||||
applications. Instead of these APIs, use the macros from virfile.h
|
||||
or file descriptors, which is particularly dangerous in a multi-threaded
|
||||
application. Instead of these APIs, use the macros from virfile.h
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
@ -740,7 +823,7 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if HAVE_NUMACTL Some system includes aren't supported
|
||||
#if WITH_NUMACTL Some system includes aren't supported
|
||||
# include <numa.h> everywhere so need these #if guards.
|
||||
#endif
|
||||
|
||||
|
@ -18,7 +18,8 @@
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:text>-*- buffer-read-only: t -*- vi: set ro:
|
||||
DO NOT EDIT THIS FILE! IT IS GENERATED AUTOMATICALLY!
|
||||
DO NOT EDIT THIS FILE! IT IS GENERATED AUTOMATICALLY
|
||||
from docs/hacking.html.in!
|
||||
|
||||
|
||||
|
||||
|
@ -11,6 +11,7 @@ my $srcdir = shift @ARGV;
|
||||
|
||||
my $symslibvirt = "$srcdir/libvirt_public.syms";
|
||||
my $symsqemu = "$srcdir/libvirt_qemu.syms";
|
||||
my $symslxc = "$srcdir/libvirt_lxc.syms";
|
||||
my $drivertable = "$srcdir/driver.h";
|
||||
|
||||
my %groupheaders = (
|
||||
@ -112,6 +113,45 @@ while (defined($line = <FILE>)) {
|
||||
close FILE;
|
||||
|
||||
|
||||
# And the same for the LXC specific APIs
|
||||
|
||||
open FILE, "<$symslxc"
|
||||
or die "cannot read $symslxc: $!";
|
||||
|
||||
$prevvers = undef;
|
||||
$vers = undef;
|
||||
while (defined($line = <FILE>)) {
|
||||
chomp $line;
|
||||
next if $line =~ /^\s*#/;
|
||||
next if $line =~ /^\s*$/;
|
||||
next if $line =~ /^\s*(global|local):/;
|
||||
if ($line =~ /^\s*LIBVIRT_LXC_(\d+\.\d+\.\d+)\s*{\s*$/) {
|
||||
if (defined $vers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$vers = $1;
|
||||
} elsif ($line =~ /\s*}\s*;\s*$/) {
|
||||
if (defined $prevvers) {
|
||||
die "malformed syms file";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
} elsif ($line =~ /\s*}\s*LIBVIRT_LXC_(\d+\.\d+\.\d+)\s*;\s*$/) {
|
||||
if ($1 ne $prevvers) {
|
||||
die "malformed syms file $1 != $vers";
|
||||
}
|
||||
$prevvers = $vers;
|
||||
$vers = undef;
|
||||
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
|
||||
$apis{$1} = $vers;
|
||||
} else {
|
||||
die "unexpected data $line\n";
|
||||
}
|
||||
}
|
||||
|
||||
close FILE;
|
||||
|
||||
|
||||
# Some special things which aren't public APIs,
|
||||
# but we want to report
|
||||
$apis{virConnectDrvSupportsFeature} = "0.3.2";
|
||||
|
@ -150,7 +150,7 @@
|
||||
<h2><a name="usagePatterns">Lock usage patterns</a></h2>
|
||||
|
||||
<p>
|
||||
The following psuedo code illustrates the common
|
||||
The following pseudo code illustrates the common
|
||||
patterns of operations invoked on the lock
|
||||
manager plugin callbacks.
|
||||
</p>
|
||||
@ -183,6 +183,10 @@
|
||||
.key = "pid",
|
||||
.value = { .i = dom->pid },
|
||||
},
|
||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
|
||||
.key = "uri",
|
||||
.value = { .cstr = driver->uri },
|
||||
},
|
||||
};
|
||||
mgr = virLockManagerNew(lockPlugin,
|
||||
VIR_LOCK_MANAGER_TYPE_DOMAIN,
|
||||
@ -225,6 +229,10 @@
|
||||
.key = "pid",
|
||||
.value = { .i = dom->pid },
|
||||
},
|
||||
{ .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
|
||||
.key = "uri",
|
||||
.value = { .cstr = driver->uri },
|
||||
},
|
||||
};
|
||||
mgr = virLockManagerNew(lockPlugin,
|
||||
VIR_LOCK_MANAGER_TYPE_DOMAIN,
|
||||
|
@ -157,5 +157,15 @@ from the C API, the only points to notice are:</p>
|
||||
various <span style="color: #E50073; background-color: #FFFFFF">methods</span>
|
||||
associated to the Domain class.</li>
|
||||
</ul>
|
||||
<h2>Maven</h2>
|
||||
<p>Up until version 0.4.7 the Java bindings were available from the central maven repository.</p>
|
||||
<p>If you want to use 0.4.8 or higher, please add the following repository to your pom.xml</p>
|
||||
<pre><repositories>
|
||||
<repository>
|
||||
<id>libvirt-org</id>
|
||||
<url>http://libvirt.org/maven2</url>
|
||||
</repository>
|
||||
</repositories></pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -184,23 +184,25 @@ div.api {
|
||||
border: 1px solid #999999;
|
||||
background: #eeeeee;
|
||||
color: black;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
div.api pre {
|
||||
margin: 0px;
|
||||
border: 0px;
|
||||
background: inherit;
|
||||
padding: inherit;
|
||||
}
|
||||
|
||||
div.api table {
|
||||
margin: 0px;
|
||||
padding-left: 2em;
|
||||
font-family: fixed;
|
||||
whitespace: pre;
|
||||
border-spacing: 0px;
|
||||
}
|
||||
|
||||
div.api table td, div.variablelist table td {
|
||||
vertical-align: top;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
|
||||
@ -412,3 +414,65 @@ table.data tbody td.n {
|
||||
background: rgb(255,220,220);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.api {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.api .type {
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
color: darkslateblue;
|
||||
}
|
||||
|
||||
.api .keyword {
|
||||
font-weight: bold;
|
||||
color: #A2F;
|
||||
}
|
||||
|
||||
.api .comment {
|
||||
color: #080;
|
||||
margin-left: 2em;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.api .comment:before {
|
||||
content: ": ";
|
||||
position: absolute;
|
||||
left: -1.3em;
|
||||
}
|
||||
|
||||
.api .undisclosed {
|
||||
font-style: italic;
|
||||
letter-spacing: .3ex;
|
||||
font-weight: bolder;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.api .directive {
|
||||
color: teal;
|
||||
}
|
||||
|
||||
.api :link:hover, .api :link:focus {
|
||||
color: blue;
|
||||
border-color: blue;
|
||||
}
|
||||
|
||||
.api :link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
dl.variablelist > dt {
|
||||
display: block;
|
||||
float: left;
|
||||
font-style: italic;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.variablelist dd {
|
||||
padding-left: 10em;
|
||||
}
|
||||
|
||||
dl.variablelist > dt:after {
|
||||
content: ": ";
|
||||
}
|
||||
|
@ -120,6 +120,28 @@
|
||||
# mount /var/lib/libvirt/sanlock
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
If your sanlock daemon happen to run under non-root
|
||||
privileges, you need to tell this to libvirt so it
|
||||
chowns created files correctly. This can be done by
|
||||
setting <code>user</code> and/or <code>group</code>
|
||||
variables in the configuration file. Accepted values
|
||||
range is specified in description to the same
|
||||
variables in <code>/etc/libvirt/qemu.conf</code>. For
|
||||
example:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
augtool -s set /files/etc/libvirt/qemu-sanlock.conf/user sanlock
|
||||
augtool -s set /files/etc/libvirt/qemu-sanlock.conf/group sanlock
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
But remember, that if this is NFS share, you need a
|
||||
no_root_squash-ed one for chown (and chmod possibly)
|
||||
to succeed.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In terms of storage requirements, if the filesystem
|
||||
uses 512 byte sectors, you need to allow for <code>1MB</code>
|
||||
@ -208,5 +230,29 @@
|
||||
</pool>
|
||||
</pre>
|
||||
|
||||
<h2><a name="domainconfig">Domain configuration</a></h2>
|
||||
|
||||
<p>
|
||||
In case sanlock loses access to disk locks for some reason, it will
|
||||
kill all domains that lost their locks. This default behavior may
|
||||
be changed using
|
||||
<a href="formatdomain.html#elementsEvents">on_lockfailure
|
||||
element</a> in domain XML. When this element is present, sanlock
|
||||
will call <code>sanlock_helper</code> (provided by libvirt) with
|
||||
the specified action. This helper binary will connect to libvirtd
|
||||
and thus it may need to authenticate if libvirtd was configured to
|
||||
require that on the read-write UNIX socket. To provide the
|
||||
appropriate credentials to sanlock_helper, a
|
||||
<a href="auth.html#Auth_client_config">client authentication
|
||||
file</a> needs to contain something like the following:
|
||||
</p>
|
||||
<pre>
|
||||
[auth-libvirt-localhost]
|
||||
credentials=sanlock
|
||||
|
||||
[credentials-sanlock]
|
||||
authname=login
|
||||
password=password
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -11,7 +11,7 @@
|
||||
libvirt implements several options for migration.
|
||||
</p>
|
||||
|
||||
<h2><a id="transport">Network data transports</a></h2>
|
||||
<h2><a name="transport">Network data transports</a></h2>
|
||||
|
||||
<p>
|
||||
There are two options for the data transport used during migration, either
|
||||
@ -19,7 +19,7 @@
|
||||
over a libvirtd connection.
|
||||
</p>
|
||||
|
||||
<h3><a id="transportnative">Hypervisor native transport</a></h3>
|
||||
<h3><a name="transportnative">Hypervisor native transport</a></h3>
|
||||
<p>
|
||||
<em>Native</em> data transports may or may not support encryption, depending
|
||||
on the hypervisor in question, but will typically have the lowest computational costs
|
||||
@ -33,7 +33,7 @@
|
||||
<img class="diagram" src="migration-native.png" alt="Migration native path">
|
||||
</p>
|
||||
|
||||
<h3><a id="transporttunnel">libvirt tunnelled transport</a></h3>
|
||||
<h3><a name="transporttunnel">libvirt tunnelled transport</a></h3>
|
||||
<p>
|
||||
<em>Tunnelled</em> data transports will always be capable of strong encryption
|
||||
since they are able to leverage the capabilities built in to the libvirt RPC protocol.
|
||||
@ -51,7 +51,7 @@
|
||||
<img class="diagram" src="migration-tunnel.png" alt="Migration tunnel path">
|
||||
</p>
|
||||
|
||||
<h2><a id="flow">Communication control paths/flows</a></h2>
|
||||
<h2><a name="flow">Communication control paths/flows</a></h2>
|
||||
|
||||
<p>
|
||||
Migration of virtual machines requires close co-ordination of the two
|
||||
@ -59,7 +59,7 @@
|
||||
which may be on the source, the destination, or a third host.
|
||||
</p>
|
||||
|
||||
<h3><a id="flowmanageddirect">Managed direct migration</a></h3>
|
||||
<h3><a name="flowmanageddirect">Managed direct migration</a></h3>
|
||||
|
||||
<p>
|
||||
With <em>managed direct</em> migration, the libvirt client process
|
||||
@ -79,7 +79,7 @@
|
||||
</p>
|
||||
|
||||
|
||||
<h3><a id="flowpeer2peer">Managed peer to peer migration</a></h3>
|
||||
<h3><a name="flowpeer2peer">Managed peer to peer migration</a></h3>
|
||||
|
||||
<p>
|
||||
With <em>peer to peer</em> migration, the libvirt client process only
|
||||
@ -101,7 +101,7 @@
|
||||
</p>
|
||||
|
||||
|
||||
<h3><a id="flowunmanageddirect">Unmanaged direct migration</a></h3>
|
||||
<h3><a name="flowunmanageddirect">Unmanaged direct migration</a></h3>
|
||||
|
||||
<p>
|
||||
With <em>unmanaged direct</em> migration, neither the libvirt client
|
||||
@ -117,7 +117,7 @@
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a id="security">Data security</a></h2>
|
||||
<h2><a name="security">Data security</a></h2>
|
||||
|
||||
<p>
|
||||
Since the migration data stream includes a complete copy of the guest
|
||||
@ -136,7 +136,21 @@
|
||||
facility should be used.
|
||||
</p>
|
||||
|
||||
<h2><a id="uris">Migration URIs</a></h2>
|
||||
<h2><a name="offline">Offline migration</a></h2>
|
||||
|
||||
<p>
|
||||
Offline migration transfers inactive the definition of a domain
|
||||
(which may or may not be active). After successful completion, the
|
||||
domain remains in its current state on the source host and is defined
|
||||
but inactive on the destination host. It's a bit more clever than
|
||||
<code>virsh dumpxml</code> on source host followed by
|
||||
<code>virsh define</code> on destination host, as offline migration
|
||||
will run the pre-migration hook to update the domain XML on
|
||||
destination host. Currently, copying non-shared storage is not
|
||||
supported during offline migration.
|
||||
</p>
|
||||
|
||||
<h2><a name="uris">Migration URIs</a></h2>
|
||||
|
||||
<p>
|
||||
Initiating a guest migration requires the client application to
|
||||
@ -186,7 +200,7 @@
|
||||
to comply with local firewall policies</li>
|
||||
</ol>
|
||||
|
||||
<h2><a id="config">Configuration file handling</a></h2>
|
||||
<h2><a name="config">Configuration file handling</a></h2>
|
||||
|
||||
<p>
|
||||
There are two types of virtual machine known to libvirt. A <em>transient</em>
|
||||
@ -429,10 +443,10 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2><a id="scenarios">Migration scenarios</a></h2>
|
||||
<h2><a name="scenarios">Migration scenarios</a></h2>
|
||||
|
||||
|
||||
<h3><a id="scenarionativedirect">Native migration, client to two libvirtd servers</a></h3>
|
||||
<h3><a name="scenarionativedirect">Native migration, client to two libvirtd servers</a></h3>
|
||||
|
||||
<p>
|
||||
At an API level this requires use of virDomainMigrate, without the
|
||||
@ -462,7 +476,7 @@
|
||||
Supported by Xen, QEMU, VMWare and VirtualBox drivers
|
||||
</p>
|
||||
|
||||
<h3><a id="scenarionativepeer2peer">Native migration, client to and peer2peer between, two libvirtd servers</a></h3>
|
||||
<h3><a name="scenarionativepeer2peer">Native migration, client to and peer2peer between, two libvirtd servers</a></h3>
|
||||
|
||||
<p>
|
||||
virDomainMigrate, with the VIR_MIGRATE_PEER2PEER flag set,
|
||||
@ -486,7 +500,7 @@
|
||||
Supported by QEMU driver
|
||||
</p>
|
||||
|
||||
<h3><a id="scenariotunnelpeer2peer1">Tunnelled migration, client and peer2peer between two libvirtd servers</a></h3>
|
||||
<h3><a name="scenariotunnelpeer2peer1">Tunnelled migration, client and peer2peer between two libvirtd servers</a></h3>
|
||||
|
||||
<p>
|
||||
virDomainMigrate, with the VIR_MIGRATE_PEER2PEER & VIR_MIGRATE_TUNNELLED
|
||||
@ -509,7 +523,7 @@
|
||||
Supported by QEMU driver
|
||||
</p>
|
||||
|
||||
<h3><a id="nativedirectunmanaged">Native migration, client to one libvirtd server</a></h3>
|
||||
<h3><a name="nativedirectunmanaged">Native migration, client to one libvirtd server</a></h3>
|
||||
|
||||
<p>
|
||||
virDomainMigrateToURI, without the VIR_MIGRATE_PEER2PEER flag set,
|
||||
@ -533,7 +547,7 @@
|
||||
Supported by Xen driver
|
||||
</p>
|
||||
|
||||
<h3><a id="nativepeer2peer">Native migration, peer2peer between two libvirtd servers</a></h3>
|
||||
<h3><a name="nativepeer2peer">Native migration, peer2peer between two libvirtd servers</a></h3>
|
||||
|
||||
<p>
|
||||
virDomainMigrateToURI, with the VIR_MIGRATE_PEER2PEER flag set,
|
||||
@ -570,7 +584,7 @@
|
||||
Supported by the QEMU driver
|
||||
</p>
|
||||
|
||||
<h3><a id="scenariotunnelpeer2peer2">Tunnelled migration, peer2peer between two libvirtd servers</a></h3>
|
||||
<h3><a name="scenariotunnelpeer2peer2">Tunnelled migration, peer2peer between two libvirtd servers</a></h3>
|
||||
|
||||
<p>
|
||||
virDomainMigrateToURI, with the VIR_MIGRATE_PEER2PEER & VIR_MIGRATE_TUNNELLED
|
||||
|
299
docs/newapi.xsl
299
docs/newapi.xsl
@ -83,17 +83,51 @@
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="formattext">
|
||||
<xsl:param name="text" />
|
||||
|
||||
<xsl:if test="$text">
|
||||
<xsl:variable name="head" select="substring-before($text, '

')"/>
|
||||
<xsl:variable name="rest" select="substring-after($text, '

')"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$head">
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="$head"/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
</xsl:when>
|
||||
<xsl:when test="not($rest)">
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="$text"/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:if test="$rest">
|
||||
<xsl:call-template name="formattext">
|
||||
<xsl:with-param name="text" select="$rest"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="macro" mode="toc">
|
||||
<xsl:text>#define </xsl:text>
|
||||
<span class="directive">#define</span><xsl:text> </xsl:text>
|
||||
<a href="#{@name}"><xsl:value-of select="@name"/></a>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="variable" mode="toc">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="string(@type)"/>
|
||||
</xsl:call-template>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="string(@type)"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:text> </xsl:text>
|
||||
<a name="{@name}"></a>
|
||||
<xsl:value-of select="@name"/>
|
||||
@ -102,18 +136,21 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="typedef" mode="toc">
|
||||
<xsl:text>typedef </xsl:text><xsl:variable name="name" select="string(@name)"/>
|
||||
<span class="keyword">typedef</span>
|
||||
<xsl:text> </xsl:text><xsl:variable name="name" select="string(@name)"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type = 'enum'">
|
||||
<xsl:text>enum </xsl:text>
|
||||
<span class="keyword">enum</span><xsl:text> </xsl:text>
|
||||
<a href="#{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:text> </xsl:text>
|
||||
<a name="{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:text>
|
||||
@ -127,7 +164,7 @@
|
||||
<h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3>
|
||||
<div class="api">
|
||||
<pre>
|
||||
<xsl:text>enum </xsl:text>
|
||||
<span class="keyword">enum</span><xsl:text> </xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text> {
|
||||
</xsl:text>
|
||||
@ -141,10 +178,11 @@
|
||||
<td><xsl:value-of select="@value"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
@ -158,8 +196,8 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="struct" mode="toc">
|
||||
<xsl:text>typedef </xsl:text>
|
||||
<xsl:value-of select="@type"/>
|
||||
<span class="keyword">typedef</span><xsl:text> </xsl:text>
|
||||
<span class="type"><xsl:value-of select="@type"/></span>
|
||||
<xsl:text> </xsl:text>
|
||||
<a href="#{@name}"><xsl:value-of select="@name"/></a>
|
||||
<xsl:text>
|
||||
@ -170,32 +208,35 @@
|
||||
<h3><a name="{@name}"><code><xsl:value-of select="@name"/></code></a></h3>
|
||||
<div class="api">
|
||||
<pre>
|
||||
<xsl:text>struct </xsl:text>
|
||||
<span class="keyword">struct </span>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text>{
|
||||
<xsl:text> {
|
||||
</xsl:text>
|
||||
</pre>
|
||||
<table>
|
||||
<xsl:for-each select="field">
|
||||
<xsl:choose>
|
||||
<xsl:when test='@type = "union"'>
|
||||
<tr><td>union {</td></tr>
|
||||
<tr><td><span class="keyword">union</span> {</td></tr>
|
||||
<tr>
|
||||
<td><table>
|
||||
<xsl:for-each select="union/field">
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
</td>
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
@ -206,10 +247,11 @@
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
<td></td></tr>
|
||||
@ -217,17 +259,20 @@
|
||||
<xsl:otherwise>
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
</td>
|
||||
<td><xsl:value-of select="@name"/></td>
|
||||
<xsl:if test="@info != ''">
|
||||
<td>
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
<div class="comment">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
@ -237,7 +282,7 @@
|
||||
<xsl:if test="not(field)">
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<xsl:text>The content of this structure is not made public by the API</xsl:text>
|
||||
<span class="undisclosed">The content of this structure is not made public by the API</span>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
@ -253,12 +298,12 @@
|
||||
<xsl:template match="macro">
|
||||
<xsl:variable name="name" select="string(@name)"/>
|
||||
<h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3>
|
||||
<pre><xsl:text>#define </xsl:text><xsl:value-of select="$name"/></pre>
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<pre class="api"><span class="directive">#define</span><xsl:text> </xsl:text><xsl:value-of select="$name"/></pre>
|
||||
<div>
|
||||
<xsl:call-template name="formattext">
|
||||
<xsl:with-param name="text" select="info"/>
|
||||
</xsl:call-template>
|
||||
</p><xsl:text>
|
||||
</div><xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
@ -267,9 +312,11 @@
|
||||
<xsl:variable name="nlen" select="string-length($name)"/>
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:text>	</xsl:text>
|
||||
<a href="#{@name}"><xsl:value-of select="@name"/></a>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
@ -280,12 +327,14 @@
|
||||
</xsl:if>
|
||||
<xsl:text>	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<xsl:text>void</xsl:text>
|
||||
<span class="type">void</span>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
@ -308,13 +357,15 @@
|
||||
<xsl:variable name="nlen" select="string-length($name)"/>
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<xsl:text>typedef </xsl:text>
|
||||
<span class="keyword">typedef</span><xsl:text> </xsl:text>
|
||||
<a href="#{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:text>	</xsl:text>
|
||||
<a href="#{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
@ -325,12 +376,14 @@
|
||||
</xsl:if>
|
||||
<xsl:text>	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<xsl:text>void</xsl:text>
|
||||
<span class="type">void</span>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
@ -356,11 +409,13 @@
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3>
|
||||
<pre class="programlisting">
|
||||
<xsl:text>typedef </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<pre class="api">
|
||||
<span class="keyword">typedef</span><xsl:text> </xsl:text>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:text>	(*</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
@ -371,16 +426,19 @@
|
||||
</xsl:if>
|
||||
<xsl:text>)	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<xsl:text>void</xsl:text>
|
||||
<span class="type">void</span>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>, </xsl:text><br/>
|
||||
<xsl:text>,
|
||||
</xsl:text>
|
||||
<xsl:if test="$blen - 40 > 8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
@ -393,34 +451,30 @@
|
||||
<xsl:text>)
|
||||
</xsl:text>
|
||||
</pre>
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<div>
|
||||
<xsl:call-template name="formattext">
|
||||
<xsl:with-param name="text" select="info"/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
</div>
|
||||
<xsl:if test="arg | return">
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody>
|
||||
<dl class="variablelist">
|
||||
<xsl:for-each select="arg">
|
||||
<tr>
|
||||
<td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<dt><xsl:value-of select="@name"/></dt>
|
||||
<dd>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</tr>
|
||||
</dd>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="return/@info">
|
||||
<tr>
|
||||
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</tr>
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@info"/>
|
||||
</xsl:call-template>
|
||||
</dd>
|
||||
</xsl:if>
|
||||
</tbody></table></div>
|
||||
</dl>
|
||||
</xsl:if>
|
||||
<br/>
|
||||
<xsl:text>
|
||||
@ -433,10 +487,12 @@
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3>
|
||||
<pre class="programlisting">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<pre class="api">
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:text>	</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
@ -447,16 +503,19 @@
|
||||
</xsl:if>
|
||||
<xsl:text>	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<xsl:text>void</xsl:text>
|
||||
<span class="type">void</span>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<span class="type">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>, </xsl:text><br/>
|
||||
<xsl:text>,
|
||||
</xsl:text>
|
||||
<xsl:if test="$blen - 40 > 8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
@ -466,39 +525,33 @@
|
||||
<xsl:text>					 </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)</xsl:text><br/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:text>)</xsl:text>
|
||||
</pre>
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<div>
|
||||
<xsl:call-template name="formattext">
|
||||
<xsl:with-param name="text" select="info"/>
|
||||
</xsl:call-template>
|
||||
</p><xsl:text>
|
||||
</div><xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:if test="arg | return/@info">
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody>
|
||||
<xsl:for-each select="arg">
|
||||
<tr>
|
||||
<td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="return/@info">
|
||||
<tr>
|
||||
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
|
||||
<td>
|
||||
<dl class="variablelist">
|
||||
<xsl:for-each select="arg">
|
||||
<dt><xsl:value-of select="@name"/></dt>
|
||||
<dd>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</dd>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="return/@info">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</tbody></table></div>
|
||||
</dd>
|
||||
</xsl:if>
|
||||
</dl>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
@ -547,20 +600,20 @@
|
||||
<h2>Table of Contents</h2>
|
||||
<xsl:if test="count(exports[@type='macro']) > 0">
|
||||
<h3><a href="#macros">Macros</a></h3>
|
||||
<pre>
|
||||
<pre class="api">
|
||||
<xsl:apply-templates select="exports[@type='macro']" mode="toc">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
</pre>
|
||||
</xsl:if>
|
||||
<h3><a href="#types">Types</a></h3>
|
||||
<pre>
|
||||
<pre class="api">
|
||||
<xsl:apply-templates select="exports[@type='typedef']" mode="toc">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
</pre>
|
||||
<h3><a href="#functions">Functions</a></h3>
|
||||
<pre>
|
||||
<pre class="api">
|
||||
<xsl:apply-templates select="exports[@type='function']" mode="toc">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
|
1508
docs/news.html.in
1508
docs/news.html.in
File diff suppressed because it is too large
Load Diff
@ -54,7 +54,7 @@
|
||||
<xsl:when test="$pagename = a/@href">
|
||||
<span class="{$class}"><xsl:value-of select="a"/></span>
|
||||
</xsl:when>
|
||||
<xsl:when test="a/@href = 'http://wiki.libvirt.org'">
|
||||
<xsl:when test="starts-with(a/@href, 'http://wiki.libvirt.org')">
|
||||
<a title="{./span}" class="{$class}" href="{a/@href}"><xsl:value-of select="a"/></a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
@ -59,6 +59,9 @@
|
||||
<li>
|
||||
<a href="http://en.wikipedia.org/wiki/Virtualization">Wikipedia Virtualization</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.ibm.com/developerworks/linux/library/l-kvm-libvirt-audit/index.html">IBM developerworks article about libvirt and audit.</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Blogs and Podcasts</h2>
|
||||
|
@ -356,7 +356,7 @@ Note that parameter values must be
|
||||
</td>
|
||||
<td> libssh2 </td>
|
||||
<td>
|
||||
Path to the known_hosts file to verify the host key agains. LibSSH2
|
||||
Path to the known_hosts file to verify the host key against. LibSSH2
|
||||
supports OpenSSH-style known_hosts files, although it does not support
|
||||
all key types, so using files created by the OpenSSH binary may result
|
||||
into truncating the known_hosts file. It's recommended to use the default
|
||||
|
@ -213,4 +213,22 @@
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='wwn'>
|
||||
<data type='string'>
|
||||
<param name='pattern'>[0-9a-fA-F]{16}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="cpuset">
|
||||
<data type="string">
|
||||
<param name="pattern">([0-9]+(-[0-9]+)?|\^[0-9]+)(,([0-9]+(-[0-9]+)?|\^[0-9]+))*</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='volName'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[a-zA-Z0-9_\+\-\.]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
</grammar>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- A Relax NG schema for the libvirt capabilities XML format -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
@ -193,6 +194,17 @@
|
||||
<attribute name='id'>
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name='socket_id'>
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
<attribute name='core_id'>
|
||||
<ref name='unsignedInt'/>
|
||||
</attribute>
|
||||
<attribute name='siblings'>
|
||||
<ref name='cpuset'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
|
@ -51,7 +51,10 @@
|
||||
<ref name="clock"/>
|
||||
<ref name="resources"/>
|
||||
<ref name="features"/>
|
||||
<ref name="termination"/>
|
||||
<ref name="events"/>
|
||||
<optional>
|
||||
<ref name="pm"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="devices"/>
|
||||
</optional>
|
||||
@ -467,6 +470,14 @@
|
||||
<interleave>
|
||||
<element name="memory">
|
||||
<ref name='scaledInteger'/>
|
||||
<optional>
|
||||
<attribute name="dumpCore">
|
||||
<choice>
|
||||
<value>on</value>
|
||||
<value>off</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
<optional>
|
||||
<element name="currentMemory">
|
||||
@ -886,6 +897,28 @@
|
||||
<optional>
|
||||
<ref name="geometry"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="diskBlockIo"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="wwn">
|
||||
<ref name="wwn"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="vendor">
|
||||
<data type="string">
|
||||
<param name="pattern">[x20-x7E]{0,8}</param>
|
||||
</data>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="product">
|
||||
<data type="string">
|
||||
<param name="pattern">[x20-x7E]{0,16}</param>
|
||||
</data>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
<define name="snapshot">
|
||||
@ -938,24 +971,42 @@
|
||||
-->
|
||||
<define name="disk">
|
||||
<element name="disk">
|
||||
<optional>
|
||||
<attribute name="device">
|
||||
<choice>
|
||||
<value>floppy</value>
|
||||
<value>disk</value>
|
||||
<value>cdrom</value>
|
||||
<value>lun</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="rawio">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<choice>
|
||||
<group>
|
||||
<optional>
|
||||
<attribute name="device">
|
||||
<choice>
|
||||
<value>floppy</value>
|
||||
<value>disk</value>
|
||||
<value>cdrom</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="device">
|
||||
<choice>
|
||||
<value>lun</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="rawio">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="sgio">
|
||||
<choice>
|
||||
<value>filtered</value>
|
||||
<value>unfiltered</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
</choice>
|
||||
<optional>
|
||||
<ref name="snapshot"/>
|
||||
</optional>
|
||||
@ -1029,6 +1080,7 @@
|
||||
<value>nbd</value>
|
||||
<value>rbd</value>
|
||||
<value>sheepdog</value>
|
||||
<value>gluster</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<optional>
|
||||
@ -1036,12 +1088,35 @@
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<element name="host">
|
||||
<attribute name="name">
|
||||
<ref name="dnsName"/>
|
||||
</attribute>
|
||||
<attribute name="port">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
<choice>
|
||||
<group>
|
||||
<optional>
|
||||
<attribute name="transport">
|
||||
<choice>
|
||||
<value>tcp</value>
|
||||
<value>rdma</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name="name">
|
||||
<choice>
|
||||
<ref name="dnsName"/>
|
||||
<ref name="ipAddr"/>
|
||||
</choice>
|
||||
</attribute>
|
||||
<attribute name="port">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="transport">
|
||||
<value>unix</value>
|
||||
</attribute>
|
||||
<attribute name="socket">
|
||||
<ref name="absFilePath"/>
|
||||
</attribute>
|
||||
</group>
|
||||
</choice>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<empty/>
|
||||
@ -1110,6 +1185,20 @@
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<define name="diskBlockIo">
|
||||
<element name="blockio">
|
||||
<optional>
|
||||
<attribute name="logical_block_size">
|
||||
<data type="integer"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="physical_block_size">
|
||||
<data type="integer"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<!--
|
||||
Disk may use a special driver for access.
|
||||
-->
|
||||
@ -1155,11 +1244,32 @@
|
||||
<ref name="genericName"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="type">
|
||||
<ref name="genericName"/>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<ref name='diskFormat'/>
|
||||
<value>aio</value> <!-- back-compat for 'raw' -->
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</define>
|
||||
<define name='diskFormat'>
|
||||
<choice>
|
||||
<value>raw</value>
|
||||
<value>dir</value>
|
||||
<value>bochs</value>
|
||||
<value>cloop</value>
|
||||
<value>cow</value>
|
||||
<value>dmg</value>
|
||||
<value>iso</value>
|
||||
<value>qcow</value>
|
||||
<value>qcow2</value>
|
||||
<value>qed</value>
|
||||
<value>vmdk</value>
|
||||
<value>vpc</value>
|
||||
<value>fat</value>
|
||||
<value>vhd</value>
|
||||
</choice>
|
||||
</define>
|
||||
<define name="driverCache">
|
||||
<attribute name="cache">
|
||||
<choice>
|
||||
@ -1621,6 +1731,14 @@
|
||||
</optional>
|
||||
<interleave>
|
||||
<element name="source">
|
||||
<optional>
|
||||
<attribute name="missing">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<choice>
|
||||
<group>
|
||||
<ref name="usbproduct"/>
|
||||
@ -2136,22 +2254,34 @@
|
||||
</define>
|
||||
<!--
|
||||
A video adapter description, allowing configuration of device
|
||||
model, number of virtual heads, and video ram size
|
||||
model, number of virtual heads, video ram size, and for qxl
|
||||
both ram bar sizes.
|
||||
-->
|
||||
<define name="video">
|
||||
<element name="video">
|
||||
<optional>
|
||||
<element name="model">
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>vga</value>
|
||||
<value>cirrus</value>
|
||||
<value>vmvga</value>
|
||||
<value>xen</value>
|
||||
<value>vbox</value>
|
||||
<value>qxl</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<choice>
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>vga</value>
|
||||
<value>cirrus</value>
|
||||
<value>vmvga</value>
|
||||
<value>xen</value>
|
||||
<value>vbox</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>qxl</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="ram">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
</choice>
|
||||
<optional>
|
||||
<attribute name="vram">
|
||||
<ref name="unsignedInt"/>
|
||||
@ -2162,6 +2292,14 @@
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="primary">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="acceleration">
|
||||
<optional>
|
||||
@ -2193,10 +2331,10 @@
|
||||
</element>
|
||||
</define>
|
||||
<!--
|
||||
When a domain terminates multiple policies can be applied depending
|
||||
on how it ended:
|
||||
When a certain event happens, multiple policies can be applied
|
||||
depends on what happened:
|
||||
-->
|
||||
<define name="termination">
|
||||
<define name="events">
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name="on_reboot">
|
||||
@ -2213,6 +2351,11 @@
|
||||
<ref name="crashOptions"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="on_lockfailure">
|
||||
<ref name="lockfailureOptions"/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
<!--
|
||||
@ -2254,6 +2397,57 @@
|
||||
<value>coredump-restart</value>
|
||||
</choice>
|
||||
</define>
|
||||
<!--
|
||||
Options when resource locks are lost:
|
||||
poweroff: power off the domain
|
||||
restart: power off the domain and start it up again to reacquire the
|
||||
locks
|
||||
pause: pause the execution of the domain so that it can be manually
|
||||
resumed when lock issues are solved
|
||||
ignore: keep the domain running
|
||||
-->
|
||||
<define name="lockfailureOptions">
|
||||
<choice>
|
||||
<value>poweroff</value>
|
||||
<value>restart</value>
|
||||
<value>pause</value>
|
||||
<value>ignore</value>
|
||||
</choice>
|
||||
</define>
|
||||
<!--
|
||||
Control ACPI sleep states (dis)allowed for the domain
|
||||
For each of the states the following rules apply:
|
||||
on: the state will be forcefully enabled
|
||||
off: the state will be forcefully disabled
|
||||
not specified: hypervisor will be left to decide its defaults
|
||||
-->
|
||||
<define name="pm">
|
||||
<element name="pm">
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name="suspend-to-mem">
|
||||
<ref name="suspendChoices"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="suspend-to-disk">
|
||||
<ref name="suspendChoices"/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
<define name="suspendChoices">
|
||||
<optional>
|
||||
<attribute name="enabled">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</define>
|
||||
<!--
|
||||
Specific setup for a qemu emulated character device. Note: this
|
||||
definition doesn't fully specify the constraints on this node.
|
||||
@ -2288,6 +2482,17 @@
|
||||
<value>virtio</value>
|
||||
<value>lxc</value>
|
||||
<value>openvz</value>
|
||||
<value>sclp</value>
|
||||
<value>sclplm</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
|
||||
<define name='qemucdevSerialTgtType'>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>isa-serial</value>
|
||||
<value>usb-serial</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
@ -2295,9 +2500,14 @@
|
||||
<define name="qemucdevTgtDef">
|
||||
<element name="target">
|
||||
<interleave>
|
||||
<optional>
|
||||
<ref name="qemucdevConsoleTgtType"/>
|
||||
</optional>
|
||||
<choice>
|
||||
<optional>
|
||||
<ref name="qemucdevConsoleTgtType"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="qemucdevSerialTgtType"/>
|
||||
</optional>
|
||||
</choice>
|
||||
<optional>
|
||||
<attribute name="port"/>
|
||||
</optional>
|
||||
@ -2321,6 +2531,49 @@
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="usbdevfilter">
|
||||
<element name="usbdev">
|
||||
<attribute name="allow">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="class">
|
||||
<choice>
|
||||
<ref name="usbClass"/>
|
||||
<ref name="usbIdDefault"/>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="vendor">
|
||||
<choice>
|
||||
<ref name="usbId"/>
|
||||
<ref name="usbIdDefault"/>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="product">
|
||||
<choice>
|
||||
<ref name="usbId"/>
|
||||
<ref name="usbIdDefault"/>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="version">
|
||||
<choice>
|
||||
<ref name="usbVersion"/>
|
||||
<ref name="usbIdDefault"/>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="qemucdevSrcType">
|
||||
<attribute name="type">
|
||||
<ref name="qemucdevSrcTypeChoice"/>
|
||||
@ -2344,6 +2597,9 @@
|
||||
<optional>
|
||||
<attribute name="wiremode"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='devSeclabel'/>
|
||||
</optional>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
@ -2615,62 +2871,135 @@
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<define name="hostdev">
|
||||
<element name="hostdev">
|
||||
<optional>
|
||||
<attribute name="mode">
|
||||
<choice>
|
||||
<value>subsystem</value>
|
||||
<value>capabilities</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>usb</value>
|
||||
<value>pci</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="managed">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<group>
|
||||
<element name="source">
|
||||
<choice>
|
||||
<group>
|
||||
<ref name="usbproduct"/>
|
||||
<optional>
|
||||
<ref name="usbaddress"/>
|
||||
</optional>
|
||||
</group>
|
||||
<ref name="usbaddress"/>
|
||||
<element name="address">
|
||||
<ref name="pciaddress"/>
|
||||
</element>
|
||||
</choice>
|
||||
</element>
|
||||
</group>
|
||||
<optional>
|
||||
<ref name="deviceBoot"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<define name="redirfilter">
|
||||
<element name="redirfilter">
|
||||
<zeroOrMore>
|
||||
<ref name="usbdevfilter"/>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="hostdev">
|
||||
<element name="hostdev">
|
||||
<choice>
|
||||
<group>
|
||||
<ref name="hostdevsubsys"/>
|
||||
</group>
|
||||
<group>
|
||||
<ref name="hostdevcaps"/>
|
||||
</group>
|
||||
</choice>
|
||||
<optional>
|
||||
<ref name="alias"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
<ref name="deviceBoot"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="rom"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="hostdevsubsys">
|
||||
<optional>
|
||||
<attribute name="mode">
|
||||
<value>subsystem</value>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="managed">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<choice>
|
||||
<ref name="hostdevsubsyspci"/>
|
||||
<ref name="hostdevsubsysusb"/>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="hostdevcaps">
|
||||
<attribute name="mode">
|
||||
<value>capabilities</value>
|
||||
</attribute>
|
||||
<choice>
|
||||
<group>
|
||||
<ref name="hostdevcapsstorage"/>
|
||||
</group>
|
||||
<group>
|
||||
<ref name="hostdevcapsmisc"/>
|
||||
</group>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
|
||||
<define name="hostdevsubsyspci">
|
||||
<attribute name="type">
|
||||
<value>pci</value>
|
||||
</attribute>
|
||||
<element name="source">
|
||||
<optional>
|
||||
<ref name="startupPolicy"/>
|
||||
</optional>
|
||||
<element name="address">
|
||||
<ref name="pciaddress"/>
|
||||
</element>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="hostdevsubsysusb">
|
||||
<attribute name="type">
|
||||
<value>usb</value>
|
||||
</attribute>
|
||||
<element name="source">
|
||||
<optional>
|
||||
<ref name="startupPolicy"/>
|
||||
</optional>
|
||||
<choice>
|
||||
<group>
|
||||
<ref name="usbproduct"/>
|
||||
<optional>
|
||||
<ref name="usbaddress"/>
|
||||
</optional>
|
||||
</group>
|
||||
<ref name="usbaddress"/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="hostdevcapsstorage">
|
||||
<attribute name="type">
|
||||
<value>storage</value>
|
||||
</attribute>
|
||||
<element name="source">
|
||||
<element name="block">
|
||||
<ref name="absFilePath"/>
|
||||
</element>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="hostdevcapsmisc">
|
||||
<attribute name="type">
|
||||
<value>misc</value>
|
||||
</attribute>
|
||||
<element name="source">
|
||||
<element name="char">
|
||||
<ref name="absFilePath"/>
|
||||
</element>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="usbproduct">
|
||||
<element name="vendor">
|
||||
<attribute name="id">
|
||||
@ -2780,6 +3109,7 @@
|
||||
<ref name="smartcard"/>
|
||||
<ref name="hub"/>
|
||||
<ref name="redirdev"/>
|
||||
<ref name="redirfilter"/>
|
||||
</choice>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
@ -2792,7 +3122,8 @@
|
||||
</element>
|
||||
</define>
|
||||
<!--
|
||||
A set of optional features: PAE, APIC, ACPI, and HAP support
|
||||
A set of optional features: PAE, APIC, ACPI,
|
||||
HyperV Enlightenment and HAP support
|
||||
-->
|
||||
<define name="features">
|
||||
<optional>
|
||||
@ -2805,7 +3136,14 @@
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="apic">
|
||||
<empty/>
|
||||
<optional>
|
||||
<attribute name="eoi">
|
||||
<choice>
|
||||
<value>on</value>
|
||||
<value>off</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
@ -2818,6 +3156,9 @@
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="hyperv"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="viridian">
|
||||
<empty/>
|
||||
@ -3073,12 +3414,19 @@
|
||||
|
||||
<define name="bios">
|
||||
<element name="bios">
|
||||
<attribute name="useserial">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="useserial">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="rebootTimeout">
|
||||
<ref name="rebootTimeoutDelay"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@ -3184,7 +3532,7 @@
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name='format'>
|
||||
<ref name="genericName"/>
|
||||
<ref name='diskFormat'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
@ -3266,6 +3614,28 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<!-- Optional HyperV Enlightenment features -->
|
||||
<define name="hyperv">
|
||||
<element name="hyperv">
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name="relaxed">
|
||||
<ref name="hypervtristate"/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="hypervtristate">
|
||||
<attribute name="state">
|
||||
<choice>
|
||||
<value>on</value>
|
||||
<value>off</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
|
||||
<!--
|
||||
Optional hypervisor extensions in their own namespace:
|
||||
QEmu
|
||||
@ -3317,11 +3687,6 @@
|
||||
<!--
|
||||
Type library
|
||||
-->
|
||||
<define name="cpuset">
|
||||
<data type="string">
|
||||
<param name="pattern">([0-9]+(-[0-9]+)?|\^[0-9]+)(,([0-9]+(-[0-9]+)?|\^[0-9]+))*</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="countCPU">
|
||||
<data type="unsignedShort">
|
||||
<param name="pattern">[0-9]+</param>
|
||||
@ -3352,6 +3717,11 @@
|
||||
<param name='minInclusive'>-1</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="rebootTimeoutDelay">
|
||||
<data type="short">
|
||||
<param name="minInclusive">-1</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="PortNumber">
|
||||
<data type="short">
|
||||
<param name="minInclusive">-1</param>
|
||||
@ -3393,16 +3763,31 @@
|
||||
<param name="pattern">(([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9])|(([0-9a-fA-F]+|:)+[0-9a-fA-F]+)|([a-zA-Z0-9_\.\+\-]*)</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="usbIdDefault">
|
||||
<data type="string">
|
||||
<param name="pattern">-1</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="usbId">
|
||||
<data type="string">
|
||||
<param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="usbVersion">
|
||||
<data type="string">
|
||||
<param name="pattern">[0-9]{1,2}.[0-9]{1,2}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="usbAddr">
|
||||
<data type="string">
|
||||
<param name="pattern">(0x)?[0-9a-fA-F]{1,3}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="usbClass">
|
||||
<data type="string">
|
||||
<param name="pattern">(0x)?[0-9a-fA-F]{1,2}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="usbPort">
|
||||
<data type="string">
|
||||
<param name="pattern">((0x)?[0-9a-fA-F]{1,3}\.){0,3}(0x)?[0-9a-fA-F]{1,3}</param>
|
||||
|
@ -30,6 +30,29 @@
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='memory'>
|
||||
<choice>
|
||||
<attribute name='snapshot'>
|
||||
<choice>
|
||||
<value>no</value>
|
||||
<value>internal</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<group>
|
||||
<optional>
|
||||
<attribute name='snapshot'>
|
||||
<value>external</value>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name='file'>
|
||||
<ref name='absFilePath'/>
|
||||
</attribute>
|
||||
</group>
|
||||
</choice>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='disks'>
|
||||
<zeroOrMore>
|
||||
@ -105,7 +128,7 @@
|
||||
<element name='driver'>
|
||||
<optional>
|
||||
<attribute name='type'>
|
||||
<ref name='genericName'/>
|
||||
<ref name='diskFormat'/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<empty/>
|
||||
|
@ -17,6 +17,16 @@
|
||||
<data type="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<!-- Enables IPv6 guest-to-guest communications on a network
|
||||
with no gateways addresses specified -->
|
||||
<optional>
|
||||
<attribute name="ipv6">
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<interleave>
|
||||
|
||||
<!-- The name of the network, used to refer to it through the API
|
||||
@ -208,7 +218,7 @@
|
||||
</zeroOrMore>
|
||||
<zeroOrMore>
|
||||
<element name="host">
|
||||
<attribute name="ip"><ref name="ipv4Addr"/></attribute>
|
||||
<attribute name="ip"><ref name="ipAddr"/></attribute>
|
||||
<oneOrMore>
|
||||
<element name="hostname"><ref name="dnsName"/></element>
|
||||
</oneOrMore>
|
||||
@ -262,15 +272,17 @@
|
||||
<element name="dhcp">
|
||||
<zeroOrMore>
|
||||
<element name="range">
|
||||
<attribute name="start"><ref name="ipv4Addr"/></attribute>
|
||||
<attribute name="end"><ref name="ipv4Addr"/></attribute>
|
||||
<attribute name="start"><ref name="ipAddr"/></attribute>
|
||||
<attribute name="end"><ref name="ipAddr"/></attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<zeroOrMore>
|
||||
<element name="host">
|
||||
<attribute name="mac"><ref name="uniMacAddr"/></attribute>
|
||||
<optional>
|
||||
<attribute name="mac"><ref name="uniMacAddr"/></attribute>
|
||||
</optional>
|
||||
<attribute name="name"><text/></attribute>
|
||||
<attribute name="ip"><ref name="ipv4Addr"/></attribute>
|
||||
<attribute name="ip"><ref name="ipAddr"/></attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
|
@ -148,6 +148,11 @@
|
||||
<ref name="speed"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="floor">
|
||||
<ref name="speed"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name='burst'>
|
||||
<ref name="BurstSize"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- A Relax NG schema for the libvirt node device XML format -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
@ -245,12 +246,6 @@
|
||||
</attribute>
|
||||
</define>
|
||||
|
||||
<define name='wwn'>
|
||||
<data type='string'>
|
||||
<param name='pattern'>(0-9a-fA-F){16}</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='capsfchost'>
|
||||
<attribute name='type'>
|
||||
<value>fc_host</value>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- A Relax NG schema for the libvirt volume encryption XML format -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
|
@ -144,7 +144,7 @@
|
||||
|
||||
<define name='commonmetadata'>
|
||||
<element name='name'>
|
||||
<ref name='name'/>
|
||||
<ref name='genericName'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='uuid'>
|
||||
@ -230,7 +230,7 @@
|
||||
<attribute name='path'>
|
||||
<choice>
|
||||
<ref name='absFilePath'/>
|
||||
<ref name='name'/>
|
||||
<ref name='genericName'/>
|
||||
</choice>
|
||||
</attribute>
|
||||
<choice>
|
||||
@ -519,12 +519,6 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='name'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[a-zA-Z0-9_\+\-]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="PortNumber">
|
||||
<data type="short">
|
||||
<param name="minInclusive">-1</param>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<define name='vol'>
|
||||
<element name='volume'>
|
||||
<element name='name'>
|
||||
<ref name='name'/>
|
||||
<ref name='volName'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='key'>
|
||||
@ -209,10 +209,4 @@
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<define name='name'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[a-zA-Z0-9_\+\-\.]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
</grammar>
|
||||
|
@ -30,7 +30,7 @@ virConnectPtr conn = virConnectOpenReadOnly (<b>"test:///default"</b>);
|
||||
<p>
|
||||
To simplify life for administrators, it is possible to setup URI aliases in a
|
||||
libvirt client configuration file. The configuration file is <code>/etc/libvirt/libvirt.conf</code>
|
||||
for the root user, or <code>$XDG_CONFIG_DIR/libvirt/libvirt.conf</code> for any unprivileged user.
|
||||
for the root user, or <code>$XDG_CONFIG_HOME/libvirt/libvirt.conf</code> for any unprivileged user.
|
||||
In this file, the following syntax can be used to setup aliases
|
||||
</p>
|
||||
|
||||
|
@ -90,6 +90,9 @@ const char *eventToString(int event) {
|
||||
case VIR_DOMAIN_EVENT_SHUTDOWN:
|
||||
ret = "Shutdown";
|
||||
break;
|
||||
case VIR_DOMAIN_EVENT_PMSUSPENDED:
|
||||
ret = "PMSuspended";
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -146,6 +149,9 @@ static const char *eventDetailToString(int event, int detail) {
|
||||
case VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT:
|
||||
ret = "Snapshot";
|
||||
break;
|
||||
case VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR:
|
||||
ret = "API error";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case VIR_DOMAIN_EVENT_RESUMED:
|
||||
@ -193,6 +199,16 @@ static const char *eventDetailToString(int event, int detail) {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case VIR_DOMAIN_EVENT_PMSUSPENDED:
|
||||
switch ((virDomainEventPMSuspendedDetailType) detail) {
|
||||
case VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY:
|
||||
ret = "Memory";
|
||||
break;
|
||||
case VIR_DOMAIN_EVENT_PMSUSPENDED_DISK:
|
||||
ret = "Disk";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -377,7 +393,7 @@ static int myDomainEventPMWakeupCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
int reason ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) system pmwakeup",
|
||||
printf("%s EVENT: Domain %s(%d) system pmwakeup\n",
|
||||
__func__, virDomainGetName(dom), virDomainGetID(dom));
|
||||
return 0;
|
||||
}
|
||||
@ -387,7 +403,17 @@ static int myDomainEventPMSuspendCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
int reason ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) system pmsuspend",
|
||||
printf("%s EVENT: Domain %s(%d) system pmsuspend\n",
|
||||
__func__, virDomainGetName(dom), virDomainGetID(dom));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int myDomainEventPMSuspendDiskCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
int reason ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) system pmsuspend-disk\n",
|
||||
__func__, virDomainGetName(dom), virDomainGetID(dom));
|
||||
return 0;
|
||||
}
|
||||
@ -430,6 +456,7 @@ int main(int argc, char **argv)
|
||||
int callback11ret = -1;
|
||||
int callback12ret = -1;
|
||||
int callback13ret = -1;
|
||||
int callback14ret = -1;
|
||||
struct sigaction action_stop;
|
||||
|
||||
memset(&action_stop, 0, sizeof(action_stop));
|
||||
@ -523,6 +550,11 @@ int main(int argc, char **argv)
|
||||
VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventBalloonChangeCallback),
|
||||
strdup("callback balloonchange"), myFreeFunc);
|
||||
callback14ret = virConnectDomainEventRegisterAny(dconn,
|
||||
NULL,
|
||||
VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK,
|
||||
VIR_DOMAIN_EVENT_CALLBACK(myDomainEventPMSuspendDiskCallback),
|
||||
strdup("pmsuspend-disk"), myFreeFunc);
|
||||
if ((callback1ret != -1) &&
|
||||
(callback2ret != -1) &&
|
||||
(callback3ret != -1) &&
|
||||
@ -534,7 +566,8 @@ int main(int argc, char **argv)
|
||||
(callback10ret != -1) &&
|
||||
(callback11ret != -1) &&
|
||||
(callback12ret != -1) &&
|
||||
(callback13ret != -1)) {
|
||||
(callback13ret != -1) &&
|
||||
(callback14ret != -1)) {
|
||||
if (virConnectSetKeepAlive(dconn, 5, 3) < 0) {
|
||||
virErrorPtr err = virGetLastError();
|
||||
fprintf(stderr, "Failed to start keepalive protocol: %s\n",
|
||||
|
@ -126,7 +126,7 @@ class virEventLoopPure:
|
||||
self.poll.register(self.pipetrick[0], select.POLLIN)
|
||||
|
||||
|
||||
# Calculate when the next timeout is due to occurr, returning
|
||||
# Calculate when the next timeout is due to occur, returning
|
||||
# the absolute timestamp for the next timeout, or 0 if there is
|
||||
# no timeout due
|
||||
def next_timeout(self):
|
||||
@ -169,7 +169,7 @@ class virEventLoopPure:
|
||||
#
|
||||
# Due to the coarse granularity of schedular timeslices, if
|
||||
# we ask for a sleep of 500ms in order to satisfy a timer, we
|
||||
# may return upto 1 schedular timeslice early. So even though
|
||||
# may return up to 1 schedular timeslice early. So even though
|
||||
# our sleep timeout was reached, the registered timer may not
|
||||
# technically be at its expiry point. This leads to us going
|
||||
# back around the loop with a crazy 5ms sleep. So when checking
|
||||
@ -436,18 +436,20 @@ def eventToString(event):
|
||||
"Suspended",
|
||||
"Resumed",
|
||||
"Stopped",
|
||||
"Shutdown" );
|
||||
"Shutdown",
|
||||
"PMSuspended" );
|
||||
return eventStrings[event];
|
||||
|
||||
def detailToString(event, detail):
|
||||
eventStrings = (
|
||||
( "Added", "Updated" ),
|
||||
( "Removed" ),
|
||||
( "Removed", ),
|
||||
( "Booted", "Migrated", "Restored", "Snapshot", "Wakeup" ),
|
||||
( "Paused", "Migrated", "IOError", "Watchdog", "Restored", "Snapshot" ),
|
||||
( "Paused", "Migrated", "IOError", "Watchdog", "Restored", "Snapshot", "API error" ),
|
||||
( "Unpaused", "Migrated", "Snapshot" ),
|
||||
( "Shutdown", "Destroyed", "Crashed", "Migrated", "Saved", "Failed", "Snapshot"),
|
||||
( "Finished" )
|
||||
( "Finished", ),
|
||||
( "Memory", "Disk" )
|
||||
)
|
||||
return eventStrings[event][detail]
|
||||
|
||||
@ -488,8 +490,21 @@ def myDomainEventPMWakeupCallback(conn, dom, reason, opaque):
|
||||
def myDomainEventPMSuspendCallback(conn, dom, reason, opaque):
|
||||
print "myDomainEventPMSuspendCallback: Domain %s(%s) system pmsuspend" % (
|
||||
dom.name(), dom.ID())
|
||||
def myDomainEventBalloonChangeCallback(conn, dom, utcoffset, actual):
|
||||
def myDomainEventBalloonChangeCallback(conn, dom, actual, opaque):
|
||||
print "myDomainEventBalloonChangeCallback: Domain %s(%s) %d" % (dom.name(), dom.ID(), actual)
|
||||
def myDomainEventPMSuspendDiskCallback(conn, dom, reason, opaque):
|
||||
print "myDomainEventPMSuspendDiskCallback: Domain %s(%s) system pmsuspend_disk" % (
|
||||
dom.name(), dom.ID())
|
||||
|
||||
run = True
|
||||
|
||||
def myConnectionCloseCallback(conn, reason, opaque):
|
||||
reasonStrings = (
|
||||
"Error", "End-of-file", "Keepalive", "Client",
|
||||
)
|
||||
print "myConnectionCloseCallback: %s: %s" % (conn.getURI(), reasonStrings[reason])
|
||||
run = False
|
||||
|
||||
def usage(out=sys.stderr):
|
||||
print >>out, "usage: "+os.path.basename(sys.argv[0])+" [-hdl] [uri]"
|
||||
print >>out, " uri will default to qemu:///system"
|
||||
@ -539,6 +554,8 @@ def main():
|
||||
if (old_exitfunc): old_exitfunc()
|
||||
sys.exitfunc = exit
|
||||
|
||||
vc.registerCloseCallback(myConnectionCloseCallback, None)
|
||||
|
||||
#Add 2 callbacks to prove this works with more than just one
|
||||
vc.domainEventRegister(myDomainEventCallback1,None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_LIFECYCLE, myDomainEventCallback2, None)
|
||||
@ -552,6 +569,7 @@ def main():
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_PMWAKEUP, myDomainEventPMWakeupCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_PMSUSPEND, myDomainEventPMSuspendCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE, myDomainEventBalloonChangeCallback, None)
|
||||
vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK, myDomainEventPMSuspendDiskCallback, None)
|
||||
|
||||
vc.setKeepAlive(5, 3)
|
||||
|
||||
@ -559,7 +577,7 @@ def main():
|
||||
# of demo we'll just go to sleep. The other option is to
|
||||
# run the event loop in your main thread if your app is
|
||||
# totally event based.
|
||||
while vc.isAlive() == 1:
|
||||
while run:
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ try:
|
||||
dom = conn.lookupByName(name)
|
||||
# Annoyiingly, libvirt prints its own error message here
|
||||
except libvirt.libvirtError:
|
||||
print "Domain %s is not runing" % name
|
||||
print "Domain %s is not running" % name
|
||||
sys.exit(0)
|
||||
|
||||
info = dom.info()
|
||||
|
@ -13,7 +13,7 @@
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, see
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
|
@ -13,7 +13,7 @@
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, see
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
|
@ -13,7 +13,7 @@
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, see
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
|
@ -5,7 +5,7 @@ index 209d64c..5ea72a1 100644
|
||||
@@ -1,4 +1,4 @@
|
||||
-# ssize_t.m4 serial 5 (gettext-0.18.2)
|
||||
+# ssize_t.m4 serial 6 (gettext-0.18.2)
|
||||
dnl Copyright (C) 2001-2003, 2006, 2010-2012 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2001-2003, 2006, 2010-2013 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
@@ -17,7 +17,21 @@ AC_DEFUN([gt_TYPE_SSIZE_T],
|
||||
|
@ -6,6 +6,7 @@
|
||||
virincdir = $(includedir)/libvirt
|
||||
|
||||
virinc_HEADERS = libvirt.h \
|
||||
libvirt-lxc.h \
|
||||
libvirt-qemu.h \
|
||||
virterror.h
|
||||
|
||||
|
50
include/libvirt/libvirt-lxc.h
Normal file
50
include/libvirt/libvirt-lxc.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* -*- c -*-
|
||||
* libvirt-lxc.h: Interfaces specific for LXC driver
|
||||
* Summary: lxc specific interfaces
|
||||
* Description: Provides the interfaces of the libvirt library to handle
|
||||
* LXC specific methods
|
||||
*
|
||||
* Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __VIR_LXC_H__
|
||||
# define __VIR_LXC_H__
|
||||
|
||||
# include "libvirt/libvirt.h"
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
int virDomainLxcOpenNamespace(virDomainPtr domain,
|
||||
int **fdlist,
|
||||
unsigned int flags);
|
||||
|
||||
int virDomainLxcEnterNamespace(virDomainPtr domain,
|
||||
unsigned int nfdlist,
|
||||
int *fdlist,
|
||||
unsigned int *noldfdlist,
|
||||
int **oldfdlist,
|
||||
unsigned int flags);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* __VIR_LXC_H__ */
|
@ -17,7 +17,7 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; If not, see
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Chris Lalancette <clalance@redhat.com>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,7 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; If not, see
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
@ -112,7 +112,9 @@ typedef enum {
|
||||
VIR_FROM_PARALLELS = 48, /* Error from Parallels */
|
||||
VIR_FROM_DEVICE = 49, /* Error from Device */
|
||||
|
||||
VIR_FROM_SSH = 50, /* Error from libssh2 connection transport */
|
||||
VIR_FROM_SSH = 50, /* Error from libssh2 connection transport */
|
||||
VIR_FROM_LOCKSPACE = 51, /* Error from lockspace */
|
||||
VIR_FROM_INITCTL = 52, /* Error from initctl device communication */
|
||||
|
||||
# ifdef VIR_ENUM_SENTINELS
|
||||
VIR_ERR_DOMAIN_LAST
|
||||
@ -285,6 +287,7 @@ typedef enum {
|
||||
VIR_ERR_SSH = 85, /* error in ssh transport driver */
|
||||
VIR_ERR_AGENT_UNRESPONSIVE = 86, /* guest agent is unresponsive,
|
||||
not running or not usable */
|
||||
VIR_ERR_RESOURCE_BUSY = 87, /* resource is already in use */
|
||||
} virErrorNumber;
|
||||
|
||||
/**
|
||||
|
975
libvirt.spec.in
975
libvirt.spec.in
File diff suppressed because it is too large
Load Diff
42
m4/virt-apparmor.m4
Normal file
42
m4/virt-apparmor.m4
Normal file
@ -0,0 +1,42 @@
|
||||
dnl The libapparmor.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_APPARMOR],[
|
||||
LIBVIRT_CHECK_LIB([APPARMOR], [apparmor],
|
||||
[aa_change_profile], [sys/apparmor.h])
|
||||
|
||||
AC_ARG_WITH([apparmor_mount],
|
||||
AC_HELP_STRING([--with-apparmor-mount],
|
||||
[set AppArmor mount point @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_apparmor_mount=check])
|
||||
|
||||
if test "$with_apparmor" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([APPARMOR_DIR],
|
||||
"/etc/apparmor.d",
|
||||
[path to apparmor directory])
|
||||
AC_DEFINE_UNQUOTED([APPARMOR_PROFILES_PATH],
|
||||
"/sys/kernel/security/apparmor/profiles",
|
||||
[path to kernel profiles])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_APPARMOR],[
|
||||
LIBVIRT_RESULT_LIB([APPARMOR])
|
||||
])
|
9
m4/virt-attr.m4
Normal file
9
m4/virt-attr.m4
Normal file
@ -0,0 +1,9 @@
|
||||
dnl The libattr.so library
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_ATTR],[
|
||||
LIBVIRT_CHECK_LIB([ATTR], [attr], [getxattr], [attr/xattr.h])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_ATTR],[
|
||||
LIBVIRT_RESULT_LIB([ATTR])
|
||||
])
|
27
m4/virt-audit.m4
Normal file
27
m4/virt-audit.m4
Normal file
@ -0,0 +1,27 @@
|
||||
dnl The libaudit.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_AUDIT],[
|
||||
LIBVIRT_CHECK_LIB([AUDIT], [audit],
|
||||
[audit_encode_nv_string], [libaudit.h])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_AUDIT],[
|
||||
LIBVIRT_RESULT_LIB([AUDIT])
|
||||
])
|
26
m4/virt-avahi.m4
Normal file
26
m4/virt-avahi.m4
Normal file
@ -0,0 +1,26 @@
|
||||
dnl The libavahi.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_AVAHI],[
|
||||
LIBVIRT_CHECK_PKG([AVAHI], [avahi-client], [0.6.0])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_AVAHI],[
|
||||
LIBVIRT_RESULT_LIB([AVAHI])
|
||||
])
|
26
m4/virt-blkid.m4
Normal file
26
m4/virt-blkid.m4
Normal file
@ -0,0 +1,26 @@
|
||||
dnl The libblkid.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_BLKID],[
|
||||
LIBVIRT_CHECK_PKG([BLKID], [blkid], [2.17])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_BLKID],[
|
||||
LIBVIRT_RESULT_LIB([BLKID])
|
||||
])
|
26
m4/virt-capng.m4
Normal file
26
m4/virt-capng.m4
Normal file
@ -0,0 +1,26 @@
|
||||
dnl The libcapng.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_CAPNG],[
|
||||
LIBVIRT_CHECK_LIB([CAPNG], [cap-ng], [capng_updatev], [cap-ng.h])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_CAPNG],[
|
||||
LIBVIRT_RESULT_LIB([CAPNG])
|
||||
])
|
@ -57,6 +57,25 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
|
||||
dontwarn="$dontwarn -Wformat-nonliteral"
|
||||
# Gnulib's stat-time.h violates this
|
||||
dontwarn="$dontwarn -Waggregate-return"
|
||||
# gcc 4.4.6 complains this is C++ only; gcc 4.7.0 implies this from -Wall
|
||||
dontwarn="$dontwarn -Wenum-compare"
|
||||
|
||||
# gcc 4.2 treats attribute(format) as an implicit attribute(nonnull),
|
||||
# which triggers spurious warnings for our usage
|
||||
AC_CACHE_CHECK([whether gcc -Wformat allows NULL strings],
|
||||
[lv_cv_gcc_wformat_null_works], [
|
||||
save_CFLAGS=$CFLAGS
|
||||
CFLAGS='-Wunknown-pragmas -Werror -Wformat'
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <stddef.h>
|
||||
static __attribute__ ((__format__ (__printf__, 1, 2))) int
|
||||
foo (const char *fmt, ...) { return !fmt; }
|
||||
]], [[
|
||||
return foo(NULL);
|
||||
]])],
|
||||
[lv_cv_gcc_wformat_null_works=yes],
|
||||
[lv_cv_gcc_wformat_null_works=no])
|
||||
CFLAGS=$save_CFLAGS])
|
||||
|
||||
# Gnulib uses '#pragma GCC diagnostic push' to silence some
|
||||
# warnings, but older gcc doesn't support this.
|
||||
@ -76,6 +95,22 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
|
||||
dontwarn="$dontwarn -Wmissing-declarations"
|
||||
fi
|
||||
|
||||
dnl Check whether strchr(s, char variable) causes a bogus compile
|
||||
dnl warning, which is the case with GCC < 4.6 on some glibc
|
||||
AC_CACHE_CHECK([whether GCC -Wlogical-op gives bogus warnings],
|
||||
[lv_cv_gcc_wlogical_op_broken], [
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="-O2 -Wlogical-op -Werror"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <string.h>
|
||||
]], [[
|
||||
const char *haystack;
|
||||
char needle;
|
||||
return strchr(haystack, needle) == haystack;]])],
|
||||
[lv_cv_gcc_wlogical_op_broken=no],
|
||||
[lv_cv_gcc_wlogical_op_broken=yes])
|
||||
CFLAGS="$save_CFLAGS"])
|
||||
|
||||
# We might fundamentally need some of these disabled forever, but
|
||||
# ideally we'd turn many of them on
|
||||
dontwarn="$dontwarn -Wfloat-equal"
|
||||
@ -110,8 +145,14 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
|
||||
gl_WARN_ADD([-Wjump-misses-init])
|
||||
|
||||
# GNULIB turns on -Wformat=2 which implies -Wformat-nonliteral,
|
||||
# so we need to manually re-exclude it.
|
||||
# so we need to manually re-exclude it. Also, older gcc 4.2
|
||||
# added an implied ATTRIBUTE_NONNULL on any parameter marked
|
||||
# ATTRIBUTE_FMT_PRINT, which causes -Wformat failure on our
|
||||
# intentional use of virReportError(code, NULL).
|
||||
gl_WARN_ADD([-Wno-format-nonliteral])
|
||||
if test $lv_cv_gcc_wformat_null_works = no; then
|
||||
gl_WARN_ADD([-Wno-format])
|
||||
fi
|
||||
|
||||
# This should be < 256 really. Currently we're down to 4096,
|
||||
# but using 1024 bytes sized buffers (mostly for virStrerror)
|
||||
@ -125,7 +166,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
|
||||
AH_VERBATIM([FORTIFY_SOURCE],
|
||||
[/* Enable compile-time and run-time bounds-checking, and some warnings,
|
||||
without upsetting newer glibc. */
|
||||
#if defined __OPTIMIZE__ && __OPTIMIZE__
|
||||
#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
|
||||
# define _FORTIFY_SOURCE 2
|
||||
#endif
|
||||
])
|
||||
@ -171,4 +212,10 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
|
||||
WARN_PYTHON_CFLAGS=$WARN_CFLAGS
|
||||
AC_SUBST(WARN_PYTHON_CFLAGS)
|
||||
WARN_CFLAGS=$save_WARN_CFLAGS
|
||||
|
||||
if test "$gl_cv_warn_c__Wlogical_op" = yes &&
|
||||
test "$lv_cv_gcc_wlogical_op_broken" = yes; then
|
||||
AC_DEFINE_UNQUOTED([BROKEN_GCC_WLOGICALOP], 1,
|
||||
[Define to 1 if gcc -Wlogical-op reports false positives on strchr])
|
||||
fi
|
||||
])
|
||||
|
34
m4/virt-curl.m4
Normal file
34
m4/virt-curl.m4
Normal file
@ -0,0 +1,34 @@
|
||||
dnl The libcurl.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_CURL],[
|
||||
LIBVIRT_CHECK_PKG([CURL], [libcurl], [7.18.0])
|
||||
|
||||
# XXX as of libcurl-devel-7.20.1-3.fc13.x86_64, curl ships a version
|
||||
# of <curl/curl.h> that #defines several wrapper macros around underlying
|
||||
# functions to add type safety for gcc only. However, these macros
|
||||
# spuriously trip gcc's -Wlogical-op warning. Avoid the warning by
|
||||
# disabling the wrappers; even if it removes some type-check safety.
|
||||
CURL_CFLAGS="-DCURL_DISABLE_TYPECHECK $CURL_CFLAGS"
|
||||
AC_SUBST(CURL_CFLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_CURL],[
|
||||
LIBVIRT_RESULT_LIB([CURL])
|
||||
])
|
36
m4/virt-dbus.m4
Normal file
36
m4/virt-dbus.m4
Normal file
@ -0,0 +1,36 @@
|
||||
dnl The libdbus.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_DBUS],[
|
||||
LIBVIRT_CHECK_PKG([DBUS], [dbus-1], [1.0.0])
|
||||
|
||||
if test "$with_dbus" = "yes" ; then
|
||||
old_CFLAGS="$CFLAGS"
|
||||
old_LIBS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $DBUS_CFLAGS"
|
||||
LIBS="$LIBS $DBUS_LIBS"
|
||||
AC_CHECK_FUNCS([dbus_watch_get_unix_fd])
|
||||
CFLAGS="$old_CFLAGS"
|
||||
LIBS="$old_LIBS"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_DBUS],[
|
||||
LIBVIRT_RESULT_LIB([DBUS])
|
||||
])
|
26
m4/virt-fuse.m4
Normal file
26
m4/virt-fuse.m4
Normal file
@ -0,0 +1,26 @@
|
||||
dnl The libfuse.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_FUSE],[
|
||||
LIBVIRT_CHECK_PKG([FUSE], [fuse], [2.8.6])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_FUSE],[
|
||||
LIBVIRT_RESULT_LIB([FUSE])
|
||||
])
|
26
m4/virt-hal.m4
Normal file
26
m4/virt-hal.m4
Normal file
@ -0,0 +1,26 @@
|
||||
dnl The libhal.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_HAL],[
|
||||
LIBVIRT_CHECK_PKG([HAL], [hal], [0.5.0])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_HAL],[
|
||||
LIBVIRT_RESULT_LIB([HAL])
|
||||
])
|
391
m4/virt-lib.m4
Normal file
391
m4/virt-lib.m4
Normal file
@ -0,0 +1,391 @@
|
||||
dnl
|
||||
dnl virt-lib.m4: Helper macros for checking for libraries
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
|
||||
dnl Probe for existence of libXXXX and set WITH_XXX
|
||||
dnl config header var, WITH_XXXX make conditional and
|
||||
dnl with_XXX configure shell var.
|
||||
dnl
|
||||
dnl LIBVIRT_CHECK_LIB([CHECK_NAME], [LIBRARY_NAME],
|
||||
dnl [FUNCTION_NAME], [HEADER_NAME])
|
||||
dnl
|
||||
dnl CHECK_NAME: Suffix/prefix used for variables / flags, in uppercase.
|
||||
dnl Used to set
|
||||
dnl config.h: WITH_XXX macro
|
||||
dnl Makefile: WITH_XXX conditional
|
||||
dnl Makefile: XXX_CFLAGS, XXX_LIBS variables
|
||||
dnl configure: --with-xxx argument
|
||||
dnl configure: with_xxx variable
|
||||
dnl
|
||||
dnl LIBRARY_NAME: base name of library to check for eg libXXX.so
|
||||
dnl FUNCTION_NAME: function to check for in libXXX.so
|
||||
dnl HEADER_NAME: header file to check for
|
||||
dnl
|
||||
dnl e.g.
|
||||
dnl
|
||||
dnl LIBVIRT_CHECK_LIB([SELINUX], [selinux],
|
||||
dnl [getfilecon], [selinux/selinux.h])
|
||||
dnl LIBVIRT_CHECK_LIB([SANLOCK], [sanlock_client],
|
||||
dnl [sanlock_init], [sanlock.h])
|
||||
dnl LIBVIRT_CHECK_LIB([LIBATTR], [attr],
|
||||
dnl [getxattr], [attr/attr.h])
|
||||
dnl
|
||||
AC_DEFUN([LIBVIRT_CHECK_LIB],[
|
||||
m4_pushdef([check_name], [$1])
|
||||
m4_pushdef([library_name], [$2])
|
||||
m4_pushdef([function_name], [$3])
|
||||
m4_pushdef([header_name], [$4])
|
||||
|
||||
m4_pushdef([check_name_lc], m4_tolower(check_name))
|
||||
|
||||
m4_pushdef([config_var], [WITH_]check_name)
|
||||
m4_pushdef([make_var], [WITH_]check_name)
|
||||
m4_pushdef([cflags_var], check_name[_CFLAGS])
|
||||
m4_pushdef([libs_var], check_name[_LIBS])
|
||||
m4_pushdef([arg_var], [with-]check_name_lc)
|
||||
m4_pushdef([with_var], [with_]check_name_lc)
|
||||
|
||||
AC_ARG_WITH(check_name_lc,
|
||||
[AS_HELP_STRING([--arg_var],
|
||||
[with lib]]m4_dquote(library_name)[[ support @<:@default=check@:>@])],
|
||||
[],[with_var][=check])
|
||||
|
||||
old_LIBS=$LIBS
|
||||
old_CFLAGS=$CFLAGS
|
||||
cflags_var=
|
||||
libs_var=
|
||||
|
||||
fail=0
|
||||
if test "x$with_var" != "xno" ; then
|
||||
if test "x$with_var" != "xyes" && test "x$with_var" != "xcheck" ; then
|
||||
cflags_var="-I$with_var/include"
|
||||
libs_var="-L$with_var/lib"
|
||||
fi
|
||||
CFLAGS="$CFLAGS $cflags_var"
|
||||
LIBS="$LIBS $libs_var"
|
||||
AC_CHECK_LIB(library_name, function_name, [],[
|
||||
if test "x$with_var" != "xcheck"; then
|
||||
fail=1
|
||||
fi
|
||||
with_var=no
|
||||
])
|
||||
if test "$fail" = "0" && test "x$with_var" != "xno" ; then
|
||||
AC_CHECK_HEADER([header_name], [
|
||||
with_var=yes
|
||||
],[
|
||||
if test "x$with_var" != "xcheck"; then
|
||||
fail=1
|
||||
fi
|
||||
with_var=no
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
LIBS=$old_LIBS
|
||||
CFLAGS=$old_CFLAGS
|
||||
|
||||
if test $fail = 1; then
|
||||
AC_MSG_ERROR([You must install the lib]library_name[ library & headers to compile libvirt])
|
||||
else
|
||||
if test "x$with_var" = "xyes" ; then
|
||||
if test "x$libs_var" = 'x' ; then
|
||||
libs_var="-l[]library_name"
|
||||
else
|
||||
libs_var="$libs_var -l[]library_name"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(config_var, 1, [whether lib]library_name[ is available])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(make_var, [test "x$with_var" = "xyes"])
|
||||
|
||||
AC_SUBST(cflags_var)
|
||||
AC_SUBST(libs_var)
|
||||
fi
|
||||
|
||||
m4_popdef([with_var])
|
||||
m4_popdef([arg_var])
|
||||
m4_popdef([libs_var])
|
||||
m4_popdef([cflags_var])
|
||||
m4_popdef([make_var])
|
||||
m4_popdef([config_var])
|
||||
|
||||
m4_popdef([check_name_lc])
|
||||
|
||||
m4_popdef([header_name])
|
||||
m4_popdef([function_name])
|
||||
m4_popdef([library_name])
|
||||
m4_popdef([check_name])
|
||||
])
|
||||
|
||||
dnl Probe for existence of libXXXX and set WITH_XXX
|
||||
dnl config header var, WITH_XXXX make conditional and
|
||||
dnl with_XXX configure shell var.
|
||||
dnl
|
||||
dnl LIBVIRT_CHECK_LIB_ALT([CHECK_NAME], [LIBRARY_NAME],
|
||||
dnl [FUNCTION_NAME], [HEADER_NAME],
|
||||
dnl [CHECK_NAME_ALT, [LIBRARY_NAME_ALT],
|
||||
dnl [FUNCTION_NAME_ALT], [HEADER_NAME_ALT])
|
||||
dnl
|
||||
dnl CHECK_NAME: Suffix/prefix used for variables / flags, in uppercase.
|
||||
dnl Used to set
|
||||
dnl config.h: WITH_XXX macro
|
||||
dnl Makefile: WITH_XXX conditional
|
||||
dnl Makefile: XXX_CFLAGS, XXX_LIBS variables
|
||||
dnl configure: --with-xxx argument
|
||||
dnl configure: with_xxx variable
|
||||
dnl
|
||||
dnl LIBRARY_NAME: base name of library to check for eg libXXX.so
|
||||
dnl FUNCTION_NAME: function to check for in libXXX.so
|
||||
dnl HEADER_NAME: header file to check for
|
||||
dnl
|
||||
dnl CHECK_NAME_ALT: Suffix/prefix used to set additional
|
||||
dnl variables if alternative check succeeds
|
||||
dnl config.h: WITH_XXX macro
|
||||
dnl Makefile: WITH_XXX conditional
|
||||
dnl NB all vars for CHECK_NAME are also set
|
||||
dnl LIBRARY_NAME_ALT: alternative library name to check for
|
||||
dnl FUNCTION_NAME_ALT: alternative function name to check for
|
||||
dnl HEADER_NAME_ALT: alternative header file to check for
|
||||
dnl
|
||||
dnl e.g.
|
||||
dnl
|
||||
dnl LIBVIRT_CHECK_LIB([YAJL], [yajl],
|
||||
dnl [yajl_parse_complete], [yajl/yajl_common.h],
|
||||
dnl [YAJL2], [yajl],
|
||||
dnl [yajl_tree_parse], [yajl/yajl_common.h])
|
||||
dnl
|
||||
AC_DEFUN([LIBVIRT_CHECK_LIB_ALT],[
|
||||
m4_pushdef([check_name], [$1])
|
||||
m4_pushdef([library_name], [$2])
|
||||
m4_pushdef([function_name], [$3])
|
||||
m4_pushdef([header_name], [$4])
|
||||
m4_pushdef([check_name_alt], [$5])
|
||||
m4_pushdef([library_name_alt], [$6])
|
||||
m4_pushdef([function_name_alt], [$7])
|
||||
m4_pushdef([header_name_alt], [$8])
|
||||
|
||||
m4_pushdef([check_name_lc], m4_tolower(check_name))
|
||||
|
||||
m4_pushdef([config_var], [WITH_]check_name)
|
||||
m4_pushdef([make_var], [WITH_]check_name)
|
||||
m4_pushdef([cflags_var], check_name[_CFLAGS])
|
||||
m4_pushdef([libs_var], check_name[_LIBS])
|
||||
m4_pushdef([arg_var], [with-]check_name_lc)
|
||||
m4_pushdef([with_var], [with_]check_name_lc)
|
||||
m4_pushdef([config_var_alt], [WITH_]check_name_alt)
|
||||
m4_pushdef([make_var_alt], [WITH_]check_name_alt)
|
||||
|
||||
AC_ARG_WITH(check_name_lc,
|
||||
[AS_HELP_STRING([--arg_var],
|
||||
[with lib]]m4_dquote(library_name)[[ support @<:@default=check@:>@])],
|
||||
[],[with_var][=check])
|
||||
|
||||
old_LIBS=$LIBS
|
||||
old_CFLAGS=$CFLAGS
|
||||
cflags_var=
|
||||
libs_var=
|
||||
|
||||
fail=0
|
||||
alt=0
|
||||
if test "x$with_var" != "xno" ; then
|
||||
if test "x$with_var" != "xyes" && test "x$with_var" != "xcheck" ; then
|
||||
cflags_var="-I$with_var/include"
|
||||
libs_var="-L$with_var/lib"
|
||||
fi
|
||||
CFLAGS="$CFLAGS $cflags_var"
|
||||
LIBS="$LIBS $libs_var"
|
||||
AC_CHECK_LIB(library_name, function_name, [],[
|
||||
AC_CHECK_LIB(library_name_alt, function_name_alt, [
|
||||
alt=1
|
||||
],[
|
||||
if test "x$with_var" != "xcheck"; then
|
||||
fail=1
|
||||
fi
|
||||
with_var=no
|
||||
])
|
||||
])
|
||||
if test "$fail" = "0" && test "x$with_var" != "xno" ; then
|
||||
AC_CHECK_HEADER([header_name], [
|
||||
with_var=yes
|
||||
],[
|
||||
AC_CHECK_HEADER([header_name_alt], [
|
||||
with_var=yes
|
||||
],[
|
||||
if test "x$with_var" != "xcheck"; then
|
||||
fail=1
|
||||
fi
|
||||
with_var=no
|
||||
])
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
LIBS=$old_LIBS
|
||||
CFLAGS=$old_CFLAGS
|
||||
|
||||
if test $fail = 1; then
|
||||
AC_MSG_ERROR([You must install the lib]library_name[ library & headers to compile libvirt])
|
||||
else
|
||||
if test "x$with_var" = "xyes" ; then
|
||||
if test "x$libs_var" = 'x' ; then
|
||||
libs_var="-l[]library_name"
|
||||
else
|
||||
libs_var="$libs_var -l[]library_name"
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(config_var, 1, [whether lib]library_name[ is available])
|
||||
if test "$alt" = "1" ; then
|
||||
AC_DEFINE_UNQUOTED(config_var_alt, 1, [whether lib]library_name[ is available])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(make_var, [test "x$with_var" = "xyes"])
|
||||
AM_CONDITIONAL(make_var_alt, [test "x$with_var" = "xyes" && test "$alt" = "1"])
|
||||
|
||||
AC_SUBST(cflags_var)
|
||||
AC_SUBST(libs_var)
|
||||
fi
|
||||
|
||||
m4_popdef([make_var_alt])
|
||||
m4_popdef([config_var_alt])
|
||||
m4_popdef([with_var])
|
||||
m4_popdef([arg_var])
|
||||
m4_popdef([libs_var])
|
||||
m4_popdef([cflags_var])
|
||||
m4_popdef([make_var])
|
||||
m4_popdef([config_var])
|
||||
|
||||
m4_popdef([check_name_lc])
|
||||
|
||||
m4_popdef([header_name_alt])
|
||||
m4_popdef([function_name_alt])
|
||||
m4_popdef([library_name_alt])
|
||||
m4_popdef([header_name])
|
||||
m4_popdef([function_name])
|
||||
m4_popdef([library_name])
|
||||
m4_popdef([check_name])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Probe for existence of libXXXX and set WITH_XXX
|
||||
dnl config header var, WITH_XXXX make conditional and
|
||||
dnl with_XXX configure shell var.
|
||||
dnl
|
||||
dnl LIBVIRT_CHECK_PKG([CHECK_NAME], [PC_NAME], [PC_VERSION])
|
||||
dnl
|
||||
dnl CHECK_NAME: Suffix/prefix used for variables / flags, in uppercase.
|
||||
dnl Used to set
|
||||
dnl config.h: WITH_XXX macro
|
||||
dnl Makefile: WITH_XXX conditional
|
||||
dnl Makefile: XXX_CFLAGS, XXX_LIBS variables
|
||||
dnl configure: --with-xxx argument
|
||||
dnl configure: with_xxx variable
|
||||
dnl PC_NAME: Name of the pkg-config module
|
||||
dnl PC_VERSION: Version of the pkg-config module
|
||||
dnl
|
||||
dnl eg
|
||||
dnl
|
||||
dnl LIBVIRT_CHECK_PKG([NETCF], [netcf], [0.1.4])
|
||||
dnl
|
||||
AC_DEFUN([LIBVIRT_CHECK_PKG],[
|
||||
m4_pushdef([check_name], [$1])
|
||||
m4_pushdef([pc_name], [$2])
|
||||
m4_pushdef([pc_version], [$3])
|
||||
|
||||
m4_pushdef([check_name_lc], m4_tolower(check_name))
|
||||
|
||||
m4_pushdef([config_var], [WITH_]check_name)
|
||||
m4_pushdef([make_var], [WITH_]check_name)
|
||||
m4_pushdef([cflags_var], check_name[_CFLAGS])
|
||||
m4_pushdef([libs_var], check_name[_LIBS])
|
||||
m4_pushdef([arg_var], [with-]check_name_lc)
|
||||
m4_pushdef([with_var], [with_]check_name_lc)
|
||||
|
||||
AC_ARG_WITH(check_name_lc,
|
||||
[AS_HELP_STRING([--arg_var],
|
||||
[with ]]m4_dquote(pc_name)[[ (>= ]]m4_dquote(pc_version)[[) support @<:@default=check@:>@])],
|
||||
[],[with_var][=check])
|
||||
|
||||
fail=0
|
||||
if test "x$with_var" != "xno" ; then
|
||||
PKG_CHECK_MODULES(check_name, pc_name[ >= ]pc_version, [
|
||||
with_var=yes
|
||||
],[
|
||||
if test "x$with_var" != "xcheck"; then
|
||||
fail=1
|
||||
fi
|
||||
with_var=no
|
||||
])
|
||||
fi
|
||||
|
||||
if test $fail = 1; then
|
||||
AC_MSG_ERROR([You must install the ]pc_name[ >= ]pc_version[pkg-config module to compile libvirt])
|
||||
fi
|
||||
|
||||
if test "x$with_var" = "xyes" ; then
|
||||
AC_DEFINE_UNQUOTED(config_var, 1, [whether ]pc_name[ >= ]pc_version[ is available])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(make_var, [test "x$with_var" = "xyes"])
|
||||
|
||||
m4_popdef([with_var])
|
||||
m4_popdef([arg_var])
|
||||
m4_popdef([libs_var])
|
||||
m4_popdef([cflags_var])
|
||||
m4_popdef([make_var])
|
||||
m4_popdef([config_var])
|
||||
|
||||
m4_popdef([check_name_lc])
|
||||
|
||||
m4_popdef([pc_version])
|
||||
m4_popdef([pc_name])
|
||||
m4_popdef([check_name])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl To be used after a call to LIBVIRT_CHECK_LIB,
|
||||
dnl LIBVIRT_CHECK_LIB_ALT or LIBVIRT_CHECK_PKG
|
||||
dnl to print the result status
|
||||
dnl
|
||||
dnl LIBVIRT_RESULT_LIB([CHECK_NAME])
|
||||
dnl
|
||||
dnl CHECK_NAME: Suffix/prefix used for variables / flags, in uppercase.
|
||||
dnl
|
||||
dnl LIBVIRT_RESULT_LIB([SELINUX])
|
||||
dnl
|
||||
AC_DEFUN([LIBVIRT_RESULT_LIB],[
|
||||
m4_pushdef([check_name], [$1])
|
||||
|
||||
m4_pushdef([check_name_lc], m4_tolower(check_name))
|
||||
|
||||
m4_pushdef([cflags_var], check_name[_CFLAGS])
|
||||
m4_pushdef([libs_var], check_name[_LIBS])
|
||||
m4_pushdef([with_var], [with_]check_name_lc)
|
||||
|
||||
LIBVIRT_RESULT(check_name_lc, [$with_var], [CFLAGS='$cflags_var' LIBS='$libs_var'])
|
||||
|
||||
m4_popdef([with_var])
|
||||
m4_popdef([libs_var])
|
||||
m4_popdef([cflags_var])
|
||||
|
||||
m4_popdef([check_name_lc])
|
||||
|
||||
m4_popdef([check_name])
|
||||
])
|
40
m4/virt-netcf.m4
Normal file
40
m4/virt-netcf.m4
Normal file
@ -0,0 +1,40 @@
|
||||
dnl The libnetcf.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_NETCF],[
|
||||
LIBVIRT_CHECK_PKG([NETCF], [netcf], [0.1.4])
|
||||
|
||||
if test "$with_netcf" = "yes" ; then
|
||||
old_CFLAGS="$CFLAGS"
|
||||
old_LIBS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $NETCF_CFLAGS"
|
||||
LIBS="$LIBS $NETCF_LIBS"
|
||||
AC_CHECK_FUNC([ncf_change_begin], [netcf_transactions=1], [netcf_transactions=0])
|
||||
if test "$netcf_transactions" = "1" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_NETCF_TRANSACTIONS], [1],
|
||||
[we have sufficiently new version of netcf for transaction network API])
|
||||
fi
|
||||
CFLAGS="$old_CFLAGS"
|
||||
LIBS="$old_LIBS"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_NETCF],[
|
||||
LIBVIRT_RESULT_LIB([NETCF])
|
||||
])
|
26
m4/virt-numactl.m4
Normal file
26
m4/virt-numactl.m4
Normal file
@ -0,0 +1,26 @@
|
||||
dnl The libnuma.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_NUMACTL],[
|
||||
LIBVIRT_CHECK_LIB([NUMACTL], [numa], [numa_available], [numa.h])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_NUMACTL],[
|
||||
LIBVIRT_RESULT_LIB([NUMACTL])
|
||||
])
|
26
m4/virt-openwsman.m4
Normal file
26
m4/virt-openwsman.m4
Normal file
@ -0,0 +1,26 @@
|
||||
dnl The libopenwsman.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_OPENWSMAN],[
|
||||
LIBVIRT_CHECK_PKG([OPENWSMAN], [openwsman], [2.2.3])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_OPENWSMAN],[
|
||||
LIBVIRT_RESULT_LIB([OPENWSMAN])
|
||||
])
|
26
m4/virt-pciaccess.m4
Normal file
26
m4/virt-pciaccess.m4
Normal file
@ -0,0 +1,26 @@
|
||||
dnl The libpciaccess.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_PCIACCESS],[
|
||||
LIBVIRT_CHECK_PKG([PCIACCESS], [pciaccess], [0.10.0])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_PCIACCESS],[
|
||||
LIBVIRT_RESULT_LIB([PCIACCESS])
|
||||
])
|
42
m4/virt-result.m4
Normal file
42
m4/virt-result.m4
Normal file
@ -0,0 +1,42 @@
|
||||
dnl
|
||||
dnl virt-result.m4: Helper macros for checking for libraries
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl To be used to print the results of a conditional test
|
||||
dnl
|
||||
dnl LIBVIRT_RESULT(CHECK_NAME, STATUS, DETAILS)
|
||||
dnl
|
||||
dnl CHECK_NAME: Name of the item being checked
|
||||
dnl STATUS: 'yes' or 'no' result of check
|
||||
dnl DETAILS: Details of result eg compiler flags
|
||||
dnl
|
||||
dnl eg
|
||||
dnl
|
||||
dnl LIBVIRT_RESULT([yajl], [yes], [-I/opt/yajl/include -lyajl])
|
||||
dnl
|
||||
AC_DEFUN([LIBVIRT_RESULT], [
|
||||
if test "$2" = "no" || test -z "$3" ; then
|
||||
STR=`printf "%10s: %-3s" "$1" "$2"`
|
||||
else
|
||||
STR=`printf "%10s: %-3s (%s)" "$1" "$2" "$3"`
|
||||
fi
|
||||
|
||||
AC_MSG_NOTICE([$STR])
|
||||
])
|
56
m4/virt-sanlock.m4
Normal file
56
m4/virt-sanlock.m4
Normal file
@ -0,0 +1,56 @@
|
||||
dnl The libsanlock_client.so library
|
||||
dnl
|
||||
dnl Copyright (C) 2012-2013 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_CHECK_SANLOCK],[
|
||||
LIBVIRT_CHECK_LIB([SANLOCK], [sanlock_client], [sanlock_init], [sanlock.h])
|
||||
|
||||
if test "x$with_sanlock" = "xyes" ; then
|
||||
AC_CHECK_DECLS([SANLK_INQ_WAIT], [sanlock_inq_wait=1], [sanlock_inq_wait=0], [[
|
||||
#include <stdint.h>
|
||||
#include <sanlock_admin.h>
|
||||
]])
|
||||
|
||||
old_cppflags="$CPPFLAGS"
|
||||
old_libs="$LIBS"
|
||||
CPPFLAGS="$CPPFLAGS $SANLOCK_CFLAGS"
|
||||
LIBS="$LIBS $SANLOCK_LIBS"
|
||||
|
||||
AC_CHECK_LIB([sanlock_client], [sanlock_killpath],
|
||||
[sanlock_killpath=yes], [sanlock_killpath=no])
|
||||
if test "x$sanlock_killpath" = "xyes" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_SANLOCK_KILLPATH], 1,
|
||||
[whether Sanlock supports sanlock_killpath])
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB([sanlock_client], [sanlock_inq_lockspace],
|
||||
[sanlock_inq_lockspace=yes], [sanlock_inq_lockspace=no])
|
||||
if test "x$sanlock_inq_lockspace" = "xyes" && \
|
||||
test $sanlock_inq_wait = 1; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_SANLOCK_INQ_LOCKSPACE], 1,
|
||||
[whether sanlock supports sanlock_inq_lockspace])
|
||||
fi
|
||||
|
||||
CPPFLAGS="$old_cppflags"
|
||||
LIBS="$old_libs"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_RESULT_SANLOCK],[
|
||||
LIBVIRT_RESULT_LIB([SANLOCK])
|
||||
])
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user