mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-08-18 13:50:02 +03:00
Compare commits
635 Commits
Author | SHA1 | Date | |
---|---|---|---|
31a5ee922a | |||
83acdeaf17 | |||
730801d955 | |||
cd0ef0e09b | |||
8d42b9b4e8 | |||
fe1183a7cd | |||
71c865f4d2 | |||
361e46d6d0 | |||
9120f00446 | |||
7efec25964 | |||
b62bf7a700 | |||
23d6abd23b | |||
719c50caf8 | |||
db0b9e7d52 | |||
16478459da | |||
0943048ad0 | |||
49a0f6cd99 | |||
d8acc44672 | |||
9258ec0a2e | |||
3fdef8cfca | |||
264e98d6a8 | |||
5ec6cf7fb8 | |||
96c8608dc5 | |||
c129d4fe45 | |||
c37ff6a1ec | |||
3db3acb94e | |||
9344e6ad1a | |||
33e25a3984 | |||
c16888a849 | |||
1cb334efba | |||
4cd188d4d5 | |||
6b8d8395b6 | |||
1e44c678fa | |||
0ea0128904 | |||
29727bacd7 | |||
09080c38d1 | |||
62a30a496a | |||
b16cd226a2 | |||
3fc974209a | |||
5ec55b4ff0 | |||
3bd3d6b0bf | |||
6f4ca18d83 | |||
3970a2dc86 | |||
b74aadb3e5 | |||
950176ec65 | |||
227f26afdb | |||
0cdb9a5cfc | |||
d115ed59e0 | |||
7f7676e77b | |||
ef088ed962 | |||
594ac31b2d | |||
fb54230b60 | |||
ba1d379ce8 | |||
854111f97e | |||
9757e10d6d | |||
7cc5410bfd | |||
a7d17c6187 | |||
1af75828a0 | |||
731c738652 | |||
72a8405a47 | |||
2c7f5ca662 | |||
a5a46c6fc2 | |||
7d8f5eb3bc | |||
3dc4268669 | |||
9827e0a42c | |||
1f9da29de1 | |||
eaa2fd6939 | |||
cdc42d0a48 | |||
be34c3c7ef | |||
654dd2902d | |||
54c973d52b | |||
b195f20f18 | |||
1f703731d3 | |||
912f5e5884 | |||
e09086b074 | |||
db2ae2044a | |||
952eb15deb | |||
e2c03da940 | |||
80b4d20dfe | |||
2dccf5ef07 | |||
e5df24a11c | |||
ca18b7108d | |||
2c8eb68969 | |||
d47b6e54fd | |||
dfff67c082 | |||
6512d09cf8 | |||
e3a0c80f1d | |||
5b6782f941 | |||
2df1657686 | |||
b2a2ba71b4 | |||
3812c7b42d | |||
15f5eaa098 | |||
80fd73ca09 | |||
08fd20b04a | |||
9c48360b1a | |||
0c0e0d0263 | |||
81fbb4cb23 | |||
6aabcb5bd8 | |||
39d883bb3d | |||
623bc48ad8 | |||
62927dd8f0 | |||
e1f2778434 | |||
98f6f381c8 | |||
d2259ada49 | |||
1671b64702 | |||
aef969499f | |||
21c84e00d3 | |||
2355fce3ae | |||
1825c6555a | |||
50b6c95d62 | |||
ed00e45dba | |||
704bd732b5 | |||
f0088c1bfa | |||
d392f4db9d | |||
eb895e7407 | |||
8cfc4c9a03 | |||
77dd67087b | |||
0022995555 | |||
86304e35a3 | |||
d22591efb9 | |||
3aa13a471a | |||
4bc3bd7b18 | |||
a3e1f04b76 | |||
379eb3956c | |||
2c2672bc9a | |||
ce4896fb65 | |||
16a4d22b4b | |||
5e13b7ab5e | |||
5d462bd0b3 | |||
014c9f3196 | |||
b66924148a | |||
a44d0dc26c | |||
febc591683 | |||
4f6c999006 | |||
d86c876a66 | |||
16658da4e7 | |||
e8d43d0687 | |||
42ce352c13 | |||
73370e9868 | |||
1dd6f855c3 | |||
6237e9c89b | |||
4886cba76a | |||
38a22fbfaa | |||
7b2f8cdd7c | |||
053307175c | |||
a6e7ba9464 | |||
1ed1bf3a38 | |||
4ac290cc33 | |||
5da9c98067 | |||
774c757e67 | |||
b030084f07 | |||
2224989c39 | |||
4359900ed1 | |||
989051a85e | |||
3a6bf1bb78 | |||
da9d937b94 | |||
1867004ed1 | |||
0a6a6f5e61 | |||
8803937b59 | |||
eabb98b0a8 | |||
d6c99337a9 | |||
61defb6bcc | |||
73f702ff4a | |||
3d294a1c03 | |||
30a9329ab1 | |||
322707ba8a | |||
3c58896eb7 | |||
4d434da34c | |||
a0356bcc41 | |||
c2c4d51b2f | |||
58fe995e50 | |||
d6c40aaec8 | |||
9bca7a7e2e | |||
cebc4b8921 | |||
ad4f092443 | |||
8a73fe5936 | |||
d78554d884 | |||
2982d73a11 | |||
ab0da52b43 | |||
8d6af63a8a | |||
74ec5e65ce | |||
776e37e1eb | |||
a9e4ea94f1 | |||
d812e7aeb8 | |||
1b0cce7d3a | |||
e8ac4a79f1 | |||
cfe49446d3 | |||
0276587287 | |||
9933c4f2f6 | |||
522776ed4c | |||
5073aa994a | |||
438fa79358 | |||
2d4d657695 | |||
a3dddc0020 | |||
d0b97e820c | |||
c198f51a10 | |||
3238081efd | |||
2861390866 | |||
6c6fbac7a9 | |||
515378b34e | |||
978dd6d48b | |||
e85065b854 | |||
a9d12c2444 | |||
fd5eb45b95 | |||
3a80f2f7ce | |||
66b3250563 | |||
7aee22939f | |||
ddcee85f7c | |||
f01ee2acc8 | |||
4c81b0fdc5 | |||
28024f2311 | |||
0418fa2e72 | |||
a4e9edbd77 | |||
8287bd2996 | |||
3b3cdec395 | |||
e6abf3d8f2 | |||
048781fe71 | |||
7003390791 | |||
75b7f400f9 | |||
728e9229b1 | |||
edcae5a7c4 | |||
98ea78b6ee | |||
65160f50be | |||
b6c87e3b7a | |||
a4a38ffda1 | |||
96ceb12443 | |||
79f9419652 | |||
d9734072ff | |||
b0367e86ee | |||
44112bce89 | |||
338e7c3c8d | |||
7679f064bf | |||
7a90f21655 | |||
1c06eb18c3 | |||
8838ee39ab | |||
c0a9b6a533 | |||
aee70b7482 | |||
2718a3d836 | |||
f2d8c9d087 | |||
eebf932e94 | |||
c1237818d2 | |||
20fa7cdb32 | |||
3f24ae2eb9 | |||
8459f6e284 | |||
a26d2628c0 | |||
f7e5ca90e6 | |||
ca9e601fcb | |||
913ab198fb | |||
79fa4a98d1 | |||
b9daebfee4 | |||
54f868c164 | |||
457d4ad99d | |||
9501a45fc0 | |||
a3bd8bbb38 | |||
d4c1e5aeed | |||
434daaff9a | |||
156e36a238 | |||
cf30da7a25 | |||
188852c984 | |||
27c357bcfa | |||
8153c72b97 | |||
5dbb208a4f | |||
ab007c3da0 | |||
bfeeb9a6d2 | |||
e9f468d3f9 | |||
c90e545f83 | |||
cc3618d77b | |||
a858474f49 | |||
469b6b3a75 | |||
9b2c299a35 | |||
2c345831a3 | |||
b6798b68cb | |||
841d50358f | |||
c7523b410a | |||
4fe975fe4e | |||
3a70131312 | |||
7c59337d5d | |||
470764f0b4 | |||
46306c9c85 | |||
a5d8d265a2 | |||
1e93e37bbf | |||
cf54204e27 | |||
49e261d14e | |||
c23a4fd13f | |||
de42b8b223 | |||
7cdedde225 | |||
4106f68ccf | |||
06ef64d169 | |||
f66d574541 | |||
1c5c63338c | |||
1a43d0b2c2 | |||
3a524a2b11 | |||
3b734b78ff | |||
ffb13b1115 | |||
d5ef0a69e9 | |||
7286882c34 | |||
e104269398 | |||
3a2881fa60 | |||
0b7d2ae653 | |||
16e4084a10 | |||
a44dc266d9 | |||
c7c42a85b9 | |||
6695818c03 | |||
6df8b363f7 | |||
33a198c1f6 | |||
84961bd3f4 | |||
de3e38a65e | |||
fa479727ff | |||
576b2c7514 | |||
2b844f1614 | |||
2e5efc3d6e | |||
e7c8ab8f0e | |||
5baa463541 | |||
f3cbd24ddc | |||
11f6cc3279 | |||
d37bca86d0 | |||
643ee3fa44 | |||
1428704d2a | |||
49226d2ce4 | |||
dd16045041 | |||
63a499d3f3 | |||
52a18abd94 | |||
d0857c0132 | |||
803d320430 | |||
21a2eba44f | |||
b148318981 | |||
042956d558 | |||
2aec15bc5a | |||
22f3ec27a3 | |||
a645c8f0fd | |||
057ad3a2f5 | |||
94d599eccf | |||
deae2bb57f | |||
a010165d27 | |||
921d2225ba | |||
ad905a195e | |||
1fb7af40cd | |||
b927aed8a3 | |||
f509e16241 | |||
a7d1eb3c44 | |||
60e8977fdd | |||
033eef4358 | |||
a8eb010ea2 | |||
2597f8ecc9 | |||
e2692e25de | |||
27ba0ad905 | |||
0c3fb8d41c | |||
5de41c06a4 | |||
edc9e78b48 | |||
ba7d82c699 | |||
25f7fa0583 | |||
c11a82b62a | |||
51ea18a844 | |||
4ecf9c653e | |||
3b3305d859 | |||
534664c372 | |||
98895e9386 | |||
1b9d074493 | |||
723bfda1ce | |||
16387171c0 | |||
cce1998a64 | |||
8e7d14953c | |||
604c70fd5d | |||
66137344fe | |||
10616d7a1e | |||
5362edd442 | |||
2b2dae816d | |||
421d995005 | |||
89832303d7 | |||
e9f4c94301 | |||
3a4f172fdd | |||
c5358c0e1f | |||
e4b07fd6a5 | |||
f248c965ce | |||
5697aa848b | |||
8c12b20c61 | |||
3fa3cff73c | |||
fa1e4759db | |||
79533da1b3 | |||
1f60411686 | |||
a4e09c1ed8 | |||
1449392dce | |||
74c1c534a9 | |||
0a4283cb94 | |||
6e547d54e5 | |||
9428f2ced6 | |||
563dc5654c | |||
e7ef4ed1d2 | |||
03fa46886a | |||
81ea6e4d9f | |||
dddad4bcb4 | |||
834d65471d | |||
63166a4e0c | |||
7a18fbeeb8 | |||
816d79143b | |||
32f021f266 | |||
e15bf04465 | |||
fe9c8d9147 | |||
43d0ba5f95 | |||
4060131927 | |||
bb8d57c68a | |||
7ed63c5312 | |||
874990dc2c | |||
db810b1148 | |||
7cfbb17978 | |||
8f147d16f1 | |||
fb7cebb767 | |||
e7c78b0a94 | |||
a73cd93b24 | |||
37f415da42 | |||
af10d9baa8 | |||
79d2c5831a | |||
040e80f7e6 | |||
b8d4b6bec9 | |||
4811fab790 | |||
eb81396863 | |||
c7e1cfc9f4 | |||
7d43c80bc4 | |||
776b675861 | |||
2060a0a43e | |||
b827338a72 | |||
264f3ddac9 | |||
2cdb665b10 | |||
f2f656d426 | |||
0fe553744a | |||
278e947890 | |||
bbf20165cc | |||
046039124d | |||
afec7cf1ff | |||
448b92c05e | |||
ecb0221a5f | |||
91f9157e5b | |||
d42cfb4ef0 | |||
03a155a25b | |||
645f4acafe | |||
4b3e19526c | |||
57dbe08e74 | |||
dad6ecc6bf | |||
8d567fbcd3 | |||
8c4d80d72e | |||
c15a64b9b4 | |||
5313dc372b | |||
7bed630dfb | |||
4be6e024c7 | |||
da82b03fb0 | |||
ddfd21f815 | |||
3cbc05012d | |||
d0d4b8ad76 | |||
dae7054b76 | |||
a8a560dd3a | |||
c7a8e1bf74 | |||
007f016b2d | |||
d11d93f406 | |||
fd2090cdb9 | |||
f24e67d24f | |||
e6cbadd588 | |||
ce62916b6e | |||
308b85330a | |||
7023663873 | |||
e99fb5ed9d | |||
db19834a0a | |||
3ad6dcf3dc | |||
fe2af45bb2 | |||
ce4c0bf5a2 | |||
632be33689 | |||
2e23607448 | |||
e51cf5c192 | |||
7c34bb2681 | |||
2659b3f5aa | |||
730fd3b022 | |||
3c3dffc285 | |||
45e0483dac | |||
bc0010b3d1 | |||
fedad93d9e | |||
6008cfc7c0 | |||
4916936751 | |||
75825e453a | |||
a32c43d6fe | |||
cabc2cc98f | |||
c04498b305 | |||
117aa0d874 | |||
52147a0452 | |||
9b6efcfef1 | |||
f9c56cce79 | |||
1dc10a7b28 | |||
6c70802374 | |||
a340f9131a | |||
77cfcccfa8 | |||
41d8968d43 | |||
4604c18f0b | |||
1cfd5a00eb | |||
ff26194143 | |||
e40438fa7f | |||
15a9144609 | |||
dd9e9c3b54 | |||
790f0b3057 | |||
457a10d91d | |||
624f0c68bc | |||
df4c57ae27 | |||
0f04b58730 | |||
5469686bfd | |||
ec3fa12e94 | |||
6f5e63324f | |||
64a4c60e9e | |||
cdf7a40d9c | |||
7ecb50c2a6 | |||
4c9afe08e4 | |||
8d6a1b2c88 | |||
3cc8a66052 | |||
11dc7786f4 | |||
f0006d9792 | |||
8a659e3186 | |||
784b5030c1 | |||
cd04abcc8e | |||
c26cb9234f | |||
e02f691a90 | |||
c6d5ac174e | |||
bb4ec5550b | |||
8f67f6448b | |||
649bcd72fe | |||
4fbad2e049 | |||
b712bfb46c | |||
7d10811312 | |||
91b009cde4 | |||
3811eaaa63 | |||
3023ec5ee7 | |||
bea92f968e | |||
af249ea468 | |||
7400396801 | |||
89d549c3eb | |||
8db32571ba | |||
a9cb354833 | |||
24e3b35c6c | |||
15941b2bc7 | |||
45bd290b64 | |||
0aa72ac6fd | |||
1fc3816d0f | |||
104fdbf038 | |||
07a107f0da | |||
08dce95a74 | |||
667ce28946 | |||
4e40aee273 | |||
7624b47d1e | |||
2f5115627b | |||
030db0c2ec | |||
4c44cdcce3 | |||
517761fd96 | |||
af1e2ede26 | |||
468439854b | |||
23eaae9aff | |||
3d4c1d94d7 | |||
753c6c9c75 | |||
ef591ef7b9 | |||
075bb5f1aa | |||
9ae8fa5839 | |||
4728bad403 | |||
112ed8f50d | |||
991be60403 | |||
9231aa7d95 | |||
979218cdd9 | |||
680c92ae7e | |||
b79aaf91b8 | |||
447ef8863c | |||
7c7681dd90 | |||
b7abcf9d71 | |||
fc8d199188 | |||
958c366b21 | |||
4296cea2b2 | |||
a71f79c37e | |||
8001eef5d0 | |||
4ab7995871 | |||
5f67253813 | |||
0264e1678c | |||
46992453b9 | |||
3505790b85 | |||
530d4463ba | |||
c3cc4f8bad | |||
9899e08b8d | |||
37bc888b28 | |||
24c8fc5dff | |||
d5fcd4f7a3 | |||
47fec8eac2 | |||
a3adcce795 | |||
1acef95a81 | |||
66c6cc7c5e | |||
33b35313a3 | |||
64f920d056 | |||
48a7637d9f | |||
e5edc3f03a | |||
d61fff3f4b | |||
9bcb174473 | |||
fcbbb289b6 | |||
0d77396605 | |||
936565c701 | |||
16c1c0833b | |||
0b74bc622c | |||
74c81b5d93 | |||
dfdfc601ac | |||
d27098c054 | |||
4c893ef9be | |||
03b5dc14de | |||
b2af10cd49 | |||
982682b8fd | |||
5bd53990c5 | |||
6940109b9a | |||
43a9249c95 | |||
2ff5cffe6e | |||
4ed2c3773e | |||
2f4682a9f8 | |||
08bed02515 | |||
b03fe2d0ae | |||
09c64d0072 | |||
949dd07b19 | |||
309acaa023 | |||
e8fc4cbb64 | |||
89f0c6d089 | |||
9e2fe24518 | |||
d686056f62 | |||
9710856b33 | |||
f5ee422c58 | |||
cf577653dc | |||
de2b252df5 | |||
41fa653f32 | |||
4f4a1deccb | |||
caf8e91588 | |||
6d8331fd58 | |||
4027461865 | |||
e1ea1b2af7 | |||
39a7be470c | |||
16a3a4a30a | |||
2210f8a3a8 | |||
04e0686262 | |||
e391595890 | |||
c396fb36fa | |||
2d8d9b100b |
2
.gnulib
2
.gnulib
Submodule .gnulib updated: 28db629d4f...146d914507
@ -1,5 +1,6 @@
|
||||
^src/libvirt\.c$
|
||||
^src/qemu/qemu_driver\.c$
|
||||
^src/qemu/qemu_monitor\.c$
|
||||
^src/util/util\.c$
|
||||
^src/xen/xend_internal\.c$
|
||||
^daemon/libvirtd.c$
|
||||
|
@ -1,8 +1,5 @@
|
||||
ChangeLog
|
||||
docs/devhelp/libvirt-virterror.html
|
||||
docs/html/libvirt-virterror.html
|
||||
docs/libvirt-api.xml
|
||||
docs/libvirt-refs.xml
|
||||
include/libvirt/virterror.h
|
||||
daemon/dispatch.c
|
||||
src/util/virterror.c
|
||||
^ChangeLog$
|
||||
^ChangeLog-old$
|
||||
^include/libvirt/virterror\.h$
|
||||
^daemon/dispatch\.c$
|
||||
^src/util/virterror\.c$
|
||||
|
@ -1,3 +1,2 @@
|
||||
gnulib/lib/getaddrinfo.c
|
||||
gnulib/m4/
|
||||
src/xend_internal.c
|
||||
^gnulib/lib/getaddrinfo\.c$
|
||||
^gnulib/m4/
|
||||
|
2
.x-sc_prohibit_gethostname
Normal file
2
.x-sc_prohibit_gethostname
Normal file
@ -0,0 +1,2 @@
|
||||
^src/util/util\.c$
|
||||
^ChangeLog-old$
|
@ -1,10 +1,10 @@
|
||||
^gnulib/
|
||||
^po/
|
||||
ChangeLog
|
||||
^ChangeLog$
|
||||
^ChangeLog-old$
|
||||
^Makefile*
|
||||
^docs/
|
||||
^tests/
|
||||
^tools/virsh\.c
|
||||
^tools/console\.c
|
||||
^src/util/virterror\.c
|
||||
^tools/virsh\.c$
|
||||
^tools/console\.c$
|
||||
^build-aux/
|
||||
|
2
.x-sc_prohibit_readlink
Normal file
2
.x-sc_prohibit_readlink
Normal file
@ -0,0 +1,2 @@
|
||||
^src/util/util\.c$
|
||||
^ChangeLog-old$
|
@ -1 +1,9 @@
|
||||
^gnulib/
|
||||
^ChangeLog-old$
|
||||
^docs/
|
||||
^examples/domain-events/events-c/event-test\.c$
|
||||
^src/internal\.h$
|
||||
^src/lxc/lxc_container\.c$
|
||||
^src/node_device/node_device_devkit\.c$
|
||||
^src/node_device/node_device_hal\.c$
|
||||
^src/storage/parthelper\.c$
|
||||
|
@ -1 +1 @@
|
||||
src/util/util.c
|
||||
^src/util/util\.c$
|
||||
|
@ -1,5 +1,4 @@
|
||||
^examples/
|
||||
^gnulib/lib/dummy\.c$
|
||||
^gnulib/tests/dummy\.c$
|
||||
^daemon/remote_protocol\.c$
|
||||
^ChangeLog$
|
||||
|
9
AUTHORS
9
AUTHORS
@ -23,6 +23,7 @@ The primary maintainers and people with commit access rights:
|
||||
Guido Günther <agx@sigxcpu.org>
|
||||
John Levon <john.levon@sun.com>
|
||||
Matthias Bolte <matthias.bolte@googlemail.com>
|
||||
Jiri Denemark <jdenemar@redhat.com>
|
||||
|
||||
Patches have also been contributed by:
|
||||
|
||||
@ -80,6 +81,14 @@ Patches have also been contributed by:
|
||||
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>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
26
HACKING
26
HACKING
@ -15,14 +15,14 @@ should work:
|
||||
|
||||
or:
|
||||
|
||||
cvs diff -up > libvirt-myfeature.patch
|
||||
git diff > libvirt-myfeature.patch
|
||||
|
||||
(3) 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.
|
||||
|
||||
(4) Make sure your patches apply against libvirt CVS. Developers
|
||||
only follow CVS and don't care much about released versions.
|
||||
(4) 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:
|
||||
@ -37,6 +37,17 @@ and run the tests:
|
||||
|
||||
The latter test checks for memory leaks.
|
||||
|
||||
If you encounter any failing tests, the VIR_TEST_DEBUG environment variable
|
||||
may provide extra information to debug the failures. Larger values of
|
||||
VIR_TEST_DEBUG may provide larger amounts of information:
|
||||
|
||||
VIR_TEST_DEBUG=1 make check (or)
|
||||
VIR_TEST_DEBUG=2 make check
|
||||
|
||||
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 feature or changing the output of a program.
|
||||
|
||||
@ -211,7 +222,7 @@ one of the following semantically named macros
|
||||
STREQ(a,b)
|
||||
STRNEQ(a,b)
|
||||
|
||||
- For case sensitive equality:
|
||||
- For case insensitive equality:
|
||||
STRCASEEQ(a,b)
|
||||
STRCASENEQ(a,b)
|
||||
|
||||
@ -220,7 +231,7 @@ one of the following semantically named macros
|
||||
STREQLEN(a,b,n)
|
||||
STRNEQLEN(a,b,n)
|
||||
|
||||
- For case sensitive equality of a substring:
|
||||
- For case insensitive equality of a substring:
|
||||
|
||||
STRCASEEQLEN(a,b,n)
|
||||
STRCASENEQLEN(a,b,n)
|
||||
@ -282,10 +293,11 @@ eg typical usage is as follows:
|
||||
...
|
||||
virBufferAddLit(&buf, "</domain>\n");
|
||||
|
||||
....
|
||||
...
|
||||
|
||||
if (virBufferError(&buf)) {
|
||||
__virRaiseError(...);
|
||||
virBufferFreeAndReset(&buf);
|
||||
virReportOOMError(...);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
17
Makefile.am
17
Makefile.am
@ -5,7 +5,7 @@ GENHTML = genhtml
|
||||
|
||||
SUBDIRS = gnulib/lib include src daemon tools proxy docs gnulib/tests \
|
||||
python tests po examples/domain-events/events-c examples/hellolibvirt \
|
||||
examples/dominfo examples/domsuspend examples/python
|
||||
examples/dominfo examples/domsuspend examples/python examples/apparmor
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4
|
||||
|
||||
@ -17,12 +17,23 @@ EXTRA_DIST = \
|
||||
mingw32-libvirt.spec.in \
|
||||
libvirt.pc libvirt.pc.in \
|
||||
autobuild.sh \
|
||||
.x-sc_avoid_ctype_macros \
|
||||
.x-sc_avoid_if_before_free \
|
||||
.x-sc_require_config_h_first \
|
||||
.x-sc_avoid_write \
|
||||
.x-sc_m4_quote_check \
|
||||
.x-sc_prohibit_asprintf \
|
||||
.x-sc_prohibit_gethostby \
|
||||
.x-sc_prohibit_gethostname \
|
||||
.x-sc_prohibit_have_config_h \
|
||||
.x-sc_prohibit_HAVE_MBRTOWC \
|
||||
.x-sc_prohibit_nonreentrant \
|
||||
.x-sc_prohibit_strcmp \
|
||||
.x-sc_prohibit_strcmp_and_strncmp \
|
||||
.x-sc_prohibit_strncpy \
|
||||
.x-sc_prohibit_VIR_ERR_NO_MEMORY \
|
||||
.x-sc_require_config_h \
|
||||
.x-sc_prohibit_nonreentrant \
|
||||
.x-sc_require_config_h_first \
|
||||
.x-sc_trailing_blank \
|
||||
Makefile.nonreentrant \
|
||||
autogen.sh \
|
||||
examples/domain-events/events-python \
|
||||
|
12
autogen.sh
12
autogen.sh
@ -49,9 +49,17 @@ test -f src/libvirt.c || {
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$*"; then
|
||||
|
||||
EXTRA_ARGS=
|
||||
if test "x$1" = "x--system"; then
|
||||
shift
|
||||
EXTRA_ARGS="--prefix=/usr --sysconfdir=/etc --localstatedir=/var"
|
||||
echo "Running ./configure with $EXTRA_ARGS $@"
|
||||
else
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Ensure that whenever we pull in a gnulib update or otherwise change to a
|
||||
@ -77,7 +85,7 @@ if test x$OBJ_DIR != x; then
|
||||
cd "$OBJ_DIR"
|
||||
fi
|
||||
|
||||
$srcdir/configure "$@" && {
|
||||
$srcdir/configure $EXTRA_ARGS "$@" && {
|
||||
echo
|
||||
echo "Now type 'make' to compile libvirt."
|
||||
}
|
||||
|
@ -65,8 +65,10 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||
<$gnulib_tool || exit
|
||||
|
||||
modules='
|
||||
areadlink
|
||||
base64
|
||||
c-ctype
|
||||
canonicalize-lgpl
|
||||
close
|
||||
connect
|
||||
getaddrinfo
|
||||
@ -75,6 +77,7 @@ getpass
|
||||
gettext
|
||||
gitlog-to-changelog
|
||||
gnumakefile
|
||||
ignore-value
|
||||
inet_pton
|
||||
ioctl
|
||||
maintainer-makefile
|
||||
|
16
build-aux/.gitignore
vendored
16
build-aux/.gitignore
vendored
@ -1,13 +1,7 @@
|
||||
compile
|
||||
config.guess
|
||||
config.rpath
|
||||
config.sub
|
||||
depcomp
|
||||
install-sh
|
||||
ltmain.sh
|
||||
missing
|
||||
mkinstalldirs
|
||||
mktempd
|
||||
*
|
||||
/link-warning.h
|
||||
/mktempd
|
||||
/arg-nonnull.h
|
||||
/gitlog-to-changelog
|
||||
/useless-if-before-free
|
||||
/vc-list-files
|
||||
/gitlog-to-changelog
|
||||
|
@ -1,28 +0,0 @@
|
||||
/* GL_LINK_WARNING("literal string") arranges to emit the literal string as
|
||||
a linker warning on most glibc systems.
|
||||
We use a linker warning rather than a preprocessor warning, because
|
||||
#warning cannot be used inside macros. */
|
||||
#ifndef GL_LINK_WARNING
|
||||
/* This works on platforms with GNU ld and ELF object format.
|
||||
Testing __GLIBC__ is sufficient for asserting that GNU ld is in use.
|
||||
Testing __ELF__ guarantees the ELF object format.
|
||||
Testing __GNUC__ is necessary for the compound expression syntax. */
|
||||
# if defined __GLIBC__ && defined __ELF__ && defined __GNUC__
|
||||
# define GL_LINK_WARNING(message) \
|
||||
GL_LINK_WARNING1 (__FILE__, __LINE__, message)
|
||||
# define GL_LINK_WARNING1(file, line, message) \
|
||||
GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */
|
||||
# define GL_LINK_WARNING2(file, line, message) \
|
||||
GL_LINK_WARNING3 (file ":" #line ": warning: " message)
|
||||
# define GL_LINK_WARNING3(message) \
|
||||
({ static const char warning[sizeof (message)] \
|
||||
__attribute__ ((__unused__, \
|
||||
__section__ (".gnu.warning"), \
|
||||
__aligned__ (1))) \
|
||||
= message "\n"; \
|
||||
(void)0; \
|
||||
})
|
||||
# else
|
||||
# define GL_LINK_WARNING(message) ((void) 0)
|
||||
# endif
|
||||
#endif
|
@ -1,134 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Create a temporary directory, much like mktemp -d does.
|
||||
|
||||
# Copyright (C) 2007-2008 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
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Written by Jim Meyering.
|
||||
|
||||
# Usage: mktempd /tmp phoey.XXXXXXXXXX
|
||||
|
||||
# First, try to use the mktemp program.
|
||||
# Failing that, we'll roll our own mktemp-like function:
|
||||
# - try to get random bytes from /dev/urandom
|
||||
# - failing that, generate output from a combination of quickly-varying
|
||||
# sources and gzip. Ignore non-varying gzip header, and extract
|
||||
# "random" bits from there.
|
||||
# - given those bits, map to file-name bytes using tr, and try to create
|
||||
# the desired directory.
|
||||
# - make only $MAX_TRIES attempts
|
||||
|
||||
ME=`basename "$0"`
|
||||
die() { echo >&2 "$ME: $@"; exit 1; }
|
||||
|
||||
MAX_TRIES=4
|
||||
|
||||
rand_bytes()
|
||||
{
|
||||
n=$1
|
||||
|
||||
chars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
|
||||
|
||||
dev_rand=/dev/urandom
|
||||
if test -r "$dev_rand"; then
|
||||
# Note: 256-length($chars) == 194; 3 copies of $chars is 186 + 8 = 194.
|
||||
dd ibs=$n count=1 if="$dev_rand" | tr -c $chars 01234567$chars$chars$chars
|
||||
return
|
||||
fi
|
||||
|
||||
cmds='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n'
|
||||
data=` (eval "$cmds") 2>&1 | gzip `
|
||||
|
||||
n_plus_50=`expr $n + 50`
|
||||
|
||||
# Ensure that $data has length at least 50+$n
|
||||
while :; do
|
||||
len=`echo "$data"|wc -c`
|
||||
test $n_plus_50 -le $len && break;
|
||||
data=` (echo "$data"; eval "$cmds") 2>&1 | gzip `
|
||||
done
|
||||
|
||||
echo "$data" \
|
||||
| dd bs=1 skip=50 count=$n 2>/dev/null \
|
||||
| tr -c $chars 01234567$chars$chars$chars
|
||||
}
|
||||
|
||||
mktempd()
|
||||
{
|
||||
case $# in
|
||||
2);;
|
||||
*) die "Usage: $ME DIR TEMPLATE";;
|
||||
esac
|
||||
|
||||
destdir=$1
|
||||
template=$2
|
||||
|
||||
# Disallow any trailing slash on specified destdir:
|
||||
# it would subvert the post-mktemp "case"-based destdir test.
|
||||
case $destdir in
|
||||
/) ;;
|
||||
*/) die "invalid destination dir: remove trailing slash(es)";;
|
||||
esac
|
||||
|
||||
case $template in
|
||||
*XXXX) ;;
|
||||
*) die "invalid template: $template (must have a suffix of at least 4 X's)";;
|
||||
esac
|
||||
|
||||
fail=0
|
||||
|
||||
# First, try to use mktemp.
|
||||
d=`env -u TMPDIR mktemp -d -t -p "$destdir" "$template" 2>/dev/null` \
|
||||
|| fail=1
|
||||
|
||||
# The resulting name must be in the specified directory.
|
||||
case $d in "$destdir"*);; *) fail=1;; esac
|
||||
|
||||
# It must have created the directory.
|
||||
test -d "$d" || fail=1
|
||||
|
||||
# It must have 0700 permissions. Handle sticky "S" bits.
|
||||
perms=`ls -dgo "$d" 2>/dev/null|tr S -` || fail=1
|
||||
case $perms in drwx------*) ;; *) fail=1;; esac
|
||||
|
||||
test $fail = 0 && {
|
||||
echo "$d"
|
||||
return
|
||||
}
|
||||
|
||||
# If we reach this point, we'll have to create a directory manually.
|
||||
|
||||
# Get a copy of the template without its suffix of X's.
|
||||
base_template=`echo "$template"|sed 's/XX*$//'`
|
||||
|
||||
# Calculate how many X's we've just removed.
|
||||
template_length=`echo "$template" | wc -c`
|
||||
nx=`echo "$base_template" | wc -c`
|
||||
nx=`expr $template_length - $nx`
|
||||
|
||||
err=
|
||||
i=1
|
||||
while :; do
|
||||
X=`rand_bytes $nx`
|
||||
candidate_dir="$destdir/$base_template$X"
|
||||
err=`mkdir -m 0700 "$candidate_dir" 2>&1` \
|
||||
&& { echo "$candidate_dir"; return; }
|
||||
test $MAX_TRIES -le $i && break;
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
die "$err"
|
||||
}
|
||||
|
||||
mktempd "$@"
|
23
cfg.mk
23
cfg.mk
@ -1,5 +1,5 @@
|
||||
# Customize Makefile.maint. -*- makefile -*-
|
||||
# Copyright (C) 2003-2009 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2010 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
|
||||
@ -79,11 +79,9 @@ sc_avoid_write:
|
||||
# Use STREQ rather than comparing strcmp == 0, or != 0.
|
||||
# Similarly, use STREQLEN or STRPREFIX rather than strncmp.
|
||||
sc_prohibit_strcmp_and_strncmp:
|
||||
@grep -nE '! *strn?cmp *\(|\<strn?cmp *\([^)]+\) *==' \
|
||||
$$($(VC_LIST_EXCEPT)) \
|
||||
| grep -vE ':# *define STREQ(LEN)?\(' && \
|
||||
{ echo '$(ME): use STREQ(LEN) in place of the above uses of strcmp(strncmp)' \
|
||||
1>&2; exit 1; } || :
|
||||
@re='strn?cmp *\(' \
|
||||
msg='use STREQ() in place of the above uses of str[n]cmp' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
# Use virAsprintf rather than a'sprintf since *strp is undefined on error.
|
||||
sc_prohibit_asprintf:
|
||||
@ -96,6 +94,16 @@ sc_prohibit_strncpy:
|
||||
msg='use virStrncpy, not strncpy' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
sc_prohibit_readlink:
|
||||
@re='readlink *\(' \
|
||||
msg='use virFileResolveLink, not readlink' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
sc_prohibit_gethostname:
|
||||
@re='gethostname *\(' \
|
||||
msg='use virGetHostname, not gethostname' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
sc_prohibit_VIR_ERR_NO_MEMORY:
|
||||
@re='\<V''IR_ERR_NO_MEMORY\>' \
|
||||
msg='use virReportOOMError, not V'IR_ERR_NO_MEMORY \
|
||||
@ -262,3 +270,6 @@ ifeq (0,$(MAKELEVEL))
|
||||
$(error gnulib update required; run ./autogen.sh first)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Exempt @...@ uses of these symbols.
|
||||
_makefile_at_at_check_exceptions = ' && !/(SCHEMA|SYSCONF)DIR/'
|
||||
|
@ -1,9 +1,9 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT([libvirt], [0.7.2])
|
||||
AC_INIT([libvirt], [0.7.6])
|
||||
AC_CONFIG_SRCDIR([src/libvirt.c])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
dnl Make automake keep quiet about wildcards & other GNUmake-isms
|
||||
AM_INIT_AUTOMAKE([-Wno-portability])
|
||||
|
||||
@ -33,7 +33,13 @@ GNUTLS_REQUIRED="1.0.25"
|
||||
AVAHI_REQUIRED="0.6.0"
|
||||
POLKIT_REQUIRED="0.6"
|
||||
PARTED_REQUIRED="1.8.0"
|
||||
NETCF_REQUIRED="0.0.1"
|
||||
NETCF_REQUIRED="0.1.4"
|
||||
UDEV_REQUIRED=145
|
||||
PCIACCESS_REQUIRED=0.10.0
|
||||
XMLRPC_REQUIRED=1.14.0
|
||||
HAL_REQUIRED=0.5.0
|
||||
DEVMAPPER_REQUIRED=1.0.0
|
||||
LIBCURL_REQUIRED="7.18.0"
|
||||
|
||||
dnl Checks for C compiler.
|
||||
AC_PROG_CC
|
||||
@ -72,12 +78,32 @@ AC_SUBST(VERSION_SCRIPT_FLAGS)
|
||||
|
||||
LIBVIRT_COMPILE_WARNINGS([maximum])
|
||||
|
||||
AC_MSG_CHECKING([for CPUID instruction])
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <stdint.h>
|
||||
]],
|
||||
[[
|
||||
uint32_t eax, ebx, ecx, edx;
|
||||
asm volatile (
|
||||
"cpuid"
|
||||
: "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
|
||||
: "a" (eax));
|
||||
]]),
|
||||
[have_cpuid=yes],
|
||||
[have_cpuid=no])
|
||||
if test "x$have_cpuid" = xyes; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_CPUID], 1, [whether CPUID instruction is supported])
|
||||
fi
|
||||
AC_MSG_RESULT([$have_cpuid])
|
||||
|
||||
|
||||
dnl Support large files / 64 bit seek offsets.
|
||||
dnl Use --disable-largefile if you don't want this.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
dnl Availability of various common functions (non-fatal if missing).
|
||||
AC_CHECK_FUNCS([cfmakeraw regexec uname sched_getaffinity getuid getgid posix_fallocate mmap readlink])
|
||||
AC_CHECK_FUNCS([cfmakeraw regexec uname sched_getaffinity getuid getgid posix_fallocate mmap])
|
||||
|
||||
dnl Availability of various not common threadsafe functions
|
||||
AC_CHECK_FUNCS([strerror_r strtok_r getmntent_r getgrnam_r getpwuid_r])
|
||||
@ -90,7 +116,8 @@ dnl If portablexdr is installed, prefer that.
|
||||
dnl Otherwise try -lrpc (Cygwin) -lxdr (some MinGW), -lnsl (Solaris)
|
||||
dnl or none (most Unix)
|
||||
AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[
|
||||
AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl])
|
||||
AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl],[],
|
||||
[AC_MSG_ERROR([Cannot find a XDR library])])
|
||||
])
|
||||
|
||||
AC_CHECK_LIB([intl],[gettext],[])
|
||||
@ -178,33 +205,33 @@ fi
|
||||
|
||||
dnl Allow to build without Xen, QEMU/KVM, test or remote driver
|
||||
AC_ARG_WITH([xen],
|
||||
[ --with-xen add XEN support (on)],[],[with_xen=yes])
|
||||
AC_HELP_STRING([--with-xen], [add XEN support @<:@default=check@:>@]),[],[with_xen=check])
|
||||
AC_ARG_WITH([xen-inotify],
|
||||
[ --with-xen-inotify add XEN inotify support (on)],[],[with_xen_inotify=check])
|
||||
AC_HELP_STRING([--with-xen-inotify], [add XEN inotify support @<:@default=check@:>@]),[],[with_xen_inotify=check])
|
||||
AC_ARG_WITH([qemu],
|
||||
[ --with-qemu add QEMU/KVM support (on)],[],[with_qemu=yes])
|
||||
AC_HELP_STRING([--with-qemu], [add QEMU/KVM support @<:@default=yes@:>@]),[],[with_qemu=yes])
|
||||
AC_ARG_WITH([uml],
|
||||
[ --with-uml add UML support (on)],[],[with_uml=check])
|
||||
AC_HELP_STRING([--with-uml], [add UML support @<:@default=check@:>@]),[],[with_uml=check])
|
||||
AC_ARG_WITH([openvz],
|
||||
[ --with-openvz add OpenVZ support (on)],[],[with_openvz=yes])
|
||||
AC_HELP_STRING([--with-openvz], [add OpenVZ support @<:@default=yes@:>@]),[],[with_openvz=yes])
|
||||
AC_ARG_WITH([libssh2],
|
||||
[ --with-libssh2=[PFX] libssh2 location],[],[with_libssh2=yes])
|
||||
AC_HELP_STRING([--with-libssh2=@<:@PFX@:>@], [libssh2 location @<:@default=/usr/local/lib@:>@]),[],[with_libssh2=yes])
|
||||
AC_ARG_WITH([phyp],
|
||||
[ --with-phyp=[PFX] add PHYP support (on)],[],[with_phyp=check])
|
||||
AC_HELP_STRING([--with-phyp], [add PHYP support @<:@default=check@:>@]),[],[with_phyp=check])
|
||||
AC_ARG_WITH([vbox],
|
||||
[ --with-vbox add VirtualBox support (on)],[],[with_vbox=yes])
|
||||
AC_HELP_STRING([--with-vbox], [add VirtualBox support @<:@default=yes@:>@]),[],[with_vbox=yes])
|
||||
AC_ARG_WITH([lxc],
|
||||
[ --with-lxc add Linux Container support (on)],[],[with_lxc=check])
|
||||
AC_HELP_STRING([--with-lxc], [add Linux Container support @<:@default=check@:>@]),[],[with_lxc=check])
|
||||
AC_ARG_WITH([one],
|
||||
[ --with-one add ONE support (on)],[],[with_one=check])
|
||||
AC_HELP_STRING([--with-one], [add ONE support @<:@default=check@:>@]),[],[with_one=check])
|
||||
AC_ARG_WITH([esx],
|
||||
[ --with-esx add ESX support (on)],[],[with_esx=check])
|
||||
AC_HELP_STRING([--with-esx], [add ESX support @<:@default=check@:>@]),[],[with_esx=check])
|
||||
AC_ARG_WITH([test],
|
||||
[ --with-test add test driver support (on)],[],[with_test=yes])
|
||||
AC_HELP_STRING([--with-test], [add test driver support @<:@default=yes@:>@]),[],[with_test=yes])
|
||||
AC_ARG_WITH([remote],
|
||||
[ --with-remote add remote driver support (on)],[],[with_remote=yes])
|
||||
AC_HELP_STRING([--with-remote], [add remote driver support @<:@default=yes@:>@]),[],[with_remote=yes])
|
||||
AC_ARG_WITH([libvirtd],
|
||||
[ --with-libvirtd add libvirtd support (on)],[],[with_libvirtd=yes])
|
||||
AC_HELP_STRING([--with-libvirtd], [add libvirtd support @<:@default=yes@:>@]),[],[with_libvirtd=yes])
|
||||
|
||||
dnl
|
||||
dnl specific tests to setup DV devel environments with debug etc ...
|
||||
@ -218,8 +245,8 @@ AC_SUBST([STATIC_BINARIES])
|
||||
|
||||
dnl --enable-debug=(yes|no)
|
||||
AC_ARG_ENABLE([debug],
|
||||
[AC_HELP_STRING([--enable-debug=no/yes],
|
||||
[enable debugging output])],[],[enable_debug=yes])
|
||||
[AC_HELP_STRING([--enable-debug=@<:@no|yes@:>@],
|
||||
[enable debugging output @<:@default=yes@:>@])],[],[enable_debug=yes])
|
||||
AM_CONDITIONAL([ENABLE_DEBUG], test x"$enable_debug" = x"yes")
|
||||
if test x"$enable_debug" = x"yes"; then
|
||||
AC_DEFINE([ENABLE_DEBUG], [], [whether debugging is enabled])
|
||||
@ -227,7 +254,7 @@ fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING([where to write libvirtd PID file])
|
||||
AC_ARG_WITH([remote-pid-file], [AC_HELP_STRING([--with-remote-pid-file=[pidfile|none]], [PID file for libvirtd])])
|
||||
AC_ARG_WITH([remote-pid-file], [AC_HELP_STRING([--with-remote-pid-file=@<:@pidfile|none@:>@], [PID file for libvirtd])])
|
||||
if test "x$with_remote_pid_file" == "x" ; then
|
||||
REMOTE_PID_FILE="$localstatedir/run/libvirtd.pid"
|
||||
elif test "x$with_remote_pid_file" == "xnone" ; then
|
||||
@ -243,50 +270,32 @@ dnl init script flavor
|
||||
dnl
|
||||
AC_MSG_CHECKING([for init script flavor])
|
||||
AC_ARG_WITH([init-script],
|
||||
[AC_HELP_STRING([--with-init-scripts=[redhat|auto|none]],
|
||||
[Style of init scripts to install (defaults to auto)])])
|
||||
if test "x$with_init_scripts" = "x" -o "x$with_init_scripts" = "xauto"; then
|
||||
[AC_HELP_STRING([--with-init-script=@<:@redhat|auto|none@:>@],
|
||||
[Style of init script to install @<:@default=auto@:>@])])
|
||||
if test "x$with_init_script" = "x" -o "x$with_init_script" = "xauto"; then
|
||||
if test -f /etc/redhat-release ; then
|
||||
with_init_scripts=redhat
|
||||
with_init_script=redhat
|
||||
else
|
||||
with_init_scripts=none
|
||||
with_init_script=none
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([LIBVIRT_INIT_SCRIPTS_RED_HAT], test x$with_init_scripts = xredhat)
|
||||
AC_MSG_RESULT($with_init_scripts)
|
||||
AM_CONDITIONAL([LIBVIRT_INIT_SCRIPT_RED_HAT], test x$with_init_script = xredhat)
|
||||
AC_MSG_RESULT($with_init_script)
|
||||
|
||||
dnl RHEL-5 has a peculiar version of Xen, which requires some special casing
|
||||
AC_ARG_WITH([rhel5-api],
|
||||
[AC_HELP_STRING([--with-rhel5-api=[ARG]],
|
||||
[build for the RHEL-5 API [default=no]])])
|
||||
[AC_HELP_STRING([--with-rhel5-api=@<:@ARG@:>@],
|
||||
[build for the RHEL-5 API @<:@default=no@:>@])])
|
||||
if test x"$with_rhel5_api" = x"yes"; then
|
||||
AC_DEFINE([WITH_RHEL5_API], [1], [whether building for the RHEL-5 API])
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl ensure that Fedora's system-config-firewall knows
|
||||
dnl about libvirt's iptables rules
|
||||
dnl
|
||||
AC_ARG_ENABLE([iptables-lokkit],
|
||||
[AC_HELP_STRING([--enable-iptables-lokkit=no/yes/check],
|
||||
[enable registering libvirt's iptables rules with Fedora's lokkit])],
|
||||
[],[enable_iptables_lokkit=check])
|
||||
if test x"$enable_iptables_lokkit" != x"no"; then
|
||||
AC_PATH_PROG([LOKKIT_PATH],[lokkit], [], [/usr/sbin:$PATH])
|
||||
fi
|
||||
|
||||
if test x"$enable_iptables_lokkit" = x"yes" -a x"$LOKKIT_PATH" = x; then
|
||||
AC_MSG_ERROR([Cannot find lokkit and --enable-iptables-lokkit specified])
|
||||
fi
|
||||
|
||||
if test x"$LOKKIT_PATH" != x; then
|
||||
AC_DEFINE([ENABLE_IPTABLES_LOKKIT], [], [whether support for Fedora's lokkit is enabled])
|
||||
AC_DEFINE_UNQUOTED([LOKKIT_PATH], "$LOKKIT_PATH", [path to lokkit binary])
|
||||
fi
|
||||
|
||||
AC_PATH_PROG([IPTABLES_PATH], [iptables], /sbin/iptables, [/usr/sbin:$PATH])
|
||||
AC_DEFINE_UNQUOTED([IPTABLES_PATH], "$IPTABLES_PATH", [path to iptables binary])
|
||||
|
||||
AC_PATH_PROG([EBTABLES_PATH], [ebtables], /sbin/ebtables, [/usr/sbin:$PATH])
|
||||
AC_DEFINE_UNQUOTED([EBTABLES_PATH], "$EBTABLES_PATH", [path to ebtables binary])
|
||||
|
||||
if test "$with_openvz" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([WITH_OPENVZ], 1, [whether OpenVZ driver is enabled])
|
||||
fi
|
||||
@ -325,6 +334,8 @@ if test "$with_libvirtd" = "yes" ; then
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_LIBVIRTD], [test "$with_libvirtd" = "yes"])
|
||||
|
||||
old_LIBS="$LIBS"
|
||||
old_CFLAGS="$CFLAGS"
|
||||
XEN_LIBS=""
|
||||
XEN_CFLAGS=""
|
||||
dnl search for the Xen store library
|
||||
@ -334,52 +345,58 @@ if test "$with_xen" != "no" ; then
|
||||
XEN_LIBS="-L$with_xen/lib64 -L$with_xen/lib"
|
||||
fi
|
||||
fail=0
|
||||
old_LIBS="$LIBS"
|
||||
old_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $XEN_CFLAGS"
|
||||
LIBS="$LIBS $XEN_LIBS"
|
||||
AC_CHECK_LIB([xenstore], [xs_read], [
|
||||
with_xen=yes
|
||||
XEN_LIBS="$XEN_LIBS -lxenstore"
|
||||
],[
|
||||
if test "$with_xen" = "check" ; then
|
||||
with_xen=no
|
||||
else
|
||||
with_xen=no
|
||||
if test "$with_xen" = "yes"; then
|
||||
fail=1
|
||||
fi
|
||||
with_xen=no
|
||||
])
|
||||
|
||||
test $fail = 1 &&
|
||||
AC_MSG_ERROR([You must install the Xen development package to compile Xen driver with -lxenstore])
|
||||
|
||||
AC_CHECK_HEADERS([xen/xen.h xen/version.h xen/dom0_ops.h],,[
|
||||
AC_MSG_ERROR([Cannot find standard Xen headers. Is xen-devel installed?])
|
||||
],
|
||||
[#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
])
|
||||
|
||||
dnl Search for the location of <xen/{linux,sys}/privcmd.h>.
|
||||
AC_CHECK_HEADERS([xen/sys/privcmd.h],,[
|
||||
AC_CHECK_HEADERS([xen/linux/privcmd.h],,[
|
||||
AC_MSG_ERROR([Cannot find header file <xen/linux/privcmd.h> or <xen/sys/privcmd.h>. Is xen-devel installed?])
|
||||
],
|
||||
[#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <xen/xen.h>
|
||||
])
|
||||
],
|
||||
[#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <xen/xen.h>
|
||||
])
|
||||
LIBS="$old_LIBS"
|
||||
CFLAGS="$old_CFLAGS"
|
||||
fi
|
||||
|
||||
if test "$with_xen" != "no" ; then
|
||||
AC_CHECK_HEADERS([xen/xen.h xen/version.h xen/dom0_ops.h],,[
|
||||
if test "$with_xen" = "yes"; then
|
||||
fail=1
|
||||
fi
|
||||
with_xen=no
|
||||
],
|
||||
[#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$with_xen" != "no" ; then
|
||||
dnl Search for the location of <xen/{linux,sys}/privcmd.h>.
|
||||
found=
|
||||
AC_CHECK_HEADERS([xen/sys/privcmd.h xen/linux/privcmd.h], [found=yes; break;], [],
|
||||
[#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <xen/xen.h>
|
||||
])
|
||||
if test "x$found" != "xyes"; then
|
||||
if test "$with_xen" = "yes"; then
|
||||
fail=1
|
||||
fi
|
||||
with_xen=no
|
||||
fi
|
||||
fi
|
||||
|
||||
LIBS="$old_LIBS"
|
||||
CFLAGS="$old_CFLAGS"
|
||||
|
||||
if test $fail = 1; then
|
||||
AC_MSG_ERROR([You must install the Xen development package to compile Xen driver with -lxenstore])
|
||||
fi
|
||||
|
||||
if test "$with_xen" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([WITH_XEN], 1, [whether Xen driver is enabled])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([WITH_XEN], [test "$with_xen" = "yes"])
|
||||
AC_SUBST([XEN_CFLAGS])
|
||||
AC_SUBST([XEN_LIBS])
|
||||
@ -469,8 +486,6 @@ PKG_PROG_PKG_CONFIG
|
||||
dnl OpenNebula driver Compilation setting
|
||||
dnl
|
||||
|
||||
XMLRPC_REQUIRED=1.14.0
|
||||
|
||||
XMLRPC_CFLAGS=
|
||||
XMLRPC_LIBS=
|
||||
if test "x$with_one" = "xyes" -o "x$with_one" = "xcheck"; then
|
||||
@ -502,7 +517,7 @@ LIBXML_CFLAGS=""
|
||||
LIBXML_LIBS=""
|
||||
LIBXML_FOUND="no"
|
||||
|
||||
AC_ARG_WITH([libxml], [ --with-libxml=[PFX] libxml2 location])
|
||||
AC_ARG_WITH([libxml], AC_HELP_STRING([--with-libxml=@<:@PFX@:>@], [libxml2 location]))
|
||||
if test "x$with_libxml" = "xno" ; then
|
||||
AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_REQUIRED)
|
||||
AC_MSG_ERROR([libxml2 >= $LIBXML_REQUIRED is required for libvirt])
|
||||
@ -535,20 +550,20 @@ AC_SUBST([LIBXML_LIBS])
|
||||
|
||||
dnl xmlURI structure has query_raw?
|
||||
old_cflags="$CFLAGS"
|
||||
old_ldflags="$LDFLAGS"
|
||||
old_libs="$LIBS"
|
||||
CFLAGS="$CFLAGS $LIBXML_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $LIBXML_LIBS"
|
||||
LIBS="$LIBS $LIBXML_LIBS"
|
||||
AC_CHECK_MEMBER([struct _xmlURI.query_raw],
|
||||
[AC_DEFINE([HAVE_XMLURI_QUERY_RAW], [], [Have query_raw field in libxml2 xmlURI structure])],,
|
||||
[#include <libxml/uri.h>])
|
||||
CFLAGS="$old_cflags"
|
||||
LDFLAGS="$old_ldflags"
|
||||
LIBS="$old_libs"
|
||||
|
||||
dnl GnuTLS library
|
||||
GNUTLS_CFLAGS=
|
||||
GNUTLS_LIBS=
|
||||
GNUTLS_FOUND=no
|
||||
if test -z "$PKG_CONFIG" ; then
|
||||
if test -x "$PKG_CONFIG" ; then
|
||||
PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_REQUIRED,
|
||||
[GNUTLS_FOUND=yes], [GNUTLS_FOUND=no])
|
||||
fi
|
||||
@ -561,8 +576,12 @@ if test "$GNUTLS_FOUND" = "no"; then
|
||||
test $fail = 1 &&
|
||||
AC_MSG_ERROR([You must install the GnuTLS library in order to compile and run libvirt])
|
||||
|
||||
GNUTLS_LIBS=$LIBS
|
||||
dnl Not all versions of gnutls include -lgcrypt, and so we add
|
||||
dnl it explicitly for the calls to gcry_control/check_version
|
||||
GNUTLS_LIBS="$LIBS -lgcrypt"
|
||||
LIBS="$old_libs"
|
||||
else
|
||||
GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
|
||||
fi
|
||||
|
||||
AC_SUBST([GNUTLS_CFLAGS])
|
||||
@ -572,20 +591,20 @@ dnl Old versions of GnuTLS uses types like 'gnutls_session' instead
|
||||
dnl of 'gnutls_session_t'. Try to detect this type if defined so
|
||||
dnl that we can offer backwards compatibility.
|
||||
old_cflags="$CFLAGS"
|
||||
old_ldflags="$LDFLAGS"
|
||||
old_libs="$LIBS"
|
||||
CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $GNUTLS_LIBS"
|
||||
LIBS="$LIBS $GNUTLS_LIBS"
|
||||
AC_CHECK_TYPE([gnutls_session],
|
||||
AC_DEFINE([GNUTLS_1_0_COMPAT],[],
|
||||
[enable GnuTLS 1.0 compatibility macros]),,
|
||||
[#include <gnutls/gnutls.h>])
|
||||
CFLAGS="$old_cflags"
|
||||
LDFLAGS="$old_ldflags"
|
||||
LIBS="$old_libs"
|
||||
|
||||
|
||||
dnl Cyrus SASL
|
||||
AC_ARG_WITH([sasl],
|
||||
[ --with-sasl use cyrus SASL for authentication],
|
||||
AC_HELP_STRING([--with-sasl], [use cyrus SASL for authentication @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_sasl=check])
|
||||
|
||||
@ -602,7 +621,7 @@ if test "x$with_sasl" != "xno"; then
|
||||
CFLAGS="$CFLAGS $SASL_CFLAGS"
|
||||
LIBS="$LIBS $SASL_LIBS"
|
||||
AC_CHECK_HEADER([sasl/sasl.h],[],[
|
||||
if test "x$with_sasl" != "xcheck" ; then
|
||||
if test "x$with_sasl" = "xcheck" ; then
|
||||
with_sasl=no
|
||||
else
|
||||
fail=1
|
||||
@ -638,12 +657,62 @@ AC_SUBST([SASL_CFLAGS])
|
||||
AC_SUBST([SASL_LIBS])
|
||||
|
||||
|
||||
dnl YAJL JSON library http://lloyd.github.com/yajl/
|
||||
AC_ARG_WITH([yajl],
|
||||
AC_HELP_STRING([--with-yajl], [use YAJL for JSON parsing/formatting @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_yajl=check])
|
||||
|
||||
YAJL_CFLAGS=
|
||||
YAJL_LIBS=
|
||||
if test "x$with_yajl" != "xno"; then
|
||||
if test "x$with_yajl" != "xyes" -a "x$with_yajl" != "xcheck"; then
|
||||
YAJL_CFLAGS="-I$with_yajl/include"
|
||||
YAJL_LIBS="-L$with_yajl/lib"
|
||||
fi
|
||||
fail=0
|
||||
old_cppflags="$CPPFLAGS"
|
||||
old_libs="$LIBS"
|
||||
CPPFLAGS="$CPPFLAGS $YAJL_CFLAGS"
|
||||
LIBS="$LIBS $YAJL_LIBS"
|
||||
AC_CHECK_HEADER([yajl/yajl_common.h],[],[
|
||||
if test "x$with_yajl" = "xcheck" ; then
|
||||
with_yajl=no
|
||||
else
|
||||
fail=1
|
||||
fi])
|
||||
if test "x$with_yajl" != "xno" ; then
|
||||
AC_CHECK_LIB([yajl], [yajl_parse],[
|
||||
YAJL_LIBS="$YAJL_LIBS -lyajl"
|
||||
with_yajl=yes
|
||||
],[
|
||||
if test "x$with_yajl" = "xcheck" ; then
|
||||
with_yajl=no
|
||||
else
|
||||
fail=1
|
||||
fi
|
||||
])
|
||||
fi
|
||||
test $fail = 1 &&
|
||||
AC_MSG_ERROR([You must install the YAJL development package in order to compile libvirt])
|
||||
CPPFLAGS="$old_cppflags"
|
||||
LIBS="$old_libs"
|
||||
if test "x$with_yajl" = "xyes" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_YAJL], 1,
|
||||
[whether YAJL is available for JSON parsing/formatting])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_YAJL], [test "x$with_yajl" = "xyes"])
|
||||
AC_SUBST([YAJL_CFLAGS])
|
||||
AC_SUBST([YAJL_LIBS])
|
||||
|
||||
|
||||
dnl PolicyKit library
|
||||
POLKIT_CFLAGS=
|
||||
POLKIT_LIBS=
|
||||
PKCHECK_PATH=
|
||||
AC_ARG_WITH([polkit],
|
||||
[ --with-polkit use PolicyKit for UNIX socket access checks],
|
||||
AC_HELP_STRING([--with-polkit], [use PolicyKit for UNIX socket access checks @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_polkit=check])
|
||||
|
||||
@ -678,12 +747,12 @@ if test "x$with_polkit" = "xyes" -o "x$with_polkit" = "xcheck"; then
|
||||
[use PolicyKit for UNIX socket access checks])
|
||||
|
||||
old_CFLAGS=$CFLAGS
|
||||
old_LDFLAGS=$LDFLAGS
|
||||
old_LIBS=$LIBS
|
||||
CFLAGS="$CFLAGS $POLKIT_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $POLKIT_LIBS"
|
||||
LIBS="$LIBS $POLKIT_LIBS"
|
||||
AC_CHECK_FUNCS([polkit_context_is_caller_authorized])
|
||||
CFLAGS="$old_CFLAGS"
|
||||
LDFLAGS="$old_LDFLAGS"
|
||||
LIBS="$old_LIBS"
|
||||
|
||||
AC_PATH_PROG([POLKIT_AUTH], [polkit-auth])
|
||||
if test "x$POLKIT_AUTH" != "x"; then
|
||||
@ -701,7 +770,7 @@ AC_SUBST([POLKIT_LIBS])
|
||||
|
||||
dnl Avahi library
|
||||
AC_ARG_WITH([avahi],
|
||||
[ --with-avahi use avahi to advertise remote daemon],
|
||||
AC_HELP_STRING([--with-avahi], [use avahi to advertise remote daemon @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_avahi=check])
|
||||
|
||||
@ -728,7 +797,7 @@ AC_SUBST([AVAHI_LIBS])
|
||||
|
||||
dnl SELinux
|
||||
AC_ARG_WITH([selinux],
|
||||
[ --with-selinux use SELinux to manage security],
|
||||
AC_HELP_STRING([--with-selinux], [use SELinux to manage security @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_selinux=check])
|
||||
|
||||
@ -763,7 +832,7 @@ AC_SUBST([SELINUX_LIBS])
|
||||
|
||||
|
||||
AC_ARG_WITH([secdriver-selinux],
|
||||
[ --with-secdriver-selinux use SELinux security driver],
|
||||
AC_HELP_STRING([--with-secdriver-selinux], [use SELinux security driver @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_secdriver_selinux=check])
|
||||
|
||||
@ -801,7 +870,7 @@ AM_CONDITIONAL([WITH_SECDRIVER_SELINUX], [test "$with_secdriver_selinux" != "no"
|
||||
|
||||
dnl AppArmor
|
||||
AC_ARG_WITH([apparmor],
|
||||
[ --with-apparmor use AppArmor to manage security],
|
||||
AC_HELP_STRING([--with-apparmor], [use AppArmor to manage security @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_apparmor=check])
|
||||
|
||||
@ -840,7 +909,7 @@ AC_SUBST([APPARMOR_LIBS])
|
||||
|
||||
|
||||
AC_ARG_WITH([secdriver-apparmor],
|
||||
[ --with-secdriver-apparmor use AppArmor security driver],
|
||||
AC_HELP_STRING([--with-secdriver-apparmor], [use AppArmor security driver @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_secdriver_apparmor=check])
|
||||
|
||||
@ -879,7 +948,7 @@ AM_CONDITIONAL([WITH_SECDRIVER_APPARMOR], [test "$with_secdriver_apparmor" != "n
|
||||
|
||||
dnl NUMA lib
|
||||
AC_ARG_WITH([numactl],
|
||||
[ --with-numactl use numactl for host topology info],
|
||||
AC_HELP_STRING([--with-numactl], [use numactl for host topology info @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_numactl=check])
|
||||
|
||||
@ -974,7 +1043,7 @@ if test "$with_phyp" = "check"; then
|
||||
|
||||
if test "$with_phyp" != "no"; then
|
||||
saved_libs="$LIBS"
|
||||
LIBS="$LIBS -lssh2"
|
||||
LIBS="$LIBS -L$libssh2_path -lssh2"
|
||||
AC_TRY_LINK([#include <libssh2.h>], [
|
||||
(void) libssh2_session_block_directions(NULL);
|
||||
], [
|
||||
@ -1014,7 +1083,7 @@ AM_CONDITIONAL([WITH_PHYP],[test "$with_phyp" = "yes"])
|
||||
|
||||
dnl libcap-ng
|
||||
AC_ARG_WITH([capng],
|
||||
[ --with-capng use libcap-ng to reduce libvirtd privileges],
|
||||
AC_HELP_STRING([--with-capng], [use libcap-ng to reduce libvirtd privileges @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_capng=check])
|
||||
|
||||
@ -1097,7 +1166,7 @@ AC_SUBST([VIRSH_LIBS])
|
||||
|
||||
|
||||
AC_ARG_WITH([network],
|
||||
[ --with-network with virtual network driver (on)],[],[with_network=yes])
|
||||
AC_HELP_STRING([--with-network], [with virtual network driver @<:@default=yes@:>@]),[],[with_network=yes])
|
||||
if test "$with_libvirtd" = "no" ; then
|
||||
with_network=no
|
||||
fi
|
||||
@ -1115,7 +1184,7 @@ AM_CONDITIONAL([WITH_BRIDGE], [test "$with_bridge" = "yes"])
|
||||
|
||||
dnl netcf library
|
||||
AC_ARG_WITH([netcf],
|
||||
[ --with-netcf libnetcf support to configure physical host network interfaces],
|
||||
AC_HELP_STRING([--with-netcf], [libnetcf support to configure physical host network interfaces @<:@default=check@:>@]),
|
||||
[], [with_netcf=check])
|
||||
|
||||
NETCF_CFLAGS=
|
||||
@ -1151,17 +1220,17 @@ AM_CONDITIONAL([WITH_SECRETS], [test "$with_secrets" = "yes"])
|
||||
|
||||
|
||||
AC_ARG_WITH([storage-fs],
|
||||
[ --with-storage-fs with FileSystem backend for the storage driver (on)],[],[with_storage_fs=check])
|
||||
AC_HELP_STRING([--with-storage-fs], [with FileSystem backend for the storage driver @<:@default=check@:>@]),[],[with_storage_fs=check])
|
||||
AC_ARG_WITH([storage-lvm],
|
||||
[ --with-storage-lvm with LVM backend for the storage driver (on)],[],[with_storage_lvm=check])
|
||||
AC_HELP_STRING([--with-storage-lvm], [with LVM backend for the storage driver @<:@default=check@:>@]),[],[with_storage_lvm=check])
|
||||
AC_ARG_WITH([storage-iscsi],
|
||||
[ --with-storage-iscsi with iSCSI backend for the storage driver (on)],[],[with_storage_iscsi=check])
|
||||
AC_HELP_STRING([--with-storage-iscsi], [with iSCSI backend for the storage driver @<:@default=check@:>@]),[],[with_storage_iscsi=check])
|
||||
AC_ARG_WITH([storage-scsi],
|
||||
[ --with-storage-scsi with SCSI backend for the storage driver (on)],[],[with_storage_scsi=check])
|
||||
AC_HELP_STRING([--with-storage-scsi], [with SCSI backend for the storage driver @<:@default=check@:>@]),[],[with_storage_scsi=check])
|
||||
AC_ARG_WITH([storage-mpath],
|
||||
[ --with-storage-mpath with mpath backend for the storage driver (on)],[],[with_storage_mpath=check])
|
||||
AC_HELP_STRING([--with-storage-mpath], [with mpath backend for the storage driver @<:@default=check@:>@]),[],[with_storage_mpath=check])
|
||||
AC_ARG_WITH([storage-disk],
|
||||
[ --with-storage-disk with GPartd Disk backend for the storage driver (on)],[],[with_storage_disk=check])
|
||||
AC_HELP_STRING([--with-storage-disk], [with GPartd Disk backend for the storage driver @<:@default=check@:>@]),[],[with_storage_disk=check])
|
||||
|
||||
with_storage_dir=yes
|
||||
if test "$with_libvirtd" = "no"; then
|
||||
@ -1301,14 +1370,24 @@ fi
|
||||
AM_CONDITIONAL([WITH_STORAGE_MPATH], [test "$with_storage_mpath" = "yes"])
|
||||
|
||||
if test "$with_storage_mpath" = "yes"; then
|
||||
DEVMAPPER_REQUIRED=0.0
|
||||
DEVMAPPER_CFLAGS=
|
||||
DEVMAPPER_LIBS=
|
||||
PKG_CHECK_MODULES(DEVMAPPER, devmapper >= $DEVMAPPER_REQUIRED,
|
||||
[], [
|
||||
AC_MSG_ERROR(
|
||||
[You must install device-mapper-devel >= $DEVMAPPER_REQUIRED to compile libvirt])
|
||||
])
|
||||
PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= $DEVMAPPER_REQUIRED], [], [DEVMAPPER_FOUND=no])
|
||||
if test "$DEVMAPPER_FOUND" = "no"; then
|
||||
# devmapper is missing pkg-config files in ubuntu, suse, etc
|
||||
save_LIBS="$LIBS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
DEVMAPPER_FOUND=yes
|
||||
AC_CHECK_HEADER([libdevmapper.h],,[DEVMAPPER_FOUND=no])
|
||||
AC_CHECK_LIB([devmapper], [dm_task_run],,[DEVMAPPER_FOUND=no])
|
||||
DEVMAPPER_LIBS="-ldevmapper"
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
fi
|
||||
if test "$DEVMAPPER_FOUND" = "no" ; then
|
||||
AC_MSG_ERROR([You must install device-mapper-devel/libdevmapper >= $DEVMAPPER_REQUIRED to compile libvirt])
|
||||
fi
|
||||
|
||||
fi
|
||||
AC_SUBST([DEVMAPPER_CFLAGS])
|
||||
AC_SUBST([DEVMAPPER_LIBS])
|
||||
@ -1365,7 +1444,6 @@ dnl
|
||||
|
||||
LIBCURL_CFLAGS=""
|
||||
LIBCURL_LIBS=""
|
||||
LIBCURL_REQUIRED="7.18.0"
|
||||
LIBCURL_FOUND="no"
|
||||
|
||||
if test "$with_esx" = "yes" -o "$with_esx" = "check"; then
|
||||
@ -1394,79 +1472,79 @@ dnl check for python
|
||||
dnl
|
||||
|
||||
AC_ARG_WITH([python],
|
||||
[ --with-python Build python bindings (on)],[],[with_python=yes])
|
||||
AC_HELP_STRING([--with-python], [Build python bindings @<:@default=yes@:>@]),[],[with_python=yes])
|
||||
|
||||
if test "$enable_shared:$with_python" = no:yes; then
|
||||
AC_MSG_WARN([Disabling shared libraries is incompatible with building Python extensions.])
|
||||
AC_MSG_WARN([Ignoring --with-python.])
|
||||
with_python=no
|
||||
fi
|
||||
|
||||
PYTHON_VERSION=
|
||||
PYTHON_INCLUDES=
|
||||
PYTHON_SITE_PACKAGES=
|
||||
PYTHON_TESTS=
|
||||
pythondir=
|
||||
if test "$with_python" != "no" ; then
|
||||
if test -x "$with_python/bin/python"
|
||||
then
|
||||
echo Found python in $with_python/bin/python
|
||||
AC_MSG_NOTICE(Found python in $with_python/bin/python)
|
||||
PYTHON="$with_python/bin/python"
|
||||
with_python=yes
|
||||
else
|
||||
if test -x "$with_python"
|
||||
then
|
||||
echo Found python in $with_python
|
||||
PYTHON="$with_python"
|
||||
else
|
||||
if test -x "$PYTHON"
|
||||
then
|
||||
echo Found python in environment PYTHON=$PYTHON
|
||||
with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
|
||||
else
|
||||
AC_PATH_PROG([PYTHON], [python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5])
|
||||
fi
|
||||
fi
|
||||
if test -x "$with_python"
|
||||
then
|
||||
AC_MSG_NOTICE(Found python in $with_python)
|
||||
PYTHON="$with_python"
|
||||
with_python=yes
|
||||
else
|
||||
if test -x "$PYTHON"
|
||||
then
|
||||
AC_MSG_NOTICE(Found python in environment PYTHON=$PYTHON)
|
||||
with_python=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "$PYTHON" != ""
|
||||
then
|
||||
PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
|
||||
echo Found Python version $PYTHON_VERSION
|
||||
fi
|
||||
if test "$PYTHON_VERSION" != ""
|
||||
then
|
||||
if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
|
||||
-d $with_python/lib/python$PYTHON_VERSION/site-packages
|
||||
then
|
||||
PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
|
||||
PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
|
||||
else
|
||||
if test -r $prefix/include/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
|
||||
PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
|
||||
else
|
||||
if test -r /usr/include/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
|
||||
PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
|
||||
else
|
||||
echo could not find python$PYTHON_VERSION/Python.h
|
||||
fi
|
||||
fi
|
||||
if test ! -d "$PYTHON_SITE_PACKAGES"
|
||||
then
|
||||
PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "$with_python" != "yes"
|
||||
then
|
||||
pythondir='$(PYTHON_SITE_PACKAGES)'
|
||||
|
||||
if test "$with_python" == "yes" ; then
|
||||
AM_PATH_PYTHON(,, [:])
|
||||
|
||||
if test "$PYTHON" != : ; then
|
||||
PYTHON_CONFIG="$PYTHON-config"
|
||||
|
||||
if test -x "$PYTHON_CONFIG"
|
||||
then
|
||||
PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
|
||||
else
|
||||
if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
|
||||
else
|
||||
if test -r $prefix/include/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
|
||||
else
|
||||
if test -r /usr/include/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
|
||||
else
|
||||
AC_MSG_NOTICE([Could not find python$PYTHON_VERSION/Python.h, disabling bindings])
|
||||
with_python=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_NOTICE([Could not find python interpreter, disabling bindings])
|
||||
with_python=no
|
||||
fi
|
||||
else
|
||||
pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages'
|
||||
AC_MSG_NOTICE([Could not find python in $with_python, disabling bindings])
|
||||
with_python=no
|
||||
fi
|
||||
else
|
||||
PYTHON=
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_PYTHON], test "$PYTHON_INCLUDES" != "")
|
||||
AC_SUBST([pythondir])
|
||||
AM_CONDITIONAL([WITH_PYTHON], [test "$with_python" = "yes"])
|
||||
AC_SUBST([PYTHON_VERSION])
|
||||
AC_SUBST([PYTHON_INCLUDES])
|
||||
AC_SUBST([PYTHON_SITE_PACKAGES])
|
||||
|
||||
|
||||
|
||||
AC_MSG_CHECKING([whether this host is running a Xen kernel])
|
||||
RUNNING_XEN=
|
||||
@ -1491,7 +1569,7 @@ AC_MSG_RESULT($RUNNING_XEND)
|
||||
AM_CONDITIONAL([ENABLE_XEN_TESTS], [test "$RUNNING_XEN" != "no" -a "$RUNNING_XEND" != "no"])
|
||||
|
||||
AC_ARG_ENABLE([test-coverage],
|
||||
[ --enable-test-coverage turn on code coverage instrumentation],
|
||||
AC_HELP_STRING([--enable-test-coverage], [turn on code coverage instrumentation @<:@default=no@:>@]),
|
||||
[case "${enableval}" in
|
||||
yes|no) ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for test-coverage option]) ;;
|
||||
@ -1508,7 +1586,7 @@ if test "${enable_coverage}" = yes; then
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([test-oom],
|
||||
[ --enable-test-oom memory allocation failure checking],
|
||||
AC_HELP_STRING([--enable-test-oom], [memory allocation failure checking @<:@default=no@:>@]),
|
||||
[case "${enableval}" in
|
||||
yes|no) ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for test-oom option]) ;;
|
||||
@ -1528,7 +1606,7 @@ fi
|
||||
|
||||
|
||||
AC_ARG_ENABLE([test-locking],
|
||||
[ --enable-test-locking thread locking tests using CIL],
|
||||
AC_HELP_STRING([--enable-test-locking], [thread locking tests using CIL @<:@default=no@:>@]),
|
||||
[case "${enableval}" in
|
||||
yes|no) ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for test-locking option]) ;;
|
||||
@ -1545,7 +1623,7 @@ AM_CONDITIONAL([WITH_CIL],[test "$enable_locking" = "yes"])
|
||||
dnl Enable building the proxy?
|
||||
|
||||
AC_ARG_WITH([xen-proxy],
|
||||
[ --with-xen-proxy add XEN setuid proxy support (on)],[],[with_xen_proxy=auto])
|
||||
AC_HELP_STRING([--with-xen-proxy], [add XEN setuid proxy support @<:@default=auto@:>@]),[],[with_xen_proxy=auto])
|
||||
|
||||
AC_MSG_CHECKING([if Xen setuid proxy is needed])
|
||||
if test "$with_xen_proxy" = "auto"; then
|
||||
@ -1605,7 +1683,7 @@ AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != "no"])
|
||||
|
||||
dnl Driver-Modules library
|
||||
AC_ARG_WITH([driver-modules],
|
||||
[ --with-driver-modules build drivers as loadable modules],
|
||||
AC_HELP_STRING([--with-driver-modules], [build drivers as loadable modules @<:@default=no@:>@]),
|
||||
[],
|
||||
[with_driver_modules=no])
|
||||
|
||||
@ -1640,12 +1718,11 @@ test "$enable_shared" = no && lt_cv_objdir=.
|
||||
LV_LIBTOOL_OBJDIR=${lt_cv_objdir-.}
|
||||
AC_SUBST([LV_LIBTOOL_OBJDIR])
|
||||
|
||||
dnl HAL or DeviceKit library for host device enumeration
|
||||
HAL_REQUIRED=0.0
|
||||
dnl HAL library check for host device enumeration
|
||||
HAL_CFLAGS=
|
||||
HAL_LIBS=
|
||||
AC_ARG_WITH([hal],
|
||||
[ --with-hal use HAL for host device enumeration],
|
||||
AC_HELP_STRING([--with-hal], [use HAL for host device enumeration @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_hal=check])
|
||||
|
||||
@ -1663,79 +1740,73 @@ if test "x$with_hal" = "xyes" -o "x$with_hal" = "xcheck"; then
|
||||
fi
|
||||
])
|
||||
if test "x$with_hal" = "xyes" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_HAL], 1,
|
||||
[use HAL for host device enumeration])
|
||||
|
||||
old_CFLAGS=$CFLAGS
|
||||
old_LDFLAGS=$LDFLAGS
|
||||
old_LIBS=$LIBS
|
||||
CFLAGS="$CFLAGS $HAL_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $HAL_LIBS"
|
||||
LIBS="$LIBS $HAL_LIBS"
|
||||
AC_CHECK_FUNCS([libhal_get_all_devices],,[with_hal=no])
|
||||
AC_CHECK_FUNCS([dbus_watch_get_unix_fd])
|
||||
CFLAGS="$old_CFLAGS"
|
||||
LDFLAGS="$old_LDFLAGS"
|
||||
LIBS="$old_LIBS"
|
||||
fi
|
||||
if test "x$with_hal" = "xyes" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_HAL], 1,
|
||||
[use HAL for host device enumeration])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_HAL], [test "x$with_hal" = "xyes"])
|
||||
AC_SUBST([HAL_CFLAGS])
|
||||
AC_SUBST([HAL_LIBS])
|
||||
|
||||
DEVKIT_REQUIRED=0.0
|
||||
DEVKIT_CFLAGS=
|
||||
DEVKIT_LIBS=
|
||||
AC_ARG_WITH([devkit],
|
||||
[ --with-devkit use DeviceKit for host device enumeration],
|
||||
|
||||
dnl udev/libpciaccess library check for alternate host device enumeration
|
||||
UDEV_CFLAGS=
|
||||
UDEV_LIBS=
|
||||
PCIACCESS_CFLAGS=
|
||||
PCIACCESS_LIBS=
|
||||
AC_ARG_WITH([udev],
|
||||
AC_HELP_STRING([--with-udev], [use libudev for host device enumeration @<:@default=check@:>@]),
|
||||
[],
|
||||
[with_devkit=no])
|
||||
[with_udev=check])
|
||||
|
||||
if test "$with_libvirtd" = "no" ; then
|
||||
with_devkit=no
|
||||
with_udev=no
|
||||
fi
|
||||
|
||||
dnl Extra check needed while devkit pkg-config info missing glib2 dependency
|
||||
PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 0.0,,[
|
||||
if test "x$with_devkit" = "xcheck"; then
|
||||
with_devkit=no
|
||||
elif test "x$with_devkit" = "xyes"; then
|
||||
AC_MSG_ERROR([required package DeviceKit requires package glib-2.0])
|
||||
fi])
|
||||
|
||||
if test "x$with_devkit" = "xyes" -o "x$with_devkit" = "xcheck"; then
|
||||
PKG_CHECK_MODULES(DEVKIT, devkit-gobject >= $DEVKIT_REQUIRED,
|
||||
[with_devkit=yes], [
|
||||
if test "x$with_devkit" = "xcheck" ; then
|
||||
with_devkit=no
|
||||
if test "x$with_udev" = "xyes" -o "x$with_udev" = "xcheck"; then
|
||||
PKG_CHECK_MODULES(UDEV, libudev >= $UDEV_REQUIRED,
|
||||
[], [
|
||||
if test "x$with_udev" = "xcheck" ; then
|
||||
with_udev=no
|
||||
else
|
||||
AC_MSG_ERROR(
|
||||
[You must install DeviceKit-devel >= $DEVKIT_REQUIRED to compile libvirt])
|
||||
[You must install libudev-devel >= $UDEV_REQUIRED to compile libvirt])
|
||||
fi
|
||||
])
|
||||
if test "x$with_devkit" = "xyes" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_DEVKIT], 1,
|
||||
[use DeviceKit for host device enumeration])
|
||||
|
||||
dnl Add glib2 flags explicitly while devkit pkg-config info missing glib2 dependency
|
||||
DEVKIT_CFLAGS="$GLIB2_CFLAGS $DEVKIT_CFLAGS"
|
||||
DEVKIT_LIBS="$GLIB2_LIBS $DEVKIT_LIBS"
|
||||
|
||||
dnl Add more flags apparently required for devkit to work properly
|
||||
DEVKIT_CFLAGS="$DEVKIT_CFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT"
|
||||
|
||||
old_CFLAGS=$CFLAGS
|
||||
old_LDFLAGS=$LDFLAGS
|
||||
CFLAGS="$CFLAGS $DEVKIT_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $DEVKIT_LIBS"
|
||||
AC_CHECK_FUNCS([devkit_client_connect],,[with_devkit=no])
|
||||
CFLAGS="$old_CFLAGS"
|
||||
LDFLAGS="$old_LDFLAGS"
|
||||
if test "x$with_udev" != "xno"; then
|
||||
PKG_CHECK_MODULES(PCIACCESS, pciaccess >= $PCIACCESS_REQUIRED,
|
||||
[with_udev=yes],
|
||||
[
|
||||
if test "x$with_udev" = "xcheck" ; then
|
||||
with_udev=no
|
||||
else
|
||||
AC_MSG_ERROR(
|
||||
[You must install libpciaccess-devel >= $PCIACCESS_REQUIRED to compile libvirt])
|
||||
fi
|
||||
])
|
||||
fi
|
||||
if test "x$with_udev" = "xyes" ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_UDEV], 1,
|
||||
[use UDEV for host device enumeration])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_DEVKIT], [test "x$with_devkit" = "xyes"])
|
||||
AC_SUBST([DEVKIT_CFLAGS])
|
||||
AC_SUBST([DEVKIT_LIBS])
|
||||
AM_CONDITIONAL([HAVE_UDEV], [test "x$with_udev" = "xyes"])
|
||||
AC_SUBST([UDEV_CFLAGS])
|
||||
AC_SUBST([UDEV_LIBS])
|
||||
AC_SUBST([PCIACCESS_CFLAGS])
|
||||
AC_SUBST([PCIACCESS_LIBS])
|
||||
|
||||
with_nodedev=no;
|
||||
if test "$with_devkit" = "yes" -o "$with_hal" = "yes";
|
||||
if test "$with_hal" = "yes" -o "$with_udev" = "yes";
|
||||
then
|
||||
with_nodedev=yes
|
||||
AC_DEFINE_UNQUOTED([WITH_NODE_DEVICES], 1, [with node device driver])
|
||||
@ -1746,17 +1817,16 @@ AM_CONDITIONAL([WITH_LINUX], [test `uname -s` = "Linux"])
|
||||
|
||||
|
||||
AC_ARG_WITH([qemu-user],
|
||||
[ --with-qemu-user username to run QEMU system instance as],
|
||||
AC_HELP_STRING([--with-qemu-user], [username to run QEMU system instance as @<:@default=root@:>@]),
|
||||
[QEMU_USER=${withval}],
|
||||
[QEMU_USER=root])
|
||||
AC_ARG_WITH([qemu-group],
|
||||
[ --with-qemu-group groupname to run QEMU system instance as],
|
||||
AC_HELP_STRING([--with-qemu-group], [groupname to run QEMU system instance as @<:@default=root@:>@]),
|
||||
[QEMU_GROUP=${withval}],
|
||||
[QEMU_GROUP=root])
|
||||
AC_DEFINE_UNQUOTED([QEMU_USER], ["$QEMU_USER"], [QEMU user account])
|
||||
AC_DEFINE_UNQUOTED([QEMU_GROUP], ["$QEMU_GROUP"], [QEMU group account])
|
||||
|
||||
|
||||
# Only COPYING.LIB is under version control, yet COPYING
|
||||
# is included as part of the distribution tarball.
|
||||
# Copy one to the other, but only if this is a srcdir-build.
|
||||
@ -1780,6 +1850,7 @@ AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
|
||||
tests/xmconfigdata/Makefile \
|
||||
tests/xencapsdata/Makefile \
|
||||
tests/confdata/Makefile \
|
||||
examples/apparmor/Makefile \
|
||||
examples/domain-events/events-c/Makefile \
|
||||
examples/domsuspend/Makefile \
|
||||
examples/dominfo/Makefile \
|
||||
@ -1851,6 +1922,11 @@ AC_MSG_NOTICE([ sasl: $SASL_CFLAGS $SASL_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ sasl: no])
|
||||
fi
|
||||
if test "$with_yajl" != "no" ; then
|
||||
AC_MSG_NOTICE([ yajl: $YAJL_CFLAGS $YAJL_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ yajl: no])
|
||||
fi
|
||||
if test "$with_avahi" = "yes" ; then
|
||||
AC_MSG_NOTICE([ avahi: $AVAHI_CFLAGS $AVAHI_LIBS])
|
||||
else
|
||||
@ -1895,10 +1971,10 @@ AC_MSG_NOTICE([ hal: $HAL_CFLAGS $HAL_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ hal: no])
|
||||
fi
|
||||
if test "$with_devkit" = "yes" ; then
|
||||
AC_MSG_NOTICE([ devkit: $DEVKIT_CFLAGS $DEVKIT_LIBS])
|
||||
if test "$with_udev" = "yes" ; then
|
||||
AC_MSG_NOTICE([ udev: $UDEV_CFLAGS $UDEV_LIBS $PCIACCESS_CFLAGS $PCIACCESS_LIBS])
|
||||
else
|
||||
AC_MSG_NOTICE([ devkit: no])
|
||||
AC_MSG_NOTICE([ udev: no])
|
||||
fi
|
||||
if test "$with_netcf" = "yes" ; then
|
||||
AC_MSG_NOTICE([ netcf: $NETCF_CFLAGS $NETCF_LIBS])
|
@ -110,6 +110,10 @@ endif
|
||||
if WITH_NODE_DEVICES
|
||||
libvirtd_LDADD += ../src/libvirt_driver_nodedev.la
|
||||
endif
|
||||
|
||||
if WITH_SECRETS
|
||||
libvirtd_LDADD += ../src/libvirt_driver_secret.la
|
||||
endif
|
||||
endif
|
||||
|
||||
libvirtd_LDADD += ../src/libvirt.la
|
||||
@ -188,7 +192,7 @@ install-logrotate: libvirtd.logrotate
|
||||
mkdir -p $(DESTDIR)$(sysconfdir)/logrotate.d/
|
||||
$(INSTALL_DATA) $< $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd
|
||||
|
||||
if LIBVIRT_INIT_SCRIPTS_RED_HAT
|
||||
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
install-init: libvirtd.init
|
||||
mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
||||
$(INSTALL_SCRIPT) libvirtd.init \
|
||||
@ -222,7 +226,7 @@ install-init:
|
||||
uninstall-init:
|
||||
libvirtd.init:
|
||||
|
||||
endif # DBUS_INIT_SCRIPTS_RED_HAT
|
||||
endif # LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
|
||||
# This must be added last, since functions it provides/replaces
|
||||
# are used by nearly every other library.
|
||||
|
@ -1,9 +1,29 @@
|
||||
|
||||
Threading: the RULES.
|
||||
====================
|
||||
Threading in the libvirtd daemon
|
||||
================================
|
||||
|
||||
If you don't understand this, don't touch the code. Ask for
|
||||
further advice / explanation on the mailing list first.
|
||||
To allow efficient processing of RPC requests, the libvirtd daemon
|
||||
makes use of threads.
|
||||
|
||||
- The process leader. This is the initial thread of control
|
||||
when the daemon starts running. It is responsible for
|
||||
initializing all the state, and starting the event loop.
|
||||
Once that's all done, this thread does nothing except
|
||||
wait for the event loop to quit, thus indicating an orderly
|
||||
shutdown is required.
|
||||
|
||||
- The event loop. This thread runs the event loop, sitting
|
||||
in poll() on all monitored file handles, and calculating
|
||||
and dispatching any timers that may be registered. When
|
||||
this thread quits, the entire daemon will shutdown.
|
||||
|
||||
- The workers. These 'n' threads all sit around waiting to
|
||||
process incoming RPC requests. Since RPC requests may take
|
||||
a long time to complete, with long idle periods, there will
|
||||
be quite a few workers running.
|
||||
|
||||
The use of threads obviously requires locking to ensure safety when
|
||||
accessing/changing data structures.
|
||||
|
||||
- the top level lock is on 'struct qemud_server'. This must be
|
||||
held before acquiring any other lock
|
||||
@ -16,47 +36,17 @@ further advice / explanation on the mailing list first.
|
||||
this as a caller of virEvent APIs.
|
||||
|
||||
|
||||
The server lock is only needed / used once the daemon has entered
|
||||
its main loop, which is the qemudRunLoop() . The initial thread
|
||||
acquires the lock upon entering this method.
|
||||
The server lock is used in conjunction with a condition variable
|
||||
to pass jobs from the event loop thread to the workers. The main
|
||||
event loop thread handles I/O from the client socket, and once a
|
||||
complete RPC message has been read off the wire (and optionally
|
||||
decrypted), it will be placed onto the 'dx' job queue for the
|
||||
associated client object. The job condition will be signalled and
|
||||
a worker will wakup and process it.
|
||||
|
||||
It immediatelty spawns 'n' worker threads, whose main loop is
|
||||
the qemudWorker() method. The workers will immediately try to
|
||||
acquire the server lock, and thus block since its held by the
|
||||
initial thread.
|
||||
The worker thread must quickly drop its locks on the server and
|
||||
client to allow the main event loop thread to continue running
|
||||
with its other work. Critically important, is that now libvirt
|
||||
API call will ever be made with the server or client locks held.
|
||||
|
||||
When the initial thread enters the poll() call, it drops the
|
||||
server lock. The worker locks now each wakeup, acquire the
|
||||
server lock and go into a condition wait on the 'job' condition
|
||||
variable. The workers are now all 'primed' for incoming RPC
|
||||
calls.
|
||||
|
||||
|
||||
|
||||
A file descriptor event now occurrs, causing the initial thread
|
||||
to exit poll(). It invokes the registered callback associated
|
||||
with the file descriptors on which the event occurrs. The callbacks
|
||||
are required to immediately acquire the server lock.
|
||||
|
||||
If the callback is dealing with a client event, it will then
|
||||
acquire the client lock, and drop the server lock.
|
||||
|
||||
The callback will now handle the I/O event, reading or writing
|
||||
a RPC message. Once a complete RPC message has been read the
|
||||
client is marked as being in state QEMUD_MODE_WAIT_DISPATCH,
|
||||
and the 'job' condition variable is signaled. The callback
|
||||
now drops the client lock and goes back into the poll() loop
|
||||
waiting for more I/O events.
|
||||
|
||||
Meanwhile one of the worker threads wakes up from its condition
|
||||
variable sleep, holding the server lock. It now searches for a
|
||||
client in state QEMUD_MODE_WAIT_DISPATCH. If it doesn't find
|
||||
one, it goes back to sleep. If it does find one, then it calls
|
||||
into the remoteDispatchClientRequest() method de-serialize the
|
||||
incoming message into an XDR object and invoke the helper method
|
||||
for the associated RPC call.
|
||||
|
||||
While the helper method is executing, no locks are held on either
|
||||
the client or server, but the ref count on the 'struct qemud_client'
|
||||
object is incremented to ensure its not deleted. The helper can
|
||||
now safely invoke the necessary libvirt API call.
|
||||
-- End
|
||||
|
@ -413,7 +413,12 @@ static int virEventDispatchTimeouts(void) {
|
||||
if (eventLoop.timeouts[i].deleted || eventLoop.timeouts[i].frequency < 0)
|
||||
continue;
|
||||
|
||||
if (eventLoop.timeouts[i].expiresAt <= now) {
|
||||
/* Add 20ms fuzz so we don't pointlessly spin doing
|
||||
* <10ms sleeps, particularly on kernels with low HZ
|
||||
* it is fine that a timer expires 20ms earlier than
|
||||
* requested
|
||||
*/
|
||||
if (eventLoop.timeouts[i].expiresAt <= (now+20)) {
|
||||
virEventTimeoutCallback cb = eventLoop.timeouts[i].cb;
|
||||
int timer = eventLoop.timeouts[i].timer;
|
||||
void *opaque = eventLoop.timeouts[i].opaque;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* libvirtd.c: daemon start of day, guest process & i/o management
|
||||
*
|
||||
* Copyright (C) 2006, 2007, 2008, 2009 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2010 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@ -93,8 +93,10 @@
|
||||
#ifdef WITH_NODE_DEVICES
|
||||
#include "node_device/node_device_driver.h"
|
||||
#endif
|
||||
#ifdef WITH_SECRETS
|
||||
#include "secret/secret_driver.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __sun
|
||||
@ -185,6 +187,30 @@ static int max_client_requests = 5;
|
||||
static sig_atomic_t sig_errors = 0;
|
||||
static int sig_lasterrno = 0;
|
||||
|
||||
enum {
|
||||
VIR_DAEMON_ERR_NONE = 0,
|
||||
VIR_DAEMON_ERR_PIDFILE,
|
||||
VIR_DAEMON_ERR_RUNDIR,
|
||||
VIR_DAEMON_ERR_INIT,
|
||||
VIR_DAEMON_ERR_SIGNAL,
|
||||
VIR_DAEMON_ERR_PRIVS,
|
||||
VIR_DAEMON_ERR_NETWORK,
|
||||
VIR_DAEMON_ERR_CONFIG,
|
||||
|
||||
VIR_DAEMON_ERR_LAST
|
||||
};
|
||||
|
||||
VIR_ENUM_DECL(virDaemonErr)
|
||||
VIR_ENUM_IMPL(virDaemonErr, VIR_DAEMON_ERR_LAST,
|
||||
"Initialization successful",
|
||||
"Unable to obtain pidfile",
|
||||
"Unable to create rundir",
|
||||
"Unable to initialize libvirt",
|
||||
"Unable to setup signal handlers",
|
||||
"Unable to drop privileges",
|
||||
"Unable to initialize network sockets",
|
||||
"Unable to load configuration file")
|
||||
|
||||
static void sig_handler(int sig, siginfo_t * siginfo,
|
||||
void* context ATTRIBUTE_UNUSED) {
|
||||
int origerrno;
|
||||
@ -335,7 +361,6 @@ qemudDispatchSignalEvent(int watch ATTRIBUTE_UNUSED,
|
||||
void *opaque) {
|
||||
struct qemud_server *server = (struct qemud_server *)opaque;
|
||||
siginfo_t siginfo;
|
||||
int ret;
|
||||
|
||||
virMutexLock(&server->lock);
|
||||
|
||||
@ -347,8 +372,6 @@ qemudDispatchSignalEvent(int watch ATTRIBUTE_UNUSED,
|
||||
return;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
||||
switch (siginfo.si_signo) {
|
||||
case SIGHUP:
|
||||
VIR_INFO0(_("Reloading configuration on SIGHUP"));
|
||||
@ -360,7 +383,7 @@ qemudDispatchSignalEvent(int watch ATTRIBUTE_UNUSED,
|
||||
case SIGQUIT:
|
||||
case SIGTERM:
|
||||
VIR_WARN(_("Shutting down on signal %d"), siginfo.si_signo);
|
||||
server->shutdown = 1;
|
||||
server->quitEventThread = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -368,14 +391,15 @@ qemudDispatchSignalEvent(int watch ATTRIBUTE_UNUSED,
|
||||
break;
|
||||
}
|
||||
|
||||
if (ret != 0)
|
||||
server->shutdown = 1;
|
||||
|
||||
virMutexUnlock(&server->lock);
|
||||
}
|
||||
|
||||
|
||||
static int qemudGoDaemon(void) {
|
||||
static int daemonForkIntoBackground(void) {
|
||||
int statuspipe[2];
|
||||
if (pipe(statuspipe) < 0)
|
||||
return -1;
|
||||
|
||||
int pid = fork();
|
||||
switch (pid) {
|
||||
case 0:
|
||||
@ -384,6 +408,8 @@ static int qemudGoDaemon(void) {
|
||||
int stdoutfd = -1;
|
||||
int nextpid;
|
||||
|
||||
close(statuspipe[0]);
|
||||
|
||||
if ((stdinfd = open("/dev/null", O_RDONLY)) < 0)
|
||||
goto cleanup;
|
||||
if ((stdoutfd = open("/dev/null", O_WRONLY)) < 0)
|
||||
@ -407,7 +433,7 @@ static int qemudGoDaemon(void) {
|
||||
nextpid = fork();
|
||||
switch (nextpid) {
|
||||
case 0:
|
||||
return 0;
|
||||
return statuspipe[1];
|
||||
case -1:
|
||||
return -1;
|
||||
default:
|
||||
@ -428,15 +454,29 @@ static int qemudGoDaemon(void) {
|
||||
|
||||
default:
|
||||
{
|
||||
int got, status = 0;
|
||||
/* We wait to make sure the next child forked
|
||||
successfully */
|
||||
if ((got = waitpid(pid, &status, 0)) < 0 ||
|
||||
int got, exitstatus = 0;
|
||||
int ret;
|
||||
char status;
|
||||
|
||||
close(statuspipe[1]);
|
||||
|
||||
/* We wait to make sure the first child forked successfully */
|
||||
if ((got = waitpid(pid, &exitstatus, 0)) < 0 ||
|
||||
got != pid ||
|
||||
status != 0) {
|
||||
exitstatus != 0) {
|
||||
return -1;
|
||||
}
|
||||
_exit(0);
|
||||
|
||||
/* Now block until the second child initializes successfully */
|
||||
again:
|
||||
ret = read(statuspipe[0], &status, 1);
|
||||
if (ret == -1 && errno == EINTR)
|
||||
goto again;
|
||||
|
||||
if (ret == 1 && status != 0) {
|
||||
fprintf(stderr, "error: %s\n", virDaemonErrTypeToString(status));
|
||||
}
|
||||
_exit(ret == 1 && status == 0 ? 0 : 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -535,16 +575,6 @@ static int qemudListenUnix(struct qemud_server *server,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((sock->watch = virEventAddHandleImpl(sock->fd,
|
||||
VIR_EVENT_HANDLE_READABLE |
|
||||
VIR_EVENT_HANDLE_ERROR |
|
||||
VIR_EVENT_HANDLE_HANGUP,
|
||||
qemudDispatchServerEvent,
|
||||
server, NULL)) < 0) {
|
||||
VIR_ERROR0(_("Failed to add server event callback"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
sock->next = server->sockets;
|
||||
server->sockets = sock;
|
||||
server->nsockets++;
|
||||
@ -552,9 +582,9 @@ static int qemudListenUnix(struct qemud_server *server,
|
||||
return 0;
|
||||
|
||||
cleanup:
|
||||
if (sock->fd)
|
||||
if (sock->fd >= 0)
|
||||
close(sock->fd);
|
||||
free(sock);
|
||||
VIR_FREE(sock);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -570,7 +600,7 @@ remoteMakeSockets (int *fds, int max_fds, int *nfds_r, const char *node, const c
|
||||
|
||||
int e = getaddrinfo (node, service, &hints, &ai);
|
||||
if (e != 0) {
|
||||
VIR_ERROR(_("getaddrinfo: %s\n"), gai_strerror (e));
|
||||
VIR_ERROR(_("getaddrinfo: %s"), gai_strerror (e));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -587,19 +617,28 @@ remoteMakeSockets (int *fds, int max_fds, int *nfds_r, const char *node, const c
|
||||
int opt = 1;
|
||||
setsockopt (fds[*nfds_r], SOL_SOCKET, SO_REUSEADDR, &opt, sizeof opt);
|
||||
|
||||
#ifdef IPV6_V6ONLY
|
||||
if (runp->ai_family == PF_INET6) {
|
||||
int on = 1;
|
||||
/*
|
||||
* Normally on Linux an INET6 socket will bind to the INET4
|
||||
* address too. If getaddrinfo returns results with INET4
|
||||
* first though, this will result in INET6 binding failing.
|
||||
* We can trivially cope with multiple server sockets, so
|
||||
* we force it to only listen on IPv6
|
||||
*/
|
||||
setsockopt(fds[*nfds_r], IPPROTO_IPV6,IPV6_V6ONLY,
|
||||
(void*)&on, sizeof on);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bind (fds[*nfds_r], runp->ai_addr, runp->ai_addrlen) == -1) {
|
||||
if (errno != EADDRINUSE) {
|
||||
VIR_ERROR(_("bind: %s"), virStrerror (errno, ebuf, sizeof ebuf));
|
||||
return -1;
|
||||
}
|
||||
close (fds[*nfds_r]);
|
||||
}
|
||||
else {
|
||||
if (listen (fds[*nfds_r], SOMAXCONN) == -1) {
|
||||
VIR_ERROR(_("listen: %s"),
|
||||
virStrerror (errno, ebuf, sizeof ebuf));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
++*nfds_r;
|
||||
}
|
||||
runp = runp->ai_next;
|
||||
@ -675,17 +714,6 @@ remoteListenTCP (struct qemud_server *server,
|
||||
virStrerror (errno, ebuf, sizeof ebuf));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((sock->watch = virEventAddHandleImpl(sock->fd,
|
||||
VIR_EVENT_HANDLE_READABLE |
|
||||
VIR_EVENT_HANDLE_ERROR |
|
||||
VIR_EVENT_HANDLE_HANGUP,
|
||||
qemudDispatchServerEvent,
|
||||
server, NULL)) < 0) {
|
||||
VIR_ERROR0(_("Failed to add server event callback"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -706,9 +734,15 @@ static int qemudInitPaths(struct qemud_server *server,
|
||||
int ret = -1;
|
||||
char *sock_dir_prefix = NULL;
|
||||
|
||||
if (unix_sock_dir)
|
||||
if (unix_sock_dir) {
|
||||
sock_dir = unix_sock_dir;
|
||||
else {
|
||||
/* Change the group ownership of /var/run/libvirt to unix_sock_gid */
|
||||
if (server->privileged) {
|
||||
if (chown(unix_sock_dir, -1, unix_sock_gid) < 0)
|
||||
VIR_ERROR(_("Failed to change group ownership of %s"),
|
||||
unix_sock_dir);
|
||||
}
|
||||
} else {
|
||||
sock_dir = sockname;
|
||||
if (server->privileged) {
|
||||
dir_prefix = strdup (LOCAL_STATE_DIR);
|
||||
@ -752,13 +786,16 @@ static int qemudInitPaths(struct qemud_server *server,
|
||||
goto snprintf_error;
|
||||
}
|
||||
|
||||
if (server->privileged)
|
||||
server->logDir = strdup (LOCAL_STATE_DIR "/log/libvirt");
|
||||
else
|
||||
virAsprintf(&server->logDir, "%s/.libvirt/log", dir_prefix);
|
||||
if (server->privileged) {
|
||||
if (!(server->logDir = strdup (LOCAL_STATE_DIR "/log/libvirt")))
|
||||
virReportOOMError(NULL);
|
||||
} else {
|
||||
if (virAsprintf(&server->logDir, "%s/.libvirt/log", dir_prefix) < 0)
|
||||
virReportOOMError(NULL);
|
||||
}
|
||||
|
||||
if (server->logDir == NULL)
|
||||
virReportOOMError(NULL);
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
|
||||
@ -768,12 +805,18 @@ static int qemudInitPaths(struct qemud_server *server,
|
||||
_("Resulting path too long for buffer in qemudInitPaths()"));
|
||||
|
||||
cleanup:
|
||||
free (dir_prefix);
|
||||
free (sock_dir_prefix);
|
||||
VIR_FREE(dir_prefix);
|
||||
VIR_FREE(sock_dir_prefix);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct qemud_server *qemudInitialize(int sigread) {
|
||||
static void virshErrorHandler(void *opaque ATTRIBUTE_UNUSED, virErrorPtr err ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* Don't do anything, since logging infrastructure already
|
||||
* took care of reporting the error */
|
||||
}
|
||||
|
||||
static struct qemud_server *qemudInitialize(void) {
|
||||
struct qemud_server *server;
|
||||
|
||||
if (VIR_ALLOC(server) < 0) {
|
||||
@ -781,26 +824,29 @@ static struct qemud_server *qemudInitialize(int sigread) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
server->privileged = geteuid() == 0 ? 1 : 0;
|
||||
server->sigread = server->sigwrite = -1;
|
||||
|
||||
if (virMutexInit(&server->lock) < 0) {
|
||||
VIR_ERROR("%s", _("cannot initialize mutex"));
|
||||
VIR_FREE(server);
|
||||
return NULL;
|
||||
}
|
||||
if (virCondInit(&server->job) < 0) {
|
||||
VIR_ERROR("%s", _("cannot initialize condition variable"));
|
||||
virMutexDestroy(&server->lock);
|
||||
VIR_FREE(server);
|
||||
}
|
||||
|
||||
server->privileged = geteuid() == 0 ? 1 : 0;
|
||||
server->sigread = sigread;
|
||||
|
||||
if (virEventInit() < 0) {
|
||||
VIR_ERROR0(_("Failed to initialize event system"));
|
||||
VIR_FREE(server);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virInitialize();
|
||||
if (virEventInit() < 0) {
|
||||
VIR_ERROR0(_("Failed to initialize event system"));
|
||||
virMutexDestroy(&server->lock);
|
||||
if (virCondDestroy(&server->job) < 0)
|
||||
{}
|
||||
VIR_FREE(server);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Note that the order is important: the first ones have a higher
|
||||
@ -812,7 +858,7 @@ static struct qemud_server *qemudInitialize(int sigread) {
|
||||
#ifdef WITH_DRIVER_MODULES
|
||||
/* We don't care if any of these fail, because the whole point
|
||||
* is to allow users to only install modules they want to use.
|
||||
* If they try to use a open a connection for a module that
|
||||
* If they try to open a connection for a module that
|
||||
* is not loaded they'll get a suitable error at that point
|
||||
*/
|
||||
virDriverLoadModule("network");
|
||||
@ -833,11 +879,12 @@ static struct qemud_server *qemudInitialize(int sigread) {
|
||||
#ifdef WITH_STORAGE_DIR
|
||||
storageRegister();
|
||||
#endif
|
||||
#if defined(WITH_NODE_DEVICES) && \
|
||||
(defined(HAVE_HAL) || defined(HAVE_DEVKIT))
|
||||
#if defined(WITH_NODE_DEVICES)
|
||||
nodedevRegister();
|
||||
#endif
|
||||
#ifdef WITH_SECRETS
|
||||
secretRegister();
|
||||
#endif
|
||||
#ifdef WITH_QEMU
|
||||
qemuRegister();
|
||||
#endif
|
||||
@ -859,13 +906,10 @@ static struct qemud_server *qemudInitialize(int sigread) {
|
||||
virEventUpdateTimeoutImpl,
|
||||
virEventRemoveTimeoutImpl);
|
||||
|
||||
virStateInitialize(server->privileged);
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
static struct qemud_server *qemudNetworkInit(struct qemud_server *server) {
|
||||
struct qemud_socket *sock;
|
||||
static int qemudNetworkInit(struct qemud_server *server) {
|
||||
char sockname[PATH_MAX];
|
||||
char roSockname[PATH_MAX];
|
||||
#if HAVE_SASL
|
||||
@ -932,20 +976,24 @@ static struct qemud_server *qemudNetworkInit(struct qemud_server *server) {
|
||||
#ifdef HAVE_AVAHI
|
||||
if (server->privileged && mdns_adv) {
|
||||
struct libvirtd_mdns_group *group;
|
||||
struct qemud_socket *sock;
|
||||
int port = 0;
|
||||
|
||||
server->mdns = libvirtd_mdns_new();
|
||||
|
||||
if (!mdns_name) {
|
||||
char groupname[64], localhost[HOST_NAME_MAX+1], *tmp;
|
||||
char groupname[64], *localhost, *tmp;
|
||||
/* Extract the host part of the potentially FQDN */
|
||||
gethostname(localhost, HOST_NAME_MAX);
|
||||
localhost[HOST_NAME_MAX] = '\0';
|
||||
localhost = virGetHostname(NULL);
|
||||
if (localhost == NULL)
|
||||
goto cleanup;
|
||||
|
||||
if ((tmp = strchr(localhost, '.')))
|
||||
*tmp = '\0';
|
||||
snprintf(groupname, sizeof(groupname)-1, "Virtualization Host %s", localhost);
|
||||
groupname[sizeof(groupname)-1] = '\0';
|
||||
group = libvirtd_mdns_add_group(server->mdns, groupname);
|
||||
VIR_FREE(localhost);
|
||||
} else {
|
||||
group = libvirtd_mdns_add_group(server->mdns, mdns_name);
|
||||
}
|
||||
@ -973,23 +1021,30 @@ static struct qemud_server *qemudNetworkInit(struct qemud_server *server) {
|
||||
}
|
||||
#endif
|
||||
|
||||
return server;
|
||||
return 0;
|
||||
|
||||
cleanup:
|
||||
if (server) {
|
||||
sock = server->sockets;
|
||||
while (sock) {
|
||||
close(sock->fd);
|
||||
sock = sock->next;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int qemudNetworkEnable(struct qemud_server *server) {
|
||||
struct qemud_socket *sock;
|
||||
|
||||
sock = server->sockets;
|
||||
while (sock) {
|
||||
if ((sock->watch = virEventAddHandleImpl(sock->fd,
|
||||
VIR_EVENT_HANDLE_READABLE |
|
||||
VIR_EVENT_HANDLE_ERROR |
|
||||
VIR_EVENT_HANDLE_HANGUP,
|
||||
qemudDispatchServerEvent,
|
||||
server, NULL)) < 0) {
|
||||
VIR_ERROR0(_("Failed to add server event callback"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if HAVE_POLKIT0
|
||||
if (server->sysbus)
|
||||
dbus_connection_unref(server->sysbus);
|
||||
#endif
|
||||
free(server);
|
||||
sock = sock->next;
|
||||
}
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static gnutls_session_t
|
||||
@ -1371,7 +1426,8 @@ static int qemudDispatchServer(struct qemud_server *server, struct qemud_socket
|
||||
if (client &&
|
||||
client->tlssession) gnutls_deinit (client->tlssession);
|
||||
close (fd);
|
||||
VIR_FREE(client->rx);
|
||||
if (client)
|
||||
VIR_FREE(client->rx);
|
||||
VIR_FREE(client);
|
||||
return -1;
|
||||
}
|
||||
@ -1391,7 +1447,7 @@ void qemudDispatchClientFailure(struct qemud_client *client) {
|
||||
}
|
||||
|
||||
/* Deregister event delivery callback */
|
||||
if(client->conn) {
|
||||
if (client->conn && client->domain_events_registered) {
|
||||
DEBUG0("Deregistering to relay remote events");
|
||||
virConnectDomainEventDeregister(client->conn, remoteRelayDomainEvent);
|
||||
}
|
||||
@ -1401,8 +1457,7 @@ void qemudDispatchClientFailure(struct qemud_client *client) {
|
||||
sasl_dispose(&client->saslconn);
|
||||
client->saslconn = NULL;
|
||||
}
|
||||
free(client->saslUsername);
|
||||
client->saslUsername = NULL;
|
||||
VIR_FREE(client->saslUsername);
|
||||
#endif
|
||||
if (client->tlssession) {
|
||||
gnutls_deinit (client->tlssession);
|
||||
@ -2136,7 +2191,7 @@ static void qemudInactiveTimer(int timerid, void *data) {
|
||||
virEventUpdateTimeoutImpl(timerid, -1);
|
||||
} else {
|
||||
DEBUG0("Timer expired and inactive, shutting down");
|
||||
server->shutdown = 1;
|
||||
server->quitEventThread = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2166,9 +2221,10 @@ static void qemudFreeClient(struct qemud_client *client) {
|
||||
VIR_FREE(client);
|
||||
}
|
||||
|
||||
static int qemudRunLoop(struct qemud_server *server) {
|
||||
static void *qemudRunLoop(void *opaque) {
|
||||
struct qemud_server *server = opaque;
|
||||
int timerid = -1;
|
||||
int ret = -1, i;
|
||||
int i;
|
||||
int timerActive = 0;
|
||||
|
||||
virMutexLock(&server->lock);
|
||||
@ -2178,7 +2234,7 @@ static int qemudRunLoop(struct qemud_server *server) {
|
||||
qemudInactiveTimer,
|
||||
server, NULL)) < 0) {
|
||||
VIR_ERROR0(_("Failed to register shutdown timeout"));
|
||||
return -1;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (min_workers > max_workers)
|
||||
@ -2187,7 +2243,7 @@ static int qemudRunLoop(struct qemud_server *server) {
|
||||
server->nworkers = max_workers;
|
||||
if (VIR_ALLOC_N(server->workers, server->nworkers) < 0) {
|
||||
VIR_ERROR0(_("Failed to allocate workers"));
|
||||
return -1;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < min_workers ; i++) {
|
||||
@ -2196,7 +2252,7 @@ static int qemudRunLoop(struct qemud_server *server) {
|
||||
server->nactiveworkers++;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
for (;!server->quitEventThread;) {
|
||||
/* A shutdown timeout is specified, so check
|
||||
* if any drivers have active state, if not
|
||||
* shutdown after timeout seconds
|
||||
@ -2268,11 +2324,6 @@ static int qemudRunLoop(struct qemud_server *server) {
|
||||
server->nactiveworkers--;
|
||||
}
|
||||
}
|
||||
|
||||
if (server->shutdown) {
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
@ -2291,34 +2342,63 @@ cleanup:
|
||||
VIR_FREE(server->workers);
|
||||
|
||||
virMutexUnlock(&server->lock);
|
||||
return ret;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static int qemudStartEventLoop(struct qemud_server *server) {
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
/* We want to join the eventloop, so don't detach it */
|
||||
/*pthread_attr_setdetachstate(&attr, 1);*/
|
||||
|
||||
if (pthread_create(&server->eventThread,
|
||||
&attr,
|
||||
qemudRunLoop,
|
||||
server) != 0)
|
||||
return -1;
|
||||
|
||||
server->hasEventThread = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void qemudCleanup(struct qemud_server *server) {
|
||||
struct qemud_socket *sock;
|
||||
|
||||
close(server->sigread);
|
||||
if (server->sigread != -1)
|
||||
close(server->sigread);
|
||||
if (server->sigwrite != -1)
|
||||
close(server->sigwrite);
|
||||
|
||||
sock = server->sockets;
|
||||
while (sock) {
|
||||
struct qemud_socket *next = sock->next;
|
||||
if (sock->watch)
|
||||
virEventRemoveHandleImpl(sock->watch);
|
||||
close(sock->fd);
|
||||
free(sock);
|
||||
VIR_FREE(sock);
|
||||
sock = next;
|
||||
}
|
||||
free(server->logDir);
|
||||
VIR_FREE(server->logDir);
|
||||
|
||||
#ifdef HAVE_SASL
|
||||
if (server->saslUsernameWhitelist) {
|
||||
char **list = server->saslUsernameWhitelist;
|
||||
while (*list) {
|
||||
free(*list);
|
||||
VIR_FREE(*list);
|
||||
list++;
|
||||
}
|
||||
free(server->saslUsernameWhitelist);
|
||||
VIR_FREE(server->saslUsernameWhitelist);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_POLKIT0
|
||||
if (server->sysbus)
|
||||
dbus_connection_unref(server->sysbus);
|
||||
#endif
|
||||
|
||||
virStateCleanup();
|
||||
|
||||
if (virCondDestroy(&server->job) < 0) {
|
||||
@ -2431,7 +2511,7 @@ checkType (virConfValuePtr p, const char *filename,
|
||||
(var_name) = strdup (p->str); \
|
||||
if ((var_name) == NULL) { \
|
||||
char ebuf[1024]; \
|
||||
VIR_ERROR(_("remoteReadConfigFile: %s\n"), \
|
||||
VIR_ERROR(_("remoteReadConfigFile: %s"), \
|
||||
virStrerror(errno, ebuf, sizeof ebuf)); \
|
||||
goto free_and_fail; \
|
||||
} \
|
||||
@ -2474,7 +2554,7 @@ static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, cons
|
||||
*auth = REMOTE_AUTH_POLKIT;
|
||||
#endif
|
||||
} else {
|
||||
VIR_ERROR(_("remoteReadConfigFile: %s: %s: unsupported auth %s\n"),
|
||||
VIR_ERROR(_("remoteReadConfigFile: %s: %s: unsupported auth %s"),
|
||||
filename, key, p->str);
|
||||
return -1;
|
||||
}
|
||||
@ -2509,8 +2589,9 @@ remoteReadSaslAllowedUsernameList (virConfPtr conf ATTRIBUTE_UNUSED,
|
||||
* debugging is asked for then output informations or debug.
|
||||
*/
|
||||
static int
|
||||
qemudSetLogging(virConfPtr conf, const char *filename) {
|
||||
int log_level;
|
||||
qemudSetLogging(virConfPtr conf, const char *filename)
|
||||
{
|
||||
int log_level = 0;
|
||||
char *log_filters = NULL;
|
||||
char *log_outputs = NULL;
|
||||
int ret = -1;
|
||||
@ -2531,12 +2612,6 @@ qemudSetLogging(virConfPtr conf, const char *filename) {
|
||||
* level has been set, we must process variables in the opposite
|
||||
* order, each one overriding the previous.
|
||||
*/
|
||||
/*
|
||||
* GET_CONF_INT returns 0 when there is no log_level setting in
|
||||
* the config file. The conditional below eliminates a false
|
||||
* warning in that case, but also has the side effect of missing
|
||||
* a warning if the user actually does say log_level=0.
|
||||
*/
|
||||
GET_CONF_INT (conf, filename, log_level);
|
||||
if (log_level != 0)
|
||||
virLogSetDefaultPriority(log_level);
|
||||
@ -2672,10 +2747,9 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
|
||||
goto free_and_fail;
|
||||
}
|
||||
unix_sock_gid = grp->gr_gid;
|
||||
VIR_FREE (buf);
|
||||
VIR_FREE(buf);
|
||||
}
|
||||
free (unix_sock_group);
|
||||
unix_sock_group = NULL;
|
||||
VIR_FREE(unix_sock_group);
|
||||
}
|
||||
|
||||
GET_CONF_STR (conf, filename, unix_sock_ro_perms);
|
||||
@ -2684,8 +2758,7 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
|
||||
VIR_ERROR(_("Failed to parse mode '%s'"), unix_sock_ro_perms);
|
||||
goto free_and_fail;
|
||||
}
|
||||
free (unix_sock_ro_perms);
|
||||
unix_sock_ro_perms = NULL;
|
||||
VIR_FREE(unix_sock_ro_perms);
|
||||
}
|
||||
|
||||
GET_CONF_STR (conf, filename, unix_sock_rw_perms);
|
||||
@ -2694,8 +2767,7 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
|
||||
VIR_ERROR(_("Failed to parse mode '%s'"), unix_sock_rw_perms);
|
||||
goto free_and_fail;
|
||||
}
|
||||
free (unix_sock_rw_perms);
|
||||
unix_sock_rw_perms = NULL;
|
||||
VIR_FREE(unix_sock_rw_perms);
|
||||
}
|
||||
|
||||
GET_CONF_STR (conf, filename, unix_sock_dir);
|
||||
@ -2730,12 +2802,11 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
|
||||
|
||||
free_and_fail:
|
||||
virConfFree (conf);
|
||||
free (mdns_name);
|
||||
mdns_name = NULL;
|
||||
free (unix_sock_ro_perms);
|
||||
free (unix_sock_rw_perms);
|
||||
free (unix_sock_group);
|
||||
VIR_FREE (buf);
|
||||
VIR_FREE(mdns_name);
|
||||
VIR_FREE(unix_sock_ro_perms);
|
||||
VIR_FREE(unix_sock_rw_perms);
|
||||
VIR_FREE(unix_sock_group);
|
||||
VIR_FREE(buf);
|
||||
|
||||
/* Don't bother trying to free listen_addr, tcp_port, tls_port, key_file,
|
||||
cert_file, ca_file, or crl_file, since they are initialized to
|
||||
@ -2746,9 +2817,8 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
|
||||
if (tls_allowed_dn_list) {
|
||||
int i;
|
||||
for (i = 0; tls_allowed_dn_list[i]; i++)
|
||||
free (tls_allowed_dn_list[i]);
|
||||
free (tls_allowed_dn_list);
|
||||
tls_allowed_dn_list = NULL;
|
||||
VIR_FREE(tls_allowed_dn_list[i]);
|
||||
VIR_FREE(tls_allowed_dn_list);
|
||||
}
|
||||
|
||||
return -1;
|
||||
@ -2769,13 +2839,13 @@ qemudSetupPrivs (void)
|
||||
|
||||
if (__init_daemon_priv (PU_RESETGROUPS | PU_CLEARLIMITSET,
|
||||
SYSTEM_UID, SYSTEM_UID, PRIV_XVM_CONTROL, NULL)) {
|
||||
VIR_ERROR0(_("additional privileges are required\n"));
|
||||
VIR_ERROR0(_("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)) {
|
||||
VIR_ERROR0(_("failed to set reduced privileges\n"));
|
||||
VIR_ERROR0(_("failed to set reduced privileges"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -2785,6 +2855,67 @@ qemudSetupPrivs (void)
|
||||
#define qemudSetupPrivs() 0
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Doing anything non-trivial in signal handlers is pretty dangerous,
|
||||
* since there are very few async-signal safe POSIX funtions. To
|
||||
* deal with this we setup a very simple signal handler. It simply
|
||||
* writes the signal number to a pipe. The main event loop then sees
|
||||
* the signal on the pipe and can safely do the processing from
|
||||
* event loop context
|
||||
*/
|
||||
static int
|
||||
daemonSetupSignals(struct qemud_server *server)
|
||||
{
|
||||
struct sigaction sig_action;
|
||||
int sigpipe[2];
|
||||
|
||||
if (pipe(sigpipe) < 0)
|
||||
return -1;
|
||||
|
||||
if (virSetNonBlock(sigpipe[0]) < 0 ||
|
||||
virSetNonBlock(sigpipe[1]) < 0 ||
|
||||
virSetCloseExec(sigpipe[0]) < 0 ||
|
||||
virSetCloseExec(sigpipe[1]) < 0) {
|
||||
char ebuf[1024];
|
||||
VIR_ERROR(_("Failed to create pipe: %s"),
|
||||
virStrerror(errno, ebuf, sizeof ebuf));
|
||||
goto error;
|
||||
}
|
||||
|
||||
sig_action.sa_sigaction = sig_handler;
|
||||
sig_action.sa_flags = SA_SIGINFO;
|
||||
sigemptyset(&sig_action.sa_mask);
|
||||
|
||||
sigaction(SIGHUP, &sig_action, NULL);
|
||||
sigaction(SIGINT, &sig_action, NULL);
|
||||
sigaction(SIGQUIT, &sig_action, NULL);
|
||||
sigaction(SIGTERM, &sig_action, NULL);
|
||||
sigaction(SIGCHLD, &sig_action, NULL);
|
||||
|
||||
sig_action.sa_handler = SIG_IGN;
|
||||
sigaction(SIGPIPE, &sig_action, NULL);
|
||||
|
||||
if (virEventAddHandleImpl(sigpipe[0],
|
||||
VIR_EVENT_HANDLE_READABLE,
|
||||
qemudDispatchSignalEvent,
|
||||
server, NULL) < 0) {
|
||||
VIR_ERROR0(_("Failed to register callback for signal pipe"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
server->sigread = sigpipe[0];
|
||||
server->sigwrite = sigpipe[1];
|
||||
sigwrite = sigpipe[1];
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
close(sigpipe[0]);
|
||||
close(sigpipe[1]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Print command-line usage. */
|
||||
static void
|
||||
usage (const char *argv0)
|
||||
@ -2807,7 +2938,7 @@ libvirt management daemon:\n\
|
||||
\n\
|
||||
Default paths:\n\
|
||||
\n\
|
||||
Configuration file (unless overridden by -c):\n\
|
||||
Configuration file (unless overridden by -f):\n\
|
||||
" SYSCONF_DIR "/libvirt/libvirtd.conf\n\
|
||||
\n\
|
||||
Sockets (as root):\n\
|
||||
@ -2838,10 +2969,9 @@ enum {
|
||||
#define MAX_LISTEN 5
|
||||
int main(int argc, char **argv) {
|
||||
struct qemud_server *server = NULL;
|
||||
struct sigaction sig_action;
|
||||
int sigpipe[2];
|
||||
const char *pid_file = NULL;
|
||||
const char *remote_config_file = NULL;
|
||||
int statuswrite = -1;
|
||||
int ret = 1;
|
||||
|
||||
struct option opts[] = {
|
||||
@ -2856,6 +2986,8 @@ int main(int argc, char **argv) {
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
virInitialize();
|
||||
|
||||
while (1) {
|
||||
int optidx = 0;
|
||||
int c;
|
||||
@ -2908,7 +3040,7 @@ int main(int argc, char **argv) {
|
||||
default:
|
||||
fprintf (stderr, "libvirtd: internal error: unknown flag: %c\n",
|
||||
c);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2923,10 +3055,10 @@ int main(int argc, char **argv) {
|
||||
|
||||
if (godaemon) {
|
||||
char ebuf[1024];
|
||||
if (qemudGoDaemon() < 0) {
|
||||
if ((statuswrite = daemonForkIntoBackground()) < 0) {
|
||||
VIR_ERROR(_("Failed to fork as daemon: %s"),
|
||||
virStrerror(errno, ebuf, sizeof ebuf));
|
||||
goto error1;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2938,33 +3070,11 @@ int main(int argc, char **argv) {
|
||||
|
||||
/* If we have a pidfile set, claim it now, exiting if already taken */
|
||||
if (pid_file != NULL &&
|
||||
qemudWritePidFile (pid_file) < 0)
|
||||
goto error1;
|
||||
|
||||
if (pipe(sigpipe) < 0 ||
|
||||
virSetNonBlock(sigpipe[0]) < 0 ||
|
||||
virSetNonBlock(sigpipe[1]) < 0 ||
|
||||
virSetCloseExec(sigpipe[0]) < 0 ||
|
||||
virSetCloseExec(sigpipe[1]) < 0) {
|
||||
char ebuf[1024];
|
||||
VIR_ERROR(_("Failed to create pipe: %s"),
|
||||
virStrerror(errno, ebuf, sizeof ebuf));
|
||||
goto error2;
|
||||
qemudWritePidFile (pid_file) < 0) {
|
||||
pid_file = NULL; /* Prevent unlinking of someone else's pid ! */
|
||||
ret = VIR_DAEMON_ERR_PIDFILE;
|
||||
goto error;
|
||||
}
|
||||
sigwrite = sigpipe[1];
|
||||
|
||||
sig_action.sa_sigaction = sig_handler;
|
||||
sig_action.sa_flags = SA_SIGINFO;
|
||||
sigemptyset(&sig_action.sa_mask);
|
||||
|
||||
sigaction(SIGHUP, &sig_action, NULL);
|
||||
sigaction(SIGINT, &sig_action, NULL);
|
||||
sigaction(SIGQUIT, &sig_action, NULL);
|
||||
sigaction(SIGTERM, &sig_action, NULL);
|
||||
sigaction(SIGCHLD, &sig_action, NULL);
|
||||
|
||||
sig_action.sa_handler = SIG_IGN;
|
||||
sigaction(SIGPIPE, &sig_action, NULL);
|
||||
|
||||
/* Ensure the rundir exists (on tmpfs on some systems) */
|
||||
if (geteuid() == 0) {
|
||||
@ -2972,8 +3082,11 @@ int main(int argc, char **argv) {
|
||||
|
||||
if (mkdir (rundir, 0755)) {
|
||||
if (errno != EEXIST) {
|
||||
VIR_ERROR0 (_("unable to create rundir"));
|
||||
return -1;
|
||||
char ebuf[1024];
|
||||
VIR_ERROR(_("unable to create rundir %s: %s"), rundir,
|
||||
virStrerror(errno, ebuf, sizeof(ebuf)));
|
||||
ret = VIR_DAEMON_ERR_RUNDIR;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2984,51 +3097,105 @@ int main(int argc, char **argv) {
|
||||
* which is also passed into all libvirt stateful
|
||||
* drivers
|
||||
*/
|
||||
if (qemudSetupPrivs() < 0)
|
||||
goto error2;
|
||||
if (qemudSetupPrivs() < 0) {
|
||||
ret = VIR_DAEMON_ERR_PRIVS;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!(server = qemudInitialize(sigpipe[0]))) {
|
||||
ret = 2;
|
||||
goto error2;
|
||||
if (!(server = qemudInitialize())) {
|
||||
ret = VIR_DAEMON_ERR_INIT;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((daemonSetupSignals(server)) < 0) {
|
||||
ret = VIR_DAEMON_ERR_SIGNAL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Read the config file (if it exists). */
|
||||
if (remoteReadConfigFile (server, remote_config_file) < 0)
|
||||
goto error2;
|
||||
|
||||
/* Change the group ownership of /var/run/libvirt to unix_sock_gid */
|
||||
if (unix_sock_dir && server->privileged) {
|
||||
if (chown(unix_sock_dir, -1, unix_sock_gid) < 0)
|
||||
VIR_ERROR(_("Failed to change group ownership of %s"),
|
||||
unix_sock_dir);
|
||||
if (remoteReadConfigFile (server, remote_config_file) < 0) {
|
||||
ret = VIR_DAEMON_ERR_CONFIG;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (virEventAddHandleImpl(sigpipe[0],
|
||||
VIR_EVENT_HANDLE_READABLE,
|
||||
qemudDispatchSignalEvent,
|
||||
server, NULL) < 0) {
|
||||
VIR_ERROR0(_("Failed to register callback for signal pipe"));
|
||||
ret = 3;
|
||||
goto error2;
|
||||
/* Disable error func, now logging is setup */
|
||||
virSetErrorFunc(NULL, virshErrorHandler);
|
||||
|
||||
if (qemudNetworkInit(server) < 0) {
|
||||
ret = VIR_DAEMON_ERR_NETWORK;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!(server = qemudNetworkInit(server))) {
|
||||
ret = 2;
|
||||
goto error2;
|
||||
/* Tell parent of daemon that basic initialization is complete
|
||||
* In particular we're ready to accept net connections & have
|
||||
* written the pidfile
|
||||
*/
|
||||
if (statuswrite != -1) {
|
||||
char status = 0;
|
||||
while (write(statuswrite, &status, 1) == -1 &&
|
||||
errno == EINTR)
|
||||
;
|
||||
close(statuswrite);
|
||||
statuswrite = -1;
|
||||
}
|
||||
|
||||
qemudRunLoop(server);
|
||||
/* Start the event loop in a background thread, since
|
||||
* state initialization needs events to be being processed */
|
||||
if (qemudStartEventLoop(server) < 0) {
|
||||
VIR_ERROR0("Event thread startup failed");
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Start the stateful HV drivers
|
||||
* This is delibrately 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(server->privileged) < 0) {
|
||||
VIR_ERROR0("Driver state initialization failed");
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
/* Start accepting new clients from network */
|
||||
virMutexLock(&server->lock);
|
||||
if (qemudNetworkEnable(server) < 0) {
|
||||
VIR_ERROR0("Network event loop enablement failed");
|
||||
goto shutdown;
|
||||
}
|
||||
virMutexUnlock(&server->lock);
|
||||
|
||||
ret = 0;
|
||||
|
||||
error2:
|
||||
shutdown:
|
||||
/* In a non-0 shutdown scenario we need to tell event loop
|
||||
* to quit immediately. Otherwise in normal case we just
|
||||
* sit in the thread join forever. Sure this means the
|
||||
* main thread doesn't do anything useful ever, but that's
|
||||
* not too much of drain on resources
|
||||
*/
|
||||
if (ret != 0) {
|
||||
virMutexLock(&server->lock);
|
||||
if (server->hasEventThread)
|
||||
/* This SIGQUIT triggers the shutdown process */
|
||||
kill(getpid(), SIGQUIT);
|
||||
virMutexUnlock(&server->lock);
|
||||
}
|
||||
pthread_join(server->eventThread, NULL);
|
||||
|
||||
error:
|
||||
if (statuswrite != -1) {
|
||||
if (ret != 0) {
|
||||
/* Tell parent of daemon what failed */
|
||||
char status = ret;
|
||||
while (write(statuswrite, &status, 1) == -1 &&
|
||||
errno == EINTR)
|
||||
;
|
||||
}
|
||||
close(statuswrite);
|
||||
}
|
||||
if (server)
|
||||
qemudCleanup(server);
|
||||
if (pid_file)
|
||||
unlink (pid_file);
|
||||
close(sigwrite);
|
||||
|
||||
error1:
|
||||
virLogShutdown();
|
||||
return ret;
|
||||
}
|
||||
|
@ -175,8 +175,9 @@ struct qemud_client {
|
||||
|
||||
int fd;
|
||||
int watch;
|
||||
int readonly:1;
|
||||
int closing:1;
|
||||
unsigned int readonly :1;
|
||||
unsigned int closing :1;
|
||||
unsigned int domain_events_registered :1;
|
||||
|
||||
struct sockaddr_storage addr;
|
||||
socklen_t addrlen;
|
||||
@ -184,7 +185,7 @@ struct qemud_client {
|
||||
int type; /* qemud_sock_type */
|
||||
gnutls_session_t tlssession;
|
||||
int auth;
|
||||
int handshake : 1; /* If we're in progress for TLS handshake */
|
||||
unsigned int handshake :1; /* If we're in progress for TLS handshake */
|
||||
#if HAVE_SASL
|
||||
sasl_conn_t *saslconn;
|
||||
int saslSSF;
|
||||
@ -243,9 +244,9 @@ struct qemud_socket {
|
||||
|
||||
struct qemud_worker {
|
||||
pthread_t thread;
|
||||
int hasThread :1;
|
||||
int processingCall :1;
|
||||
int quitRequest : 1;
|
||||
unsigned int hasThread :1;
|
||||
unsigned int processingCall :1;
|
||||
unsigned int quitRequest :1;
|
||||
|
||||
/* back-pointer to our server */
|
||||
struct qemud_server *server;
|
||||
@ -267,8 +268,11 @@ struct qemud_server {
|
||||
struct qemud_client **clients;
|
||||
|
||||
int sigread;
|
||||
int sigwrite;
|
||||
char *logDir;
|
||||
unsigned int shutdown : 1;
|
||||
pthread_t eventThread;
|
||||
unsigned int hasEventThread :1;
|
||||
unsigned int quitEventThread :1;
|
||||
#ifdef HAVE_AVAHI
|
||||
struct libvirtd_mdns *mdns;
|
||||
#endif
|
||||
|
@ -40,6 +40,7 @@
|
||||
|
||||
SERVICE=libvirtd
|
||||
PROCESS=libvirtd
|
||||
PIDFILE=@localstatedir@/run/$SERVICE.pid
|
||||
|
||||
LIBVIRTD_CONFIG=
|
||||
LIBVIRTD_ARGS=
|
||||
@ -59,7 +60,7 @@ start() {
|
||||
echo -n $"Starting $SERVICE daemon: "
|
||||
mkdir -p @localstatedir@/cache/libvirt
|
||||
rm -rf @localstatedir@/cache/libvirt/*
|
||||
KRB5_KTNAME=$KRB5_KTNAME daemon --check $SERVICE $PROCESS --daemon $LIBVIRTD_CONFIG_ARGS $LIBVIRTD_ARGS
|
||||
KRB5_KTNAME=$KRB5_KTNAME daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $LIBVIRTD_CONFIG_ARGS $LIBVIRTD_ARGS
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$SERVICE
|
||||
@ -68,12 +69,12 @@ start() {
|
||||
stop() {
|
||||
echo -n $"Stopping $SERVICE daemon: "
|
||||
|
||||
killproc $PROCESS
|
||||
killproc -p $PIDFILE $PROCESS
|
||||
RETVAL=$?
|
||||
echo
|
||||
if [ $RETVAL -eq 0 ]; then
|
||||
rm -f @localstatedir@/lock/subsys/$SERVICE
|
||||
rm -f @localstatedir@/run/$SERVICE.pid
|
||||
rm -f $PIDFILE
|
||||
rm -rf @localstatedir@/cache/libvirt/*
|
||||
fi
|
||||
}
|
||||
@ -86,7 +87,7 @@ restart() {
|
||||
reload() {
|
||||
echo -n $"Reloading $SERVICE configuration: "
|
||||
|
||||
killproc $PROCESS -HUP
|
||||
killproc -p $PIDFILE $PROCESS -HUP
|
||||
RETVAL=$?
|
||||
echo
|
||||
return $RETVAL
|
||||
@ -98,7 +99,7 @@ case "$1" in
|
||||
$1
|
||||
;;
|
||||
status)
|
||||
status $PROCESS
|
||||
status -p $PIDFILE $PROCESS
|
||||
RETVAL=$?
|
||||
;;
|
||||
force-reload)
|
||||
|
@ -5,4 +5,5 @@
|
||||
compress
|
||||
delaycompress
|
||||
copytruncate
|
||||
minsize 100k
|
||||
}
|
||||
|
363
daemon/remote.c
363
daemon/remote.c
@ -231,7 +231,7 @@ remoteDispatchGetType (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
*/
|
||||
ret->type = strdup (type);
|
||||
if (!ret->type) {
|
||||
remoteDispatchFormatError (rerr, "%s", _("out of memory in strdup"));
|
||||
remoteDispatchOOMError(rerr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -258,6 +258,26 @@ remoteDispatchGetVersion (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchGetLibVersion (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *rerr,
|
||||
void *args ATTRIBUTE_UNUSED,
|
||||
remote_get_lib_version_ret *ret)
|
||||
{
|
||||
unsigned long libVer;
|
||||
|
||||
if (virConnectGetLibVersion (conn, &libVer) == -1) {
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret->lib_ver = libVer;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchGetHostname (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
@ -565,7 +585,7 @@ remoteDispatchDomainSetSchedulerParameters (struct qemud_server *server ATTRIBUT
|
||||
remoteDispatchFormatError (rerr, "%s", _("nparams too large"));
|
||||
return -1;
|
||||
}
|
||||
if (VIR_ALLOC_N(params, nparams)) {
|
||||
if (VIR_ALLOC_N(params, nparams) < 0) {
|
||||
remoteDispatchOOMError(rerr);
|
||||
return -1;
|
||||
}
|
||||
@ -687,6 +707,62 @@ remoteDispatchDomainInterfaceStats (struct qemud_server *server ATTRIBUTE_UNUSED
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchDomainMemoryStats (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *rerr,
|
||||
remote_domain_memory_stats_args *args,
|
||||
remote_domain_memory_stats_ret *ret)
|
||||
{
|
||||
virDomainPtr dom;
|
||||
struct _virDomainMemoryStat *stats;
|
||||
unsigned int nr_stats, i;
|
||||
|
||||
if (args->maxStats > REMOTE_DOMAIN_MEMORY_STATS_MAX) {
|
||||
remoteDispatchFormatError (rerr, "%s",
|
||||
_("maxStats > REMOTE_DOMAIN_MEMORY_STATS_MAX"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
dom = get_nonnull_domain (conn, args->dom);
|
||||
if (dom == NULL) {
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Allocate stats array for making dispatch call */
|
||||
if (VIR_ALLOC_N(stats, args->maxStats) < 0) {
|
||||
remoteDispatchOOMError(rerr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
nr_stats = virDomainMemoryStats (dom, stats, args->maxStats, 0);
|
||||
virDomainFree (dom);
|
||||
if (nr_stats == -1) {
|
||||
VIR_FREE(stats);
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Allocate return buffer */
|
||||
if (VIR_ALLOC_N(ret->stats.stats_val, args->maxStats) < 0) {
|
||||
VIR_FREE(stats);
|
||||
remoteDispatchOOMError(rerr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Copy the stats into the xdr return structure */
|
||||
for (i = 0; i < nr_stats; i++) {
|
||||
ret->stats.stats_val[i].tag = stats[i].tag;
|
||||
ret->stats.stats_val[i].val = stats[i].val;
|
||||
}
|
||||
ret->stats.stats_len = nr_stats;
|
||||
VIR_FREE(stats);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDispatchDomainBlockPeek (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
@ -721,10 +797,8 @@ remoteDispatchDomainBlockPeek (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
|
||||
ret->buffer.buffer_len = size;
|
||||
if (VIR_ALLOC_N (ret->buffer.buffer_val, size) < 0) {
|
||||
char ebuf[1024];
|
||||
virDomainFree (dom);
|
||||
remoteDispatchFormatError (rerr, "%s",
|
||||
virStrerror(errno, ebuf, sizeof ebuf));
|
||||
remoteDispatchOOMError(rerr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -772,10 +846,8 @@ remoteDispatchDomainMemoryPeek (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
|
||||
ret->buffer.buffer_len = size;
|
||||
if (VIR_ALLOC_N (ret->buffer.buffer_val, size) < 0) {
|
||||
char ebuf[1024];
|
||||
virDomainFree (dom);
|
||||
remoteDispatchFormatError (rerr, "%s",
|
||||
virStrerror(errno, ebuf, sizeof ebuf));
|
||||
remoteDispatchOOMError(rerr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -3303,7 +3375,7 @@ remoteDispatchAuthPolkit (struct qemud_server *server,
|
||||
goto authfail;
|
||||
}
|
||||
if (status != 0) {
|
||||
VIR_ERROR(_("Policy kit denied action %s from pid %d, uid %d, result: %d\n"),
|
||||
VIR_ERROR(_("Policy kit denied action %s from pid %d, uid %d, result: %d"),
|
||||
action, callerPid, callerUid, status);
|
||||
goto authfail;
|
||||
}
|
||||
@ -3370,7 +3442,7 @@ remoteDispatchAuthPolkit (struct qemud_server *server,
|
||||
|
||||
if (!(pkaction = polkit_action_new())) {
|
||||
char ebuf[1024];
|
||||
VIR_ERROR(_("Failed to create polkit action %s\n"),
|
||||
VIR_ERROR(_("Failed to create polkit action %s"),
|
||||
virStrerror(errno, ebuf, sizeof ebuf));
|
||||
polkit_caller_unref(pkcaller);
|
||||
goto authfail;
|
||||
@ -3380,7 +3452,7 @@ remoteDispatchAuthPolkit (struct qemud_server *server,
|
||||
if (!(pkcontext = polkit_context_new()) ||
|
||||
!polkit_context_init(pkcontext, &pkerr)) {
|
||||
char ebuf[1024];
|
||||
VIR_ERROR(_("Failed to create polkit context %s\n"),
|
||||
VIR_ERROR(_("Failed to create polkit context %s"),
|
||||
(pkerr ? polkit_error_get_error_message(pkerr)
|
||||
: virStrerror(errno, ebuf, sizeof ebuf)));
|
||||
if (pkerr)
|
||||
@ -3412,7 +3484,7 @@ remoteDispatchAuthPolkit (struct qemud_server *server,
|
||||
polkit_caller_unref(pkcaller);
|
||||
polkit_action_unref(pkaction);
|
||||
if (pkresult != POLKIT_RESULT_YES) {
|
||||
VIR_ERROR(_("Policy kit denied action %s from pid %d, uid %d, result: %s\n"),
|
||||
VIR_ERROR(_("Policy kit denied action %s from pid %d, uid %d, result: %s"),
|
||||
action, callerPid, callerUid,
|
||||
polkit_result_to_string_representation(pkresult));
|
||||
goto authfail;
|
||||
@ -4102,12 +4174,15 @@ remoteDispatchStorageVolCreateXmlFrom (struct qemud_server *server ATTRIBUTE_UNU
|
||||
|
||||
clonevol = get_nonnull_storage_vol (conn, args->clonevol);
|
||||
if (clonevol == NULL) {
|
||||
virStoragePoolFree(pool);
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
newvol = virStorageVolCreateXMLFrom (pool, args->xml, clonevol,
|
||||
args->flags);
|
||||
virStorageVolFree(clonevol);
|
||||
virStoragePoolFree(pool);
|
||||
if (newvol == NULL) {
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
@ -4414,7 +4489,7 @@ remoteDispatchNodeDeviceDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
|
||||
dev = virNodeDeviceLookupByName(conn, args->name);
|
||||
if (dev == NULL) {
|
||||
remoteDispatchFormatError(rerr, "%s", _("node_device not found"));
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4445,7 +4520,7 @@ remoteDispatchNodeDeviceGetParent (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
|
||||
dev = virNodeDeviceLookupByName(conn, args->name);
|
||||
if (dev == NULL) {
|
||||
remoteDispatchFormatError(rerr, "%s", _("node_device not found"));
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4487,7 +4562,7 @@ remoteDispatchNodeDeviceNumOfCaps (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
|
||||
dev = virNodeDeviceLookupByName(conn, args->name);
|
||||
if (dev == NULL) {
|
||||
remoteDispatchFormatError(rerr, "%s", _("node_device not found"));
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4516,7 +4591,7 @@ remoteDispatchNodeDeviceListCaps (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
|
||||
dev = virNodeDeviceLookupByName(conn, args->name);
|
||||
if (dev == NULL) {
|
||||
remoteDispatchFormatError(rerr, "%s", _("node_device not found"));
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4559,7 +4634,7 @@ remoteDispatchNodeDeviceDettach (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
|
||||
dev = virNodeDeviceLookupByName(conn, args->name);
|
||||
if (dev == NULL) {
|
||||
remoteDispatchFormatError(rerr, "%s", _("node_device not found"));
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4586,7 +4661,7 @@ remoteDispatchNodeDeviceReAttach (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
|
||||
dev = virNodeDeviceLookupByName(conn, args->name);
|
||||
if (dev == NULL) {
|
||||
remoteDispatchFormatError(rerr, "%s", _("node_device not found"));
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4613,7 +4688,7 @@ remoteDispatchNodeDeviceReset (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
|
||||
dev = virNodeDeviceLookupByName(conn, args->name);
|
||||
if (dev == NULL) {
|
||||
remoteDispatchFormatError(rerr, "%s", _("node_device not found"));
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4663,7 +4738,7 @@ remoteDispatchNodeDeviceDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
|
||||
dev = virNodeDeviceLookupByName(conn, args->name);
|
||||
if (dev == NULL) {
|
||||
remoteDispatchFormatError(rerr, "%s", _("node_device not found"));
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -4691,12 +4766,17 @@ remoteDispatchDomainEventsRegister (struct qemud_server *server ATTRIBUTE_UNUSED
|
||||
{
|
||||
CHECK_CONN(client);
|
||||
|
||||
/* Register event delivery callback */
|
||||
REMOTE_DEBUG("%s","Registering to relay remote events");
|
||||
virConnectDomainEventRegister(conn, remoteRelayDomainEvent, client, NULL);
|
||||
if (virConnectDomainEventRegister(conn,
|
||||
remoteRelayDomainEvent,
|
||||
client, NULL) < 0) {
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(ret)
|
||||
if (ret)
|
||||
ret->cb_registered = 1;
|
||||
|
||||
client->domain_events_registered = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4711,12 +4791,15 @@ remoteDispatchDomainEventsDeregister (struct qemud_server *server ATTRIBUTE_UNUS
|
||||
{
|
||||
CHECK_CONN(client);
|
||||
|
||||
/* Deregister event delivery callback */
|
||||
REMOTE_DEBUG("%s","Deregistering to relay remote events");
|
||||
virConnectDomainEventDeregister(conn, remoteRelayDomainEvent);
|
||||
if (virConnectDomainEventDeregister(conn, remoteRelayDomainEvent) < 0) {
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(ret)
|
||||
if (ret)
|
||||
ret->cb_registered = 0;
|
||||
|
||||
client->domain_events_registered = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -5005,6 +5088,230 @@ remoteDispatchSecretLookupByUsage (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
static int remoteDispatchDomainIsActive(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *err,
|
||||
remote_domain_is_active_args *args,
|
||||
remote_domain_is_active_ret *ret)
|
||||
{
|
||||
virDomainPtr domain;
|
||||
|
||||
domain = get_nonnull_domain(conn, args->dom);
|
||||
if (domain == NULL) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret->active = virDomainIsActive(domain);
|
||||
|
||||
if (ret->active < 0) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int remoteDispatchDomainIsPersistent(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *err,
|
||||
remote_domain_is_persistent_args *args,
|
||||
remote_domain_is_persistent_ret *ret)
|
||||
{
|
||||
virDomainPtr domain;
|
||||
|
||||
domain = get_nonnull_domain(conn, args->dom);
|
||||
if (domain == NULL) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret->persistent = virDomainIsPersistent(domain);
|
||||
|
||||
if (ret->persistent < 0) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int remoteDispatchInterfaceIsActive(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *err,
|
||||
remote_interface_is_active_args *args,
|
||||
remote_interface_is_active_ret *ret)
|
||||
{
|
||||
virInterfacePtr iface;
|
||||
|
||||
iface = get_nonnull_interface(conn, args->iface);
|
||||
if (iface == NULL) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret->active = virInterfaceIsActive(iface);
|
||||
|
||||
if (ret->active < 0) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int remoteDispatchNetworkIsActive(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *err,
|
||||
remote_network_is_active_args *args,
|
||||
remote_network_is_active_ret *ret)
|
||||
{
|
||||
virNetworkPtr network;
|
||||
|
||||
network = get_nonnull_network(conn, args->net);
|
||||
if (network == NULL) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret->active = virNetworkIsActive(network);
|
||||
|
||||
if (ret->active < 0) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int remoteDispatchNetworkIsPersistent(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *err,
|
||||
remote_network_is_persistent_args *args,
|
||||
remote_network_is_persistent_ret *ret)
|
||||
{
|
||||
virNetworkPtr network;
|
||||
|
||||
network = get_nonnull_network(conn, args->net);
|
||||
if (network == NULL) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret->persistent = virNetworkIsPersistent(network);
|
||||
|
||||
if (ret->persistent < 0) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int remoteDispatchStoragePoolIsActive(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *err,
|
||||
remote_storage_pool_is_active_args *args,
|
||||
remote_storage_pool_is_active_ret *ret)
|
||||
{
|
||||
virStoragePoolPtr pool;
|
||||
|
||||
pool = get_nonnull_storage_pool(conn, args->pool);
|
||||
if (pool == NULL) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret->active = virStoragePoolIsActive(pool);
|
||||
|
||||
if (ret->active < 0) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int remoteDispatchStoragePoolIsPersistent(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *err,
|
||||
remote_storage_pool_is_persistent_args *args,
|
||||
remote_storage_pool_is_persistent_ret *ret)
|
||||
{
|
||||
virStoragePoolPtr pool;
|
||||
|
||||
pool = get_nonnull_storage_pool(conn, args->pool);
|
||||
if (pool == NULL) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret->persistent = virStoragePoolIsPersistent(pool);
|
||||
|
||||
if (ret->persistent < 0) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int remoteDispatchIsSecure(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *err,
|
||||
void *args ATTRIBUTE_UNUSED,
|
||||
remote_is_secure_ret *ret)
|
||||
{
|
||||
ret->secure = virConnectIsSecure(conn);
|
||||
|
||||
if (ret->secure < 0) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
remoteDispatchCpuCompare(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *err,
|
||||
remote_cpu_compare_args *args,
|
||||
remote_cpu_compare_ret *ret)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = virConnectCompareCPU(conn, args->xml, args->flags);
|
||||
if (result == VIR_CPU_COMPARE_ERROR) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret->result = result;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*----- Helpers. -----*/
|
||||
|
||||
/* get_nonnull_domain and get_nonnull_network turn an on-wire
|
||||
|
@ -126,3 +126,12 @@
|
||||
remote_secret_undefine_args val_remote_secret_undefine_args;
|
||||
remote_secret_lookup_by_usage_args val_remote_secret_lookup_by_usage_args;
|
||||
remote_domain_migrate_prepare_tunnel_args val_remote_domain_migrate_prepare_tunnel_args;
|
||||
remote_domain_is_active_args val_remote_domain_is_active_args;
|
||||
remote_domain_is_persistent_args val_remote_domain_is_persistent_args;
|
||||
remote_network_is_active_args val_remote_network_is_active_args;
|
||||
remote_network_is_persistent_args val_remote_network_is_persistent_args;
|
||||
remote_storage_pool_is_active_args val_remote_storage_pool_is_active_args;
|
||||
remote_storage_pool_is_persistent_args val_remote_storage_pool_is_persistent_args;
|
||||
remote_interface_is_active_args val_remote_interface_is_active_args;
|
||||
remote_cpu_compare_args val_remote_cpu_compare_args;
|
||||
remote_domain_memory_stats_args val_remote_domain_memory_stats_args;
|
||||
|
@ -50,6 +50,14 @@ static int remoteDispatchClose(
|
||||
remote_error *err,
|
||||
void *args,
|
||||
void *ret);
|
||||
static int remoteDispatchCpuCompare(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_cpu_compare_args *args,
|
||||
remote_cpu_compare_ret *ret);
|
||||
static int remoteDispatchDomainAttachDevice(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -226,6 +234,22 @@ static int remoteDispatchDomainInterfaceStats(
|
||||
remote_error *err,
|
||||
remote_domain_interface_stats_args *args,
|
||||
remote_domain_interface_stats_ret *ret);
|
||||
static int remoteDispatchDomainIsActive(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_is_active_args *args,
|
||||
remote_domain_is_active_ret *ret);
|
||||
static int remoteDispatchDomainIsPersistent(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_is_persistent_args *args,
|
||||
remote_domain_is_persistent_ret *ret);
|
||||
static int remoteDispatchDomainLookupById(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -258,6 +282,14 @@ static int remoteDispatchDomainMemoryPeek(
|
||||
remote_error *err,
|
||||
remote_domain_memory_peek_args *args,
|
||||
remote_domain_memory_peek_ret *ret);
|
||||
static int remoteDispatchDomainMemoryStats(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_domain_memory_stats_args *args,
|
||||
remote_domain_memory_stats_ret *ret);
|
||||
static int remoteDispatchDomainMigrateFinish(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -450,6 +482,14 @@ static int remoteDispatchGetHostname(
|
||||
remote_error *err,
|
||||
void *args,
|
||||
remote_get_hostname_ret *ret);
|
||||
static int remoteDispatchGetLibVersion(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
void *args,
|
||||
remote_get_lib_version_ret *ret);
|
||||
static int remoteDispatchGetMaxVcpus(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -514,6 +554,14 @@ static int remoteDispatchInterfaceGetXmlDesc(
|
||||
remote_error *err,
|
||||
remote_interface_get_xml_desc_args *args,
|
||||
remote_interface_get_xml_desc_ret *ret);
|
||||
static int remoteDispatchInterfaceIsActive(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_interface_is_active_args *args,
|
||||
remote_interface_is_active_ret *ret);
|
||||
static int remoteDispatchInterfaceLookupByMacString(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -538,6 +586,14 @@ static int remoteDispatchInterfaceUndefine(
|
||||
remote_error *err,
|
||||
remote_interface_undefine_args *args,
|
||||
void *ret);
|
||||
static int remoteDispatchIsSecure(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
void *args,
|
||||
remote_is_secure_ret *ret);
|
||||
static int remoteDispatchListDefinedDomains(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -666,6 +722,22 @@ static int remoteDispatchNetworkGetBridgeName(
|
||||
remote_error *err,
|
||||
remote_network_get_bridge_name_args *args,
|
||||
remote_network_get_bridge_name_ret *ret);
|
||||
static int remoteDispatchNetworkIsActive(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_network_is_active_args *args,
|
||||
remote_network_is_active_ret *ret);
|
||||
static int remoteDispatchNetworkIsPersistent(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_network_is_persistent_args *args,
|
||||
remote_network_is_persistent_ret *ret);
|
||||
static int remoteDispatchNetworkLookupByName(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
@ -1034,6 +1106,22 @@ static int remoteDispatchStoragePoolGetInfo(
|
||||
remote_error *err,
|
||||
remote_storage_pool_get_info_args *args,
|
||||
remote_storage_pool_get_info_ret *ret);
|
||||
static int remoteDispatchStoragePoolIsActive(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_storage_pool_is_active_args *args,
|
||||
remote_storage_pool_is_active_ret *ret);
|
||||
static int remoteDispatchStoragePoolIsPersistent(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_storage_pool_is_persistent_args *args,
|
||||
remote_storage_pool_is_persistent_ret *ret);
|
||||
static int remoteDispatchStoragePoolListVolumes(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
|
@ -106,3 +106,14 @@
|
||||
remote_secret_get_xml_desc_ret val_remote_secret_get_xml_desc_ret;
|
||||
remote_secret_get_value_ret val_remote_secret_get_value_ret;
|
||||
remote_secret_lookup_by_usage_ret val_remote_secret_lookup_by_usage_ret;
|
||||
remote_is_secure_ret val_remote_is_secure_ret;
|
||||
remote_domain_is_active_ret val_remote_domain_is_active_ret;
|
||||
remote_domain_is_persistent_ret val_remote_domain_is_persistent_ret;
|
||||
remote_network_is_active_ret val_remote_network_is_active_ret;
|
||||
remote_network_is_persistent_ret val_remote_network_is_persistent_ret;
|
||||
remote_storage_pool_is_active_ret val_remote_storage_pool_is_active_ret;
|
||||
remote_storage_pool_is_persistent_ret val_remote_storage_pool_is_persistent_ret;
|
||||
remote_interface_is_active_ret val_remote_interface_is_active_ret;
|
||||
remote_get_lib_version_ret val_remote_get_lib_version_ret;
|
||||
remote_cpu_compare_ret val_remote_cpu_compare_ret;
|
||||
remote_domain_memory_stats_ret val_remote_domain_memory_stats_ret;
|
||||
|
@ -747,3 +747,58 @@
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_migrate_prepare_tunnel_args,
|
||||
.ret_filter = (xdrproc_t) xdr_void,
|
||||
},
|
||||
{ /* IsSecure => 149 */
|
||||
.fn = (dispatch_fn) remoteDispatchIsSecure,
|
||||
.args_filter = (xdrproc_t) xdr_void,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_is_secure_ret,
|
||||
},
|
||||
{ /* DomainIsActive => 150 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainIsActive,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_is_active_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_is_active_ret,
|
||||
},
|
||||
{ /* DomainIsPersistent => 151 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainIsPersistent,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_is_persistent_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_is_persistent_ret,
|
||||
},
|
||||
{ /* NetworkIsActive => 152 */
|
||||
.fn = (dispatch_fn) remoteDispatchNetworkIsActive,
|
||||
.args_filter = (xdrproc_t) xdr_remote_network_is_active_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_network_is_active_ret,
|
||||
},
|
||||
{ /* NetworkIsPersistent => 153 */
|
||||
.fn = (dispatch_fn) remoteDispatchNetworkIsPersistent,
|
||||
.args_filter = (xdrproc_t) xdr_remote_network_is_persistent_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_network_is_persistent_ret,
|
||||
},
|
||||
{ /* StoragePoolIsActive => 154 */
|
||||
.fn = (dispatch_fn) remoteDispatchStoragePoolIsActive,
|
||||
.args_filter = (xdrproc_t) xdr_remote_storage_pool_is_active_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_storage_pool_is_active_ret,
|
||||
},
|
||||
{ /* StoragePoolIsPersistent => 155 */
|
||||
.fn = (dispatch_fn) remoteDispatchStoragePoolIsPersistent,
|
||||
.args_filter = (xdrproc_t) xdr_remote_storage_pool_is_persistent_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_storage_pool_is_persistent_ret,
|
||||
},
|
||||
{ /* InterfaceIsActive => 156 */
|
||||
.fn = (dispatch_fn) remoteDispatchInterfaceIsActive,
|
||||
.args_filter = (xdrproc_t) xdr_remote_interface_is_active_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_interface_is_active_ret,
|
||||
},
|
||||
{ /* GetLibVersion => 157 */
|
||||
.fn = (dispatch_fn) remoteDispatchGetLibVersion,
|
||||
.args_filter = (xdrproc_t) xdr_void,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_get_lib_version_ret,
|
||||
},
|
||||
{ /* CpuCompare => 158 */
|
||||
.fn = (dispatch_fn) remoteDispatchCpuCompare,
|
||||
.args_filter = (xdrproc_t) xdr_remote_cpu_compare_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_cpu_compare_ret,
|
||||
},
|
||||
{ /* DomainMemoryStats => 159 */
|
||||
.fn = (dispatch_fn) remoteDispatchDomainMemoryStats,
|
||||
.args_filter = (xdrproc_t) xdr_remote_domain_memory_stats_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_domain_memory_stats_ret,
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<!-- Generate XHTML-1.0 transitional -->
|
||||
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
|
||||
<xsl:output method="xml" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
|
||||
|
||||
|
@ -119,7 +119,7 @@
|
||||
packages as well as the public headers to compile against libxenstore.</p>
|
||||
</li>
|
||||
<li>
|
||||
<em>I use the CVS version and there is no configure script</em>
|
||||
<em>I use the GIT version and there is no configure script</em>
|
||||
<p>The configure script (and other Makefiles) are generated. Use the
|
||||
autogen.sh script to regenerate the configure script and Makefiles,
|
||||
like:</p>
|
||||
|
@ -106,9 +106,9 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl
|
||||
|
||||
%.html: %.html.tmp
|
||||
@(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \
|
||||
if $(XMLCATALOG) /etc/xml/catalog "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > /dev/null ; then \
|
||||
if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \
|
||||
echo "Validating $@" ; \
|
||||
$(XMLLINT) --nonet --format --valid $< > $@ || : ; \
|
||||
$(XMLLINT) --nonet --format --valid $< > $@ || (rm $@ && exit 1) ; \
|
||||
else echo "missing XHTML1 DTD" ; fi ; fi );
|
||||
|
||||
|
||||
@ -117,7 +117,7 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
|
||||
echo "Rebuilding the HTML pages from the XML API" ; \
|
||||
$(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
|
||||
-@(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \
|
||||
if $(XMLCATALOG) /etc/xml/catalog "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > /dev/null ; then \
|
||||
if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \
|
||||
echo "Validating the resulting XHTML pages" ; \
|
||||
$(XMLLINT) --nonet --valid --noout html/*.html ; \
|
||||
else echo "missing XHTML1 DTD" ; fi ; fi );
|
||||
@ -143,7 +143,7 @@ rebuild: api all
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
||||
-@INSTALL@ -m 0644 $(srcdir)/FAQ.html \
|
||||
-$(INSTALL) -m 0644 $(srcdir)/FAQ.html \
|
||||
$(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
|
||||
for h in $(apihtml); do \
|
||||
@ -152,11 +152,12 @@ install-data-local:
|
||||
$(INSTALL) -m 0644 $(srcdir)/$$p $(DESTDIR)$(HTML_DIR)/html; done
|
||||
$(mkinstalldirs) $(DESTDIR)$(DEVHELP_DIR)
|
||||
for file in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
|
||||
@INSTALL@ -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
|
||||
$(INSTALL) -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
|
||||
done
|
||||
|
||||
uninstall-local:
|
||||
for h in $(apihtml); do rm $(DESTDIR)$(HTML_DIR)/$$h; done
|
||||
for p in $(apipng); do rm $(DESTDIR)$(HTML_DIR)/$$p; done
|
||||
for f in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
|
||||
rm $(DESTDIR)$(DEVHELP_DIR)$$f ; done
|
||||
rm $(DESTDIR)$(DEVHELP_DIR)/$$(basename $$f); \
|
||||
done
|
||||
|
@ -84,7 +84,7 @@
|
||||
which is garanteed to be unique for long term usage and across a
|
||||
set of nodes.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a name="Functions" id="Functions">Functions and naming
|
||||
conventions</a></h2>
|
||||
<p> The naming of the functions present in the library is usually
|
||||
@ -93,7 +93,7 @@
|
||||
<p> For each first class object you will find apis
|
||||
for the following actions:</p>
|
||||
<ul>
|
||||
<li><b>Lookup</b>:...LookupByName,
|
||||
<li><b>Lookup</b>:...LookupByName,
|
||||
<li><b>Enumeration</b>:virConnectList... and virConnectNumOf...:
|
||||
those are used to enumerate a set of object available to an given
|
||||
hypervisor connection like:
|
||||
@ -119,7 +119,7 @@
|
||||
<li><b>Destruction</b>: ... </li>
|
||||
</ul>
|
||||
<p> For more in-depth details of the storage related APIs see
|
||||
<a href="storage.html">the storage management page</a>,
|
||||
<a href="storage.html">the storage management page</a>,
|
||||
<h2><a name="Driver" id="Driver">The libvirt drivers</a></h2>
|
||||
<p></p>
|
||||
<p class="image">
|
||||
|
@ -145,20 +145,20 @@
|
||||
|
||||
<ol class="ordinarylist">
|
||||
<li>SHOULD log a message with VIR_DEBUG() indicating that it is
|
||||
being called and its parameters;</li>
|
||||
being called and its parameters;</li>
|
||||
<li>MUST call virResetLastError();</li>
|
||||
<li>SHOULD confirm that the connection is valid with
|
||||
VIR_IS_CONNECT(conn);</li>
|
||||
VIR_IS_CONNECT(conn);</li>
|
||||
<li><strong>SECURITY: If the API requires a connection with write
|
||||
privileges, MUST confirm that the connection flags do not
|
||||
indicate that the connection is read-only;</strong></li>
|
||||
privileges, MUST confirm that the connection flags do not
|
||||
indicate that the connection is read-only;</strong></li>
|
||||
<li>SHOULD do basic validation of the parameters that are being
|
||||
passed in;</li>
|
||||
passed in;</li>
|
||||
<li>MUST confirm that the driver for this connection exists and that
|
||||
it implements this function;</li>
|
||||
it implements this function;</li>
|
||||
<li>MUST call the internal API;</li>
|
||||
<li>SHOULD log a message with VIR_DEBUG() indicating that it is
|
||||
returning, its return value, and status.</li>
|
||||
returning, its return value, and status.</li>
|
||||
<li>MUST return status to the caller.</li>
|
||||
</ol>
|
||||
|
||||
@ -178,7 +178,7 @@
|
||||
involves making two additions to:
|
||||
</p>
|
||||
|
||||
<p><code>qemud/remote_protocol.x</code></p>
|
||||
<p><code>src/remote/remote_protocol.x</code></p>
|
||||
|
||||
<p>
|
||||
First, create two new structs for each new function that you're adding
|
||||
@ -198,7 +198,7 @@
|
||||
|
||||
<p>
|
||||
Once these changes are in place, it's necessary to run 'make rpcgen'
|
||||
in the qemud directory to create the .c and .h files required by the
|
||||
in the src directory to create the .c and .h files required by the
|
||||
remote protocol code. This must be done on a Linux host using the
|
||||
GLibC rpcgen program. Other rpcgen versions may generate code which
|
||||
results in bogus compile time warnings
|
||||
@ -213,7 +213,7 @@
|
||||
the rpcgen generated .h files. The remote method calls go in:
|
||||
</p>
|
||||
|
||||
<p><code>src/remote_internal.c</code></p>
|
||||
<p><code>src/remote/remote_internal.c</code></p>
|
||||
|
||||
<p>Each remote method invocation does the following:</p>
|
||||
|
||||
@ -243,7 +243,7 @@
|
||||
The server side dispatchers are implemented in:
|
||||
</p>
|
||||
|
||||
<p><code>qemud/remote.c</code></p>
|
||||
<p><code>daemon/remote.c</code></p>
|
||||
|
||||
<p>Again, this step uses the .h files generated by make rpcgen.</p>
|
||||
|
||||
|
@ -26,6 +26,7 @@ included_files = {
|
||||
|
||||
ignored_words = {
|
||||
"ATTRIBUTE_UNUSED": (0, "macro keyword"),
|
||||
"ATTRIBUTE_SENTINEL": (0, "macro keyword"),
|
||||
"VIR_DEPRECATED": (0, "macro keyword"),
|
||||
"WINAPI": (0, "Windows keyword"),
|
||||
"__declspec": (3, "Windows keyword"),
|
||||
|
@ -21,42 +21,42 @@
|
||||
<dl>
|
||||
<dt>virsh</dt>
|
||||
<dd>
|
||||
An interactive shell, and batch scriptable tool for performing
|
||||
management tasks on all libvirt managed domains, networks and
|
||||
storage. This is part of the libvirt core distribution.
|
||||
An interactive shell, and batch scriptable tool for performing
|
||||
management tasks on all libvirt managed domains, networks and
|
||||
storage. This is part of the libvirt core distribution.
|
||||
</dd>
|
||||
<dt><a href="http://virt-manager.org/">virt-install</a></dt>
|
||||
<dd>
|
||||
Provides a way to provision new virtual machines from a
|
||||
OS distribution install tree. It supports provisioning from
|
||||
local CD images, and the network over NFS, HTTP and FTP.
|
||||
Provides a way to provision new virtual machines from a
|
||||
OS distribution install tree. It supports provisioning from
|
||||
local CD images, and the network over NFS, HTTP and FTP.
|
||||
</dd>
|
||||
<dt><a href="http://virt-manager.org/">virt-clone</a></dt>
|
||||
<dd>
|
||||
Allows the disk image(s) and configuration for an existing
|
||||
virtual machine to be cloned to form a new virtual machine.
|
||||
It automates copying of data across to new disk images, and
|
||||
updates the UUID, Mac address and name in the configuration
|
||||
Allows the disk image(s) and configuration for an existing
|
||||
virtual machine to be cloned to form a new virtual machine.
|
||||
It automates copying of data across to new disk images, and
|
||||
updates the UUID, Mac address and name in the configuration
|
||||
</dd>
|
||||
<dt><a href="http://virt-manager.org/">virt-image</a></dt>
|
||||
<dd>
|
||||
Provides a way to deploy virtual appliances. It defines a
|
||||
simplified portable XML format describing the pre-requisites
|
||||
of a virtual machine. At time of deployment this is translated
|
||||
into the domain XML format for execution under any libvirt
|
||||
hypervisor meeting the pre-requisites.
|
||||
Provides a way to deploy virtual appliances. It defines a
|
||||
simplified portable XML format describing the pre-requisites
|
||||
of a virtual machine. At time of deployment this is translated
|
||||
into the domain XML format for execution under any libvirt
|
||||
hypervisor meeting the pre-requisites.
|
||||
</dd>
|
||||
<dt><a href="http://et.redhat.com/~rjones/virt-df/">virt-df</a></dt>
|
||||
<dd>
|
||||
Examine the utilization of each filesystem in a virtual machine
|
||||
from the comfort of the host machine. This tool peeks into the
|
||||
guest disks and determines how much space is used. It can cope
|
||||
with common Linux filesystems and LVM volumes.
|
||||
Examine the utilization of each filesystem in a virtual machine
|
||||
from the comfort of the host machine. This tool peeks into the
|
||||
guest disks and determines how much space is used. It can cope
|
||||
with common Linux filesystems and LVM volumes.
|
||||
</dd>
|
||||
<dt><a href="http://et.redhat.com/~rjones/virt-top/">virt-top</a></dt>
|
||||
<dd>
|
||||
Watch the CPU, memory, network and disk utilization of all
|
||||
virtual machines running on a host.
|
||||
Watch the CPU, memory, network and disk utilization of all
|
||||
virtual machines running on a host.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -65,17 +65,17 @@
|
||||
<dl>
|
||||
<dt><a href="http://virt-manager.org/">virt-manager</a></dt>
|
||||
<dd>
|
||||
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.
|
||||
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.
|
||||
</dd>
|
||||
<dt><a href="http://virt-manager.org/">virt-viewer</a></dt>
|
||||
<dd>
|
||||
A lightweight tool for accessing the graphical console
|
||||
associated with a virtual machine. It can securely connect
|
||||
to remote consoles supporting the VNC protocol. Also provides
|
||||
an optional mozilla browser plugin.
|
||||
A lightweight tool for accessing the graphical console
|
||||
associated with a virtual machine. It can securely connect
|
||||
to remote consoles supporting the VNC protocol. Also provides
|
||||
an optional mozilla browser plugin.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -84,18 +84,18 @@
|
||||
<dl>
|
||||
<dt><a href="http://ovirt.org/">oVirt</a></dt>
|
||||
<dd>
|
||||
oVirt provides the ability to manage large numbers of virtual
|
||||
machines across an entire data center of hosts. It integrates
|
||||
with FreeIPA for Kerberos authentication, and in the future,
|
||||
certificate management.
|
||||
oVirt provides the ability to manage large numbers of virtual
|
||||
machines across an entire data center of hosts. It integrates
|
||||
with FreeIPA for Kerberos authentication, and in the future,
|
||||
certificate management.
|
||||
</dd>
|
||||
<dt><a href="http://community.abiquo.com/display/AbiCloud">AbiCloud</a></dt>
|
||||
<dd>
|
||||
AbiCloud is an open source cloud platform manager which allows to
|
||||
easily deploy a private cloud in your datacenter. One of the key
|
||||
differences of AbiCloud is the web rich interface for managing the
|
||||
infrastructure. You can deploy a new service just dragging and
|
||||
dropping a VM.
|
||||
AbiCloud is an open source cloud platform manager which allows to
|
||||
easily deploy a private cloud in your datacenter. One of the key
|
||||
differences of AbiCloud is the web rich interface for managing the
|
||||
infrastructure. You can deploy a new service just dragging and
|
||||
dropping a VM.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -104,10 +104,10 @@
|
||||
<dl>
|
||||
<dt><a href="http://et.redhat.com/~rjones/virt-p2v/">virt-p2v</a></dt>
|
||||
<dd>
|
||||
A tool for converting a physical machine into a virtual machine. It
|
||||
is a LiveCD which is booted on the machine to be converted. It collects
|
||||
a little information from the user and then copies the disks over to
|
||||
a remote machine and defines the XML for a domain to run the guest.
|
||||
A tool for converting a physical machine into a virtual machine. It
|
||||
is a LiveCD which is booted on the machine to be converted. It collects
|
||||
a little information from the user and then copies the disks over to
|
||||
a remote machine and defines the XML for a domain to run the guest.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -115,13 +115,13 @@
|
||||
<dl>
|
||||
<dt><a href="http://honk.sigxcpu.org/projects/libvirt/#munin">for munin</a></dt>
|
||||
<dd>
|
||||
The plugins provided by Guido Günther allow to monitor various things
|
||||
The plugins provided by Guido Günther allow to monitor various things
|
||||
like network and block I/O with
|
||||
<a href="http://munin.projects.linpro.no/">Munin</a>.
|
||||
</dd>
|
||||
<dt><a href="http://collectd.org/plugins/libvirt.shtml">for collectd</a></dt>
|
||||
<dd>
|
||||
The libvirt-plugin is part of <a href="http://collectd.org/">collectd</a>
|
||||
The libvirt-plugin is part of <a href="http://collectd.org/">collectd</a>
|
||||
and gather statistics about virtualized guests on a system. This
|
||||
way, you can collect CPU, network interface and block device usage
|
||||
for each guest without installing collectd on the guest systems.
|
||||
@ -130,8 +130,8 @@
|
||||
</dd>
|
||||
<dt><a href="http://et.redhat.com/~rjones/nagios-virt/">nagios-virt</a></dt>
|
||||
<dd>
|
||||
Nagios-virt is a configuration tool for adding monitoring of your
|
||||
virtualised domains to <a href="http://www.nagios.org/">Nagios</a>.
|
||||
Nagios-virt is a configuration tool for adding monitoring of your
|
||||
virtualised domains to <a href="http://www.nagios.org/">Nagios</a>.
|
||||
You can use this tool to either set up a new Nagios installation for
|
||||
your Xen or QEMU/KVM guests, or to integrate with your existing Nagios
|
||||
installation.
|
||||
|
@ -11,26 +11,26 @@
|
||||
|
||||
<ul>
|
||||
<li><strong>VLAN 1</strong>. This virtual network has connectivity
|
||||
to <code>LAN 2</code> with traffic forwarded and NATed.
|
||||
to <code>LAN 2</code> with traffic forwarded and NATed.
|
||||
</li>
|
||||
<li><strong>VLAN 2</strong>. This virtual network is completely
|
||||
isolated from any physical LAN.
|
||||
isolated from any physical LAN.
|
||||
</li>
|
||||
<li><strong>Guest A</strong>. The first network interface is bridged
|
||||
to the physical <code>LAN 1</code>. The second interface is connected
|
||||
to a virtual network <code>VLAN 1</code>.
|
||||
to the physical <code>LAN 1</code>. The second interface is connected
|
||||
to a virtual network <code>VLAN 1</code>.
|
||||
</li>
|
||||
<li><strong>Guest B</strong>. The first network interface is connected
|
||||
to a virtual network <code>VLAN 1</code>, giving it limited NAT
|
||||
based connectivity to LAN2. It has a second network interface
|
||||
connected to <code>VLAN 2</code>. It acts a router allowing limited
|
||||
traffic between the two VLANs, thus giving <code>Guest C</code>
|
||||
connectivity to the physical <code>LAN 2</code>.
|
||||
</li>
|
||||
to a virtual network <code>VLAN 1</code>, giving it limited NAT
|
||||
based connectivity to LAN2. It has a second network interface
|
||||
connected to <code>VLAN 2</code>. It acts a router allowing limited
|
||||
traffic between the two VLANs, thus giving <code>Guest C</code>
|
||||
connectivity to the physical <code>LAN 2</code>.
|
||||
</li>
|
||||
<li><strong>Guest C</strong>. The only network interface is connected
|
||||
to a virtual network <code>VLAN 2</code>. It has no direct connectivity
|
||||
to a physical LAN, relying on <code>Guest B</codE> to route traffic
|
||||
on its behalf.
|
||||
to a virtual network <code>VLAN 2</code>. It has no direct connectivity
|
||||
to a physical LAN, relying on <code>Guest B</codE> to route traffic
|
||||
on its behalf.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -7,16 +7,16 @@
|
||||
</p>
|
||||
<ol>
|
||||
<li>
|
||||
<strong>Volume</strong> - a single storage volume which can
|
||||
be assigned to a guest, or used for creating further pools. A
|
||||
volume is either a block device, a raw file, or a special format
|
||||
file.
|
||||
<strong>Volume</strong> - a single storage volume which can
|
||||
be assigned to a guest, or used for creating further pools. A
|
||||
volume is either a block device, a raw file, or a special format
|
||||
file.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Pool</strong> - provides a means for taking a chunk
|
||||
of storage and carving it up into volumes. A pool can be used to
|
||||
manage things such as a physical disk, a NFS server, a iSCSI target,
|
||||
a host adapter, an LVM group.
|
||||
<strong>Pool</strong> - provides a means for taking a chunk
|
||||
of storage and carving it up into volumes. A pool can be used to
|
||||
manage things such as a physical disk, a NFS server, a iSCSI target,
|
||||
a host adapter, an LVM group.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
|
@ -15,7 +15,7 @@ higher level kind of languages:</p>
|
||||
<li><strong>OCaml</strong>: Richard Jones supplies <a href="http://libvirt.org/ocaml/">bindings for OCaml</a>.</li>
|
||||
<li><strong>Ruby</strong>: David Lutterkort provides <a href="http://libvirt.org/ruby/">bindings for Ruby</a>.</li>
|
||||
<li><strong>Java</strong>: Daniel Veillard maintains <a href="java.html">Java bindings</a>.</li>
|
||||
<li><strong>C#</strong>: Richard Jones wrote about <a href="https://www.redhat.com/archives/libvir-list/2008-September/msg00283.html">calling libvirt from C# on the mailing list</a>.</li>
|
||||
<li><strong>C#</strong>: Jaromír Červenka maintains <a href="http://svn.i-tux.cz/listing.php?repname=SharpLibVirt">C# bindings here</a>.</li>
|
||||
</ul>
|
||||
<p>For information on using libvirt on <strong>Windows</strong>
|
||||
<a href="windows.html">please see the Windows
|
||||
|
@ -16,7 +16,7 @@
|
||||
<p>
|
||||
If you are using official libvirt binaries from a Linux distribution
|
||||
check below for distribution specific bug reporting policies first.
|
||||
For general libvirt bug reports, from self-built releases, CVS snapshots
|
||||
For general libvirt bug reports, from self-built releases, GIT snapshots
|
||||
and any other non-distribution supported builds, enter tickets under
|
||||
the <code>Virtualization Tools</code> product and the <code>libvirt</code>
|
||||
component.
|
||||
@ -30,26 +30,26 @@
|
||||
<h2>Linux Distribution specific bug reports</h2>
|
||||
<ul>
|
||||
<li>
|
||||
If you are using official binaries from a <strong>Fedora distribution</strong>, enter
|
||||
tickets against the <code>Fedora</code> product and the <code>libvirt</code>
|
||||
component.
|
||||
<ul>
|
||||
<li><a href="http://bugzilla.redhat.com/buglist.cgi?component=libvirt&product=Fedora">View Fedora libvirt tickets</a></li>
|
||||
<li><a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&component=libvirt">New Fedora libvirt ticket</a></li>
|
||||
</ul>
|
||||
If you are using official binaries from a <strong>Fedora distribution</strong>, enter
|
||||
tickets against the <code>Fedora</code> product and the <code>libvirt</code>
|
||||
component.
|
||||
<ul>
|
||||
<li><a href="http://bugzilla.redhat.com/buglist.cgi?component=libvirt&product=Fedora">View Fedora libvirt tickets</a></li>
|
||||
<li><a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&component=libvirt">New Fedora libvirt ticket</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
If you are using official binaries from <strong>Red Hat Enterprise Linux distribution</strong>,
|
||||
tickets against the <code>Red Hat Enterprise Linux 5</code> product and
|
||||
the <code>libvirt</code> component.
|
||||
<ul>
|
||||
<li><a href="http://bugzilla.redhat.com/buglist.cgi?component=libvirt&product=Red%20Hat%20Enterprise%20Linux%205">View Red Hat Enterprise Linux libvirt tickets</a></li>
|
||||
<li><a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%205&component=libvirt">New Red Hat Enterprise Linux libvirt ticket</a></li>
|
||||
</ul>
|
||||
If you are using official binaries from <strong>Red Hat Enterprise Linux distribution</strong>,
|
||||
tickets against the <code>Red Hat Enterprise Linux 5</code> product and
|
||||
the <code>libvirt</code> component.
|
||||
<ul>
|
||||
<li><a href="http://bugzilla.redhat.com/buglist.cgi?component=libvirt&product=Red%20Hat%20Enterprise%20Linux%205">View Red Hat Enterprise Linux libvirt tickets</a></li>
|
||||
<li><a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%205&component=libvirt">New Red Hat Enterprise Linux libvirt ticket</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
If you are using official binaries from another Linux distribution first
|
||||
follow their own bug reporting guidelines.
|
||||
If you are using official binaries from another Linux distribution first
|
||||
follow their own bug reporting guidelines.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -64,8 +64,8 @@
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>The version number of the libvirt build, or date of the CVS
|
||||
checkout</li>
|
||||
<li>The version number of the libvirt build, or SHA1 of the GIT
|
||||
commit</li>
|
||||
<li>The hardware architecture being used</li>
|
||||
<li>The name of the hypervisor (Xen, QEMU, KVM)</li>
|
||||
<li>The XML config of the guest domain if relevant</li>
|
||||
|
@ -3,17 +3,46 @@
|
||||
<body>
|
||||
<h1>Contacting the development team</h1>
|
||||
|
||||
<h2>Mailing list</h2>
|
||||
<h2>Mailing lists</h2>
|
||||
|
||||
<p>
|
||||
There is a mailing-list <a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a> for libvirt,
|
||||
with an <a href="https://www.redhat.com/archives/libvir-list/">on-line archive</a>.
|
||||
Please subscribe to this list before posting by visiting the
|
||||
<a href="https://www.redhat.com/mailman/listinfo/libvir-list">associated Web</a>
|
||||
page and follow the instructions. Patches with explanations and provided as
|
||||
attachments are really appreciated and will be discussed on the mailing list.
|
||||
If possible generate the patches by using <code>cvs diff -up</code> in a CVS
|
||||
checkout.
|
||||
There are two mailing-lists:
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt><a href="https://www.redhat.com/archives/libvir-list/">libvir-list@redhat.com</a></dt>
|
||||
<dd>This list a place for discussions about the <strong>development</strong> of libvirt. Topics for discussion include
|
||||
<ul>
|
||||
<li>New features for libvirt</li>
|
||||
<li>Bug fixing of libvirt</li>
|
||||
<li>New hypervisor drivers</li>
|
||||
<li>Development of language bindings for libvirt API</li>
|
||||
<li>Testing and documentation of libvirt</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt><a href="">libvirt-users@redhat.com</a></dt>
|
||||
<dd>This list a place for discussions involving libvirt <strong>users</strong>. Topics for discussion include
|
||||
<ul>
|
||||
<li>Usage of libvirt / virsh</li>
|
||||
<li>Administration of libvirtd</li>
|
||||
<li>Deployment of libvirt with hypervisors</li>
|
||||
<li>Development of applications on top of / using the libvirt API(s)</li>
|
||||
<li>Any other topics along these lines</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
Both mailing lists require that you subscribe before posting to the list,
|
||||
otherwise your posting will be delayed for manual approval by mailman.
|
||||
You can subscribe at the linked webpages above.
|
||||
</p>
|
||||
<p>
|
||||
Patches with explanations and provided as attachments are really appreciated and should
|
||||
be directed to the development mailing list will be discussed on the mailing list.
|
||||
If possible generate the patches by using <code>git format-patch</code> in a GIT
|
||||
clone.
|
||||
</p>
|
||||
|
||||
<h2>IRC discussion</h2>
|
||||
|
@ -25,10 +25,10 @@
|
||||
# make install
|
||||
</pre>
|
||||
|
||||
<h2>Built from CVS / GIT</h2>
|
||||
<h2>Built from GIT</h2>
|
||||
|
||||
<p>
|
||||
When building from CVS it is necessary to generate the autotools
|
||||
When building from GIT it is necessary to generate the autotools
|
||||
support files. This requires having <code>autoconf</code>,
|
||||
<code>automake</code>, <code>libtool</code> and <code>intltool</code>
|
||||
installed. The process can be automated with the <code>autogen.sh</code>
|
||||
|
@ -24,6 +24,7 @@
|
||||
<li><strong><a href="drvopenvz.html">OpenVZ</a></strong></li>
|
||||
<li><strong><a href="drvvbox.html">VirtualBox</a></strong></li>
|
||||
<li><strong><a href="drvone.html">OpenNebula</a></strong></li>
|
||||
<li><strong><a href="drvesx.html">VMware ESX</a></strong></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
597
docs/drvesx.html.in
Normal file
597
docs/drvesx.html.in
Normal file
@ -0,0 +1,597 @@
|
||||
<html><body>
|
||||
<h1>VMware ESX hypervisor driver</h1>
|
||||
<ul id="toc"></ul>
|
||||
<p>
|
||||
The libvirt VMware ESX driver can manage VMware ESX/ESXi 3.5/4.0 and
|
||||
VMware GSX 2.0, also called VMware Server 2.0, and possibly later
|
||||
versions.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="prereq">Deployment pre-requisites</a></h2>
|
||||
<p>
|
||||
None. Any out-of-the-box installation of ESX/GSX should work. No
|
||||
preparations are required on the server side, no libvirtd must be
|
||||
installed on the ESX server. The driver uses version 2.5 of the remote,
|
||||
SOAP based
|
||||
<a href="http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/">
|
||||
VMware Virtual Infrastructure API</a> (VI API) to communicate with the
|
||||
ESX server, like the VMware Virtual Infrastructure Client (VI client)
|
||||
does. Since version 4.0 this API is called
|
||||
<a href="http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/">
|
||||
VMware vSphere API</a>.
|
||||
</p>
|
||||
|
||||
<h2><a name="uri">Connections to the VMware ESX driver</a></h2>
|
||||
<p>
|
||||
Some example remote connection URIs for the driver are:
|
||||
</p>
|
||||
<pre>
|
||||
esx://example.com (ESX over HTTPS)
|
||||
gsx://example.com (GSX over HTTPS)
|
||||
esx://example.com/?transport=http (ESX over HTTP)
|
||||
esx://example.com/?no_verify=1 (ESX over HTTPS, but doesn't verify the server's SSL certificate)
|
||||
</pre>
|
||||
|
||||
|
||||
<h3><a name="uriformat">URI Format</a></h3>
|
||||
<p>
|
||||
URIs have this general form ('[...]' marks an optional part).
|
||||
</p>
|
||||
<pre>
|
||||
type://[username@]hostname[:port]/[?extraparameters]
|
||||
</pre>
|
||||
<p>
|
||||
The <code>type://</code> is either <code>esx://</code> or
|
||||
<code>gsx://</code> and the driver selects the default port depending
|
||||
on it. For ESX the default HTTPS port is 443, for GSX it is 8333. If
|
||||
the port parameter is given, it overrides the default port.
|
||||
</p>
|
||||
|
||||
|
||||
<h4>Extra parameters</h4>
|
||||
<p>
|
||||
Extra parameters can be added to a URI as part of the query string
|
||||
(the part following '?'). The driver understands the extra parameters
|
||||
shown below.
|
||||
</p>
|
||||
<table class="top_table">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Values</th>
|
||||
<th>Meaning</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>transport</code>
|
||||
</td>
|
||||
<td>
|
||||
<code>http</code> or <code>https</code>
|
||||
</td>
|
||||
<td>
|
||||
Overrides the default HTTPS transport. For ESX the default
|
||||
HTTP port is 80, for GSX it is 8222.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>vcenter</code>
|
||||
</td>
|
||||
<td>
|
||||
Hostname of a VMware vCenter or <code>*</code>
|
||||
</td>
|
||||
<td>
|
||||
In order to perform a migration the driver needs to know the
|
||||
VMware vCenter for the ESX server. If set to <code>*</code>,
|
||||
the driver connects to the vCenter known to the ESX server.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>no_verify</code>
|
||||
</td>
|
||||
<td>
|
||||
<code>0</code> or <code>1</code>
|
||||
</td>
|
||||
<td>
|
||||
If set to 1, this disables libcurl client checks of the server's
|
||||
SSL certificate. The default value it 0.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>auto_answer</code>
|
||||
</td>
|
||||
<td>
|
||||
<code>0</code> or <code>1</code>
|
||||
</td>
|
||||
<td>
|
||||
If set to 1, the driver answers all
|
||||
<a href="#questions">questions</a> with the default answer.
|
||||
If set to 0, questions are reported as errors. The default
|
||||
value it 0.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h3><a name="auth">Authentication</a></h3>
|
||||
<p>
|
||||
In order to perform any useful operation the driver needs to log into
|
||||
the ESX server. Therefore, only <code>virConnectOpenAuth</code> can be
|
||||
used to connect to an ESX server, <code>virConnectOpen</code> and
|
||||
<code>virConnectOpenReadOnly</code> don't work.
|
||||
To log into an ESX server or vCenter the driver will request
|
||||
credentials using the callback passed to the
|
||||
<code>virConnectOpenAuth</code> function. The driver passes the
|
||||
hostname as challenge parameter to the callback. This enables the
|
||||
callback to distinguish between requests for ESX server and vCenter.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Note</strong>: During the ongoing driver development, testing
|
||||
is done using an unrestricted <code>root</code> account. Problems may
|
||||
occur if you use a restricted account. Detailed testing with restricted
|
||||
accounts has not been done yet.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="questions">Questions blocking tasks</a></h2>
|
||||
<p>
|
||||
Some methods of the VI API start tasks, for example
|
||||
<code>PowerOnVM_Task()</code>. Such tasks may be blocked by questions
|
||||
if the ESX server detects an issue with the domain that requires user
|
||||
interaction. The ESX driver cannot prompt the user to answer a
|
||||
question, libvirt doesn't have an API for something like this.
|
||||
</p>
|
||||
<p>
|
||||
The VI API provides the <code>AnswerVM()</code> method to
|
||||
programmatically answer a questions. So the driver has two options
|
||||
how to handle such a situation: either answer the questions with the
|
||||
default answer or report the question as an error and cancel the
|
||||
blocked task if possible. The
|
||||
<a href="#uriformat"><code>auto_answer</code></a> query parameter
|
||||
controls the answering behavior.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="xmlspecial">Specialties in the domain XML config</a></h2>
|
||||
<p>
|
||||
There are several specialties in the domain XML config for ESX domains.
|
||||
</p>
|
||||
|
||||
<h3><a name="restrictions">Restrictions</h3>
|
||||
<p>
|
||||
There are some restrictions for some values of the domain XML config.
|
||||
The driver will complain if this restrictions are violated.
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
Memory size has to be a multiple of 4096
|
||||
</li>
|
||||
<li>
|
||||
Number of virtual CPU has to be 1 or a multiple of 2
|
||||
</li>
|
||||
<li>
|
||||
Valid MAC address prefixes are <code>00:0c:29</code> and
|
||||
<code>00:50:56</code>. <span class="since">Since 0.7.6</span>
|
||||
arbitrary <a href="#macaddresses">MAC addresses</a> are supported.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a name="datastore">Datastore references</h3>
|
||||
<p>
|
||||
Storage is managed in datastores. VMware uses a special path format to
|
||||
reference files in a datastore. Basically, the datastore name is put
|
||||
into squared braces in front of the path.
|
||||
</p>
|
||||
<pre>
|
||||
[datastore] directory/filename
|
||||
</pre>
|
||||
<p>
|
||||
To define a new domain the driver converts the domain XML into a
|
||||
VMware VMX file and uploads it to a datastore known to the ESX server.
|
||||
Because multiple datastores may be known to an ESX server the driver
|
||||
needs to decide to which datastores the VMX file should be uploaded.
|
||||
The driver deduces this information from the path of the source of the
|
||||
first file-based harddisk listed in the domain XML.
|
||||
</p>
|
||||
|
||||
|
||||
<h3><a name="macaddresses">MAC addresses</h3>
|
||||
<p>
|
||||
VMware has registered two MAC address prefixes for domains:
|
||||
<code>00:0c:29</code> and <code>00:50:56</code>. These prefixes are
|
||||
split into ranges for different purposes.
|
||||
</p>
|
||||
<table class="top_table">
|
||||
<tr>
|
||||
<th>Range</th>
|
||||
<th>Purpose</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>00:0c:29:00:00:00</code> - <code>00:0c:29:ff:ff:ff</code>
|
||||
</td>
|
||||
<td>
|
||||
An ESX server autogenerates MAC addresses from this range if
|
||||
the VMX file doesn't contain a MAC address when trying to start
|
||||
a domain.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>00:50:56:00:00:00</code> - <code>00:50:56:3f:ff:ff</code>
|
||||
</td>
|
||||
<td>
|
||||
MAC addresses from this range can by manually assigned by the
|
||||
user in the VI client.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>00:50:56:80:00:00</code> - <code>00:50:56:bf:ff:ff</code>
|
||||
</td>
|
||||
<td>
|
||||
A VI client autogenerates MAC addresses from this range for
|
||||
newly defined domains.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
The VMX files generated by the ESX driver always contain a MAC address,
|
||||
because libvirt generates a random one if an interface element in the
|
||||
domain XML file lacks a MAC address.
|
||||
<span class="since">Since 0.7.6</span> the ESX driver sets the prefix
|
||||
for generated MAC addresses to <code>00:0c:29</code>. Before 0.7.6
|
||||
the <code>00:50:56</code> prefix was used. Sometimes this resulted in
|
||||
the generation of out-of-range MAC address that were rejected by the
|
||||
ESX server.
|
||||
</p>
|
||||
<p>
|
||||
Also <span class="since">since 0.7.6</span> every MAC address outside
|
||||
this ranges can be used. For such MAC addresses the ESX server-side
|
||||
check is disabled in the VMX file to stop the ESX server from rejecting
|
||||
out-of-predefined-range MAC addresses.
|
||||
</p>
|
||||
<pre>
|
||||
ethernet0.checkMACAddress = "false"
|
||||
</pre>
|
||||
|
||||
|
||||
<h3><a name="hardware">Available hardware</h3>
|
||||
<p>
|
||||
VMware ESX supports different models of SCSI controllers and network
|
||||
cards.
|
||||
</p>
|
||||
|
||||
<h4>SCSI controller models</h4>
|
||||
<dl>
|
||||
<dt><code>buslogic</code></dt>
|
||||
<dd>
|
||||
BusLogic SCSI controller for older guests.
|
||||
</dd>
|
||||
<dt><code>lsilogic</code></dt>
|
||||
<dd>
|
||||
LSI Logic SCSI controller for recent guests.
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
Here a domain XML snippet:
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='<strong>lsilogic</strong>'/>
|
||||
<source file='[local-storage] Fedora11/Fedora11.vmdk'/>
|
||||
<target dev='sda' bus='scsi'/>
|
||||
</disk>
|
||||
...
|
||||
</pre>
|
||||
|
||||
|
||||
<h4>Network card models</h4>
|
||||
<dl>
|
||||
<dt><code>vlance</code></dt>
|
||||
<dd>
|
||||
AMD PCnet32 network card for older guests.
|
||||
</dd>
|
||||
<dt><code>vmxnet</code>, <code>vmxnet3</code></dt>
|
||||
<dd>
|
||||
Special VMware VMXnet network card, requires VMware tools inside
|
||||
the guest.
|
||||
</dd>
|
||||
<dt><code>e1000</code></dt>
|
||||
<dd>
|
||||
Intel E1000 network card for recent guests.
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
Here a domain XML snippet:
|
||||
</p>
|
||||
<pre>
|
||||
...
|
||||
<interface type='bridge'>
|
||||
<mac address='00:50:56:25:48:c7'/>
|
||||
<source bridge='VM Network'/>
|
||||
<model type='<strong>e1000</strong>'/>
|
||||
</interface>
|
||||
...
|
||||
</pre>
|
||||
|
||||
|
||||
<h2><a name="importexport">Import and export of domain XML configs</a></h2>
|
||||
<p>
|
||||
The ESX driver currently supports a native config format known as
|
||||
<code>vmware-vmx</code> to handle VMware VMX configs.
|
||||
</p>
|
||||
|
||||
|
||||
<h3><a name="xmlimport">Converting from VMware VMX config to domain XML config</a></h3>
|
||||
<p>
|
||||
The <code>virsh domxml-from-native</code> provides a way to convert an
|
||||
existing VMware VMX config into a domain XML config that can then be
|
||||
used by libvirt.
|
||||
</p>
|
||||
<pre>
|
||||
$ cat > demo.vmx << EOF
|
||||
#!/usr/bin/vmware
|
||||
config.version = "8"
|
||||
virtualHW.version = "4"
|
||||
floppy0.present = "false"
|
||||
nvram = "Fedora11.nvram"
|
||||
deploymentPlatform = "windows"
|
||||
virtualHW.productCompatibility = "hosted"
|
||||
tools.upgrade.policy = "useGlobal"
|
||||
powerType.powerOff = "default"
|
||||
powerType.powerOn = "default"
|
||||
powerType.suspend = "default"
|
||||
powerType.reset = "default"
|
||||
displayName = "Fedora11"
|
||||
extendedConfigFile = "Fedora11.vmxf"
|
||||
scsi0.present = "true"
|
||||
scsi0.sharedBus = "none"
|
||||
scsi0.virtualDev = "lsilogic"
|
||||
memsize = "1024"
|
||||
scsi0:0.present = "true"
|
||||
scsi0:0.fileName = "/vmfs/volumes/498076b2-02796c1a-ef5b-000ae484a6a3/Fedora11/Fedora11.vmdk"
|
||||
scsi0:0.deviceType = "scsi-hardDisk"
|
||||
ide0:0.present = "true"
|
||||
ide0:0.clientDevice = "true"
|
||||
ide0:0.deviceType = "cdrom-raw"
|
||||
ide0:0.startConnected = "false"
|
||||
ethernet0.present = "true"
|
||||
ethernet0.networkName = "VM Network"
|
||||
ethernet0.addressType = "vpx"
|
||||
ethernet0.address = "00:50:56:91:48:c7"
|
||||
chipset.onlineStandby = "false"
|
||||
guestOSAltName = "Red Hat Enterprise Linux 5 (32-Bit)"
|
||||
guestOS = "rhel5"
|
||||
uuid.bios = "50 11 5e 16 9b dc 49 d7-f1 71 53 c4 d7 f9 17 10"
|
||||
snapshot.action = "keep"
|
||||
sched.cpu.min = "0"
|
||||
sched.cpu.units = "mhz"
|
||||
sched.cpu.shares = "normal"
|
||||
sched.mem.minsize = "0"
|
||||
sched.mem.shares = "normal"
|
||||
toolScripts.afterPowerOn = "true"
|
||||
toolScripts.afterResume = "true"
|
||||
toolScripts.beforeSuspend = "true"
|
||||
toolScripts.beforePowerOff = "true"
|
||||
scsi0:0.redo = ""
|
||||
tools.syncTime = "false"
|
||||
uuid.location = "56 4d b5 06 a2 bd fb eb-ae 86 f7 d8 49 27 d0 c4"
|
||||
sched.cpu.max = "unlimited"
|
||||
sched.swap.derivedName = "/vmfs/volumes/498076b2-02796c1a-ef5b-000ae484a6a3/Fedora11/Fedora11-7de040d8.vswp"
|
||||
tools.remindInstall = "TRUE"
|
||||
EOF
|
||||
|
||||
$ virsh -c esx://example.com domxml-from-native vmware-vmx demo.vmx
|
||||
Enter username for example.com [root]:
|
||||
Enter root password for example.com:
|
||||
<domain type='vmware'>
|
||||
<name>Fedora11</name>
|
||||
<uuid>50115e16-9bdc-49d7-f171-53c4d7f91710</uuid>
|
||||
<memory>1048576</memory>
|
||||
<currentMemory>1048576</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch='i686'>hvm</type>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='lsilogic'/>
|
||||
<source file='[local-storage] Fedora11/Fedora11.vmdk'/>
|
||||
<target dev='sda' bus='scsi'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<mac address='00:50:56:91:48:c7'/>
|
||||
<source bridge='VM Network'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
|
||||
<h3><a name="xmlexport">Converting from domain XML config to VMware VMX config</a></h3>
|
||||
<p>
|
||||
The <code>virsh domxml-to-native</code> provides a way to convert a
|
||||
domain XML config into a VMware VMX config.
|
||||
</p>
|
||||
<pre>
|
||||
$ cat > demo.xml << EOF
|
||||
<domain type='vmware'>
|
||||
<name>Fedora11</name>
|
||||
<uuid>50115e16-9bdc-49d7-f171-53c4d7f91710</uuid>
|
||||
<memory>1048576</memory>
|
||||
<currentMemory>1048576</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='lsilogic'/>
|
||||
<source file='[local-storage] Fedora11/Fedora11.vmdk'/>
|
||||
<target dev='sda' bus='scsi'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<mac address='00:50:56:25:48:c7'/>
|
||||
<source bridge='VM Network'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
EOF
|
||||
|
||||
$ virsh -c esx://example.com domxml-to-native vmware-vmx demo.xml
|
||||
Enter username for example.com [root]:
|
||||
Enter root password for example.com:
|
||||
config.version = "8"
|
||||
virtualHW.version = "4"
|
||||
guestOS = "other-64"
|
||||
uuid.bios = "50 11 5e 16 9b dc 49 d7-f1 71 53 c4 d7 f9 17 10"
|
||||
displayName = "Fedora11"
|
||||
memsize = "1024"
|
||||
numvcpus = "1"
|
||||
scsi0.present = "true"
|
||||
scsi0.virtualDev = "lsilogic"
|
||||
scsi0:0.present = "true"
|
||||
scsi0:0.deviceType = "scsi-hardDisk"
|
||||
scsi0:0.fileName = "/vmfs/volumes/local-storage/Fedora11/Fedora11.vmdk"
|
||||
ethernet0.present = "true"
|
||||
ethernet0.networkName = "VM Network"
|
||||
ethernet0.connectionType = "bridged"
|
||||
ethernet0.addressType = "static"
|
||||
ethernet0.address = "00:50:56:25:48:C7"
|
||||
</pre>
|
||||
|
||||
|
||||
<h2><a name="xmlconfig">Example domain XML configs</a></h2>
|
||||
|
||||
<h3>Fedora11 on x86_64</h3>
|
||||
<pre>
|
||||
<domain type='vmware'>
|
||||
<name>Fedora11</name>
|
||||
<uuid>50115e16-9bdc-49d7-f171-53c4d7f91710</uuid>
|
||||
<memory>1048576</memory>
|
||||
<currentMemory>1048576</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64'>hvm</type>
|
||||
</os>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='[local-storage] Fedora11/Fedora11.vmdk'/>
|
||||
<target dev='sda' bus='scsi'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<mac address='00:50:56:25:48:c7'/>
|
||||
<source bridge='VM Network'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
|
||||
<h2><a name="migration">Migration</a></h2>
|
||||
<p>
|
||||
A migration cannot be initiated on an ESX server directly, a VMware
|
||||
vCenter is necessary for this. The <code>vcenter</code> query
|
||||
parameter must be set either to the hostname or IP address of the
|
||||
vCenter managing the ESX server or to <code>*</code>. Setting it
|
||||
to <code>*</code> causes the driver to connect to the vCenter known to
|
||||
the ESX server. If the ESX server is not managed by a vCenter an error
|
||||
is reported.
|
||||
</p>
|
||||
<pre>
|
||||
esx://example.com/?vcenter=example-vcenter.com
|
||||
</pre>
|
||||
<p>
|
||||
Here an example how to migrate the domain <code>Fedora11</code> from
|
||||
ESX server <code>example-src.com</code> to ESX server
|
||||
<code>example-dst.com</code> implicitly involving vCenter
|
||||
<code>example-vcenter.com</code> using <code>virsh</code>.
|
||||
</p>
|
||||
<pre>
|
||||
$ virsh -c esx://example-src.com/?vcenter=* migrate Fedora11 esx://example-dst.com/?vcenter=*
|
||||
Enter username for example-src.com [root]:
|
||||
Enter root password for example-src.com:
|
||||
Enter username for example-vcenter.com [administrator]:
|
||||
Enter administrator password for example-vcenter.com:
|
||||
Enter username for example-dst.com [root]:
|
||||
Enter root password for example-dst.com:
|
||||
Enter username for example-vcenter.com [administrator]:
|
||||
Enter administrator password for example-vcenter.com:
|
||||
</pre>
|
||||
|
||||
|
||||
<h2><a name="scheduler">Scheduler configuration</a></h2>
|
||||
<p>
|
||||
The driver exposes the ESX CPU scheduler. The parameters listed below
|
||||
are available to control the scheduler.
|
||||
</p>
|
||||
<dl>
|
||||
<dt><code>reservation</code></dt>
|
||||
<dd>
|
||||
The amount of CPU resource in MHz that is guaranteed to be
|
||||
available to the domain. Valid values are 0 and greater.
|
||||
</dd>
|
||||
<dt><code>limit</code></dt>
|
||||
<dd>
|
||||
The CPU utilization of the domain will be
|
||||
limited to this value in MHz, even if more CPU resources are
|
||||
available. If the limit is set to -1, the CPU utilization of the
|
||||
domain is unlimited. If the limit is not set to -1, it must be
|
||||
greater than or equal to the reservation.
|
||||
</dd>
|
||||
<dt><code>shares</code></dt>
|
||||
<dd>
|
||||
Shares are used to determine relative CPU
|
||||
allocation between domains. In general, a domain with more shares
|
||||
gets proportionally more of the CPU resource. Valid values are 0
|
||||
and greater. The special values -1, -2 and -3 represent the
|
||||
predefined shares level <code>low</code>, <code>normal</code> and
|
||||
<code>high</code>.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h2><a name="tools">VMware tools</a></h2>
|
||||
<p>
|
||||
Some actions require installed VMware tools. If the VMware tools are
|
||||
not installed in the guest and one of the actions below is to be
|
||||
performed the ESX server raises an error and the driver reports it.
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<code>virDomainReboot</code>
|
||||
</li>
|
||||
<li>
|
||||
<code>virDomainShutdown</code>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><a name="links">Links</a></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="http://www.vmware.com/support/developer/vc-sdk/">
|
||||
VMware vSphere Web Services SDK Documentation
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.vmware.com/pdf/esx3_memory.pdf">
|
||||
The Role of Memory in VMware ESX Server 3
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.sanbarrow.com/vmx.html">
|
||||
VMware VMX config parameters
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</body></html>
|
@ -13,24 +13,24 @@ start it using
|
||||
<p></p>
|
||||
<pre>
|
||||
<domain type='lxc'>
|
||||
<name>vm1</name>
|
||||
<memory>500000</memory>
|
||||
<os>
|
||||
<type>exe</type>
|
||||
<init>/bin/sh</init>
|
||||
</os>
|
||||
<vcpu>1</vcpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/libvirt_lxc</emulator>
|
||||
<interface type='network'>
|
||||
<source network='default'/>
|
||||
</interface>
|
||||
<console type='pty' />
|
||||
</devices>
|
||||
<name>vm1</name>
|
||||
<memory>500000</memory>
|
||||
<os>
|
||||
<type>exe</type>
|
||||
<init>/bin/sh</init>
|
||||
</os>
|
||||
<vcpu>1</vcpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/libvirt_lxc</emulator>
|
||||
<interface type='network'>
|
||||
<source network='default'/>
|
||||
</interface>
|
||||
<console type='pty' />
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
@ -42,28 +42,28 @@ debootstrap, whatever) under /opt/vm-1-root:
|
||||
<p></p>
|
||||
<pre>
|
||||
<domain type='lxc'>
|
||||
<name>vm1</name>
|
||||
<memory>32768</memory>
|
||||
<os>
|
||||
<type>exe</type>
|
||||
<init>/init</init>
|
||||
</os>
|
||||
<vcpu>1</vcpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/libvirt_lxc</emulator>
|
||||
<filesystem type='mount'>
|
||||
<source dir='/opt/vm-1-root'/>
|
||||
<target dir='/'/>
|
||||
</filesystem>
|
||||
<interface type='network'>
|
||||
<source network='default'/>
|
||||
</interface>
|
||||
<console type='pty' />
|
||||
</devices>
|
||||
<name>vm1</name>
|
||||
<memory>32768</memory>
|
||||
<os>
|
||||
<type>exe</type>
|
||||
<init>/init</init>
|
||||
</os>
|
||||
<vcpu>1</vcpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/libexec/libvirt_lxc</emulator>
|
||||
<filesystem type='mount'>
|
||||
<source dir='/opt/vm-1-root'/>
|
||||
<target dir='/'/>
|
||||
</filesystem>
|
||||
<interface type='network'>
|
||||
<source network='default'/>
|
||||
</interface>
|
||||
<console type='pty' />
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
|
@ -18,82 +18,83 @@ tools and VM description files.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p style="margin-bottom: 0in">A working OpenNebula installation,
|
||||
version 1.2 or higher.
|
||||
</p>
|
||||
</li>
|
||||
version 1.2 or higher.
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<a name="uris"></a>Connections to OpenNebula driver</h2>
|
||||
<p>The Uri of the driver protocol is "one". Some example
|
||||
connection Uris for the driver are:
|
||||
</p>
|
||||
<pre> one:/// (local access)
|
||||
one+unix:/// (local access)
|
||||
one://example.com/ (remote access)
|
||||
one+tcp://example.com/ (remote access, SASl/Kerberos)
|
||||
one+ssh://user@example.com/ (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
<pre>
|
||||
one:/// (local access)
|
||||
one+unix:/// (local access)
|
||||
one://example.com/ (remote access)
|
||||
one+tcp://example.com/ (remote access, SASl/Kerberos)
|
||||
one+ssh://user@example.com/ (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
<h2>
|
||||
<a name="xmlconfig"></a>Example domain XML config</h2>
|
||||
<p>There are some limitations on the XML attributes that may be
|
||||
specified when interfacing OpenNebula. The following xml example
|
||||
details the attributes and options supported by the OpenNebula
|
||||
driver:</p>
|
||||
driver:</p>
|
||||
|
||||
<h3>Paravirtualized guest direct kernel boot
|
||||
<h3>Paravirtualized guest direct kernel boot
|
||||
</h3>
|
||||
<pre> <domain type='one'>
|
||||
<name>vm01</name>
|
||||
<memory>32768</memory>
|
||||
<vcpu>1</vcpu>
|
||||
<pre>
|
||||
<domain type='one'>
|
||||
<name>vm01</name>
|
||||
<memory>32768</memory>
|
||||
<vcpu>1</vcpu>
|
||||
|
||||
<os>
|
||||
<type>linux</type>
|
||||
<kernel>/boot/vmlinuz-2.6.24-17-xen</kernel>
|
||||
<initrd>/boot/initrd.img-2.6.24-17-xen</initrd>
|
||||
<cmdline></cmdline>
|
||||
<root>sda1</root>
|
||||
</os>
|
||||
<os>
|
||||
<type>linux</type>
|
||||
<kernel>/boot/vmlinuz-2.6.24-17-xen</kernel>
|
||||
<initrd>/boot/initrd.img-2.6.24-17-xen</initrd>
|
||||
<cmdline></cmdline>
|
||||
<root>sda1</root>
|
||||
</os>
|
||||
|
||||
<devices>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/images/sgehosts/01/disk.img'/>
|
||||
<target dev='sda1'/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/images/sgehosts/01/disk.img'/>
|
||||
<target dev='sda1'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/images/sgehosts/01/swap.img'/>
|
||||
<target dev='sda2'/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/images/sgehosts/01/swap.img'/>
|
||||
<target dev='sda2'/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='cdrom'>
|
||||
<source file='/images/iso/cdrom.iso'/>
|
||||
<target dev='hdc'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<source file='/images/iso/cdrom.iso'/>
|
||||
<target dev='hdc'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
|
||||
|
||||
<!--BRIDGE-->
|
||||
<interface type='bridge'>
|
||||
<source bridge='eth0'/>
|
||||
<mac address='00:16:3e:5d:c7:9e'/>
|
||||
</interface>
|
||||
<!--BRIDGE-->
|
||||
<interface type='bridge'>
|
||||
<source bridge='eth0'/>
|
||||
<mac address='00:16:3e:5d:c7:9e'/>
|
||||
</interface>
|
||||
|
||||
<!--ONE Network-->
|
||||
<interface type='network'>
|
||||
<source network='onenetwork'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
<!--ONE Network-->
|
||||
<interface type='network'>
|
||||
<source network='onenetwork'/>
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
<p>
|
||||
<b>Note:</b> The "<interface type='network'>" will
|
||||
attach the interface to a previously configured network (named
|
||||
<tt>onenetwork</tt>) within the <a href="http://opennebula.org/">OpenNebula</a> system, typically with the
|
||||
<tt>onevnet</tt> CLI command.</p>
|
||||
|
||||
<p><b>Note</b>: OpenNebula supports the simultaneous use of different hypervisors, so you can specify any os type (linux or hvm) supported by your cluster.
|
||||
<p><b>Note</b>: OpenNebula supports the simultaneous use of different hypervisors, so you can specify any os type (linux or hvm) supported by your cluster.
|
||||
</p>
|
||||
|
||||
<h2>Links</h2>
|
||||
|
@ -19,13 +19,13 @@
|
||||
the libvirt driver are:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
openvz:///system (local access)
|
||||
openvz+unix:///system (local access)
|
||||
openvz://example.com/system (remote access, TLS/x509)
|
||||
openvz+tcp://example.com/system (remote access, SASl/Kerberos)
|
||||
openvz+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
<pre>
|
||||
openvz:///system (local access)
|
||||
openvz+unix:///system (local access)
|
||||
openvz://example.com/system (remote access, TLS/x509)
|
||||
openvz+tcp://example.com/system (remote access, SASl/Kerberos)
|
||||
openvz+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<h2>Notes on bridged networking</h2>
|
||||
|
||||
@ -60,10 +60,10 @@
|
||||
must be created containing
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<pre>
|
||||
#!/bin/bash
|
||||
EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr"
|
||||
</pre>
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
The host OS is now ready to allow bridging of guest containers, which
|
||||
@ -83,7 +83,7 @@ EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr"
|
||||
matches the templates known to OpenVZ tools.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<pre>
|
||||
<domain type='openvz' id='104'>
|
||||
<name>104</name>
|
||||
<uuid>86c12009-e591-a159-6e9f-91d18b85ef78</uuid>
|
||||
@ -104,7 +104,7 @@ EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr"
|
||||
</interface>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -14,23 +14,23 @@
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<strong>QEMU emulators</strong>: The driver will probe <code>/usr/bin</code>
|
||||
for the presence of <code>qemu</code>, <code>qemu-system-x86_64</code>,
|
||||
<code>qemu-system-mips</code>,<code>qemu-system-mipsel</code>,
|
||||
<code>qemu-system-sparc</code>,<code>qemu-system-ppc</code>. The results
|
||||
of this can be seen from the capabilities XML output.
|
||||
<strong>QEMU emulators</strong>: The driver will probe <code>/usr/bin</code>
|
||||
for the presence of <code>qemu</code>, <code>qemu-system-x86_64</code>,
|
||||
<code>qemu-system-mips</code>,<code>qemu-system-mipsel</code>,
|
||||
<code>qemu-system-sparc</code>,<code>qemu-system-ppc</code>. The results
|
||||
of this can be seen from the capabilities XML output.
|
||||
</li>
|
||||
<li>
|
||||
<strong>KVM hypervisor</strong>: The driver will probe <code>/usr/bin</code>
|
||||
for the presence of <code>qemu-kvm</code> and <code>/dev/kvm</code> device
|
||||
node. If both are found, then KVM fullyvirtualized, hardware accelerated
|
||||
guests will be available.
|
||||
<strong>KVM hypervisor</strong>: The driver will probe <code>/usr/bin</code>
|
||||
for the presence of <code>qemu-kvm</code> and <code>/dev/kvm</code> device
|
||||
node. If both are found, then KVM fullyvirtualized, hardware accelerated
|
||||
guests will be available.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Xenner hypervisor</strong>: The driver will probe <code>/usr/bin</code>
|
||||
for the presence of <code>xenner</code> and <code>/dev/kvm</code> device
|
||||
node. If both are found, then Xen paravirtualized guests can be run using
|
||||
the KVM hardware acceleration.
|
||||
<strong>Xenner hypervisor</strong>: The driver will probe <code>/usr/bin</code>
|
||||
for the presence of <code>xenner</code> and <code>/dev/kvm</code> device
|
||||
node. If both are found, then Xen paravirtualized guests can be run using
|
||||
the KVM hardware acceleration.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -39,20 +39,20 @@
|
||||
<p>
|
||||
The libvirt QEMU driver is a multi-instance driver, providing a single
|
||||
system wide privileged driver (the "system" instance), and per-user
|
||||
unprivileged drivers (the "session" instance). The of the driver protocol
|
||||
unprivileged drivers (the "session" instance). The URI driver protocol
|
||||
is "qemu". Some example conection URIs for the libvirt driver are:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
qemu:///session (local access to per-user instance)
|
||||
qemu+unix:///session (local access to per-user instance)
|
||||
<pre>
|
||||
qemu:///session (local access to per-user instance)
|
||||
qemu+unix:///session (local access to per-user instance)
|
||||
|
||||
qemu:///system (local access to system instance)
|
||||
qemu+unix:///system (local access to system instance)
|
||||
qemu://example.com/system (remote access, TLS/x509)
|
||||
qemu+tcp://example.com/system (remote access, SASl/Kerberos)
|
||||
qemu+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
qemu:///system (local access to system instance)
|
||||
qemu+unix:///system (local access to system instance)
|
||||
qemu://example.com/system (remote access, TLS/x509)
|
||||
qemu+tcp://example.com/system (remote access, SASl/Kerberos)
|
||||
qemu+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<h2><a name="security">Driver security architecture</a></h2>
|
||||
|
||||
@ -167,7 +167,7 @@
|
||||
parent directories
|
||||
</p>
|
||||
<pre>
|
||||
chmod o+x /path/to/directory
|
||||
chmod o+x /path/to/directory
|
||||
</pre>
|
||||
<p>
|
||||
In particular note that if using the "system" instance
|
||||
@ -383,12 +383,12 @@
|
||||
The list of shared devices a guest is allowed access to is
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
/dev/null, /dev/full, /dev/zero,
|
||||
/dev/random, /dev/urandom,
|
||||
/dev/ptmx, /dev/kvm, /dev/kqemu,
|
||||
/dev/rtc, /dev/hpet, /dev/net/tun
|
||||
</pre>
|
||||
<pre>
|
||||
/dev/null, /dev/full, /dev/zero,
|
||||
/dev/random, /dev/urandom,
|
||||
/dev/ptmx, /dev/kvm, /dev/kqemu,
|
||||
/dev/rtc, /dev/hpet, /dev/net/tun
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
In the event of unanticipated needs arising, this can be customized
|
||||
@ -397,10 +397,10 @@
|
||||
should be run as root, prior to starting libvirtd
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
mkdir /dev/cgroup
|
||||
mount -t cgroup none /dev/cgroup -o devices
|
||||
</pre>
|
||||
<pre>
|
||||
mkdir /dev/cgroup
|
||||
mount -t cgroup none /dev/cgroup -o devices
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
libvirt will then place each virtual machine in a cgroup at
|
||||
@ -430,6 +430,7 @@ LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 \
|
||||
/dev/HostVG/QEMUGuest1 -net none -serial none \
|
||||
-parallel none -usb
|
||||
EOF
|
||||
|
||||
$ virsh domxml-from-native qemu-argv demo.args
|
||||
<domain type='qemu'>
|
||||
<uuid>00000000-0000-0000-0000-000000000000</uuid>
|
||||
@ -452,7 +453,7 @@ $ virsh domxml-from-native qemu-argv demo.args
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
</pre>
|
||||
|
||||
<p>NB, don't include the literral \ in the args, put everything on one line</p>
|
||||
|
||||
@ -488,6 +489,7 @@ $ virsh domxml-from-native qemu-argv demo.args
|
||||
</devices>
|
||||
</domain>
|
||||
EOF
|
||||
|
||||
$ virsh domxml-to-native qemu-argv demo.xml
|
||||
LC_ALL=C PATH=/usr/bin:/bin HOME=/home/test \
|
||||
USER=test LOGNAME=test /usr/bin/qemu -S -M pc \
|
||||
@ -495,7 +497,7 @@ $ virsh domxml-to-native qemu-argv demo.xml
|
||||
-monitor pty -no-acpi -boot c -drive \
|
||||
file=/dev/HostVG/QEMUGuest1,if=ide,index=0 -net none \
|
||||
-serial none -parallel none -usb
|
||||
</pre>
|
||||
</pre>
|
||||
|
||||
<h2><a name="xmlconfig">Example domain XML config</a></h2>
|
||||
|
||||
@ -556,7 +558,7 @@ $ virsh domxml-to-native qemu-argv demo.xml
|
||||
|
||||
<h3>Xen paravirtualized guests with hardware acceleration</h3>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -12,14 +12,14 @@
|
||||
for the libvirt driver are:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
test:///default (local access, default config)
|
||||
test:///path/to/driver/config.xml (local access, custom config)
|
||||
test+unix:///default (local access, default config, via daemon)
|
||||
test://example.com/default (remote access, TLS/x509)
|
||||
test+tcp://example.com/default (remote access, SASl/Kerberos)
|
||||
test+ssh://root@example.com/default (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
<pre>
|
||||
test:///default (local access, default config)
|
||||
test:///path/to/driver/config.xml (local access, custom config)
|
||||
test+unix:///default (local access, default config, via daemon)
|
||||
test://example.com/default (remote access, TLS/x509)
|
||||
test+tcp://example.com/default (remote access, SASl/Kerberos)
|
||||
test+ssh://root@example.com/default (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -24,16 +24,16 @@
|
||||
URIs are
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
uml:///session (local access to per-user instance)
|
||||
uml+unix:///session (local access to per-user instance)
|
||||
<pre>
|
||||
uml:///session (local access to per-user instance)
|
||||
uml+unix:///session (local access to per-user instance)
|
||||
|
||||
uml:///system (local access to system instance)
|
||||
uml+unix:///system (local access to system instance)
|
||||
uml://example.com/system (remote access, TLS/x509)
|
||||
uml+tcp://example.com/system (remote access, SASl/Kerberos)
|
||||
uml+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
uml:///system (local access to system instance)
|
||||
uml+unix:///system (local access to system instance)
|
||||
uml://example.com/system (remote access, TLS/x509)
|
||||
uml+tcp://example.com/system (remote access, SASl/Kerberos)
|
||||
uml+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<h2>Example XML configuration</h2>
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
thus accessible with "virsh console" or equivalent tools
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<pre>
|
||||
<domain type='uml'>
|
||||
<name>demo</name>
|
||||
<uuid>b4433fc2-a22e-ffb3-0a3d-9c173b395800</uuid>
|
||||
@ -77,6 +77,6 @@
|
||||
<console type='pty'/>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -13,107 +13,105 @@
|
||||
The uri of the driver protocol is "vbox". Some example connection URIs for the driver are:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
vbox:///session (local access to per-user instance)
|
||||
vbox+unix:///session (local access to per-user instance)
|
||||
vbox+tcp://user@example.com/session (remote access, SASl/Kerberos)
|
||||
vbox+ssh://user@example.com/session (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
<pre>
|
||||
vbox:///session (local access to per-user instance)
|
||||
vbox+unix:///session (local access to per-user instance)
|
||||
vbox+tcp://user@example.com/session (remote access, SASl/Kerberos)
|
||||
vbox+ssh://user@example.com/session (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<h2><a name="xmlconfig">Example domain XML config</a></h2>
|
||||
|
||||
<pre>
|
||||
<domain type='vbox'>
|
||||
<name>vbox</name>
|
||||
<uuid>4dab22b31d52d8f32516782e98ab3fa0</uuid>
|
||||
<pre>
|
||||
<domain type='vbox'>
|
||||
<name>vbox</name>
|
||||
<uuid>4dab22b31d52d8f32516782e98ab3fa0</uuid>
|
||||
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
<boot dev='cdrom'/>
|
||||
<boot dev='hd'/>
|
||||
<boot dev='fd'/>
|
||||
<boot dev='network'/>
|
||||
</os>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
<boot dev='cdrom'/>
|
||||
<boot dev='hd'/>
|
||||
<boot dev='fd'/>
|
||||
<boot dev='network'/>
|
||||
</os>
|
||||
|
||||
<memory>654321</memory>
|
||||
<vcpu>1</vcpu>
|
||||
<memory>654321</memory>
|
||||
<vcpu>1</vcpu>
|
||||
|
||||
<features>
|
||||
<pae/>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
</features>
|
||||
<features>
|
||||
<pae/>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
</features>
|
||||
|
||||
<devices>
|
||||
<disk type='file' device='cdrom'>
|
||||
<source file='/home/user/Downloads/slax-6.0.9.iso'/>
|
||||
<target dev='hdc'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<devices>
|
||||
<disk type='file' device='cdrom'>
|
||||
<source file='/home/user/Downloads/slax-6.0.9.iso'/>
|
||||
<target dev='hdc'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/home/user/tmp/vbox.vdi'/>
|
||||
<target dev='hdd'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/home/user/tmp/vbox.vdi'/>
|
||||
<target dev='hdd'/>
|
||||
</disk>
|
||||
|
||||
<disk type='file' device='floppy'>
|
||||
<source file='/home/user/tmp/WIN98C.IMG'/>
|
||||
<target dev='fda'/>
|
||||
</disk>
|
||||
<disk type='file' device='floppy'>
|
||||
<source file='/home/user/tmp/WIN98C.IMG'/>
|
||||
<target dev='fda'/>
|
||||
</disk>
|
||||
|
||||
<!--BRIDGE-->
|
||||
<interface type='bridge'>
|
||||
<source bridge='eth0'/>
|
||||
<mac address='00:16:3e:5d:c7:9e'/>
|
||||
<model type='am79c973'/>
|
||||
</interface>
|
||||
<!--BRIDGE-->
|
||||
<interface type='bridge'>
|
||||
<source bridge='eth0'/>
|
||||
<mac address='00:16:3e:5d:c7:9e'/>
|
||||
<model type='am79c973'/>
|
||||
</interface>
|
||||
|
||||
<!--NAT-->
|
||||
<interface type='user'>
|
||||
<mac address='56:16:3e:5d:c7:9e'/>
|
||||
<model type='82540eM'/>
|
||||
</interface>
|
||||
<!--NAT-->
|
||||
<interface type='user'>
|
||||
<mac address='56:16:3e:5d:c7:9e'/>
|
||||
<model type='82540eM'/>
|
||||
</interface>
|
||||
|
||||
<sound model='sb16'/>
|
||||
<sound model='sb16'/>
|
||||
|
||||
<parallel type='dev'>
|
||||
<source path='/dev/pts/1'/>
|
||||
<target port='0'/>
|
||||
</parallel>
|
||||
<parallel type='dev'>
|
||||
<source path='/dev/pts/1'/>
|
||||
<target port='0'/>
|
||||
</parallel>
|
||||
|
||||
<parallel type='dev'>
|
||||
<source path='/dev/pts/2'/>
|
||||
<target port='1'/>
|
||||
</parallel>
|
||||
<parallel type='dev'>
|
||||
<source path='/dev/pts/2'/>
|
||||
<target port='1'/>
|
||||
</parallel>
|
||||
|
||||
<serial type="dev">
|
||||
<source path="/dev/ttyS0"/>
|
||||
<target port="0"/>
|
||||
</serial>
|
||||
<serial type="dev">
|
||||
<source path="/dev/ttyS0"/>
|
||||
<target port="0"/>
|
||||
</serial>
|
||||
|
||||
<serial type="pipe">
|
||||
<source path="/tmp/serial.txt"/>
|
||||
<target port="1"/>
|
||||
</serial>
|
||||
<serial type="pipe">
|
||||
<source path="/tmp/serial.txt"/>
|
||||
<target port="1"/>
|
||||
</serial>
|
||||
|
||||
<hostdev mode='subsystem' type='usb'>
|
||||
<source>
|
||||
<vendor id='0x1234'/>
|
||||
<product id='0xbeef'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
<hostdev mode='subsystem' type='usb'>
|
||||
<source>
|
||||
<vendor id='0x1234'/>
|
||||
<product id='0xbeef'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
|
||||
<hostdev mode='subsystem' type='usb'>
|
||||
<source>
|
||||
<vendor id='0x4321'/>
|
||||
<product id='0xfeeb'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
|
||||
</devices>
|
||||
|
||||
</domain>
|
||||
</pre>
|
||||
<hostdev mode='subsystem' type='usb'>
|
||||
<source>
|
||||
<vendor id='0x4321'/>
|
||||
<product id='0xfeeb'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -18,31 +18,31 @@
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<strong>XenD</strong>: Access to the Xen daemon is a mandatory
|
||||
requirement for the libvirt Xen driver. It requires that the UNIX
|
||||
socket interface be enabled in the <code>/etc/xen/xend-config.sxp</code>
|
||||
configuration file. Specifically the config settings
|
||||
<code>(xend-unix-server yes)</code>. This path is usually restricted
|
||||
to only allow the <code>root</code> user access. As an alternative,
|
||||
the HTTP interface can be used, however, this has significant security
|
||||
implications.
|
||||
<strong>XenD</strong>: Access to the Xen daemon is a mandatory
|
||||
requirement for the libvirt Xen driver. It requires that the UNIX
|
||||
socket interface be enabled in the <code>/etc/xen/xend-config.sxp</code>
|
||||
configuration file. Specifically the config settings
|
||||
<code>(xend-unix-server yes)</code>. This path is usually restricted
|
||||
to only allow the <code>root</code> user access. As an alternative,
|
||||
the HTTP interface can be used, however, this has significant security
|
||||
implications.
|
||||
</li>
|
||||
<li>
|
||||
<strong>XenStoreD</strong>: Access to the Xenstore daemon enables
|
||||
more efficient codepaths for looking up domain information which
|
||||
lowers the CPU overhead of management.
|
||||
<strong>XenStoreD</strong>: Access to the Xenstore daemon enables
|
||||
more efficient codepaths for looking up domain information which
|
||||
lowers the CPU overhead of management.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Hypercalls</strong>: The ability to make direct hypercalls
|
||||
allows the most efficient codepaths in the driver to be used for
|
||||
monitoring domain status.
|
||||
<strong>Hypercalls</strong>: The ability to make direct hypercalls
|
||||
allows the most efficient codepaths in the driver to be used for
|
||||
monitoring domain status.
|
||||
</li>
|
||||
<li>
|
||||
<strong>XM config</strong>: When using Xen releases prior to 3.0.4,
|
||||
there is no inactive domain management in XenD. For such releases,
|
||||
libvirt will automatically process XM configuration files kept in
|
||||
the <code>/etc/xen</code> directory. It is important not to place
|
||||
any other non-config files in this directory.
|
||||
<strong>XM config</strong>: When using Xen releases prior to 3.0.4,
|
||||
there is no inactive domain management in XenD. For such releases,
|
||||
libvirt will automatically process XM configuration files kept in
|
||||
the <code>/etc/xen</code> directory. It is important not to place
|
||||
any other non-config files in this directory.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -54,13 +54,13 @@
|
||||
the libvirt driver are:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
xen:/// (local access, direct)
|
||||
xen+unix:/// (local access, via daemon)
|
||||
xen://example.com/ (remote access, TLS/x509)
|
||||
xen+tcp://example.com/ (remote access, SASl/Kerberos)
|
||||
xen+ssh://root@example.com/ (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
<pre>
|
||||
xen:/// (local access, direct)
|
||||
xen+unix:/// (local access, via daemon)
|
||||
xen://example.com/ (remote access, TLS/x509)
|
||||
xen+tcp://example.com/ (remote access, SASl/Kerberos)
|
||||
xen+ssh://root@example.com/ (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<h2><a name="imex">Import and export of libvirt domain XML configs</a></h2>
|
||||
|
||||
@ -114,8 +114,7 @@
|
||||
<input type='mouse' bus='xen'/>
|
||||
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
</domain></pre>
|
||||
|
||||
<h3><a name="xmlexport">Converting from domain XML to XM config files</a></h3>
|
||||
|
||||
@ -125,7 +124,7 @@
|
||||
format.
|
||||
</p>
|
||||
|
||||
<pre># virsh -c xen:/// domxml-to-native xen-xm rhel5pv.xml
|
||||
<pre>$ virsh -c xen:/// domxml-to-native xen-xm rhel5pv.xml
|
||||
name = "rhel5pv"
|
||||
uuid = "8f07fe28-753f-2729-d76d-bdbd892f949a"
|
||||
maxmem = 2500
|
||||
@ -143,8 +142,7 @@ vnc = 1
|
||||
vncunused = 1
|
||||
vnclisten = "0.0.0.0"
|
||||
disk = [ "tap:aio:/var/lib/xen/images/rhel5pv.img,xvda,w", "tap:qcow:/root/qcow1-xen.img,xvdd,w" ]
|
||||
vif = [ "mac=00:16:3e:60:36:ba,bridge=virbr0,script=vif-bridge,vifname=vif5.0" ]
|
||||
</pre>
|
||||
vif = [ "mac=00:16:3e:60:36:ba,bridge=virbr0,script=vif-bridge,vifname=vif5.0" ]</pre>
|
||||
|
||||
<h2><a name="xmlconfig">Example domain XML config</a></h2>
|
||||
|
||||
|
@ -21,6 +21,11 @@ BIOS you will see</p>
|
||||
<features>
|
||||
<vmx/>
|
||||
</features>
|
||||
<model>core2duo</model>
|
||||
<topology sockets="1" cores="2" threads="1"/>
|
||||
<feature name="lahf_lm"/>
|
||||
<feature name='xtpr'/>
|
||||
...
|
||||
</cpu>
|
||||
</host></span>
|
||||
|
||||
@ -48,15 +53,17 @@ BIOS you will see</p>
|
||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
||||
</arch>
|
||||
<features>
|
||||
<cpuselection/>
|
||||
</features>
|
||||
</guest></span>
|
||||
...
|
||||
</capabilities></pre>
|
||||
<p>The first block (in red) indicates the host hardware capabilities, currently
|
||||
it is limited to the CPU properties but other information may be available,
|
||||
it shows the CPU architecture, and the features of the chip (the feature
|
||||
block is similar to what you will find in a Xen fully virtualized domain
|
||||
description).</p>
|
||||
it shows the CPU architecture, topology, model name, and additional features
|
||||
which are not included in the model but the CPU provides them. Features of the
|
||||
chip are shown within the feature block (the block is similar to what you will
|
||||
find in a Xen fully virtualized domain description).</p>
|
||||
<p>The second block (in blue) indicates the paravirtualization support of the
|
||||
Xen support, you will see the os_type of xen to indicate a paravirtual
|
||||
kernel, then architecture information and potential features.</p>
|
||||
|
@ -37,17 +37,17 @@
|
||||
<dl>
|
||||
<dt><code>name</code></dt>
|
||||
<dd>The content of the <code>name</code> element provides
|
||||
a short name for the virtual machine. This name should
|
||||
consist only of alpha-numeric characters and is required
|
||||
to be unique within the scope of a single host. It is
|
||||
often used to form the filename for storing the persistent
|
||||
configuration file. <span class="since">Since 0.0.1</span></dd>
|
||||
a short name for the virtual machine. This name should
|
||||
consist only of alpha-numeric characters and is required
|
||||
to be unique within the scope of a single host. It is
|
||||
often used to form the filename for storing the persistent
|
||||
configuration file. <span class="since">Since 0.0.1</span></dd>
|
||||
<dt><code>uuid</code></dt>
|
||||
<dd>The content of the <code>uuid</code> element provides
|
||||
a globally unique identifier for the virtual machine.
|
||||
The format must be RFC 4122 compliant, eg <code>3e3fce45-4f53-4fa7-bb32-11f34168b82b</code>.
|
||||
If omitted when defining/creating a new machine, a random
|
||||
UUID is generated. <span class="since">Since 0.0.1</span></dd>
|
||||
a globally unique identifier for the virtual machine.
|
||||
The format must be RFC 4122 compliant, eg <code>3e3fce45-4f53-4fa7-bb32-11f34168b82b</code>.
|
||||
If omitted when defining/creating a new machine, a random
|
||||
UUID is generated. <span class="since">Since 0.0.1</span></dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsOS">Operating system booting</a></h3>
|
||||
@ -78,24 +78,24 @@
|
||||
<dl>
|
||||
<dt><code>type</code></dt>
|
||||
<dd>The content of the <code>type</code> element specifies the
|
||||
type of operating system to be booted in the virtual machine.
|
||||
<code>hvm</code> indicates that the OS is one designed to run
|
||||
on bare metal, so requires full virtualization. <code>linux</code>
|
||||
(badly named!) refers to an OS that supports the Xen 3 hypervisor
|
||||
guest ABI. There are also two optional attributes, <code>arch</code>
|
||||
specifying the CPU architecture to virtualization, and <code>machine</code>
|
||||
referring to the machine type. The <a href="formatcaps.html">Capabilities XML</a>
|
||||
provides details on allowed values for these. <span class="since">Since 0.0.1</span></dd>
|
||||
type of operating system to be booted in the virtual machine.
|
||||
<code>hvm</code> indicates that the OS is one designed to run
|
||||
on bare metal, so requires full virtualization. <code>linux</code>
|
||||
(badly named!) refers to an OS that supports the Xen 3 hypervisor
|
||||
guest ABI. There are also two optional attributes, <code>arch</code>
|
||||
specifying the CPU architecture to virtualization, and <code>machine</code>
|
||||
referring to the machine type. The <a href="formatcaps.html">Capabilities XML</a>
|
||||
provides details on allowed values for these. <span class="since">Since 0.0.1</span></dd>
|
||||
<dt><code>loader</code></dt>
|
||||
<dd>The optional <code>loader</code> tag refers to a firmware blob
|
||||
used to assist the domain creation process. At this time, it is
|
||||
only needed by Xen fully virtualized domains. <span class="since">Since 0.1.0</span></dd>
|
||||
used to assist the domain creation process. At this time, it is
|
||||
only needed by Xen fully virtualized domains. <span class="since">Since 0.1.0</span></dd>
|
||||
<dt><code>boot</code></dt>
|
||||
<dd>The <code>dev</code> attribute takes one of the values "fd", "hd",
|
||||
"cdrom" or "network" and is used to specify the next boot device
|
||||
to consider. The <code>boot</code> element can be repeated multiple
|
||||
times to setup a priority list of boot devices to try in turn.
|
||||
<span class="since">Since 0.1.3</span>
|
||||
"cdrom" or "network" and is used to specify the next boot device
|
||||
to consider. The <code>boot</code> element can be repeated multiple
|
||||
times to setup a priority list of boot devices to try in turn.
|
||||
<span class="since">Since 0.1.3</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -111,22 +111,22 @@
|
||||
|
||||
<pre>
|
||||
...
|
||||
<bootloader>/usr/bin/pygrub</bootloader>
|
||||
<bootloader_args>--append single</bootloader_args>
|
||||
<bootloader>/usr/bin/pygrub</bootloader>
|
||||
<bootloader_args>--append single</bootloader_args>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>bootloader</code></dt>
|
||||
<dd>The content of the <code>bootloader</code> element provides
|
||||
a fully qualified path to the bootloader executable in the
|
||||
host OS. This bootloader will be run to choose which kernel
|
||||
to boot. The required output of the bootloader is dependent
|
||||
on the hypervisor in use. <span class="since">Since 0.1.0</span></dd>
|
||||
a fully qualified path to the bootloader executable in the
|
||||
host OS. This bootloader will be run to choose which kernel
|
||||
to boot. The required output of the bootloader is dependent
|
||||
on the hypervisor in use. <span class="since">Since 0.1.0</span></dd>
|
||||
<dt><code>bootloader_args</code></dt>
|
||||
<dd>The optional <code>bootloader_args</code> element allows
|
||||
command line arguments to be passed to the bootloader.
|
||||
<span class="since">Since 0.2.3</span>
|
||||
</dd>
|
||||
command line arguments to be passed to the bootloader.
|
||||
<span class="since">Since 0.2.3</span>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
@ -141,64 +141,157 @@
|
||||
|
||||
<pre>
|
||||
...
|
||||
<os>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
||||
<kernel>/root/f8-i386-vmlinuz</kernel>
|
||||
<initrd>/root/f8-i386-initrd</initrd>
|
||||
<cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
|
||||
</os>
|
||||
...</pre>
|
||||
</os>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>type</code></dt>
|
||||
<dd>This element has the same semantics as described earlier in the
|
||||
<a href="#elementsOSBIOS">BIOS boot section</a></dd>
|
||||
<a href="#elementsOSBIOS">BIOS boot section</a></dd>
|
||||
<dt><code>loader</code></dt>
|
||||
<dd>This element has the same semantics as described earlier in the
|
||||
<a href="#elementsOSBIOS">BIOS boot section</a></dd>
|
||||
<a href="#elementsOSBIOS">BIOS boot section</a></dd>
|
||||
<dt><code>kernel</code></dt>
|
||||
<dd>The contents of this element specify the fully-qualified path
|
||||
to the kernel image in the host OS.</dd>
|
||||
to the kernel image in the host OS.</dd>
|
||||
<dt><code>initrd</code></dt>
|
||||
<dd>The contents of this element specify the fully-qualified path
|
||||
to the (optional) ramdisk image in the host OS.</dd>
|
||||
to the (optional) ramdisk image in the host OS.</dd>
|
||||
<dt><code>cmdline</code></dt>
|
||||
<dd>The contents of this element specify arguments to be passed to
|
||||
the kernel (or installer) at boottime. This is often used to
|
||||
specify an alternate primary console (eg serial port), or the
|
||||
installation media source / kickstart file</dd>
|
||||
the kernel (or installer) at boottime. This is often used to
|
||||
specify an alternate primary console (eg serial port), or the
|
||||
installation media source / kickstart file</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsResources">Basic resources</a></h3>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<memory>524288</memory>
|
||||
<currentMemory>524288</currentMemory>
|
||||
<memoryBacking>
|
||||
<hugepages/>
|
||||
<memory>524288</memory>
|
||||
<currentMemory>524288</currentMemory>
|
||||
<memoryBacking>
|
||||
<hugepages/>
|
||||
</memoryBacking>
|
||||
<vcpu>1</vcpu>
|
||||
...</pre>
|
||||
<vcpu>1</vcpu>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>memory</code></dt>
|
||||
<dd>The maximum allocation of memory for the guest at boot time.
|
||||
The units for this value are kilobytes (i.e. blocks of 1024 bytes)</dd>
|
||||
The units for this value are kilobytes (i.e. blocks of 1024 bytes)</dd>
|
||||
<dt><code>currentMemory</code></dt>
|
||||
<dd>The actual allocation of memory for the guest. This value
|
||||
be less than the maximum allocation, to allow for ballooning
|
||||
up the guests memory on the fly. If this is omitted, it defaults
|
||||
to the same value as the <code>memory<code> element</dd>
|
||||
be less than the maximum allocation, to allow for ballooning
|
||||
up the guests memory on the fly. If this is omitted, it defaults
|
||||
to the same value as the <code>memory<code> element</dd>
|
||||
<dt><code>memoryBacking</code></dt>
|
||||
<dd>The optional <code>memoryBacking</code> element, may have an
|
||||
<code>hugepages</code> element set within it. This tells the
|
||||
hypervisor that the guest should have its memory allocated using
|
||||
hugepages instead of the normal native page size.</dd>
|
||||
<code>hugepages</code> element set within it. This tells the
|
||||
hypervisor that the guest should have its memory allocated using
|
||||
hugepages instead of the normal native page size.</dd>
|
||||
<dt><code>vcpu</code></dt>
|
||||
<dd>The content of this element defines the number of virtual
|
||||
CPUs allocated for the guest OS.</dd>
|
||||
CPUs allocated for the guest OS.</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsCPU">CPU model and topology</a></h3>
|
||||
|
||||
<p>
|
||||
Requirements for CPU model, its features and topology can be specified
|
||||
using the following collection of elements.
|
||||
<span class="since">Since 0.7.5</span>
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<cpu match='exact'>
|
||||
<model>core2duo</model>
|
||||
<topology sockets='1' cores='2' threads='1'/>
|
||||
<feature policy='disable' name='lahf_lm'/>
|
||||
</cpu>
|
||||
...</pre>
|
||||
|
||||
<p>
|
||||
In case no restrictions need to be put on CPU model and its features, a
|
||||
simpler <code>cpu</code> element can be used.
|
||||
<span class="since">Since 0.7.6</span>
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<cpu>
|
||||
<topology sockets='1' cores='2' threads='1'/>
|
||||
</cpu>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>cpu</code></dt>
|
||||
<dd>The <code>cpu</code> element is the main container for describing
|
||||
guest CPU requirements. Its <code>match</code> attribute specified how
|
||||
strictly has the virtual CPU provided to the guest match these
|
||||
requirements. <span class="since">Since 0.7.6</span> the
|
||||
<code>match</code> attribute can be omitted if <code>topology</code>
|
||||
is the only element within <code>cpu</code>. Possible values for the
|
||||
<code>match</code> attribute are:
|
||||
|
||||
<dl>
|
||||
<dt><code>minimum</code></dt>
|
||||
<dd>The specified CPU model and features describes the minimum
|
||||
requested CPU.</dd>
|
||||
<dt><code>exact</code></dt>
|
||||
<dd>The virtual CPU provided to the guest will exactly match the
|
||||
specification</dd>
|
||||
<dt><code>strict</code></dt>
|
||||
<dd>The guest will not be created unless the host CPU does exactly
|
||||
match the specification.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt><code>model</code></dt>
|
||||
<dd>The content of the <code>model</code> element specifies CPU model
|
||||
requested by the guest. The list of available CPU models and their
|
||||
definition can be found in <code>cpu_map.xml</code> file installed
|
||||
in libvirt's data directory.</dd>
|
||||
|
||||
<dt><code>topology</code></dt>
|
||||
<dd>The <code>topology</code> element specifies requested topology of
|
||||
virtual CPU provided to the guest. Three non-zero values have to be
|
||||
given for <code>sockets</code>, <code>cores</code>, and
|
||||
<code>threads</code>: total number of CPU sockets, number of cores per
|
||||
socket, and number of threads per core, respectively.</dd>
|
||||
|
||||
<dt><code>feature</code></dt>
|
||||
<dd>The <code>cpu</code> element can contain zero or more
|
||||
<code>elements</code> used to fine-tune features provided by the
|
||||
selected CPU model. The list of known feature names can be found in
|
||||
the same file as CPU models. The meaning of each <code>feature</code>
|
||||
element depends on its <code>policy</code> attribute, which has to be
|
||||
set to one of the following values:
|
||||
|
||||
<dl>
|
||||
<dt><code>force</code></dt>
|
||||
<dd>The virtual CPU will claim the feature is supported regardless
|
||||
of it being supported by host CPU.</dd>
|
||||
<dt><code>require</code></dt>
|
||||
<dd>Guest creation will fail unless the feature is supported by host
|
||||
CPU.</dd>
|
||||
<dt><code>optional</code></dt>
|
||||
<dd>The feature will be supported by virtual CPU if and only if it
|
||||
is supported by host CPU.</dd>
|
||||
<dt><code>disable</code></dt>
|
||||
<dd>The feature will not be supported by virtual CPU.</dd>
|
||||
<dt><code>forbid</code></dt>
|
||||
<dd>Guest creation will fail if the feature is supported by host
|
||||
CPU.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsLifecycle">Lifecycle control</a></h3>
|
||||
@ -214,21 +307,21 @@
|
||||
|
||||
<pre>
|
||||
...
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
...</pre>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>on_poweroff</code></dt>
|
||||
<dd>The content of this element specifies the action to take when
|
||||
the guest requests a poweroff.</dd>
|
||||
the guest requests a poweroff.</dd>
|
||||
<dt><code>on_reboot</code></dt>
|
||||
<dd>The content of this element specifies the action to take when
|
||||
the guest requests a reboot.</dd>
|
||||
the guest requests a reboot.</dd>
|
||||
<dt><code>on_crash</code></dt>
|
||||
<dd>The content of this element specifies the action to take when
|
||||
the guest crashes.</dd>
|
||||
the guest crashes.</dd>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
@ -238,16 +331,16 @@
|
||||
<dl>
|
||||
<dt><code>destroy</code></dt>
|
||||
<dd>The domain will be terminated completely and all resources
|
||||
released</dd>
|
||||
released</dd>
|
||||
<dt><code>restart</code></dt>
|
||||
<dd>The domain will be terminated, and then restarted with
|
||||
the same configuration</dd>
|
||||
the same configuration</dd>
|
||||
<dt><code>preserve</code></dt>
|
||||
<dd>The domain will be terminated, and its resource preserved
|
||||
to allow analysis.</dd>
|
||||
to allow analysis.</dd>
|
||||
<dt><code>rename-restart</code></dt>
|
||||
<dd>The domain will be terminated, and then restarted with
|
||||
a new name</dd>
|
||||
a new name</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsFeatures">Hypervisor features</a></h3>
|
||||
@ -259,12 +352,12 @@
|
||||
|
||||
<pre>
|
||||
...
|
||||
<features>
|
||||
<pae/>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
</features>
|
||||
...</pre>
|
||||
<features>
|
||||
<pae/>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
</features>
|
||||
...</pre>
|
||||
|
||||
<p>
|
||||
All features are listed within the <code>features</code>
|
||||
@ -277,10 +370,10 @@
|
||||
<dl>
|
||||
<dt><code>pae</code></dt>
|
||||
<dd>Physical address extension mode allows 32-bit guests
|
||||
to address more than 4 GB of memory.</dd>
|
||||
to address more than 4 GB of memory.</dd>
|
||||
<dt><code>acpi</code></dt>
|
||||
<dd>ACPI is useful for power management, for example, with
|
||||
KVM guests it is required for graceful shutdown to work.
|
||||
KVM guests it is required for graceful shutdown to work.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -296,13 +389,13 @@
|
||||
<pre>
|
||||
...
|
||||
<clock offset="localtime"/>
|
||||
...</pre>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>clock</code></dt>
|
||||
<dd>The <code>sync</code> attribute takes either "utc" or
|
||||
"localtime" to specify how the guest clock is initialized
|
||||
in relation to the host OS.
|
||||
<dd>The <code>offset</code> attribute takes either "utc" or
|
||||
"localtime" to specify how the guest clock is initialized
|
||||
in relation to the host OS.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -318,17 +411,17 @@
|
||||
<pre>
|
||||
...
|
||||
<devices>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>emulator</code></dt>
|
||||
<dd>
|
||||
The contents of the <code>emulator</code> element specify
|
||||
the fully qualified path to the device model emulator binary.
|
||||
The <a href="formatcaps.html">capabilities XML</a> specifies
|
||||
the recommended default emulator to use for each particular
|
||||
domain type / architecture combination.
|
||||
The contents of the <code>emulator</code> element specify
|
||||
the fully qualified path to the device model emulator binary.
|
||||
The <a href="formatcaps.html">capabilities XML</a> specifies
|
||||
the recommended default emulator to use for each particular
|
||||
domain type / architecture combination.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -342,53 +435,61 @@
|
||||
|
||||
<pre>
|
||||
...
|
||||
<disk type='file'>
|
||||
<driver name="tap" type="aio">
|
||||
<source file='/var/lib/xen/images/fv0'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
<disk type='file'>
|
||||
<driver name="tap" type="aio" cache="default">
|
||||
<source file='/var/lib/xen/images/fv0'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
<encryption type='...'>
|
||||
...
|
||||
</encryption>
|
||||
</disk>
|
||||
...</pre>
|
||||
<shareable/>
|
||||
</disk>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>disk</code></dt>
|
||||
<dd>The <code>disk</code> element is the main container for describing
|
||||
disks. The <code>type</code> attribute is either "file" or "block"
|
||||
and refers to the underlying source for the disk. The optional
|
||||
<code>device</code> attribute indicates how the disk is to be exposed
|
||||
to the guest OS. Possible values for this attribute are "floppy", "disk"
|
||||
and "cdrom", defaulting to "disk".
|
||||
<span class="since">Since 0.0.3; "device" attribute since 0.1.4</span></dd>
|
||||
disks. The <code>type</code> attribute is either "file" or "block"
|
||||
and refers to the underlying source for the disk. The optional
|
||||
<code>device</code> attribute indicates how the disk is to be exposed
|
||||
to the guest OS. Possible values for this attribute are "floppy", "disk"
|
||||
and "cdrom", defaulting to "disk".
|
||||
<span class="since">Since 0.0.3; "device" attribute since 0.1.4</span></dd>
|
||||
<dt><code>source</code></dt>
|
||||
<dd>If the disk <code>type</code> is "file", then the <code>file</code> attribute
|
||||
specifies the fully-qualified path to the file holding the disk. If the disk
|
||||
<code>type</code> is "block", then the <code>dev</code> attribute specifies
|
||||
the path to the host device to serve as the disk. <span class="since">Since 0.0.3</span></dd>
|
||||
specifies the fully-qualified path to the file holding the disk. If the disk
|
||||
<code>type</code> is "block", then the <code>dev</code> attribute specifies
|
||||
the path to the host device to serve as the disk. <span class="since">Since 0.0.3</span></dd>
|
||||
<dt><code>target</code></dt>
|
||||
<dd>The <code>target</code> element controls the bus / device under which the
|
||||
disk is exposed to the guest OS. The <code>dev</code> attribute indicates
|
||||
the "logical" device name. The actual device name specified is not guaranteed to map to
|
||||
the device name in the guest OS. Treat it as a device ordering hint.
|
||||
The optional <code>bus</code> attribute specifies the type of disk device
|
||||
to emulate; possible values are driver specific, with typical values being
|
||||
"ide", "scsi", "virtio", "xen" or "usb". 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.
|
||||
<span class="since">Since 0.0.3; <code>bus</code> attribute since 0.4.3;
|
||||
disk is exposed to the guest OS. The <code>dev</code> attribute indicates
|
||||
the "logical" device name. The actual device name specified is not guaranteed to map to
|
||||
the device name in the guest OS. Treat it as a device ordering hint.
|
||||
The optional <code>bus</code> attribute specifies the type of disk device
|
||||
to emulate; possible values are driver specific, with typical values being
|
||||
"ide", "scsi", "virtio", "xen" or "usb". 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.
|
||||
<span class="since">Since 0.0.3; <code>bus</code> attribute since 0.4.3;
|
||||
"usb" attribute value since after 0.4.4</span></dd>
|
||||
<dt><code>driver</code></dt>
|
||||
<dd>If the hypervisor supports multiple backend drivers, then the optional
|
||||
<code>driver</code> element allows them to be selected. The <code>name</code>
|
||||
attribute is the primary backend driver name, while the optional <code>type</code>
|
||||
attribute provides the sub-type. <span class="since">Since 0.1.8</span>
|
||||
<code>driver</code> element allows them to be selected. The <code>name</code>
|
||||
attribute is the primary backend driver name, while the optional <code>type</code>
|
||||
attribute provides the sub-type. The optional <code>cache</code> attribute
|
||||
controls the cache mechanism, possible values are "default", "none",
|
||||
"writethrough" and "writeback". <span class="since">Since 0.1.8</span>
|
||||
</dd>
|
||||
<dt><code>encryption</code></dt>
|
||||
<dd>If present, specifies how the volume is encrypted. See
|
||||
the <a href="formatstorageencryption.html">Storage Encryption</a> page
|
||||
for more information.
|
||||
</dd>
|
||||
<dt><code>shareable</code></dt>
|
||||
<dd>If present, this indicates the device is expected to be shared
|
||||
between domains (assuming the hypervisor and OS support this),
|
||||
which means that caching should be deactivated for that device.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4><a name="elementsUSB">USB and PCI devices</a></h4>
|
||||
@ -401,22 +502,22 @@
|
||||
|
||||
<pre>
|
||||
...
|
||||
<hostdev mode='subsystem' type='usb'>
|
||||
<source>
|
||||
<vendor id='0x1234'/>
|
||||
<product id='0xbeef'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
...</pre>
|
||||
<hostdev mode='subsystem' type='usb'>
|
||||
<source>
|
||||
<vendor id='0x1234'/>
|
||||
<product id='0xbeef'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
...</pre>
|
||||
<p>or:</p>
|
||||
<pre>
|
||||
...
|
||||
<hostdev mode='subsystem' type='pci'>
|
||||
<source>
|
||||
<address bus='0x06' slot='0x02' function='0x0'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
...</pre>
|
||||
<hostdev mode='subsystem' type='pci'>
|
||||
<source>
|
||||
<address bus='0x06' slot='0x02' function='0x0'/>
|
||||
</source>
|
||||
</hostdev>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>hostdev</code></dt>
|
||||
@ -457,12 +558,12 @@
|
||||
|
||||
<pre>
|
||||
...
|
||||
<interface type='bridge'>
|
||||
<source bridge='xenbr0'/>
|
||||
<mac address='00:16:3e:5d:c7:9e'/>
|
||||
<script path='vif-bridge'/>
|
||||
</interface>
|
||||
...</pre>
|
||||
<interface type='bridge'>
|
||||
<source bridge='xenbr0'/>
|
||||
<mac address='00:16:3e:5d:c7:9e'/>
|
||||
<script path='vif-bridge'/>
|
||||
</interface>
|
||||
...</pre>
|
||||
|
||||
<h5><a name="elementsNICSVirtual">Virtual network</a></h5>
|
||||
|
||||
@ -484,7 +585,8 @@
|
||||
of the box which does NAT'ing to the default route and has an IP range of
|
||||
<code>192.168.22.0/255.255.255.0</code>. Each guest will have an
|
||||
associated tun device created with a name of vnetN, which can also be
|
||||
overridden with the <target> element.
|
||||
overridden with the <target> element (see
|
||||
<a href="#elementsNICSTargetOverride">overriding the target element</a>).
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@ -514,10 +616,11 @@
|
||||
there is a bridge device on the host which has one or more of the hosts
|
||||
physical NICs enslaved. The guest VM will have an associated tun device
|
||||
created with a name of vnetN, which can also be overridden with the
|
||||
<target> element. The tun device will be enslaved to the bridge.
|
||||
The IP range / network configuration is whatever is used on the LAN. This
|
||||
provides the guest VM full incoming & outgoing net access just like a
|
||||
physical machine.
|
||||
<target> element (see
|
||||
<a href="#elementsNICSTargetOverride">overriding the target element</a>).
|
||||
The tun device will be enslaved to the bridge. The IP range / network
|
||||
configuration is whatever is used on the LAN. This provides the guest VM
|
||||
full incoming & outgoing net access just like a physical machine.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@ -652,6 +755,25 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
ne2k_isa i82551 i82557b i82559er ne2k_pci pcnet rtl8139 e1000 virtio
|
||||
</p>
|
||||
|
||||
<h5><a name="elementsNICSTargetOverride">Overriding the target element</a></h5>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<interface type='network'>
|
||||
<source network='default'/>
|
||||
<b><target dev='vnet1'/></b>
|
||||
</interface>
|
||||
...</pre>
|
||||
|
||||
<p>
|
||||
If no target is specified, certain hypervisors will automatically
|
||||
generate a name for the created tun device. This name can be manually
|
||||
specifed, however the name <i>must not start with either 'vnet' or
|
||||
'vif'</i>, which are prefixes reserved by libvirt and certain
|
||||
hypervisors. Manually specified targets using these prefixes will be
|
||||
ignored.
|
||||
</p>
|
||||
|
||||
<h4><a name="elementsInput">Input devices</a></h4>
|
||||
|
||||
<p>
|
||||
@ -663,16 +785,16 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
|
||||
<pre>
|
||||
...
|
||||
<input type='mouse' bus='usb'/>
|
||||
...</pre>
|
||||
<input type='mouse' bus='usb'/>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>input</code></dt>
|
||||
<dd>The <code>input</code> element has one mandatory attribute, the <code>type</code>
|
||||
whose value can be either 'mouse' or 'tablet'. The latter provides absolute
|
||||
cursor movement, while the former uses relative movement. The optional
|
||||
<code>bus</code> attribute can be used to refine the exact device type.
|
||||
It takes values "xen" (paravirtualized), "ps2" and "usb".</dd>
|
||||
whose value can be either 'mouse' or 'tablet'. The latter provides absolute
|
||||
cursor movement, while the former uses relative movement. The optional
|
||||
<code>bus</code> attribute can be used to refine the exact device type.
|
||||
It takes values "xen" (paravirtualized), "ps2" and "usb".</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@ -687,11 +809,11 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
|
||||
<pre>
|
||||
...
|
||||
<graphics type='sdl' display=':0.0'/>
|
||||
<graphics type='vnc' port='5904'/>
|
||||
<graphics type='rdp' autoport='yes' multiUser='yes' />
|
||||
<graphics type='desktop' fullscreen='yes'/>
|
||||
...</pre>
|
||||
<graphics type='sdl' display=':0.0'/>
|
||||
<graphics type='vnc' port='5904'/>
|
||||
<graphics type='rdp' autoport='yes' multiUser='yes' />
|
||||
<graphics type='desktop' fullscreen='yes'/>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>graphics</code></dt>
|
||||
@ -747,70 +869,176 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
|
||||
<pre>
|
||||
...
|
||||
<video type='vga' nvram='8192' heads='1'>
|
||||
<acceleration accel3d='yes' accel3d='yes' />
|
||||
<video>
|
||||
<model type='vga' vram='8192' heads='1'>
|
||||
<acceleration accel3d='yes' accel3d='yes'/>
|
||||
</model>
|
||||
</video>
|
||||
...
|
||||
</pre>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>video</code></dt>
|
||||
<dd>The <code>video</code> element has a mandatory <code>type</code>
|
||||
attribute which takes the value "vga", "cirrus", "vmvga", "xen" or "vbox".
|
||||
You can also provide the amount of video memory using <code>nvram</code>,
|
||||
the number of screen with <code>heads</code>, and whether acceleration
|
||||
should be enabled (if supported) using the <code>accel3d</code> and
|
||||
<code>accel2d</code> attributes in the <code>acceleration</code> element.
|
||||
<dd>
|
||||
The <code>video</code> element is the a container for describing
|
||||
video devices.
|
||||
</dd>
|
||||
|
||||
<dt><code>model</code></dt>
|
||||
<dd>
|
||||
The <code>model</code> element has a mandatory <code>type</code>
|
||||
attribute which takes the value "vga", "cirrus", "vmvga", "xen" or "vbox".
|
||||
You can also provide the amount of video memory in kilobytes using
|
||||
<code>vram</code> and the number of screen with <code>heads</code>.
|
||||
</dd>
|
||||
|
||||
<dt><code>acceleration</code></dt>
|
||||
<dd>
|
||||
If acceleration should be enabled (if supported) using the
|
||||
<code>accel3d</code> and <code>accel2d</code> attributes in the
|
||||
<code>acceleration</code> element.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4><a name="elementsConsole">Consoles, serial & parallel devices</a></h4>
|
||||
<h4><a name="elementsConsole">Consoles, serial, parallel & channel devices</a></h4>
|
||||
|
||||
<p>
|
||||
A character device provides a way to interact with the virtual machine.
|
||||
Paravirtualized consoles, serial ports and parallel ports are all
|
||||
classed as character devices and so represented using the same syntax.
|
||||
Paravirtualized consoles, serial ports, parallel ports and channels are
|
||||
all classed as character devices and so represented using the same syntax.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<parallel type='pty'>
|
||||
<source path='/dev/pts/2'/>
|
||||
<target port='0'/>
|
||||
<source path='/dev/pts/2'/>
|
||||
<target port='0'/>
|
||||
</parallel>
|
||||
<serial type='pty'>
|
||||
<source path='/dev/pts/3'/>
|
||||
<target port='0'/>
|
||||
<source path='/dev/pts/3'/>
|
||||
<target port='0'/>
|
||||
</serial>
|
||||
<console type='pty'>
|
||||
<source path='/dev/pts/4'/>
|
||||
<target port='0'/>
|
||||
<source path='/dev/pts/4'/>
|
||||
<target port='0'/>
|
||||
</console>
|
||||
<channel type='unix'>
|
||||
<source mode='bind' path='/tmp/guestfwd'/>
|
||||
<target type='guestfwd' address='10.0.2.1' port='4600'/>
|
||||
</channel>
|
||||
</devices>
|
||||
</domain></pre>
|
||||
|
||||
<p>
|
||||
In each of these directives, the top-level element name (parallel, serial,
|
||||
console, channel) describes how the device is presented to the guest. The
|
||||
guest interface is configured by the <code>target</code> element.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The interface presented to the host is given in the <code>type</code>
|
||||
attribute of the top-level element. The host interface is
|
||||
configured by the <code>source</code> element.
|
||||
</p>
|
||||
|
||||
<h5><a name="elementsCharGuestInterface">Guest interface</a></h5>
|
||||
|
||||
<p>
|
||||
A character device presents itself to the guest as one of the following
|
||||
types.
|
||||
</p>
|
||||
|
||||
<h6><a name="elementCharParallel">Parallel port</a></h6>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<parallel type='pty'>
|
||||
<source path='/dev/pts/2'/>
|
||||
<target port='0'/>
|
||||
</parallel>
|
||||
...</pre>
|
||||
|
||||
<p>
|
||||
<code>target</code> can have a <code>port</code> attribute, which
|
||||
specifies the port number. Ports are numbered starting from 1. There are
|
||||
usually 0, 1 or 2 parallel ports.
|
||||
</p>
|
||||
|
||||
<h6><a name="elementCharSerial">Serial port</a></h6>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<serial type='pty'>
|
||||
<source path='/dev/pts/3'/>
|
||||
<target port='0'/>
|
||||
</serial>
|
||||
...</pre>
|
||||
|
||||
<p>
|
||||
<code>target</code> can have a <code>port</code> attribute, which
|
||||
specifies the port number. Ports are numbered starting from 1. There are
|
||||
usually 0, 1 or 2 serial ports.
|
||||
</p>
|
||||
|
||||
<h6><a name="elementCharConsole">Console</a></h6>
|
||||
|
||||
<p>
|
||||
This represents the primary console. This can be the paravirtualized
|
||||
console with Xen guests, or duplicates the primary serial port for fully
|
||||
virtualized guests without a paravirtualized console.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<console type='pty'>
|
||||
<source path='/dev/pts/4'/>
|
||||
<target port='0'/>
|
||||
</console>
|
||||
...</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
|
||||
only 1 console.
|
||||
</p>
|
||||
|
||||
<h6><a name="elementCharChannel">Channel</a></h6>
|
||||
|
||||
<p>
|
||||
This represents a private communication channel between the host and the
|
||||
guest.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<channel type='unix'>
|
||||
<source mode='bind' path='/tmp/guestfwd'/>
|
||||
<target type='guestfwd' address='10.0.2.1' port='4600'/>
|
||||
</channel>
|
||||
...</pre>
|
||||
|
||||
<p>
|
||||
This can be implemented in a variety of ways. The specific type of
|
||||
channel is given in the <code>type</code> attribute of the
|
||||
<code>target</code> element. Different channel types have different
|
||||
<code>target</code> attributes.
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt><code>parallel</code></dt>
|
||||
<dd>Represents a parallel port</dd>
|
||||
<dt><code>serial</code></dt>
|
||||
<dd>Represents a serial port</dd>
|
||||
<dt><code>console</code></dt>
|
||||
<dd>Represents the primary console. This can be the paravirtualized
|
||||
console with Xen guests, or duplicates the primary serial port
|
||||
for fully virtualized guests without a paravirtualized console.</dd>
|
||||
<dt><code>source</code></dt>
|
||||
<dd>The attributes available for the <code>source</code> element
|
||||
vary according to the <code>type</code> attribute on the parent
|
||||
tag. Allowed variations will be described below</dd>
|
||||
<dt><code>target</code></dt>
|
||||
<dd>The port number of the character device is specified via the
|
||||
<code>port</code> attribute, numbered starting from 1. There is
|
||||
usually only one console device, and 0, 1 or 2 serial devices
|
||||
or parallel devices.
|
||||
<dt><code>guestfwd</code></dt>
|
||||
<dd>TCP traffic sent by the guest to a given IP address and port is
|
||||
forwarded to the channel device on the host. The <code>target</code>
|
||||
element must have <code>address</code> and <code>port</code> attributes.
|
||||
<span class="since">Since 0.7.3</span></dd>
|
||||
</dl>
|
||||
|
||||
<h5><a name="elementsCharSTDIO">Domain logfile</a></h5>
|
||||
<h5><a name="elementsCharHostInterface">Host interface</a></h5>
|
||||
|
||||
<p>
|
||||
A character device presents itself to the host as one of the following
|
||||
types.
|
||||
</p>
|
||||
|
||||
<h6><a name="elementsCharSTDIO">Domain logfile</a></h6>
|
||||
|
||||
<p>
|
||||
This disables all input on the character device, and sends output
|
||||
@ -825,7 +1053,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
...</pre>
|
||||
|
||||
|
||||
<h5><a name="elementsCharFle">Device logfile</a></h5>
|
||||
<h6><a name="elementsCharFle">Device logfile</a></h6>
|
||||
|
||||
<p>
|
||||
A file is opened and all data sent to the character
|
||||
@ -840,7 +1068,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</serial>
|
||||
...</pre>
|
||||
|
||||
<h5><a name="elementsCharVC">Virtual console</a></h5>
|
||||
<h6><a name="elementsCharVC">Virtual console</a></h6>
|
||||
|
||||
<p>
|
||||
Connects the character device to the graphical framebuffer in
|
||||
@ -855,7 +1083,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</serial>
|
||||
...</pre>
|
||||
|
||||
<h5><a name="elementsCharNull">Null device</a></h5>
|
||||
<h6><a name="elementsCharNull">Null device</a></h6>
|
||||
|
||||
<p>
|
||||
Connects the character device to the void. No data is ever
|
||||
@ -869,7 +1097,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</serial>
|
||||
...</pre>
|
||||
|
||||
<h5><a name="elementsCharPTY">Pseudo TTY</a></h5>
|
||||
<h6><a name="elementsCharPTY">Pseudo TTY</a></h6>
|
||||
|
||||
<p>
|
||||
A Pseudo TTY is allocated using /dev/ptmx. A suitable client
|
||||
@ -892,7 +1120,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
with existing syntax for <console> tags.
|
||||
</p>
|
||||
|
||||
<h5><a name="elementsCharHost">Host device proxy</a></h5>
|
||||
<h6><a name="elementsCharHost">Host device proxy</a></h6>
|
||||
|
||||
<p>
|
||||
The character device is passed through to the underlying
|
||||
@ -910,7 +1138,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</serial>
|
||||
...</pre>
|
||||
|
||||
<h5><a name="elementsCharPipe">Named pipe</a></h5>
|
||||
<h6><a name="elementsCharPipe">Named pipe</a></h6>
|
||||
|
||||
<p>
|
||||
The character device writes output to a named pipe. See pipe(7) for
|
||||
@ -925,7 +1153,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</serial>
|
||||
...</pre>
|
||||
|
||||
<h5><a name="elementsCharTCP">TCP client/server</a></h5>
|
||||
<h6><a name="elementsCharTCP">TCP client/server</a></h6>
|
||||
|
||||
<p>
|
||||
The character device acts as a TCP client connecting to a
|
||||
@ -973,7 +1201,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</serial>
|
||||
...</pre>
|
||||
|
||||
<h5><a name="elementsCharUDP">UDP network console</a></h5>
|
||||
<h6><a name="elementsCharUDP">UDP network console</a></h6>
|
||||
|
||||
<p>
|
||||
The character device acts as a UDP netconsole service,
|
||||
@ -989,7 +1217,7 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</serial>
|
||||
...</pre>
|
||||
|
||||
<h5><a name="elementsCharUNIX">UNIX domain socket client/server</a></h5>
|
||||
<h6><a name="elementsCharUNIX">UNIX domain socket client/server</a></h6>
|
||||
|
||||
<p>
|
||||
The character device acts as a UNIX domain socket server,
|
||||
@ -1028,6 +1256,81 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4><a name="elementsWatchdog">Watchdog device</a></h4>
|
||||
|
||||
<p>
|
||||
A virtual hardware watchdog device can be added to the guest via
|
||||
the <code>watchdog</code> element.
|
||||
<span class="since">Since 0.7.3, QEMU and KVM only</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The watchdog device requires an additional driver and management
|
||||
daemon in the guest. Just enabling the watchdog in the libvirt
|
||||
configuration does not do anything useful on its own.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Currently libvirt does not support notification when the
|
||||
watchdog fires. This feature is planned for a future version of
|
||||
libvirt.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<watchdog model='i6300esb'/>
|
||||
...</pre>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<watchdog model='i6300esb' action='poweroff'/>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>model</code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The required <code>model</code> attribute specifies what real
|
||||
watchdog device is emulated. Valid values are specific to the
|
||||
underlying hypervisor.
|
||||
</p>
|
||||
<p>
|
||||
QEMU and KVM support:
|
||||
</p>
|
||||
<ul>
|
||||
<li> 'i6300esb' — the recommended device,
|
||||
emulating a PCI Intel 6300ESB </li>
|
||||
<li> 'ib700' — emulating an ISA iBase IB700 </li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt><code>action</code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The optional <code>action</code> attribute describes what
|
||||
action to take when the watchdog expires. Valid values are
|
||||
specific to the underlying hypervisor.
|
||||
</p>
|
||||
<p>
|
||||
QEMU and KVM support:
|
||||
</p>
|
||||
<ul>
|
||||
<li>'reset' — default, forcefully reset the guest</li>
|
||||
<li>'shutdown' — gracefully shutdown the guest
|
||||
(not recommended) </li>
|
||||
<li>'poweroff' — forcefully power off the guest</li>
|
||||
<li>'pause' — pause the guest</li>
|
||||
<li>'none' — do nothing</li>
|
||||
</ul>
|
||||
<p>
|
||||
Note that the 'shutdown' action requires that the guest
|
||||
is responsive to ACPI signals. In the sort of situations
|
||||
where the watchdog has expired, guests are usually unable
|
||||
to respond to ACPI signals. Therefore using 'shutdown'
|
||||
is not recommended.
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a name="examples">Example configs</a></h2>
|
||||
|
||||
<p>
|
||||
|
@ -35,17 +35,17 @@
|
||||
<dl>
|
||||
<dt><code>name</code></dt>
|
||||
<dd>The content of the <code>name</code> element provides
|
||||
a short name for the virtual network. This name should
|
||||
consist only of alpha-numeric characters and is required
|
||||
to be unique within the scope of a single host. It is
|
||||
used to form the filename for storing the persistent
|
||||
configuration file. <span class="since">Since 0.3.0</span></dd>
|
||||
a short name for the virtual network. This name should
|
||||
consist only of alpha-numeric characters and is required
|
||||
to be unique within the scope of a single host. It is
|
||||
used to form the filename for storing the persistent
|
||||
configuration file. <span class="since">Since 0.3.0</span></dd>
|
||||
<dt><code>uuid</code></dt>
|
||||
<dd>The content of the <code>uuid</code> element provides
|
||||
a globally unique identifier for the virtual network.
|
||||
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>
|
||||
a globally unique identifier for the virtual network.
|
||||
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>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsConnect">Connectivity</a></h3>
|
||||
@ -58,32 +58,32 @@
|
||||
<pre>
|
||||
...
|
||||
<bridge name="virbr0" />
|
||||
<forward mode="nat" dev="eth0"/>
|
||||
...</pre>
|
||||
<forward mode="nat" dev="eth0"/>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>bridge</code></dt>
|
||||
<dd>The <code>name</code> attribute on the <code>bridge</code> element
|
||||
defines the name of a bridge device which will be used to construct
|
||||
the virtual network. The virtual machines will be connected to this
|
||||
bridge device allowing them to talk to each other. The bridge device
|
||||
may also be connected to the LAN. It is recommended that bridge
|
||||
device names started with the prefix <code>vir</code>, but the name
|
||||
<code>virbr0</code> is reserved for the "default" virtual network.
|
||||
This element should always be provided when defining a new network.
|
||||
<span class="since">Since 0.3.0</span>
|
||||
defines the name of a bridge device which will be used to construct
|
||||
the virtual network. The virtual machines will be connected to this
|
||||
bridge device allowing them to talk to each other. The bridge device
|
||||
may also be connected to the LAN. It is recommended that bridge
|
||||
device names started with the prefix <code>vir</code>, but the name
|
||||
<code>virbr0</code> is reserved for the "default" virtual network.
|
||||
This element should always be provided when defining a new network.
|
||||
<span class="since">Since 0.3.0</span>
|
||||
</dd>
|
||||
<dt><code>forward</code></dt>
|
||||
<dd>Inclusion of the <code>forward</code> element indicates that
|
||||
the virtual network is to be connected to the physical LAN. If
|
||||
no attributes are set, NAT forwarding will be used for connectivity.
|
||||
Firewall rules will allow forwarding to any other network device whether
|
||||
ethernet, wireless, dialup, or VPN. If the <code>dev</code> attribute
|
||||
is set, the firewall rules will restrict forwarding to the named
|
||||
device only. If the <code>mode</code> attribute is set to <code>route</code>
|
||||
then the traffic will not have NAT applied. This presumes that the
|
||||
local LAN router has suitable routing table entries to return traffic
|
||||
to this host. <span class="since">Since 0.3.0; 'mode' attribute since
|
||||
the virtual network is to be connected to the physical LAN. If
|
||||
no attributes are set, NAT forwarding will be used for connectivity.
|
||||
Firewall rules will allow forwarding to any other network device whether
|
||||
ethernet, wireless, dialup, or VPN. If the <code>dev</code> attribute
|
||||
is set, the firewall rules will restrict forwarding to the named
|
||||
device only. If the <code>mode</code> attribute is set to <code>route</code>
|
||||
then the traffic will not have NAT applied. This presumes that the
|
||||
local LAN router has suitable routing table entries to return traffic
|
||||
to this host. <span class="since">Since 0.3.0; 'mode' attribute since
|
||||
0.4.2</span></dd>
|
||||
</dl>
|
||||
|
||||
@ -96,57 +96,62 @@
|
||||
|
||||
<pre>
|
||||
...
|
||||
<ip address="192.168.122.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
<range start="192.168.122.100" end="192.168.122.254" />
|
||||
<host mac="00:16:3e:77:e2:ed" name="foo.example.com" ip="192.168.122.10" />
|
||||
<host mac="00:16:3e:3e:a9:1a" name="bar.example.com" ip="192.168.122.11" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
<ip address="192.168.122.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
<range start="192.168.122.100" end="192.168.122.254" />
|
||||
<host mac="00:16:3e:77:e2:ed" name="foo.example.com" ip="192.168.122.10" />
|
||||
<host mac="00:16:3e:3e:a9:1a" name="bar.example.com" ip="192.168.122.11" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network></pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>ip</code></dt>
|
||||
<dd>The <code>address</code> attribute defines an IPv4 address in
|
||||
dotted-decimal format, that will be configured on the bridge
|
||||
device associated with the virtual network. To the guests this
|
||||
address will be their default route. The <code>netmask</code>
|
||||
attribute defines the significant bits of the network address,
|
||||
again specified in dotted-decimal format. <span class="since">Since 0.3.0</span>
|
||||
dotted-decimal format, that will be configured on the bridge
|
||||
device associated with the virtual network. To the guests this
|
||||
address will be their default route. The <code>netmask</code>
|
||||
attribute defines the significant bits of the network address,
|
||||
again specified in dotted-decimal format. <span class="since">Since 0.3.0</span>
|
||||
</dd><dt><code>tftp</code></dt><dd>Immediately within
|
||||
the <code>ip</code> element there is an optional <code>tftp</code>
|
||||
element. The presence of this element and of its attribute
|
||||
<code>root</code> enables TFTP services. The attribute specifies
|
||||
the path to the root directory served via TFTP.
|
||||
<span class="since">Since 0.7.1</span>
|
||||
the <code>ip</code> element there is an optional <code>tftp</code>
|
||||
element. The presence of this element and of its attribute
|
||||
<code>root</code> enables TFTP services. The attribute specifies
|
||||
the path to the root directory served via TFTP.
|
||||
<span class="since">Since 0.7.1</span>
|
||||
</dd><dt><code>dhcp</code></dt><dd>Also within the <code>ip</code> element there is an
|
||||
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.
|
||||
<span class="since">Since 0.3.0</span>
|
||||
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.
|
||||
<span class="since">Since 0.3.0</span>
|
||||
</dd>
|
||||
<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
|
||||
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>range</code> element specify the boundaries of a pool of
|
||||
IPv4 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>
|
||||
</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
|
||||
a given name (via the <code>mac</code> attribute), the IP to be
|
||||
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
|
||||
name to be given that host by the DHCP server (via the
|
||||
<code>name</code> attribute). <span class="since">Since 0.4.5</span>
|
||||
</dd><dt><code>bootp</code></dt><dd>The optional <code>bootp</code>
|
||||
element specifies BOOTP options to be provided by the DHCP server.
|
||||
Only one attribute is supported, <code>file</code>, giving the file
|
||||
to be used for the boot image). The BOOTP options currently have to
|
||||
be the same for all address ranges and statically assigned addresses.<span
|
||||
class="since">Since 0.7.1.</span>
|
||||
element specifies BOOTP options to be provided by the DHCP server.
|
||||
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
|
||||
image will be fetched. <code>server</code> defaults to the same host
|
||||
that runs the DHCP server, as is the case when the <code>tftp</code>
|
||||
element is used. The BOOTP options currently have to be the same
|
||||
for all address ranges and statically assigned addresses.<span
|
||||
class="since">Since 0.7.1 (<code>server</code> since 0.7.3).</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a name="examples">Example configuration</a></h2>
|
||||
@ -165,14 +170,14 @@
|
||||
|
||||
<pre>
|
||||
<network>
|
||||
<name>default</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>
|
||||
<name>default</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>
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesRoute">Routed network config</a></h3>
|
||||
@ -188,14 +193,14 @@
|
||||
|
||||
<pre>
|
||||
<network>
|
||||
<name>local</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>
|
||||
<name>local</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>
|
||||
</network></pre>
|
||||
|
||||
<h3><a name="examplesPrivate">Isolated network config</a></h3>
|
||||
@ -210,13 +215,13 @@
|
||||
|
||||
<pre>
|
||||
<network>
|
||||
<name>private</name>
|
||||
<bridge name="virbr2" />
|
||||
<ip address="192.168.152.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
<range start="192.168.152.2" end="192.168.152.254" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
<name>private</name>
|
||||
<bridge name="virbr2" />
|
||||
<ip address="192.168.152.1" netmask="255.255.255.0">
|
||||
<dhcp>
|
||||
<range start="192.168.152.2" end="192.168.152.254" />
|
||||
</dhcp>
|
||||
</ip>
|
||||
</network></pre>
|
||||
|
||||
</body>
|
||||
|
@ -37,10 +37,10 @@
|
||||
</dd>
|
||||
<dt><code>usage</code></dt>
|
||||
<dd>
|
||||
Specifies what this secret is used for. A mandatory
|
||||
<code>type</code> attribute specifies the usage category, currently
|
||||
only <code>volume</code> is defined. Specific usage categories are
|
||||
described below.
|
||||
Specifies what this secret is used for. A mandatory
|
||||
<code>type</code> attribute specifies the usage category, currently
|
||||
only <code>volume</code> is defined. Specific usage categories are
|
||||
described below.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
@ -34,27 +34,27 @@
|
||||
<dl>
|
||||
<dt><code>name</code></dt>
|
||||
<dd>Providing a name for the pool which is unique to the host.
|
||||
This is mandatory when defining a pool. <span class="since">Since 0.4.1</span></dd>
|
||||
This is mandatory when defining a pool. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>uuid</code></dt>
|
||||
<dd>Providing an identifier for the pool which is globally unique.
|
||||
This is optional when defining a pool, a UUID will be generated if
|
||||
omitted. <span class="since">Since 0.4.1</span></dd>
|
||||
This is optional when defining a pool, a UUID will be generated if
|
||||
omitted. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>allocation</code></dt>
|
||||
<dd>Providing the total storage allocation for the pool. This may
|
||||
be larger than the sum of the allocation of all volumes due to
|
||||
metadata overhead. This value is in bytes. This is not applicable
|
||||
when creating a pool. <span class="since">Since 0.4.1</span></dd>
|
||||
be larger than the sum of the allocation of all volumes due to
|
||||
metadata overhead. This value is in bytes. This is not applicable
|
||||
when creating a pool. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>capacity</code></dt>
|
||||
<dd>Providing the total storage capacity for the pool. Due to
|
||||
underlying device constraints it may not be possible to use the
|
||||
full capacity for storage volumes. This value is in bytes. This
|
||||
is not applicable when creating a pool. <span class="since">Since 0.4.1</span></dd>
|
||||
underlying device constraints it may not be possible to use the
|
||||
full capacity for storage volumes. This value is in bytes. This
|
||||
is not applicable when creating a pool. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>available</code></dt>
|
||||
<dd>Providing the free space available for allocating new volumes
|
||||
in the pool. Due to underlying device constraints it may not be
|
||||
possible to allocate the entire free space to a single volume.
|
||||
This value is in bytes. This is not applicable when creating a
|
||||
pool. <span class="since">Since 0.4.1</span></dd>
|
||||
in the pool. Due to underlying device constraints it may not be
|
||||
possible to allocate the entire free space to a single volume.
|
||||
This value is in bytes. This is not applicable when creating a
|
||||
pool. <span class="since">Since 0.4.1</span></dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="StoragePoolSource">Source elements</a></h3>
|
||||
@ -71,38 +71,38 @@
|
||||
<host name="iscsi.example.com"/>
|
||||
<device path="demo-target"/>
|
||||
</source>
|
||||
...</pre>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>device</code></dt>
|
||||
<dd>Provides the source for pools backed by physical devices.
|
||||
May be repeated multiple times depending on backend driver. Contains
|
||||
a single attribute <code>path</code> which is the fully qualified
|
||||
path to the block device node. <span class="since">Since 0.4.1</span></dd>
|
||||
May be repeated multiple times depending on backend driver. Contains
|
||||
a single attribute <code>path</code> which is the fully qualified
|
||||
path to the block device node. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>directory</code></dt>
|
||||
<dd>Provides the source for pools backed by directories. May
|
||||
only occur once. Contains a single attribute <code>path</code>
|
||||
which is the fully qualified path to the block device node.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
only occur once. Contains a single attribute <code>path</code>
|
||||
which is the fully qualified path to the block device node.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>host</code></dt>
|
||||
<dd>Provides the source for pools backed by storage from a
|
||||
remote server. Will be used in combination with a <code>directory</code>
|
||||
or <code>device</code> element. Contains an attribute <code>name</code>
|
||||
which is the hostname or IP address of the server. May optionally
|
||||
contain a <code>port</code> attribute for the protocol specific
|
||||
port number. <span class="since">Since 0.4.1</span></dd>
|
||||
remote server. Will be used in combination with a <code>directory</code>
|
||||
or <code>device</code> element. Contains an attribute <code>name</code>
|
||||
which is the hostname or IP address of the server. May optionally
|
||||
contain a <code>port</code> attribute for the protocol specific
|
||||
port number. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>name</code></dt>
|
||||
<dd>Provides the source for pools backed by storage from a
|
||||
named element (e.g., a logical volume group name).
|
||||
remote server. Contains a string identifier.
|
||||
<span class="since">Since 0.4.5</span></dd>
|
||||
named element (e.g., a logical volume group name).
|
||||
remote server. Contains a string identifier.
|
||||
<span class="since">Since 0.4.5</span></dd>
|
||||
<dt><code>format</code></dt>
|
||||
<dd>Provides information about the format of the pool. This
|
||||
contains a single attribute <code>type</code> whose value is
|
||||
backend specific. This is typically used to indicate filesystem
|
||||
type, or network filesystem type, or partition table type, or
|
||||
LVM metadata type. All drivers are required to have a default
|
||||
value for this, so it is optional. <span class="since">Since 0.4.1</span></dd>
|
||||
contains a single attribute <code>type</code> whose value is
|
||||
backend specific. This is typically used to indicate filesystem
|
||||
type, or network filesystem type, or partition table type, or
|
||||
LVM metadata type. All drivers are required to have a default
|
||||
value for this, so it is optional. <span class="since">Since 0.4.1</span></dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="StoragePoolTarget">Target elements</a></h3>
|
||||
@ -119,8 +119,8 @@
|
||||
<target>
|
||||
<path>/dev/disk/by-path</path>
|
||||
<permissions>
|
||||
<owner>0744</owner>
|
||||
<group>0744</group>
|
||||
<owner>107</owner>
|
||||
<group>107</group>
|
||||
<mode>0744</mode>
|
||||
<label>virt_image_t</label>
|
||||
</permissions>
|
||||
@ -133,27 +133,27 @@
|
||||
<dl>
|
||||
<dt><code>path</code></dt>
|
||||
<dd>Provides the location at which the pool will be mapped into
|
||||
the local filesystem namespace. For a filesystem/directory based
|
||||
pool it will be the name of the directory in which volumes will
|
||||
be created. For device based pools it will be the name of the directory in which
|
||||
devices nodes exist. For the latter <code>/dev/</code> may seem
|
||||
like the logical choice, however, devices nodes there are not
|
||||
guaranteed stable across reboots, since they are allocated on
|
||||
demand. It is preferable to use a stable location such as one
|
||||
of the <code>/dev/disk/by-{path,id,uuid,label</code> locations.
|
||||
<span class="since">Since 0.4.1</span>
|
||||
the local filesystem namespace. For a filesystem/directory based
|
||||
pool it will be the name of the directory in which volumes will
|
||||
be created. For device based pools it will be the name of the directory in which
|
||||
devices nodes exist. For the latter <code>/dev/</code> may seem
|
||||
like the logical choice, however, devices nodes there are not
|
||||
guaranteed stable across reboots, since they are allocated on
|
||||
demand. It is preferable to use a stable location such as one
|
||||
of the <code>/dev/disk/by-{path,id,uuid,label</code> locations.
|
||||
<span class="since">Since 0.4.1</span>
|
||||
</dd>
|
||||
<dt><code>permissions</code></dt>
|
||||
<dd>Provides information about the default permissions to use
|
||||
when creating volumes. This is currently only useful for directory
|
||||
or filesystem based pools, where the volumes allocated are simple
|
||||
files. For pools where the volumes are device nodes, the hotplug
|
||||
scripts determine permissions. It contains 4 child elements. The
|
||||
<code>mode</code> element contains the octal permission set. The
|
||||
<code>owner</code> element contains the numeric user ID. The <code>group</code>
|
||||
element contains the numeric group ID. The <code>label</code> element
|
||||
contains the MAC (eg SELinux) label string.
|
||||
<span class="since">Since 0.4.1</span>
|
||||
when creating volumes. This is currently only useful for directory
|
||||
or filesystem based pools, where the volumes allocated are simple
|
||||
files. For pools where the volumes are device nodes, the hotplug
|
||||
scripts determine permissions. It contains 4 child elements. The
|
||||
<code>mode</code> element contains the octal permission set. The
|
||||
<code>owner</code> element contains the numeric user ID. The <code>group</code>
|
||||
element contains the numeric group ID. The <code>label</code> element
|
||||
contains the MAC (eg SELinux) label string.
|
||||
<span class="since">Since 0.4.1</span>
|
||||
</dd>
|
||||
<dt><code>encryption</code></dt>
|
||||
<dd>If present, specifies how the volume is encrypted. See
|
||||
@ -192,41 +192,41 @@
|
||||
|
||||
<pre>
|
||||
<volume>
|
||||
<name>sparse.img</name>
|
||||
<key>/var/lib/xen/images/sparse.img</key>
|
||||
<name>sparse.img</name>
|
||||
<key>/var/lib/xen/images/sparse.img</key>
|
||||
<allocation>0</allocation>
|
||||
<capacity unit="T">1</capacity>
|
||||
<capacity unit="T">1</capacity>
|
||||
...</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>name</code></dt>
|
||||
<dd>Providing a name for the volume which is unique to the pool.
|
||||
This is mandatory when defining a volume. <span class="since">Since 0.4.1</span></dd>
|
||||
This is mandatory when defining a volume. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>key</code></dt>
|
||||
<dd>Providing an identifier for the volume which is globally unique.
|
||||
This is optional when defining a volume, a key will be generated if
|
||||
omitted. <span class="since">Since 0.4.1</span></dd>
|
||||
This is optional when defining a volume, a key will be generated if
|
||||
omitted. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>allocation</code></dt>
|
||||
<dd>Providing the total storage allocation for the volume. This
|
||||
may be smaller than the logical capacity if the volume is sparsely
|
||||
allocated. It may also be larger than the logical capacity if the
|
||||
volume has substantial metadata overhead. This value is in bytes.
|
||||
If omitted when creating a volume, the volume will be fully
|
||||
allocated at time of creation. If set to a value smaller than the
|
||||
capacity, the pool has the <strong>option</strong> of deciding
|
||||
to sparsely allocate a volume. It does not have to honour requests
|
||||
for sparse allocation though. <span class="since">Since 0.4.1</span></dd>
|
||||
may be smaller than the logical capacity if the volume is sparsely
|
||||
allocated. It may also be larger than the logical capacity if the
|
||||
volume has substantial metadata overhead. This value is in bytes.
|
||||
If omitted when creating a volume, the volume will be fully
|
||||
allocated at time of creation. If set to a value smaller than the
|
||||
capacity, the pool has the <strong>option</strong> of deciding
|
||||
to sparsely allocate a volume. It does not have to honour requests
|
||||
for sparse allocation though. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>capacity</code></dt>
|
||||
<dd>Providing the logical capacity for the volume. This value is
|
||||
in bytes. This is compulsory when creating a volume.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
in bytes. This is compulsory when creating a volume.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>source</code></dt>
|
||||
<dd>Provides information about the underlying storage allocation
|
||||
of the volume. This may not be available for some pool types.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
of the volume. This may not be available for some pool types.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>target</code></dt>
|
||||
<dd>Provides information about the representation of the volume
|
||||
on the local host. <span class="since">Since 0.4.1</span></dd>
|
||||
on the local host. <span class="since">Since 0.4.1</span></dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="StorageVolTarget">Target elements</a></h3>
|
||||
@ -240,42 +240,42 @@
|
||||
|
||||
<pre>
|
||||
...
|
||||
<target>
|
||||
<target>
|
||||
<path>/var/lib/virt/images/sparse.img</path>
|
||||
<format type='qcow2'/>
|
||||
<permissions>
|
||||
<owner>0744</owner>
|
||||
<group>0744</group>
|
||||
<owner>107</owner>
|
||||
<group>107</group>
|
||||
<mode>0744</mode>
|
||||
<label>virt_image_t</label>
|
||||
</permissions>
|
||||
</target></pre>
|
||||
</target></pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>path</code></dt>
|
||||
<dd>Provides the location at which the volume can be accessed on
|
||||
the local filesystem, as an absolute path. This is a readonly
|
||||
attribute, so shouldn't be specified when creating a volume.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
the local filesystem, as an absolute path. This is a readonly
|
||||
attribute, so shouldn't be specified when creating a volume.
|
||||
<span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>format</code></dt>
|
||||
<dd>Provides information about the pool specific volume format.
|
||||
For disk pools it will provide the partition type. For filesystem
|
||||
or directory pools it will provide the file format type, eg cow,
|
||||
qcow, vmdk, raw. If omitted when creating a volume, the pool's
|
||||
default format will be used. The actual format is specified via
|
||||
the <code>type</code> attribute. Consult the pool-specific docs for
|
||||
For disk pools it will provide the partition type. For filesystem
|
||||
or directory pools it will provide the file format type, eg cow,
|
||||
qcow, vmdk, raw. If omitted when creating a volume, the pool's
|
||||
default format will be used. The actual format is specified via
|
||||
the <code>type</code> attribute. Consult the pool-specific docs for
|
||||
the list of valid values. <span class="since">Since 0.4.1</span></dd>
|
||||
<dt><code>permissions</code></dt>
|
||||
<dd>Provides information about the default permissions to use
|
||||
when creating volumes. This is currently only useful for directory
|
||||
or filesystem based pools, where the volumes allocated are simple
|
||||
files. For pools where the volumes are device nodes, the hotplug
|
||||
scripts determine permissions. It contains 4 child elements. The
|
||||
<code>mode</code> element contains the octal permission set. The
|
||||
<code>owner</code> element contains the numeric user ID. The <code>group</code>
|
||||
element contains the numeric group ID. The <code>label</code> element
|
||||
contains the MAC (eg SELinux) label string.
|
||||
<span class="since">Since 0.4.1</span>
|
||||
when creating volumes. This is currently only useful for directory
|
||||
or filesystem based pools, where the volumes allocated are simple
|
||||
files. For pools where the volumes are device nodes, the hotplug
|
||||
scripts determine permissions. It contains 4 child elements. The
|
||||
<code>mode</code> element contains the octal permission set. The
|
||||
<code>owner</code> element contains the numeric user ID. The <code>group</code>
|
||||
element contains the numeric group ID. The <code>label</code> element
|
||||
contains the MAC (eg SELinux) label string.
|
||||
<span class="since">Since 0.4.1</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -294,8 +294,8 @@
|
||||
<path>/var/lib/virt/images/master.img</path>
|
||||
<format>raw</format>
|
||||
<permissions>
|
||||
<owner>0744</owner>
|
||||
<group>0744</group>
|
||||
<owner>107</owner>
|
||||
<group>107</group>
|
||||
<mode>0744</mode>
|
||||
<label>virt_image_t</label>
|
||||
</permissions>
|
||||
@ -305,25 +305,25 @@
|
||||
<dl>
|
||||
<dt><code>path</code></dt>
|
||||
<dd>Provides the location at which the backing store can be accessed on
|
||||
the local filesystem, as an absolute path. If omitted, there is no
|
||||
the local filesystem, as an absolute path. If omitted, there is no
|
||||
backing store for this volume.
|
||||
<span class="since">Since 0.6.0</span></dd>
|
||||
<span class="since">Since 0.6.0</span></dd>
|
||||
<dt><code>format</code></dt>
|
||||
<dd>Provides information about the pool specific backing store format.
|
||||
For disk pools it will provide the partition type. For filesystem
|
||||
or directory pools it will provide the file format type, eg cow,
|
||||
qcow, vmdk, raw. Consult the pool-specific docs for the list of valid
|
||||
For disk pools it will provide the partition type. For filesystem
|
||||
or directory pools it will provide the file format type, eg cow,
|
||||
qcow, vmdk, raw. Consult the pool-specific docs for the list of valid
|
||||
values. Most file formats require a backing store of the same format,
|
||||
however, the qcow2 format allows a different backing store format.
|
||||
<span class="since">Since 0.6.0</span></dd>
|
||||
<dt><code>permissions</code></dt>
|
||||
<dd>Provides information about the permissions of the backing file.
|
||||
It contains 4 child elements. The
|
||||
<code>mode</code> element contains the octal permission set. The
|
||||
<code>owner</code> element contains the numeric user ID. The <code>group</code>
|
||||
element contains the numeric group ID. The <code>label</code> element
|
||||
contains the MAC (eg SELinux) label string.
|
||||
<span class="since">Since 0.6.0</span>
|
||||
<code>mode</code> element contains the octal permission set. The
|
||||
<code>owner</code> element contains the numeric user ID. The <code>group</code>
|
||||
element contains the numeric group ID. The <code>label</code> element
|
||||
contains the MAC (eg SELinux) label string.
|
||||
<span class="since">Since 0.6.0</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -362,18 +362,18 @@
|
||||
|
||||
<pre>
|
||||
<volume>
|
||||
<name>sparse.img</name>
|
||||
<allocation>0</allocation>
|
||||
<capacity unit="T">1</capacity>
|
||||
<target>
|
||||
<name>sparse.img</name>
|
||||
<allocation>0</allocation>
|
||||
<capacity unit="T">1</capacity>
|
||||
<target>
|
||||
<path>/var/lib/virt/images/sparse.img</path>
|
||||
<permissions>
|
||||
<owner>0744</owner>
|
||||
<group>0744</group>
|
||||
<owner>107</owner>
|
||||
<group>107</group>
|
||||
<mode>0744</mode>
|
||||
<label>virt_image_t</label>
|
||||
</permissions>
|
||||
</target>
|
||||
</target>
|
||||
</volume></pre>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -5,7 +5,7 @@ body {
|
||||
color: rgb(0,0,0);
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 80%;
|
||||
// font-size: 83%;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
p, ul, ol, dl {
|
||||
|
@ -8,50 +8,50 @@
|
||||
|
||||
<ol>
|
||||
<li>Discuss any large changes on the mailing list first. Post patches
|
||||
early and listen to feedback.</li>
|
||||
early and listen to feedback.</li>
|
||||
|
||||
<li><p>Post patches in unified diff format. A command similar to this
|
||||
should work:</p>
|
||||
<pre>
|
||||
should work:</p>
|
||||
<pre>
|
||||
diff -urp libvirt.orig/ libvirt.modified/ > libvirt-myfeature.patch
|
||||
</pre>
|
||||
<p>
|
||||
or:
|
||||
</p>
|
||||
<pre>
|
||||
cvs diff -up > libvirt-myfeature.patch
|
||||
<p>
|
||||
or:
|
||||
</p>
|
||||
<pre>
|
||||
git diff > libvirt-myfeature.patch
|
||||
</pre></li>
|
||||
<li>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.</li>
|
||||
<li>Make sure your patches apply against libvirt CVS. Developers
|
||||
only follow CVS and don't care much about released versions.</li>
|
||||
if possible, with an explanation of each patch and an explanation of how
|
||||
the sequence of patches fits together.</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>
|
||||
<pre>
|
||||
In particular, configure with compile warnings set to -Werror:</p>
|
||||
<pre>
|
||||
./configure --enable-compile-warnings=error
|
||||
</pre>
|
||||
<p>
|
||||
and run the tests:
|
||||
</p>
|
||||
<pre>
|
||||
<p>
|
||||
and run the tests:
|
||||
</p>
|
||||
<pre>
|
||||
make check
|
||||
make syntax-check
|
||||
make -C tests valgrind
|
||||
</pre>
|
||||
<p>
|
||||
The latter test checks for memory leaks.
|
||||
</p>
|
||||
<p>
|
||||
The latter test checks for memory leaks.
|
||||
</p>
|
||||
|
||||
<li>Update tests and/or documentation, particularly if you are adding
|
||||
a new feature or changing the output of a program.</li>
|
||||
a new feature or changing the output of a program.</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
There is more on this subject, including lots of links to background
|
||||
reading on the subject, on
|
||||
<a href="http://et.redhat.com/~rjones/how-to-supply-code-to-open-source-projects/">
|
||||
Richard Jones' guide to working with open source projects</a>
|
||||
Richard Jones' guide to working with open source projects</a>
|
||||
</p>
|
||||
|
||||
|
||||
@ -77,8 +77,8 @@
|
||||
(setq c-indent-level 4)
|
||||
(setq c-basic-offset 4))
|
||||
(add-hook 'c-mode-hook
|
||||
'(lambda () (if (string-match "/libvirt" (buffer-file-name))
|
||||
(libvirt-c-mode))))
|
||||
'(lambda () (if (string-match "/libvirt" (buffer-file-name))
|
||||
(libvirt-c-mode))))
|
||||
</pre>
|
||||
|
||||
<h2><a name="formatting">Code formatting (especially for new code)</a></h2>
|
||||
@ -118,30 +118,30 @@
|
||||
<ul>
|
||||
<li>If you're using "int" or "long", odds are good that there's a better type.</li>
|
||||
<li>If a variable is counting something, be sure to declare it with an
|
||||
unsigned type.</li>
|
||||
unsigned type.</li>
|
||||
<li>If it's memory-size-related, use size_t (use ssize_t only if required).</li>
|
||||
<li>If it's file-size related, use uintmax_t, or maybe off_t.</li>
|
||||
<li>If it's file-offset related (i.e., signed), use off_t.</li>
|
||||
<li>If it's just counting small numbers use "unsigned int";
|
||||
(on all but oddball embedded systems, you can assume that that
|
||||
type is at least four bytes wide).</li>
|
||||
(on all but oddball embedded systems, you can assume that that
|
||||
type is at least four bytes wide).</li>
|
||||
<li>If a variable has boolean semantics, give it the "bool" type
|
||||
and use the corresponding "true" and "false" macros. It's ok
|
||||
to include <stdbool.h>, since libvirt's use of gnulib ensures
|
||||
that it exists and is usable.</li>
|
||||
and use the corresponding "true" and "false" macros. It's ok
|
||||
to include <stdbool.h>, since libvirt's use of gnulib ensures
|
||||
that it exists and is usable.</li>
|
||||
<li>In the unusual event that you require a specific width, use a
|
||||
standard type like int32_t, uint32_t, uint64_t, etc.</li>
|
||||
standard type like int32_t, uint32_t, uint64_t, etc.</li>
|
||||
<li>While using "bool" is good for readability, it comes with minor caveats:
|
||||
<ul>
|
||||
<li>Don't use "bool" in places where the type size must be constant across
|
||||
all systems, like public interfaces and on-the-wire protocols. Note
|
||||
that it would be possible (albeit wasteful) to use "bool" in libvirt's
|
||||
logical wire protocol, since XDR maps that to its lower-level bool_t
|
||||
type, which *is* fixed-size.</li>
|
||||
<li>Don't compare a bool variable against the literal, "true",
|
||||
since a value with a logical non-false value need not be "1".
|
||||
I.e., don't write "if (seen == true) ...". Rather, write "if (seen)...".</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Don't use "bool" in places where the type size must be constant across
|
||||
all systems, like public interfaces and on-the-wire protocols. Note
|
||||
that it would be possible (albeit wasteful) to use "bool" in libvirt's
|
||||
logical wire protocol, since XDR maps that to its lower-level bool_t
|
||||
type, which *is* fixed-size.</li>
|
||||
<li>Don't compare a bool variable against the literal, "true",
|
||||
since a value with a logical non-false value need not be "1".
|
||||
I.e., don't write "if (seen == true) ...". Rather, write "if (seen)...".</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -250,14 +250,14 @@
|
||||
|
||||
<ul>
|
||||
<li><p>For strict equality:</p>
|
||||
<pre>
|
||||
<pre>
|
||||
STREQ(a,b)
|
||||
STRNEQ(a,b)
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li><p>For case sensitive equality:</p>
|
||||
<pre>
|
||||
<li><p>For case insensitive equality:</p>
|
||||
<pre>
|
||||
STRCASEEQ(a,b)
|
||||
STRCASENEQ(a,b)
|
||||
</pre>
|
||||
@ -265,15 +265,15 @@
|
||||
|
||||
<li><p>For strict equality of a substring:</p>
|
||||
|
||||
<pre>
|
||||
<pre>
|
||||
STREQLEN(a,b,n)
|
||||
STRNEQLEN(a,b,n)
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li><p>For case sensitive equality of a substring:</p>
|
||||
<li><p>For case insensitive equality of a substring:</p>
|
||||
|
||||
<pre>
|
||||
<pre>
|
||||
STRCASEEQLEN(a,b,n)
|
||||
STRCASENEQLEN(a,b,n)
|
||||
</pre>
|
||||
@ -281,7 +281,7 @@
|
||||
|
||||
<li><p>For strict equality of a prefix:</p>
|
||||
|
||||
<pre>
|
||||
<pre>
|
||||
STRPREFIX(a,b)
|
||||
</pre>
|
||||
</li>
|
||||
@ -306,14 +306,15 @@
|
||||
...
|
||||
|
||||
virBufferAddLit(&buf, "<domain>\n");
|
||||
virBufferVSprint(&buf, " <memory>%d</memory>\n", memory);
|
||||
virBufferVSprint(&buf, " <memory>%d</memory>\n", memory);
|
||||
...
|
||||
virBufferAddLit(&buf, "</domain>\n");
|
||||
|
||||
....
|
||||
...
|
||||
|
||||
if (virBufferError(&buf)) {
|
||||
__virRaiseError(...);
|
||||
virBufferFreeAndReset(&buf);
|
||||
virReportOOMError(...);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -379,7 +380,7 @@
|
||||
|
||||
<pre>
|
||||
int virAsprintf(char **strp, const char *fmt, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 2, 3);
|
||||
ATTRIBUTE_FORMAT(printf, 2, 3);
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@ -416,16 +417,16 @@
|
||||
</p>
|
||||
<ul>
|
||||
<li>if a recently commited patch breaks compilation on a platform
|
||||
or for a given driver then it's fine to commit a minimal fix
|
||||
directly without getting the review feedback first</li>
|
||||
or for a given driver then it's fine to commit a minimal fix
|
||||
directly without getting the review feedback first</li>
|
||||
<li>if make check or make syntax-chek breaks, if there is
|
||||
an obvious fix, it's fine to commit immediately.
|
||||
The patch should still be sent to the list (or tell what the fix was if
|
||||
trivial) and 'make check syntax-check' should pass too before commiting
|
||||
anything</li>
|
||||
an obvious fix, it's fine to commit immediately.
|
||||
The patch should still be sent to the list (or tell what the fix was if
|
||||
trivial) and 'make check syntax-check' should pass too before commiting
|
||||
anything</li>
|
||||
<li>
|
||||
fixes for documentation and code comments can be managed
|
||||
in the same way, but still make sure they get reviewed if non-trivial.
|
||||
fixes for documentation and code comments can be managed
|
||||
in the same way, but still make sure they get reviewed if non-trivial.
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
|
@ -23,6 +23,7 @@ updated on <i>2008-06-05</i>.
|
||||
<th><a href="remote.html">Remote</a></th>
|
||||
<th><a href="drvvbox.html">VirtualBox</a></th>
|
||||
<th><a href="drvone.html">ONE</a></th>
|
||||
<th><a href="drvesx.html">ESX</a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectClose </td>
|
||||
@ -33,6 +34,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetCapabilities </td>
|
||||
@ -43,6 +45,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.1 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetHostname </td>
|
||||
@ -53,6 +56,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetMaxVcpus </td>
|
||||
@ -62,7 +66,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetType </td>
|
||||
@ -73,6 +78,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetURI </td>
|
||||
@ -83,6 +89,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectGetVersion </td>
|
||||
@ -93,6 +100,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectListDefinedDomains </td>
|
||||
@ -103,6 +111,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectListDomains </td>
|
||||
@ -113,6 +122,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectNumOfDefinedDomains </td>
|
||||
@ -123,6 +133,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectNumOfDomains </td>
|
||||
@ -133,6 +144,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectOpen </td>
|
||||
@ -143,6 +155,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectOpenAuth </td>
|
||||
@ -153,6 +166,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virConnectOpenReadOnly </td>
|
||||
@ -163,6 +177,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainAttachDevice </td>
|
||||
@ -173,6 +188,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainBlockPeek </td>
|
||||
@ -183,6 +199,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainBlockStats </td>
|
||||
@ -193,6 +210,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.2 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainCoreDump </td>
|
||||
@ -203,6 +221,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainCreate </td>
|
||||
@ -213,6 +232,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainCreateLinux </td>
|
||||
@ -223,6 +243,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainDefineXML </td>
|
||||
@ -233,6 +254,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.2 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainDestroy </td>
|
||||
@ -243,6 +265,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainDetachDevice </td>
|
||||
@ -253,6 +276,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainFree </td>
|
||||
@ -263,6 +287,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetAutostart </td>
|
||||
@ -273,11 +298,12 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetConnect </td>
|
||||
<td> 0.3.0 </td>
|
||||
<td colspan="6"> not a HV function </td>
|
||||
<td colspan="7"> not a HV function </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetID </td>
|
||||
@ -288,6 +314,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetInfo </td>
|
||||
@ -298,6 +325,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetMaxMemory </td>
|
||||
@ -308,6 +336,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetMaxVcpus </td>
|
||||
@ -318,6 +347,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetName </td>
|
||||
@ -328,6 +358,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetOSType </td>
|
||||
@ -338,6 +369,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetSchedulerParameters </td>
|
||||
@ -348,6 +380,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetSchedulerType </td>
|
||||
@ -358,6 +391,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetUUID </td>
|
||||
@ -368,6 +402,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetUUIDString </td>
|
||||
@ -378,6 +413,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetVcpus </td>
|
||||
@ -388,6 +424,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainInterfaceStats </td>
|
||||
@ -398,6 +435,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.2 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainGetXMLDesc </td>
|
||||
@ -408,6 +446,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainLookupByID </td>
|
||||
@ -418,6 +457,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainLookupByName </td>
|
||||
@ -428,6 +468,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainLookupByUUID </td>
|
||||
@ -438,6 +479,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainLookupByUUIDString </td>
|
||||
@ -448,6 +490,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainMigrate </td>
|
||||
@ -458,6 +501,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> 0.3.2 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainPinVcpu </td>
|
||||
@ -468,6 +512,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainReboot </td>
|
||||
@ -478,6 +523,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainRestore </td>
|
||||
@ -488,7 +534,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainResume </td>
|
||||
@ -499,6 +545,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSave </td>
|
||||
@ -509,6 +556,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSetAutostart </td>
|
||||
@ -519,6 +567,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSetMaxMemory </td>
|
||||
@ -528,6 +577,8 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSetMemory </td>
|
||||
@ -538,6 +589,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSetSchedulerParameters </td>
|
||||
@ -548,6 +600,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSetVcpus </td>
|
||||
@ -558,6 +611,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainShutdown </td>
|
||||
@ -568,6 +622,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainSuspend </td>
|
||||
@ -578,6 +633,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainUndefine </td>
|
||||
@ -588,17 +644,18 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> ≥ 0.6.4 </td>
|
||||
<td> ≥ 0.7.1 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virGetVersion </td>
|
||||
<td> All </td>
|
||||
<td> All </td>
|
||||
<td colspan="5"> Returns -1 if HV unsupported. </td>
|
||||
<td colspan="6"> Returns -1 if HV unsupported. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virInitialize </td>
|
||||
<td> 0.1.0 </td>
|
||||
<td colspan="6"> not a HV function </td>
|
||||
<td colspan="7"> not a HV function </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virDomainMemoryPeek </td>
|
||||
@ -609,6 +666,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virNodeGetInfo </td>
|
||||
@ -619,6 +677,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> ≥ 0.3.0 </td>
|
||||
<td> ≥ 0.6.3 </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.0 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virNodeGetFreeMemory </td>
|
||||
@ -629,6 +688,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> ≥ 0.7.2 </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> virNodeGetCellsFreeMemory </td>
|
||||
@ -639,6 +699,7 @@ updated on <i>2008-06-05</i>.
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
<td> x </td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3>Network functions</h3>
|
||||
|
@ -7,26 +7,26 @@
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
A toolkit to interact with the virtualization capabilities
|
||||
of recent versions of Linux (and other OSes).
|
||||
A toolkit to interact with the virtualization capabilities
|
||||
of recent versions of Linux (and other OSes).
|
||||
</li>
|
||||
<li>
|
||||
Free software available under the
|
||||
<a href="http://www.opensource.org/licenses/lgpl-license.html">GNU
|
||||
Lesser General Public License</a>.
|
||||
Free software available under the
|
||||
<a href="http://www.opensource.org/licenses/lgpl-license.html">GNU
|
||||
Lesser General Public License</a>.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
A long term stable C API
|
||||
A long term stable C API
|
||||
</li>
|
||||
<li>
|
||||
A set of bindings for common languages
|
||||
A set of bindings for common languages
|
||||
</li>
|
||||
<li>
|
||||
A <a href="CIM/">CIM provider</a> for the DMTF virtualization schema
|
||||
A <a href="CIM/">CIM provider</a> for the DMTF virtualization schema
|
||||
</li>
|
||||
<li>
|
||||
A <a href="/qpid/">QMF agent</a> for the AMQP/QPid messaging system
|
||||
A <a href="/qpid/">QMF agent</a> for the AMQP/QPid messaging system
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -34,29 +34,32 @@
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
The <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen</a> hypervisor
|
||||
on Linux and Solaris hosts.
|
||||
The <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen</a> hypervisor
|
||||
on Linux and Solaris hosts.
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://bellard.org/qemu/">QEMU</a> emulator
|
||||
The <a href="http://bellard.org/qemu/">QEMU</a> emulator
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://kvm.qumranet.com/kvmwiki">KVM</a> Linux hypervisor
|
||||
The <a href="http://kvm.qumranet.com/kvmwiki">KVM</a> Linux hypervisor
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://lxc.sourceforge.net/">LXC</a> Linux container system
|
||||
The <a href="http://lxc.sourceforge.net/">LXC</a> Linux container system
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://openvz.org/">OpenVZ</a> Linux container system
|
||||
The <a href="http://openvz.org/">OpenVZ</a> Linux container system
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://user-mode-linux.sourceforge.net/">User Mode Linux</a> paravirtualized kernel
|
||||
The <a href="http://user-mode-linux.sourceforge.net/">User Mode Linux</a> paravirtualized kernel
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://www.virtualbox.org/">VirtualBox</a> hypervisor
|
||||
The <a href="http://www.virtualbox.org/">VirtualBox</a> hypervisor
|
||||
</li>
|
||||
<li>
|
||||
Storage on IDE/SCSI/USB disks, FibreChannel, LVM, iSCSI, NFS and filesystems
|
||||
The <a href="http://www.vmware.com/">VMware ESX and GSX</a> hypervisors
|
||||
</li>
|
||||
<li>
|
||||
Storage on IDE/SCSI/USB disks, FibreChannel, LVM, iSCSI, NFS and filesystems
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
<xsl:import href="page.xsl"/>
|
||||
|
||||
<!-- Generate XHTML-1.0 transitional -->
|
||||
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
|
||||
<xsl:output method="xml" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
|
||||
|
||||
@ -573,7 +573,7 @@
|
||||
<xsl:document
|
||||
href="{concat($htmldir, '/index.html')}"
|
||||
method="xml"
|
||||
encoding="ISO-8859-1"
|
||||
encoding="UTF-8"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<xsl:apply-templates select="exsl:node-set($mainpage)" mode="page">
|
||||
@ -589,7 +589,7 @@
|
||||
<xsl:document
|
||||
href="{concat($htmldir, '/libvirt-', @name, '.html')}"
|
||||
method="xml"
|
||||
encoding="ISO-8859-1"
|
||||
encoding="UTF-8"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<xsl:apply-templates select="exsl:node-set($subpage)" mode="page">
|
||||
|
@ -1,10 +1,667 @@
|
||||
<?xml version="1.0"?>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 >Releases</h1>
|
||||
<p>Here is the list of official releases, however since it is early on in the
|
||||
development of libvirt, it is preferable when possible to just use the <a href="downloads.html">CVS version or snapshot</a>, contact the mailing list
|
||||
development of libvirt, it is preferable when possible to just use the <a href="downloads.html">GIT version or snapshot</a>, contact the mailing list
|
||||
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
|
||||
<h3>0.7.6: Feb 3 2010</h3>
|
||||
<ul>
|
||||
<li>Features:
|
||||
Implement support for multi IQN (David Allan),
|
||||
Implement CPU topology support for QEMU driver (Jiri Denemark),
|
||||
Use QEmu new device adressing when possible (Daniel P. Berrange),
|
||||
Implement SCSI controller hotplug/unplug for QEMU (Wolfgang Mauerer)
|
||||
</li>
|
||||
|
||||
<li>Documentation:
|
||||
Add missing function parameter documentation (Matthias Bolte),
|
||||
Add docs about new mailing list (Daniel P. Berrange),
|
||||
Document cpu-compare command in virsh man page (Jiri Denemark),
|
||||
Document cpu elements in capabilities and domain XML (Jiri Denemark),
|
||||
docs: Remove outdated information about remote limitations (Matthias Bolte),
|
||||
documentation improvements (David Jorm),
|
||||
Minor fixes for API extension doc (Jim Fehlig),
|
||||
cpu_shares parameter limit documented (David Jorm),
|
||||
Document the domain XML cache attribute for disk devices (Matthias Bolte),
|
||||
Replace old CVS references with GIT (Matthias Bolte)
|
||||
</li>
|
||||
|
||||
<li>Portability:
|
||||
portability to non-glibc: don't use realpath(..., NULL) (Jim Meyering),
|
||||
Add some missing include files which break build in certain platforms (Daniel P. Berrange),
|
||||
Remove AppArmor compile warnings (Jamie Strandboge),
|
||||
Fix compilation of virt-aa-helper.c (Matthias Bolte),
|
||||
Fix linkage of virt-aa-helper to libgnu.a (Matthias Bolte)
|
||||
</li>
|
||||
|
||||
<li>Bug Fixes:
|
||||
Fix restore of QEMU guests with PCI device reservation (Daniel P. Berrange),
|
||||
Another fork() log locking cleanup in file creation (Laine Stump),
|
||||
Fix log locking problem when using fork() in the library (Cole Robinson),
|
||||
Fix locking for udev device add/remove (David Allan),
|
||||
interface_conf.c: don't use a negative value as allocation size (Jim Meyering),
|
||||
virStoragePoolSourceListNewSource: avoid unconditional leak (Jim Meyering),
|
||||
xs_internal.c: don't use a negative value as allocation size (Jim Meyering),
|
||||
Ensure QEMU DAC security driver is activated at all times (Daniel P. Berrange),
|
||||
udev: Don't let strtoul parse USB busnum and devnum as octal (Matthias Bolte),
|
||||
json.c: avoid an unconditional leak from most qemuMonitorJSON* functions (Jim Meyering),
|
||||
Fix PCI host reattach on domain detach. (Chris Lalancette),
|
||||
Clarify controllers -device string in QEMU driver (Matthew Booth),
|
||||
util.c (virGetUserEnt): don't use a negative value as allocation size (Jim Meyering),
|
||||
cpu_x86.c: avoid NULL-deref for invalid arguments (Jim Meyering),
|
||||
Fix a crash when restarting libvirtd. (Chris Lalancette),
|
||||
qemuMonitorTextAttachDrive: avoid two leaks (Jim Meyering),
|
||||
usbGetDevice: don't leak a "usbDevice" buffer on failure path (Jim Meyering),
|
||||
qemuMonitorTextGetMemoryStats: plug a leak on an error path (Jim Meyering),
|
||||
usbFindBusByVendor: don't leak a DIR buffer and FD (Jim Meyering),
|
||||
Fix libvirtd restart for domains with PCI passthrough devices (Chris Lalancette),
|
||||
qemu: Fix race between device rebind and kvm cleanup (Chris Lalancette),
|
||||
Fix device assignment with root devices (Chris Lalancette),
|
||||
Corrected log level of WWN path message (David Allan),
|
||||
Fix an error when looking for devices in syspath (Daniel Veillard),
|
||||
Fix off-by-1 in SCSI drive hotplug (Daniel P. Berrange),
|
||||
Fix leak in hotplug code in QEMU driver (Daniel P. Berrange),
|
||||
Fix security driver calls in hotplug cleanup paths (Daniel P. Berrange),
|
||||
Add missing call to re-attach host devices if VM startup fails (Daniel P. Berrange),
|
||||
Pull initial disk labelling out into libvirtd instead of exec hook (Daniel P. Berrange),
|
||||
Fix leak of allocated security label (Daniel P. Berrange),
|
||||
Create storage pool directories with proper uid/gid/mode (Laine Stump),
|
||||
Create storage volumes directly with desired uid/gid (Laine Stump),
|
||||
Unset copied environment variables in qemuxml2argvtest (Matthias Bolte),
|
||||
qemu: Don't allocate zero bytes (Matthias Bolte),
|
||||
node_device_linux_sysfs.c: avoid opendir/fd leak on error path (Jim Meyering),
|
||||
domain_conf.c: avoid a leak and the need for "cleanup:" block (Jim Meyering),
|
||||
Fix QEMU driver custom domain status XML extensions (Daniel P. Berrange),
|
||||
xen_driver: don't leak a parsed-config buffer (Jim Meyering),
|
||||
storage_conf: plug a leak on OOM error path (Jim Meyering),
|
||||
Tests for ACS in PCIe switches (Jiri Denemark),
|
||||
storage_backend_fs.c: do not ignore probe failure (Jim Meyering),
|
||||
Avoid free'ing a constant string in chardev lookup code (Daniel P. Berrange),
|
||||
Fix build of Xen proxy daemon (Daniel P. Berrange),
|
||||
xen: do not report a write-to-Xen-daemon failure as a read failure (Jim Meyering),
|
||||
daemon: Don't blindly unregister domain events (Cole Robinson),
|
||||
node_device: udev: Fix memory leak (Cole Robinson),
|
||||
Fix migration in xend driver (Jim Fehlig),
|
||||
Ensure error handling callback functions are called from safe context (Daniel P. Berrange),
|
||||
qemu: Fix a memory leak in qemudExtractTTYPath (Matthias Bolte),
|
||||
Fix UUID random generator to use /dev/random (Laine Stump),
|
||||
let "configure --disable-shared" work once again (Jim Meyering),
|
||||
Qemu: ask for memory preallocation with large pages (Daniel Veillard),
|
||||
network/bridge_driver.c: avoid potential NULL-dereference (Jim Meyering),
|
||||
Don't free an uninitalized pointer in update_driver_name() (Matthias Bolte),
|
||||
xend_internal: don't let invalid input provoke NULL dereference (Jim Meyering),
|
||||
Don't update vol details after build (David Allan),
|
||||
vbox_tmpl.c: don't leak a domain pointer upon failure to create (Jim Meyering),
|
||||
vbox_tmpl.c: avoid NULL deref upon vboxDomainCreateXML failure (Jim Meyering),
|
||||
qemu_driver.c: avoid NULL dereference upon disk-op failure (Jim Meyering),
|
||||
openvz_conf.c: don't dereference NULL upon failure (Jim Meyering),
|
||||
Distribute vmx2xml and xml2vmx test data files (Matthias Bolte)
|
||||
</li>
|
||||
|
||||
<li>Improvements:
|
||||
Tweak USB hostdevice XML handling (Daniel P. Berrange),
|
||||
Fix QEMU hotplug device alias assignment (Daniel P. Berrange),
|
||||
Disable QEMU monitor IO debugging by default (Daniel P. Berrange),
|
||||
Re-arrange QEMU device alias assignment code (Daniel P. Berrange),
|
||||
Remove direct storage of hostnet_name & vlan (Daniel P. Berrange),
|
||||
Remove use of -netdev arg with QEMU (Daniel P. Berrange),
|
||||
Assign PCI addresses before hotplugging devices (Daniel P. Berrange),
|
||||
Rewrite way QEMU PCI addresses are allocated (Daniel P. Berrange),
|
||||
Introduce generic virDomainDeviceInfo iterator function (Daniel P. Berrange),
|
||||
Make hotplug use new device_add where possible (Daniel P. Berrange),
|
||||
Introduce internal QEMU monitor APIs for drive + device hotadd (Daniel P. Berrange),
|
||||
Split out QEMU code for building PCI/USB hostdev arg values (Daniel P. Berrange),
|
||||
Standard internal API syntax for building QEMU command line arguments (Daniel P. Berrange),
|
||||
Log flags in virConnectCompareCPU (Jiri Denemark),
|
||||
Look in /usr/libexec for the qemu-kvm binary. (Chris Lalancette),
|
||||
Support Xen 4.0 sysctl version 7 (Jim Fehlig),
|
||||
Add missing sata controller type to domain.rng (Matthew Booth),
|
||||
udev: Set the state driver name (Matthias Bolte),
|
||||
udev: Remove event handle on shutdown (Matthias Bolte),
|
||||
esx: Output error details from libcurl (Matthias Bolte),
|
||||
qemu: Search binaries in PATH instead of hardcoding /usr/bin (Matthias Bolte),
|
||||
Implement QMP support for extracting CPU thread ID (Daniel P. Berrange),
|
||||
Misc fixes to QMP monitor support for QEMU (Daniel P. Berrange),
|
||||
Fix setup of compatability serial devices from console device (Daniel P. Berrange),
|
||||
Start modernizing configure (Eric Blake),
|
||||
Add a rule to check for uses of readlink. (Chris Lalancette),
|
||||
Add virConnectGetVersion Python API (Taizo ITO),
|
||||
domMemoryStats / qemu: Fix parsing of unknown stats (Adam Litke),
|
||||
Allow surrounding whitespace in uuid (Dan Kenigsberg),
|
||||
Add configuration option to turn off dynamic permissions management (Daniel P. Berrange),
|
||||
Switch QEMU driver over to use the DAC security driver (Daniel P. Berrange),
|
||||
Introduce a new DAC security driver for QEMU (Daniel P. Berrange),
|
||||
Introduce a stacked security driver impl for QEMU (Daniel P. Berrange),
|
||||
Make security drivers responsible for checking dynamic vs static labelling (Daniel P. Berrange),
|
||||
New utility functions virFileCreate and virDirCreate (Laine Stump),
|
||||
Add virRunWithHook util function (Laine Stump),
|
||||
Update interface.rng and xml test files to match netcf 0.1.5 (Laine Stump),
|
||||
Support bond interfaces attached to bridges in interface xml. (Laine Stump),
|
||||
Allow empty bridges in interface xml. (Laine Stump),
|
||||
Support delay property in interface bridge xml. (Laine Stump),
|
||||
Use pciDeviceIsAssignable in qemu driver (Jiri Denemark),
|
||||
Allow for CPU topology specification without model (Jiri Denemark),
|
||||
Add debug messages for CPU incompatibility (Jiri Denemark),
|
||||
Take disabled/forced CPU features into account (Jiri Denemark),
|
||||
Enhance qemuParseCommandLineKeywords (Jiri Denemark),
|
||||
Convert VirtIO balloon over to -device syntax (Daniel P. Berrange),
|
||||
uto-assign PCI addresses (Daniel P. Berrange),
|
||||
Pass -vga none if no video card specified (Daniel P. Berrange),
|
||||
Add support for explicit -sdl flag to QEMU (Daniel P. Berrange),
|
||||
Assign device aliases for all devices at startup (Daniel P. Berrange),
|
||||
Add device info to serial, parallel, channel, input & fs devices (Daniel P. Berrange),
|
||||
Introduce device aliases (Daniel P. Berrange),
|
||||
Clear assigned PCI devices at shutdown (Daniel P. Berrange),
|
||||
Auto-add disk controllers based on defined disks (Daniel P. Berrange),
|
||||
Remove restriction on duplicated sound devices in parser (Daniel P. Berrange),
|
||||
Detect PCI addresses at QEMU startup (Daniel P. Berrange),
|
||||
Properly support SCSI drive hotplug (Daniel P. Berrange),
|
||||
build: update gnulib submodule to latest (Jim Meyering),
|
||||
Use closest CPU model when decoding from CPUID (Jiri Denemark),
|
||||
Change detection of xen so that it's actually automatic rather than forced. (Diego Elio Pettenò),
|
||||
Standardise ./configure --help options reporting. (Diego Elio Pettenò),
|
||||
qemu: Use log output for pty assignment if 'info chardev' is unavailable (Matthias Bolte),
|
||||
esx: Add VNC support (Matthias Bolte),
|
||||
esx: Make the domain part of the hostname optional (Matthias Bolte),
|
||||
esx: Add stubs for secondary driver types (Matthias Bolte),
|
||||
Specify bus/unit instead of index for disks with QEMU (Daniel P. Berrange),
|
||||
Split code for building QEMU -drive arg in separate method (Daniel P. Berrange),
|
||||
Convert monitor over to use virDomainDeviceAddress (Daniel P. Berrange),
|
||||
Add new domain device: "controller" (Wolfgang Mauerer),
|
||||
Set default disk controller/bus/unit props (Daniel P. Berrange),
|
||||
Add address info to sound, video and watchdog devices (Daniel P. Berrange),
|
||||
Extend the virDomainDeviceAddress struture to allow disk controller addresses (Daniel P. Berrange),
|
||||
Introduce a standardized data structure for device addresses (Daniel P. Berrange),
|
||||
util: Make sure virExec hook failures are raised (Cole Robinson),
|
||||
Implement path lookup for USB by vendor:product (Cole Robinson),
|
||||
events: Report errors on failure (Cole Robinson),
|
||||
node_device: udev: Enumerate floppy devices (Cole Robinson),
|
||||
node_device: udev: Use base 16 for product/vendor (Cole Robinson),
|
||||
libvirt.c: Preserve MigratePerform failure (Cole Robinson),
|
||||
qemu: migrate: Save MigratePerform error in MigrateFinish. (Cole Robinson),
|
||||
virterror: Add virSetError (Cole Robinson),
|
||||
Also look for dmi information in /sys/class (Guido Günther),
|
||||
proxy_internal.c: mark "request" parameter as nonnull (Jim Meyering),
|
||||
esx: Dump the raw response in case of an SOAP fault (Matthias Bolte),
|
||||
esx: Warn if the ESX server is in maintenance mode (Matthias Bolte),
|
||||
xen hypervisor: xen domctl version 6 (Jim Fehlig),
|
||||
virsh: Add persistent history using libreadline (Matthias Bolte),
|
||||
esx: Fix 'vpx' MAC address range and allow arbitrary MAC addresses (Matthias Bolte),
|
||||
esx: Fix deserialization for VI API calls CancelTask and UnregisterVM (Matthias Bolte),
|
||||
esx: Fix and improve the libcurl debug callback (Matthias Bolte),
|
||||
esx: Also allow virtualHW version 4 for ESX 4.0 (Matthias Bolte),
|
||||
qemu: Always enable the virtio balloon driver (Adam Litke),
|
||||
Disable building of static Python module (Diego Elio Pettenò),
|
||||
Fix parsing of 'info chardev' line endings (Matthew Booth)
|
||||
</li>
|
||||
|
||||
<li>Cleanups:
|
||||
xen_hypervisor.c: remove all "domain == NULL" tests, ... (Jim Meyering),
|
||||
xen_hypervisor.c: avoid NULL deref for NULL domain argument (Jim Meyering),
|
||||
libvirtd.c: avoid closing a negative socket file descriptor (Jim Meyering),
|
||||
storage_backend.c: avoid closing a negative file descriptor (Jim Meyering),
|
||||
avoid a probable EINVAL from lseek (Jim Meyering),
|
||||
util.c (two more): don't use a negative value as allocation size (Jim Meyering),
|
||||
avoid format-related warnings (Jim Meyering),
|
||||
maint: avoid excess parens in STREQ (Eric Blake),
|
||||
Move models/nmodels mismatch checking one level up (Jiri Denemark),
|
||||
Fix up a comment in virHashUpdateEntry (Chris Lalancette),
|
||||
maint: fix spelling error in hacking (Eric Blake),
|
||||
pci.c: correct an erroneous expression (Jim Meyering),
|
||||
Remove undefined symbols from libvirt_private.syms (Matthias Bolte),
|
||||
Don't call disabled timer callbacks in event-test.c (Matthias Bolte),
|
||||
hostusb: closedir only if non-NULL; rename labels: s/error/cleanup/ (Jim Meyering),
|
||||
Cleanup of large buffer on stack in virFileMakePath (Laine Stump),
|
||||
esx: Stop passing around virConnectPtr for error reporting (Matthias Bolte),
|
||||
Revert "Fix libvirtd restart for domains with PCI passthrough devices" (Chris Lalancette),
|
||||
Fix two instances of misspelled 'pseudo' (Chris Lalancette),
|
||||
Use virFileResolveLink instead of readlink in AppArmor (Chris Lalancette),
|
||||
Fix a compile warning in parthelper.c (Chris Lalancette),
|
||||
Remove unused PROC_MOUNT_BUF_LEN #define (Chris Lalancette),
|
||||
fix "make distcheck" failure (Jim Meyering),
|
||||
avoid format-related warnings (Jim Meyering),
|
||||
Refactor setup & cleanup of security labels in security driver (Daniel P. Berrange),
|
||||
Let make fail when XHTML validation fails (Jiri Denemark),
|
||||
Fix uses of virFileMakePath (Laine Stump),
|
||||
remove unnecessary closedir call (Jim Meyering),
|
||||
Make all bitfields unsigned ints to avoid unexpected values in casts (Daniel P. Berrange),
|
||||
logging: confirm that we want to ignore a write error (Jim Meyering),
|
||||
Remove superfluous new lines from messages (Jiri Denemark),
|
||||
vbox_tmpl.c: remove useless array-is-non-NULL comparisons (Jim Meyering),
|
||||
lxc_driver: remove useless comparison (Jim Meyering),
|
||||
gnulib added a new syntax-check test: use $(VAR), not @VAR@ (Jim Meyering),
|
||||
storage_backend.h: include required headers (Jim Meyering),
|
||||
esx_vi_types.c: include required headers (Jim Meyering),
|
||||
vbox: include required headers (Jim Meyering),
|
||||
cpu_x86_data.h: include required header (Jim Meyering),
|
||||
util.c: include required header, no longer masked by gnulib (Jim Meyering),
|
||||
Fix validation of news.html (Matthias Bolte),
|
||||
Remove obsolete comment in QEMU JSON code (Daniel P. Berrange),
|
||||
Make test suite output less verbose (Daniel P. Berrange),
|
||||
daemon: Fix various error reporting issues (Cole Robinson),
|
||||
util: Remove logging handlers in virExec (Cole Robinson),
|
||||
Commit bootstrap .gitignore additions (Cole Robinson),
|
||||
qemu: Disable errors in qemudShutdownVMDaemon (Cole Robinson),
|
||||
avoid another "make distcheck" failure (Jim Meyering),
|
||||
avoid newly-introduced test failure (Jim Meyering),
|
||||
don't test "res == NULL" after we've already dereferenced "res" (Jim Meyering),
|
||||
fix 7 "make check" test failures in non-srcdir build (Jim Meyering),
|
||||
virsh: Use VIR_FREE instead of free (Matthias Bolte),
|
||||
esx: Don't warn about an empty URI path (Matthias Bolte),
|
||||
qemu_driver.c: remove useless, warning-provoking test (Jim Meyering)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<h3>0.7.5: Dec 23 2009</h3>
|
||||
<ul>
|
||||
<li>Features:
|
||||
Add new API virDomainMemoryStats to header and drivers (Adam Litke),
|
||||
Public API and domain extension for CPU flags (Jiri Denemark),
|
||||
expose SR IOV physical/virtual function relationships (Dave Allan),
|
||||
Support for JSON mode monitor [deactivated] (Daniel P. Berrange),
|
||||
Support for interface model='netfront' (Jiri Denemark),
|
||||
vbox: Add support for version 3.1 (Pritesh Kothari),
|
||||
Support QEMU's virtual FAT block device driver (Daniel P. Berrange)
|
||||
</li>
|
||||
|
||||
<li>Documentation:
|
||||
Document the dommemstat command in the virsh man page (Adam Litke),
|
||||
esx: Add more links to external documentation (Matthias Bolte),
|
||||
esx: Extend documentation about 'vcenter' and add some about 'auto_answer' (Matthias Bolte),
|
||||
Fix and improve domain xml video element description (Matthias Bolte),
|
||||
Fix owner and group in example volume XML (Matthew Booth),
|
||||
add missing doc for device <shareable/> option (Daniel Veillard),
|
||||
add AppArmor test and examples to dist (Jamie Strandboge),
|
||||
Update location of C# bindings. (Richard Jones),
|
||||
Fix typo in QEMU driver webpage (Daniel P. Berrange),
|
||||
Clarify documentation for private symbols (Wolfgang Mauerer),
|
||||
Fix news.html validation (Dan Kenigsberg)
|
||||
</li>
|
||||
|
||||
<li>Portability:
|
||||
Define ATTRIBUTE_SENTINEL for GCC < 4.0 too (Matthias Bolte),
|
||||
Fix compilation with configure --disable-nls (Matthias Bolte),
|
||||
Fix configure check for SASL (Matthias Bolte),
|
||||
Fix GnuTLS pkg-config check (Matthias Bolte),
|
||||
Report an error if no XDR library can be found (Matthias Bolte),
|
||||
Fix compilation with gcrypt < 1.4.2 (Matthias Bolte),
|
||||
Don't mix LDFLAGS and LIBS in the configure script (Diego Elio Pettenò),
|
||||
Don't make it possible to define HAVE_HAL but not enable it in automake (Diego Elio Pettenò),
|
||||
Fix install location for Python bindings (Matthias Bolte),
|
||||
Use AM_PATH_PYTHON and python-config to detect Python configuration (Matthias Bolte),
|
||||
Fix a compilation failure if yajl not avail (Daniel Veillard),
|
||||
Fix compilation for configure --disable-nls (Matthias Bolte)
|
||||
</li>
|
||||
|
||||
<li>Bug fixes:
|
||||
cpu: Fix memory leaks in x86FeatureLoad and x86ModelLoad (Matthias Bolte),
|
||||
Make Xen VT-d PCI attach/detach work (Chris Lalancette),
|
||||
Fix detection of JSON when restarting libvirtd (Daniel P. Berrange),
|
||||
Fix reporting of TLS connection errors (Daniel P. Berrange),
|
||||
Fix typo in qemudDomainAttachHostPciDevice() (Daniel Veillard),
|
||||
esx: Destroy virtual machine on a vCenter if available (Matthias Bolte),
|
||||
esx: Undefine virtual machine on a vCenter if available (Matthias Bolte),
|
||||
Initialize gcrypt threading (Daniel P. Berrange),
|
||||
Fix bug in storage driver accessing wrong private data (Daniel P. Berrange),
|
||||
esx_vi.c: do not call through NULL function pointer (Jim Meyering),
|
||||
esx_util.c: avoid NULL deref for invalid inputs (Jim Meyering),
|
||||
esx: Don't goto failure for invalid arguments in VMX code (Matthias Bolte),
|
||||
Fix memory leak in qemudBuildCommandLine (Matthias Bolte),
|
||||
avoid malfunction when virFileResolveLink is applied to non-POSIX FS (Jim Meyering),
|
||||
libvirt.c: don't let a NULL "cpumaps" argument provoke a NULL-deref (Jim Meyering),
|
||||
qemu migration: avoid NULL-deref given an invalid input (Jim Meyering),
|
||||
qemu_driver.c: don't unlink(NULL) on OOM error path (Jim Meyering),
|
||||
remote_driver.c: also zero out ->saslDecodedOffset member (Jim Meyering),
|
||||
qemu_driver.c: avoid double free on error path (Jim Meyering),
|
||||
libvirtd: avoid a NULL dereference on error path (Jim Meyering),
|
||||
virsh: avoid double-free (Jim Meyering),
|
||||
node_device_driver.c: don't write beyond EOB for 4K-byte symlink (Jim Meyering),
|
||||
Eliminate failure to delete empty storage pools (Laine Stump),
|
||||
Fix use of virEventAddHandleImpl() (Jiri Denemark),
|
||||
Fix possible NULL pointer dereference (Paolo Bonzini),
|
||||
fix various breakages in qemu Dump command (Paolo Bonzini),
|
||||
Fix reference leak in remoteDispatchStorageVolCreateXmlFrom (Matthias Bolte),
|
||||
Fix memory leak in virStorageBackendCopyToFD (Matthias Bolte),
|
||||
retrieve paused/running state at migration start (Paolo Bonzini),
|
||||
fix migration of paused vms upon failure (Paolo Bonzini),
|
||||
qemu driver: Fix segfault in libvirt/libvirtd when uri->path is NULL. (Richard Jones),
|
||||
Fix a wellformedness problem in secret.rng (Diego Elio Pettenò),
|
||||
Fix virDomainObj ref handling in QEMU driver (Daniel P. Berrange),
|
||||
Pull code to start CPUs executing out of qemudInitCpuAffinity() (Daniel P. Berrange),
|
||||
Fix migration cancellation for QEMU (Daniel P. Berrange),
|
||||
Fix crash when deleting monitor while a command is in progress (Daniel P. Berrange),
|
||||
udev_device_get_devpath might return NULL (Guido Günther),
|
||||
Fix some locking issues (Matthias Bolte),
|
||||
Fix event test timer checks on kernels with HZ=100 (Daniel P. Berrange),
|
||||
Fix threading problems in python bindings (Daniel P. Berrange),
|
||||
Supress annoying libcap-ng errors from valgrind (Daniel P. Berrange),
|
||||
Fix two leaks in test driver (Daniel P. Berrange),
|
||||
Free cgroup device ACL list on driver shutdown (Daniel P. Berrange),
|
||||
xen: Fix unconditional freeing in xenDaemonListDefinedDomains() (Matthias Bolte),
|
||||
Fix default disk type when parsing QEMU argv (Daniel P. Berrange),
|
||||
remove port filter when network device is detached (Gerhard Stenzel)
|
||||
</li>
|
||||
|
||||
<li>Improvements:
|
||||
convert missing server entry points into unsupported errors (Daniel Veillard),
|
||||
fix some error report when on remote access (Olivier Fourdan),
|
||||
Disable JSON mode monitor until QEMU is more mature (Daniel P. Berrange),
|
||||
Only probe for CPU models if required (Jiri Denemark),
|
||||
Add cpu_map.xml to libvirt.spec (Jiri Denemark),
|
||||
Install cpu_map.xml (Jiri Denemark),
|
||||
esx: Don't warn about '/' paths (Matthias Bolte),
|
||||
esx: Extend vCenter query parameter (Matthias Bolte),
|
||||
esx: Improve domain lookup by UUID (Matthias Bolte),
|
||||
build: update gnulib submodule to latest (Jim Meyering),
|
||||
Relax the allowed values for machine type in schema (Daniel Veillard),
|
||||
Implement --pool option for virsh vol-path (Dave Allan),
|
||||
nodedev: Add removable storage 'media_label' prop (Cole Robinson),
|
||||
add --live support to "virsh dump" (Paolo Bonzini),
|
||||
add --crash support to "virsh dump" (Paolo Bonzini),
|
||||
Get QEMU pty paths from the monitor (Matthew Booth),
|
||||
Extract the assigned pty device for QEmu channels (Matthew Booth),
|
||||
Make QEMU driver use -chardev everywhere if available (Matthew Booth),
|
||||
add virsh --suspend arg to migrate command (Paolo Bonzini),
|
||||
reload iptables rules on libvirtd restart (Mark McLoughlin),
|
||||
reload iptables rules simply by re-adding them (Mark McLoughlin),
|
||||
Plumb domain description tag in xend backend (Jim Fehlig),
|
||||
Make QEMU text monitor parsing more robust (Daniel P. Berrange),
|
||||
Hook up JSON monitor to emit basic lifecycle events (Daniel P. Berrange),
|
||||
Add QEMU monitor callbacks for basic lifecycle events (Daniel P. Berrange),
|
||||
Switch over to passing a callback table to QEMU monitor (Daniel P. Berrange),
|
||||
Introduce callbacks for serializing domain object private data to XML (Daniel P. Berrange),
|
||||
Switch LXC driver to use a private data blob for virDomainObj state (Daniel P. Berrange),
|
||||
Switch UML driver to use a private data blob for virDomainObj state (Daniel P. Berrange),
|
||||
Add a 'format' arg to qemuMonitorChangeMedia() since JSON will support it (Daniel P. Berrange),
|
||||
Introduce a simple API for handling JSON data (Daniel P. Berrange),
|
||||
Add --system flag to autogen.sh to make it easy to build with right prefix (Daniel P. Berrange),
|
||||
Export all symbols from xml.h for internal use (Jiri Denemark),
|
||||
vbox: Use virIndexToDiskName() in vboxGenerateMediumName() (Matthias Bolte),
|
||||
Tests for interface type/model configuration (Jiri Denemark),
|
||||
Add virIndexToDiskName and fix mapping gap (Matthias Bolte),
|
||||
Add another SENTINEL attribute (Paolo Bonzini),
|
||||
Fix help message (Wolfgang Mauerer),
|
||||
Alternate CPU affinity impl to cope with NR_CPUS > 1024 (Daniel P. Berrange)
|
||||
</li>
|
||||
|
||||
<li>Cleanups:
|
||||
The secret driver is stateful, link it directly to libvirtd (Matthias Bolte),
|
||||
Remove undefined symbols from libvirt_private.syms (Matthias Bolte),
|
||||
boolean shadows a typedef in rpcndr.h when compiled with MinGW (Matthias Bolte),
|
||||
Rename DATADIR to PKGDATADIR to fix win32 build (Jiri Denemark),
|
||||
Move cpu_map.xml to -client RPM (Jiri Denemark),
|
||||
Fix undefined reference to 'close_used_without_including_unistd_h' (Matthias Bolte),
|
||||
Fix argument type of virProcessInfoSetAffinity dummy function (Matthias Bolte),
|
||||
esx: Use occurrence enum to specify expected result of a SOAP call (Matthias Bolte),
|
||||
esx: Fix occurence typo (Matthias Bolte),
|
||||
esx: Removed unused inttypes.h include (Matthias Bolte),
|
||||
esx: Replace libxml1 'xmlChildrenNode' with libxml2 'children' (Matthias Bolte),
|
||||
esx: Use more suitable error code in esxVI_LookupVirtualMachineByUuid() (Matthias Bolte),
|
||||
esx: Add automatic question handling (Matthias Bolte),
|
||||
avoid calling exit with a constant; use EXIT_* instead (Jim Meyering),
|
||||
maint: remove from VC two gnulib-provided files (Jim Meyering),
|
||||
xm_internal.c: remove misleading dead code (Jim Meyering),
|
||||
Cleanup temporary #define after use (Matthew Booth),
|
||||
Suppress cgroup error message on sucess startup (Ryota Ozaki),
|
||||
Small change of RNG syntax for domain (Diego Elio Pettenò),
|
||||
remove iptablesReloadRules() and related code (Mark McLoughlin),
|
||||
remove all traces of lokkit support (Mark McLoughlin),
|
||||
Add virBufferFreeAndReset() and replace free() (Matthias Bolte),
|
||||
Fix the news file non-ascii characters (Daniel Veillard),
|
||||
Add missing commas to the 0.7.4 news section (Matthias Bolte),
|
||||
Change generated HTML to UTF-8 encoding (Daniel Veillard),
|
||||
Avoid an type-punned pointer aliasing pbm (Daniel Veillard),
|
||||
Move qemuMonitorEscape + migrate status enum into shared monitor code (Daniel P. Berrange),
|
||||
vbox: Update IIDs from version 3.1-beta2 to 3.1-final (Matthias Bolte),
|
||||
Fix ReprotError vs ReportError typo in JSON code (Daniel P. Berrange),
|
||||
Fix inverted conditional test in configure.ac check for yajl (Daniel P. Berrange),
|
||||
Pull schedular affinity code out into a separate module (Daniel P. Berrange),
|
||||
Ignore docs/ directory for strcmp() syntax check (Daniel P. Berrange)
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<h3>0.7.4: Nov 20 2009</h3>
|
||||
<ul>
|
||||
<li>Features:
|
||||
Implement a node device backend using libudev (David Allan),
|
||||
New APIs for checking some object properties (Daniel P. Berrange),
|
||||
Fully asynchronous monitor I/O processing (Daniel P. Berrange),
|
||||
add MAC address based port filtering to qemu (Gerhard Stenzel),
|
||||
Support for IPv6 / multiple addresses per interfaces (Laine Stump)
|
||||
</li>
|
||||
|
||||
<li>Documentation:
|
||||
Document overriding domain interface target (Cole Robinson),
|
||||
514532 Fix man page, most operation are synchronous (Daniel Veillard),
|
||||
Fix typo in error message (Matthew Booth),
|
||||
esx: Add documentation to the website (Matthias Bolte),
|
||||
AppArmor updates of examples (Jamie Strandboge),
|
||||
Add documentation for <channel> domain element (Matthew Booth),
|
||||
Separate character device doc guest and host parts (Matthew Booth),
|
||||
Add a Python example that lists active ESX domains (Matthias Bolte),
|
||||
LXC fix wrong or out-of-date function descriptions (Ryota Ozaki),
|
||||
docs: <clock> property is 'offset', not 'sync' (Cole Robinson),
|
||||
Update the documentation for virDomainMigrateToURI (Chris Lalancette),
|
||||
fix virDomainMigrateToURI doc (Dan Kenigsberg)
|
||||
</li>
|
||||
|
||||
<li>Bug fixes:
|
||||
504262 Check for duplicated UUID in XM Xen defines (Daniel Veillard),
|
||||
512069 fix domain XML schemas for backward compatibility (Daniel Veillard),
|
||||
qemu-kvm needs -enable-kvm flag for VT optimization (Steve Yarmie),
|
||||
fix deprecated iptables command syntax (Steve Yarmie),
|
||||
Ensure driver lock is released when entering QEMU monitor (Daniel P. Berrange),
|
||||
only remove masquerade roles for VIR_NETWORK_FORWARD_NAT (Guido Günther),
|
||||
esx: Fix CPU clock Hz to MHz conversion (Matthias Bolte),
|
||||
esx: Fix memory leak in esxVI_HostCpuIdInfo_Free() (Matthias Bolte),
|
||||
esx: Fix MAC address formatting (Matthias Bolte),
|
||||
Fix compilation of libvirt against xen-unstable (Jim Fehlig),
|
||||
Fix probing for libpciaccess (Daniel P. Berrange),
|
||||
Fix incorrect reference counting logic in qemu monitor open (Daniel P. Berrange),
|
||||
Don't return fatal error in HAL driver init if HAL isn't running (Daniel P. Berrange),
|
||||
Fix cleanup when state driver init fails (Daniel P. Berrange),
|
||||
AppArmor handling of accesses to readonly files (Jamie Strandboge),
|
||||
AppArmor require absolute paths (Jamie Strandboge),
|
||||
Check that domain is running when starting console (Daniel P. Berrange),
|
||||
Fix incorrect variable passed to LXC event callback (Daniel P. Berrange),
|
||||
Fix race condition in HAL driver startup (Daniel P. Berrange),
|
||||
Remove capng_lock() call when spawning LXC container init process (Daniel P. Berrange),
|
||||
Fix initscript to check daemon pidfile (Daniel P. Berrange),
|
||||
Filter out stale domains from xenstore listing (Daniel P. Berrange),
|
||||
Fix logic in xenUnifiedNumOfDomains to match xenUnifiedListDomains (Jonas Eriksson),
|
||||
Disable IPv6 socket auto-binding to IPv4 socket (Daniel P. Berrange),
|
||||
Fix save and restore with non-privileged guests and SELinux (Daniel P. Berrange),
|
||||
Prevent initializing ebtables if disabled in qemu.conf (Ryota Ozaki),
|
||||
phyp: too much timeout when polling socket (Eduardo Otubo),
|
||||
phyp: ssh authentication with public key fixed (Eduardo Otubo),
|
||||
opennebula: Fix potential memory/mutex leak in state driver startup (Matthias Bolte),
|
||||
phyp: Break potential infinite loops (Matthias Bolte),
|
||||
phyp: Fix memory/session leaks and potential invalid frees (Matthias Bolte),
|
||||
storage: conf: Fix memory leak in encryption parsing (Cole Robinson),
|
||||
Fix improper error return in virInterfaceDefParseProtoIPvX (Laine Stump),
|
||||
Fix virInterfaceIpDefPtr leak during virInterfaceIpDefFree (Laine Stump),
|
||||
give up python interpreter lock before calling cb (Dan Kenigsberg),
|
||||
ESX: Fix memory leak in list handling functions. (Matthias Bolte),
|
||||
Fix --with-init-script configure option (Matthew Booth),
|
||||
Don't let parent of daemon exit until basic initialization is done (Daniel P. Berrange),
|
||||
Fix configure detection of device mapper (Pritesh Kothari),
|
||||
Remote code caught EINTR making it ininterruptable (Daniel Veillard),
|
||||
virterror: Add a missing 'break' for VIR_ERR_INVALID_SECRET (Cole Robinson),
|
||||
Fix p2p migration without a passed uri. (Cole Robinson),
|
||||
Fix problems in the Xen inotify driver. (Matthias Bolte),
|
||||
Remove a completely bogus reference increment in the Xen driver. (Chris Lalancette),
|
||||
528575 avoid libvirtd crash on LCX domain autostart (Daniel Veillard),
|
||||
Fix SELinux linking issues (Jim Fehlig),
|
||||
node device: Fix locking issue in virNodeDeviceDestroy (Cole Robinson),
|
||||
LXC fix virCgroupGetValueStr problem with \n (Ryota Ozaki),
|
||||
Avoid crash in virBufferEscapeString (Laine Stump),
|
||||
LXC complement PATH environment variable (Ryota Ozaki)
|
||||
</li>
|
||||
|
||||
<li>Improvements:
|
||||
Enable udev instead of hal on F12 / RHEL-6 or later (Daniel P. Berrange),
|
||||
python: Actually implement list*Interfaces bindings (Cole Robinson),
|
||||
esx: Handle 'vmxnet3' in esxVMX_FormatEthernet() (Matthias Bolte),
|
||||
Fix check for existance of cgroups at creation (Daniel P. Berrange),
|
||||
Fix virt-aa-helper when host and os.type arch differ (Jamie Strandboge),
|
||||
Add translation of PCI vendor and product IDs (David Allan),
|
||||
Add scsi_target device type (David Allan),
|
||||
Add several fields to node device capabilities (David Allan),
|
||||
Add virConnectGetLibvirtVersion API (Cole Robinson),
|
||||
Implement finer grained migration control for Xen (Maximilian Wilhelm),
|
||||
Support for SATA Disks in virDomainDiskBus (pritesh),
|
||||
LXC implement missing DomainInterfaceStats API (Ryota Ozaki),
|
||||
disable mac_filter config switch by default (Gerhard Stenzel),
|
||||
phyp: Reorder keyboard_interactive label in openSSHSession() (Eduardo Otubo),
|
||||
Implmentation of new APIs to checking state/persistence of objects (Daniel P. Berrange),
|
||||
Allow timeouts waiting for QEMU job lock (Daniel P. Berrange),
|
||||
Release driver and domain lock when running monitor commands (Daniel P. Berrange),
|
||||
Add reference counting on virDomainObjPtr objects (Daniel P. Berrange),
|
||||
Locking of the qemuMonitorPtr object (Daniel P. Berrange),
|
||||
Wrap text mode monitor APIs, pass qemuMonitorPtr directly to APIs (Daniel P. Berrange),
|
||||
Move encryption lookup back into qemu driver file (Daniel P. Berrange),
|
||||
Make use of private data structure for monitor state (Daniel P. Berrange),
|
||||
Add a new timed condition variable wait API (Daniel P. Berrange),
|
||||
Fix errno handling for pthreads wrappers (Daniel P. Berrange),
|
||||
524280 pass max lease option to dnsmasq (Daniel Veillard),
|
||||
Store the range size when adding a DHCP range (Daniel Veillard),
|
||||
qemu: Allow cpu pinning for all logical CPUs, not just physical (Cole Robinson),
|
||||
qemu: Use same create/define overwrite logic for migration prepare. (Cole Robinson),
|
||||
qemu: Break out function to check if we can create/define/restore (Cole Robinson),
|
||||
Add sentinel attribute for NULL terminated arg lists (Paolo Bonzini),
|
||||
test: Update inactive guest config on shutdown (Cole Robinson),
|
||||
test: Add testDomainShutdownState helper (Cole Robinson),
|
||||
Properly convert port numbers to/from network byte order (Matthew Booth),
|
||||
phyp add create() and destroy() support (Eduardo Otubo),
|
||||
Support for <channel> in domain and QEmu backend (Matthew Booth),
|
||||
Detect availability of QEMU -chardev CLI option (Matthew Booth),
|
||||
Allow character devices to have different target types (Matthew Booth),
|
||||
LXC allow container to have ethN interfaces (Ryota Ozaki),
|
||||
New ebtables module wrapper (Gerhard Stenzel),
|
||||
test: Implement virDomainPinVcpu (Cole Robinson),
|
||||
test: Implement virDomainGetVcpus (Cole Robinson),
|
||||
test: Update vcpu runtime info in SetVcpus (Cole Robinson),
|
||||
test: Use privateData to track running VM vcpu state (Cole Robinson),
|
||||
test: Break out wrapper for setting up started domain state. (Cole Robinson),
|
||||
test: Fixes for SetVcpus (Cole Robinson),
|
||||
Make monitor type (miimon/arpmon) optional in bond xml (Laine Stump),
|
||||
Support reporting live interface IP/netmask (Laine Stump),
|
||||
Make startmode optional in toplevel interface definition (Laine Stump),
|
||||
Move libvirtd event loop into background thread (Daniel P. Berrange),
|
||||
Allow NULL mac address in virGetInterface (Laine Stump),
|
||||
ESX: Don't automatically follow redirects. (Matthias Bolte),
|
||||
ESX: Change disk selection for datastore detection. (Matthias Bolte),
|
||||
ESX: Fallback to the preliminary name if the datastore cannot be found. (Matthias Bolte),
|
||||
Set KMEMSIZE for OpenVZ domains being defined (Yuji NISHIDA),
|
||||
Allow for a driver specific private data blob in virDomainObjPtr (Daniel P. Berrange),
|
||||
More network utility functions (Matthew Booth),
|
||||
Add symbols from new network.h module (Daniel Veillard),
|
||||
Set of new network related utilities (Daniel Veillard),
|
||||
Convert virDomainObjListPtr to use a hash of domain objects (Daniel P. Berrange),
|
||||
qemu: migrate: Don't require manual URI to specify a port (Cole Robinson),
|
||||
test: Support virStorageFindPoolSources (Cole Robinson),
|
||||
storage: Add ParseSourceString function for use with FindPoolSources. (Cole Robinson),
|
||||
Add support for an external TFTP boot server (Paolo Bonzini),
|
||||
test: Support virNodeDeviceCreate and virNodeDeviceDestroy (Cole Robinson),
|
||||
Consolidate virXPathNodeSet() (Daniel Veillard),
|
||||
Support QEMU watchdog device. (Richard Jones),
|
||||
Do not log rotate very small logs (Dan Kenigsberg),
|
||||
LXC implement missing macaddr assignment feature (Ryota Ozaki),
|
||||
tests: Initialize virRandom in for test suite. (Cole Robinson),
|
||||
tests: Add storage volume XML 2 XML tests. (Cole Robinson),
|
||||
tests: Add network XML to XML tests. (Cole Robinson),
|
||||
schema: Update network schema. (Cole Robinson),
|
||||
tests: Add XML 2 XML tests for storage pools. (Cole Robinson),
|
||||
tests: Break out duplicate schema verification functionality. (Cole Robinson),
|
||||
tests: Fix text output for interface XML 2 XML (Cole Robinson),
|
||||
Add ocfs2 to list of fs pool types (Jim Fehlig),
|
||||
Finer grained migration control (Chris Lalancette)
|
||||
</li>
|
||||
|
||||
<li>Cleanups:
|
||||
remove sysfs_path and parent_sysfs_path from XML (Dave Allan),
|
||||
Removing devicePath member from dev struct (Dave Allan),
|
||||
report OOM in two places in node_device_driver.c (Dave Allan),
|
||||
Whitespace cleanup for pre-tags on the website (Matthias Bolte),
|
||||
Fix type in configure output summary (Daniel P. Berrange),
|
||||
Remove a compilation warning on uninitialized var (Daniel Veillard),
|
||||
Change DTD references to use public instead of system identifier (Matthias Bolte),
|
||||
Remove obsolete devicekit checks (Daniel P. Berrange),
|
||||
Small guestfwd code cleanup (Matthew Booth),
|
||||
Small indentation cleanup of domain schema (Matthew Booth),
|
||||
AppArmor code cleanups (Jamie Strandboge),
|
||||
Fix formatting of XML for an inactive guest (Daniel P. Berrange),
|
||||
Remove DevKit node device backend (David Allan),
|
||||
Exclude numactl on s390[x] (Daniel P. Berrange),
|
||||
Fix error handling in qemuMonitorOpen (Ryota Ozaki),
|
||||
Fix warning on make due to missing cast (int) (Ryota Ozaki),
|
||||
Various fixes following a code review part 2 (Daniel Veillard),
|
||||
Various fixes following a code review (Daniel Veillard),
|
||||
Move code for low level QEMU monitor interaction into separate file (Daniel P. Berrange),
|
||||
Make pciDeviceList struct opaque (Daniel P. Berrange),
|
||||
Add missing OOM error checks, reports and cleanups (Matthias Bolte),
|
||||
Removes the ebtablesSaveRules() function (Gerhard Stenzel),
|
||||
phyp: Use actual error code instead of 0 (Matthias Bolte),
|
||||
phyp: Don't use VIR_ALLOC if a stack variable is good enough (Matthias Bolte),
|
||||
phyp: Fix several UUID table related problems (Matthias Bolte),
|
||||
phyp: Check for exit_status < 0 before parsing the result (Matthias Bolte),
|
||||
phyp: memcpy/memmove/memset can't fail, so don't check for error (Matthias Bolte),
|
||||
phyp: Make generic domain listing functions return -1 in case of error (Matthias Bolte),
|
||||
Fix configure check for libssh2 (Matthias Bolte),
|
||||
Repair getIPv4Addr after the ntohl conversion (Daniel Veillard),
|
||||
Cleanup whitespace in docs (Matthew Booth),
|
||||
Use virBuffer when building QEMU char dev command line (Matthew Booth),
|
||||
Cleanup virBuffer usage in qemdBuildCommandLine (Matthew Booth),
|
||||
Fix some cut-and-paste error in migration code (Paolo Bonzini),
|
||||
Ensure guestfwd address is IPv4 and various cleanups (Matthew Booth),
|
||||
LXC cleanup deep indentation in lxcDomainSetAutostart (Ryota Ozaki),
|
||||
LXC messages cleanup and fix lxcError (Ryota Ozaki),
|
||||
qemu: Remove compiled out localhost migration support (Cole Robinson),
|
||||
Various error reporting fixes (Cole Robinson),
|
||||
Improve error reporting for virConnectGetHostname calls (Cole Robinson),
|
||||
Fix up NLS warnings. (Chris Lalancette),
|
||||
Remove redundant virFileDeletePID() call (Chris Lalancette),
|
||||
Fix return value in virStateInitialize impl for LXC (Daniel P. Berrange),
|
||||
ESX: Unify naming of VI API utility and convenience functions. (Matthias Bolte),
|
||||
Rename internal APis (Daniel P. Berrange),
|
||||
Pull signal setup code out into separate method (Daniel P. Berrange),
|
||||
Fix duplicating logging of errors in libvirtd (Daniel P. Berrange),
|
||||
Fix initialization order bugs (Daniel P. Berrange),
|
||||
Misc cleanup to network socket init (Daniel P. Berrange),
|
||||
Annotate many methods with ATTRIBUTE_RETURN_CHECK & fix problems (Daniel P. Berrange),
|
||||
Don't use private struct member names of in6_addr (Matthias Bolte),
|
||||
Fix typo in network.c function comments (Matthew Booth),
|
||||
libvirt-devel should only require libvirt-client (Mark McLoughlin),
|
||||
qemu: Fix an error message in GetVcpus (Cole Robinson),
|
||||
storage: Break out function to add pool source to a SourceList. (Cole Robinson),
|
||||
storage: Break out pool source parsing to a separate function. (Cole Robinson),
|
||||
Fix some typos in comments (Dan Kenigsberg),
|
||||
Fix error message in qemudLoadDriverConfig() (Matthias Bolte),
|
||||
Add a new syntax-check rule for gethostname. (Chris Lalancette),
|
||||
Various syntax-check fixes. (Chris Lalancette),
|
||||
Tighten up nonreentrant syntax-check. (Chris Lalancette),
|
||||
Replace a gethostname by virGetHostname in libvirtd.c (Chris Lalancette),
|
||||
Replace two strcmp() by STREQ() in qemu_driver.c (Chris Lalancette),
|
||||
Replace gethostname by virGetHostname in xend_internal.c (Chris Lalancette),
|
||||
Add a default log_level to qemudSetLogging to remove a build warning. (Chris Lalancette),
|
||||
Better error message when libvirtd fails to start. (Chris Lalancette),
|
||||
Fix potential false-positive OOM error reporting. (Matthias Bolte),
|
||||
Fix virsh.c compilation warning (Jim Fehlig),
|
||||
Fix a make dist error due to wrong EXTRA_DIST paths (Daniel Veillard),
|
||||
node device: Break out get_wwns and get_parent_node helpers (Cole Robinson),
|
||||
tests: Centralize VIR_TEST_DEBUG lookup, and document it (Cole Robinson),
|
||||
Remove bogus const annotations to hash iterator (Daniel P. Berrange),
|
||||
Remove bashisms from schema tests. (Matthias Bolte),
|
||||
Don't copy old machines from a domain which has none (Mark McLoughlin)
|
||||
</li>
|
||||
</ul>
|
||||
<h3>0.7.3: Nov 20 2009</h3>
|
||||
<p>Broken release use 0.7.4</p>
|
||||
|
||||
<h3>0.7.2: Oct 14 2009</h3>
|
||||
<ul>
|
||||
<li>Features:
|
||||
@ -1157,8 +1814,8 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
|
||||
<ul>
|
||||
<li>Bug fixes: QEmu network serialization (Kaitlin Rupert), internal
|
||||
memory allocation fixes (Chris Lalancette Jim Meyering), virsh
|
||||
large file config problem (Jim Meyering), xen list APIs when
|
||||
max is zero, string escape problems in the xm driver </li>
|
||||
large file config problem (Jim Meyering), xen list APIs when
|
||||
max is zero, string escape problems in the xm driver </li>
|
||||
<li>Improvements: add autogen to tarballs, improve iSCSI support
|
||||
(Chris Lalancette), localization updates </li>
|
||||
<li>Cleanups: const-ness fixed (Daniel P. Berrange), string helpers
|
||||
@ -1168,60 +1825,60 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progress.</p>
|
||||
<ul>
|
||||
<li>New features: Linux Container start and stop (Dave Leskovec),
|
||||
Network interface model settings (Daniel Berrange),serial and parallel
|
||||
device support for QEmu and Xen (Daniel Berrange),
|
||||
device support for QEmu and Xen (Daniel Berrange),
|
||||
Sound support for QEmu and Xen (Cole Robinson), vCPU settings for
|
||||
QEmu (Cole Robinson), support for NUMA and vCPU pinning in QEmu
|
||||
(Daniel Berrange), new virDomainBlockPeek API (Richard Jones)</li>
|
||||
QEmu (Cole Robinson), support for NUMA and vCPU pinning in QEmu
|
||||
(Daniel Berrange), new virDomainBlockPeek API (Richard Jones)</li>
|
||||
<li>Documentation: coding guidelines (Jim Meyering and Richard Jones),
|
||||
small man page missing entries and cleanup,
|
||||
Web site revamp (Daniel Berrange),
|
||||
typo fixes (Atsushi SAKAI), more docs on network XML format
|
||||
(Daniel Berrange), libvirt Wiki (Daniel Berrange),
|
||||
policykit config docs (Cole Robinson), XML domain docs revamp
|
||||
(Daniel Berrange), docs for remote listen-tls/tcp fixes (Kenneth
|
||||
Nagin), </li>
|
||||
Web site revamp (Daniel Berrange),
|
||||
typo fixes (Atsushi SAKAI), more docs on network XML format
|
||||
(Daniel Berrange), libvirt Wiki (Daniel Berrange),
|
||||
policykit config docs (Cole Robinson), XML domain docs revamp
|
||||
(Daniel Berrange), docs for remote listen-tls/tcp fixes (Kenneth
|
||||
Nagin), </li>
|
||||
<li>Bug fixes: save change to config file for Xen (Ryan Scott),
|
||||
fix /var/run/libvirt/ group ownership (Anton Protopopov),
|
||||
ancient libparted workaround (Soren Hansen), out of bount
|
||||
array access (Daniel Berrange), remote check bug (Dave Leskovec),
|
||||
LXC signal and daemon restart problems (Dave Leskovec), bus selection
|
||||
logic fix in the daemon config (Daniel Berrange), 2 memory leaks
|
||||
in the daemon (Jim Meyering), daemon pid file logic bug fix
|
||||
(Daniel Berrange), python generator fixes (Daniel Berrange),
|
||||
ivarious leaks and memory problem pointed by valgrind (Daniel
|
||||
Berrange), iptables forwarding cleanup (Daniel Berrange),
|
||||
Xen cpuset value checking (Hiroyuki Kaguchi), container process
|
||||
checks for LXC (Dave Leskovec), let xend check block device syntax
|
||||
(Hiroyuki Kaguchi), UUIDString for python fixes (Cole Robinson)</li>
|
||||
ancient libparted workaround (Soren Hansen), out of bount
|
||||
array access (Daniel Berrange), remote check bug (Dave Leskovec),
|
||||
LXC signal and daemon restart problems (Dave Leskovec), bus selection
|
||||
logic fix in the daemon config (Daniel Berrange), 2 memory leaks
|
||||
in the daemon (Jim Meyering), daemon pid file logic bug fix
|
||||
(Daniel Berrange), python generator fixes (Daniel Berrange),
|
||||
ivarious leaks and memory problem pointed by valgrind (Daniel
|
||||
Berrange), iptables forwarding cleanup (Daniel Berrange),
|
||||
Xen cpuset value checking (Hiroyuki Kaguchi), container process
|
||||
checks for LXC (Dave Leskovec), let xend check block device syntax
|
||||
(Hiroyuki Kaguchi), UUIDString for python fixes (Cole Robinson)</li>
|
||||
<li>Improvements: fixes for MinGW compilation (Richard Jones),
|
||||
autostart for running Xen domains (Cole Robinson),
|
||||
control of listening IP for daemon (Stefan de Konink),
|
||||
various Xenner related fixes and improvements (Daniel Berrange)
|
||||
autostart status printed in virsh domainfo (Shigeki Sakamoto),
|
||||
better error messages for xend driver (Richard Jones)</li>
|
||||
control of listening IP for daemon (Stefan de Konink),
|
||||
various Xenner related fixes and improvements (Daniel Berrange)
|
||||
autostart status printed in virsh domainfo (Shigeki Sakamoto),
|
||||
better error messages for xend driver (Richard Jones)</li>
|
||||
<li>Code cleanups: OpenVZ compilation (Richard Jones), conn dom and
|
||||
net fields deprecation in error structures (Richard Jones),
|
||||
Xen-ism on UUID (Richard Jones), add missing .pod to dist (Richard
|
||||
Jones), tab cleanup from sources (Jim Meyering), remove unused field
|
||||
in virsh control structure (Richard Jones), compilation without
|
||||
pthread.h (Jim Meyering), cleanup of tests (Daniel Berrange),
|
||||
syntax-check improvements (Jim Meyering), python cleanup,
|
||||
remove dependancy on libc is_* character tests (Jim Meyering),
|
||||
format related cleanups (Jim Meyering), cleanup of the buffer
|
||||
internal APIs (Daniel Berrange), conversion to the new memory
|
||||
allocation API (Daniel Berrange), lcov coverage testing
|
||||
(Daniel Berrange), gnulib updates (Jim Meyering), compatibility
|
||||
fix with RHEL 5 (Daniel Berrange), SuSE compatibility fix (Jim
|
||||
Fehlig), const'ification of a number of structures (Jim Meyering),
|
||||
string comparison macro cleanups (Daniel Berrange), character
|
||||
range testing cleanups and assorted bug fixes (Jim Meyering),
|
||||
QEmu test fixes (Daniel Berrange), configure macro cleanup (Daniel
|
||||
Berrange), refactor QEmu command line building code (Daniel Berrange),
|
||||
type punning warning in remote code (Richard Jones), refactoring
|
||||
of internal headers (Richard Jones), generic out of memory
|
||||
testing and associated bug fixes (Daniel Berrange), don't raise
|
||||
internal error for unsupported features (Kaitlin Rupert),
|
||||
missing driver entry points (Daniel Berrange)</li>
|
||||
Xen-ism on UUID (Richard Jones), add missing .pod to dist (Richard
|
||||
Jones), tab cleanup from sources (Jim Meyering), remove unused field
|
||||
in virsh control structure (Richard Jones), compilation without
|
||||
pthread.h (Jim Meyering), cleanup of tests (Daniel Berrange),
|
||||
syntax-check improvements (Jim Meyering), python cleanup,
|
||||
remove dependancy on libc is_* character tests (Jim Meyering),
|
||||
format related cleanups (Jim Meyering), cleanup of the buffer
|
||||
internal APIs (Daniel Berrange), conversion to the new memory
|
||||
allocation API (Daniel Berrange), lcov coverage testing
|
||||
(Daniel Berrange), gnulib updates (Jim Meyering), compatibility
|
||||
fix with RHEL 5 (Daniel Berrange), SuSE compatibility fix (Jim
|
||||
Fehlig), const'ification of a number of structures (Jim Meyering),
|
||||
string comparison macro cleanups (Daniel Berrange), character
|
||||
range testing cleanups and assorted bug fixes (Jim Meyering),
|
||||
QEmu test fixes (Daniel Berrange), configure macro cleanup (Daniel
|
||||
Berrange), refactor QEmu command line building code (Daniel Berrange),
|
||||
type punning warning in remote code (Richard Jones), refactoring
|
||||
of internal headers (Richard Jones), generic out of memory
|
||||
testing and associated bug fixes (Daniel Berrange), don't raise
|
||||
internal error for unsupported features (Kaitlin Rupert),
|
||||
missing driver entry points (Daniel Berrange)</li>
|
||||
</ul>
|
||||
<h3>0.4.2: Apr 8 2008</h3>
|
||||
<ul>
|
||||
|
@ -22,28 +22,28 @@
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
The <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen</a> hypervisor
|
||||
The <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen</a> hypervisor
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://bellard.org/qemu/">QEMU</a> emulator
|
||||
The <a href="http://bellard.org/qemu/">QEMU</a> emulator
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://kvm.qumranet.com/kvmwiki">KVM</a> Linux hypervisor
|
||||
The <a href="http://kvm.qumranet.com/kvmwiki">KVM</a> Linux hypervisor
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://lxc.sourceforge.net/">LXC</a> Linux container system
|
||||
The <a href="http://lxc.sourceforge.net/">LXC</a> Linux container system
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://openvz.org/">OpenVZ</a> Linux container system
|
||||
The <a href="http://openvz.org/">OpenVZ</a> Linux container system
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://virt.kernelnewbies.org/lguest">lGuest</a> paravirtualized hypervisor
|
||||
The <a href="http://virt.kernelnewbies.org/lguest">lGuest</a> paravirtualized hypervisor
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://virt.kernelnewbies.org/Linux-VServer">Linux-VServer</a> container system
|
||||
The <a href="http://virt.kernelnewbies.org/Linux-VServer">Linux-VServer</a> container system
|
||||
</li>
|
||||
<li>
|
||||
The <a href="http://virt.kernelnewbies.org/UML">User Mode Linux</a> paravirtualized hypervisor
|
||||
The <a href="http://virt.kernelnewbies.org/UML">User Mode Linux</a> paravirtualized hypervisor
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -51,13 +51,13 @@
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="http://virt.kernelnewbies.org/">Kernel Newbies Virtualization guide</a>
|
||||
<a href="http://virt.kernelnewbies.org/">Kernel Newbies Virtualization guide</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www-128.ibm.com/developerworks/linux/library/l-linuxvirt/?ca=dgr-lnxw01Virtual-Linux">IBM developerworks virtualization guide</a>
|
||||
<a href="http://www-128.ibm.com/developerworks/linux/library/l-linuxvirt/?ca=dgr-lnxw01Virtual-Linux">IBM developerworks virtualization guide</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://en.wikipedia.org/wiki/Virtualization">Wikipedia Virtualization</a>
|
||||
<a href="http://en.wikipedia.org/wiki/Virtualization">Wikipedia Virtualization</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -811,16 +811,6 @@ should just 'do the right thing(tm)'.
|
||||
<a name="Remote_limitations" id="Remote_limitations">Limitations</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li> Remote storage: To be fully useful, particularly for
|
||||
creating new domains, it should be possible to enumerate
|
||||
and provision storage on the remote machine. This is currently
|
||||
in the design phase. </li>
|
||||
<li> Migration: We expect libvirt will support migration,
|
||||
and obviously remote support is what makes migration worthwhile.
|
||||
This is also in the design phase. Issues <a href="https://www.redhat.com/mailman/listinfo/libvir-list" title="libvir-list mailing list">to discuss</a> include
|
||||
which path the migration data should follow (eg. client to
|
||||
client direct, or client to server to client) and security.
|
||||
</li>
|
||||
<li> Fine-grained authentication: libvirt in general,
|
||||
but in particular the remote case should support more
|
||||
fine-grained authentication for operations, rather than
|
||||
|
@ -25,6 +25,9 @@
|
||||
<optional>
|
||||
<ref name='cpufeatures'/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='cpuspec'/>
|
||||
</optional>
|
||||
</element>
|
||||
<optional>
|
||||
<ref name='migration'/>
|
||||
@ -67,6 +70,31 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='cpuspec'>
|
||||
<element name='model'>
|
||||
<text/>
|
||||
</element>
|
||||
<element name='topology'>
|
||||
<attribute name='sockets'>
|
||||
<ref name='positiveInteger'/>
|
||||
</attribute>
|
||||
<attribute name='cores'>
|
||||
<ref name='positiveInteger'/>
|
||||
</attribute>
|
||||
<attribute name='threads'>
|
||||
<ref name='positiveInteger'/>
|
||||
</attribute>
|
||||
</element>
|
||||
<zeroOrMore>
|
||||
<element name='feature'>
|
||||
<attribute name='name'>
|
||||
<ref name='featureName'/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</define>
|
||||
|
||||
<define name='migration'>
|
||||
<element name='migration_features'>
|
||||
<optional>
|
||||
@ -259,6 +287,11 @@
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name='cpuselection'>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@ -293,8 +326,14 @@
|
||||
</define>
|
||||
|
||||
|
||||
<define name='positiveInteger'>
|
||||
<data type='positiveInteger'>
|
||||
<param name="pattern">[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='uint'>
|
||||
<data type='string'>
|
||||
<data type='unsignedInt'>
|
||||
<param name="pattern">[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
@ -305,4 +344,9 @@
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='featureName'>
|
||||
<data type='string'>
|
||||
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
|
||||
</data>
|
||||
</define>
|
||||
</grammar>
|
||||
|
@ -27,6 +27,9 @@
|
||||
<optional>
|
||||
<ref name="description"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="cpu"/>
|
||||
</optional>
|
||||
<ref name="os"/>
|
||||
<ref name="clock"/>
|
||||
<ref name="resources"/>
|
||||
@ -167,13 +170,11 @@
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="machine">
|
||||
<choice>
|
||||
<value>xenfv</value>
|
||||
<value>pc</value>
|
||||
<value>isapc</value>
|
||||
</choice>
|
||||
<data type="string">
|
||||
<param name="pattern">[a-zA-Z0-9_\.\-]+</param>
|
||||
</data>
|
||||
</attribute>
|
||||
</optional>
|
||||
</optional>
|
||||
</group>
|
||||
</define>
|
||||
<define name="hvmmips">
|
||||
@ -275,13 +276,13 @@
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="memoryBacking">
|
||||
<optional>
|
||||
<element name="hugepages">
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
<element name="memoryBacking">
|
||||
<optional>
|
||||
<element name="hugepages">
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="vcpu">
|
||||
@ -384,6 +385,9 @@
|
||||
<optional>
|
||||
<ref name="encryption"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</define>
|
||||
<!--
|
||||
A disk description can be either of type file or block
|
||||
@ -434,6 +438,22 @@
|
||||
<ref name="diskspec"/>
|
||||
</interleave>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>dir</value>
|
||||
</attribute>
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name="source">
|
||||
<attribute name="dir">
|
||||
<ref name="absFilePath"/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<ref name="diskspec"/>
|
||||
</interleave>
|
||||
</group>
|
||||
<ref name="diskspec"/>
|
||||
</choice>
|
||||
</element>
|
||||
@ -501,6 +521,26 @@
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
<define name="controller">
|
||||
<element name="controller">
|
||||
<optional>
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>fdc</value>
|
||||
<value>ide</value>
|
||||
<value>scsi</value>
|
||||
<value>sata</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name="index">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<define name="filesystem">
|
||||
<element name="filesystem">
|
||||
<choice>
|
||||
@ -561,6 +601,9 @@
|
||||
</interleave>
|
||||
</group>
|
||||
</choice>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<define name="filesystemtgt">
|
||||
@ -698,6 +741,9 @@
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
<!--
|
||||
@ -842,7 +888,7 @@
|
||||
<define name="video">
|
||||
<element name="video">
|
||||
<optional>
|
||||
<element name="model">
|
||||
<element name="model">
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>vga</value>
|
||||
@ -882,7 +928,10 @@
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
@ -930,6 +979,27 @@
|
||||
definition doesn't fully specify the constraints on this node.
|
||||
-->
|
||||
<define name="qemucdev">
|
||||
<ref name="qemucdevSrcType"/>
|
||||
<optional>
|
||||
<attribute name="tty">
|
||||
<ref name="devicePath"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<interleave>
|
||||
<ref name="qemucdevSrcDef"/>
|
||||
<optional>
|
||||
<element name="target">
|
||||
<optional>
|
||||
<attribute name="port"/>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
<define name="qemucdevSrcType">
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>dev</value>
|
||||
@ -944,43 +1014,34 @@
|
||||
<value>pty</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<interleave>
|
||||
<optional>
|
||||
<oneOrMore>
|
||||
<element name="source">
|
||||
<optional>
|
||||
<attribute name="mode"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="path"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="host"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="service"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="wiremode"/>
|
||||
</optional>
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="protocol">
|
||||
<optional>
|
||||
<attribute name="type"/>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="target">
|
||||
<optional>
|
||||
<attribute name="port"/>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
<define name="qemucdevSrcDef">
|
||||
<zeroOrMore>
|
||||
<element name="source">
|
||||
<optional>
|
||||
<attribute name="mode"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="path"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="host"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="service"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="wiremode"/>
|
||||
</optional>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
<element name="protocol">
|
||||
<optional>
|
||||
<attribute name="type"/>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
<!--
|
||||
The description for a console
|
||||
@ -1011,6 +1072,33 @@
|
||||
<value>ac97</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<define name="watchdog">
|
||||
<element name="watchdog">
|
||||
<attribute name="model">
|
||||
<choice>
|
||||
<value>i6300esb</value>
|
||||
<value>ib700</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="action">
|
||||
<choice>
|
||||
<value>reset</value>
|
||||
<value>shutdown</value>
|
||||
<value>poweroff</value>
|
||||
<value>pause</value>
|
||||
<value>none</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<define name="parallel">
|
||||
@ -1023,6 +1111,27 @@
|
||||
<ref name="qemucdev"/>
|
||||
</element>
|
||||
</define>
|
||||
<define name="guestfwdTarget">
|
||||
<element name="target">
|
||||
<attribute name="type">
|
||||
<value>guestfwd</value>
|
||||
</attribute>
|
||||
<attribute name="address"/>
|
||||
<attribute name="port"/>
|
||||
</element>
|
||||
</define>
|
||||
<define name="channel">
|
||||
<element name="channel">
|
||||
<ref name="qemucdevSrcType"/>
|
||||
<interleave>
|
||||
<ref name="qemucdevSrcDef"/>
|
||||
<ref name="guestfwdTarget"/>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
<define name="input">
|
||||
<element name="input">
|
||||
<attribute name="type">
|
||||
@ -1040,6 +1149,9 @@
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<define name="hostdev">
|
||||
@ -1067,12 +1179,22 @@
|
||||
<group>
|
||||
<element name="source">
|
||||
<choice>
|
||||
<ref name="usbproduct"/>
|
||||
<group>
|
||||
<ref name="usbproduct"/>
|
||||
<optional>
|
||||
<ref name="usbaddress"/>
|
||||
</optional>
|
||||
</group>
|
||||
<ref name="usbaddress"/>
|
||||
<ref name="pciaddress"/>
|
||||
<element name="address">
|
||||
<ref name="pciaddress"/>
|
||||
</element>
|
||||
</choice>
|
||||
</element>
|
||||
</group>
|
||||
<optional>
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
<define name="usbproduct">
|
||||
@ -1098,22 +1220,35 @@
|
||||
</element>
|
||||
</define>
|
||||
<define name="pciaddress">
|
||||
<element name="address">
|
||||
<optional>
|
||||
<attribute name="domain">
|
||||
<ref name="pciDomain"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="domain">
|
||||
<ref name="pciDomain"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name="bus">
|
||||
<ref name="pciBus"/>
|
||||
</attribute>
|
||||
<attribute name="slot">
|
||||
<ref name="pciSlot"/>
|
||||
</attribute>
|
||||
<attribute name="function">
|
||||
<ref name="pciFunc"/>
|
||||
</attribute>
|
||||
</define>
|
||||
<define name="driveaddress">
|
||||
<optional>
|
||||
<attribute name="controller">
|
||||
<ref name="driveController"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="bus">
|
||||
<ref name="pciBus"/>
|
||||
<ref name="driveBus"/>
|
||||
</attribute>
|
||||
<attribute name="slot">
|
||||
<ref name="pciSlot"/>
|
||||
</attribute>
|
||||
<attribute name="function">
|
||||
<ref name="pciFunc"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
<attribute name="unit">
|
||||
<ref name="driveUnit"/>
|
||||
</attribute>
|
||||
</define>
|
||||
<!--
|
||||
Devices attached to a domain.
|
||||
@ -1127,6 +1262,7 @@
|
||||
<zeroOrMore>
|
||||
<choice>
|
||||
<ref name="disk"/>
|
||||
<ref name="controller"/>
|
||||
<ref name="filesystem"/>
|
||||
<ref name="interface"/>
|
||||
<ref name="input"/>
|
||||
@ -1137,8 +1273,12 @@
|
||||
<ref name="console"/>
|
||||
<ref name="parallel"/>
|
||||
<ref name="serial"/>
|
||||
<ref name="channel"/>
|
||||
</choice>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
<ref name="watchdog"/>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
@ -1168,6 +1308,79 @@
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
<!--
|
||||
CPU specification
|
||||
-->
|
||||
<define name="cpu">
|
||||
<element name="cpu">
|
||||
<optional>
|
||||
<attribute name="match">
|
||||
<choice>
|
||||
<value>minimum</value>
|
||||
<value>exact</value>
|
||||
<value>strict</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name="model">
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="topology">
|
||||
<attribute name="sockets">
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
<attribute name="cores">
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
<attribute name="threads">
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<element name="feature">
|
||||
<attribute name="policy">
|
||||
<choice>
|
||||
<value>force</value>
|
||||
<value>require</value>
|
||||
<value>optional</value>
|
||||
<value>disable</value>
|
||||
<value>forbid</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<attribute name="name">
|
||||
<ref name="featureName"/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="address">
|
||||
<element name="address">
|
||||
<choice>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>pci</value>
|
||||
</attribute>
|
||||
<ref name="pciaddress"/>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>drive</value>
|
||||
</attribute>
|
||||
<ref name="driveaddress"/>
|
||||
</group>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<!--
|
||||
Type library
|
||||
|
||||
@ -1181,6 +1394,11 @@
|
||||
<param name="pattern">[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name='positiveInteger'>
|
||||
<data type='positiveInteger'>
|
||||
<param name="pattern">[0-9]+</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="countCPU">
|
||||
<data type="unsignedShort">
|
||||
<param name="pattern">[0-9]+</param>
|
||||
@ -1288,4 +1506,24 @@
|
||||
<param name="pattern">(0x)?[0-7]</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="driveController">
|
||||
<data type="string">
|
||||
<param name="pattern">[0-9]{1,2}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="driveBus">
|
||||
<data type="string">
|
||||
<param name="pattern">[0-9]{1,2}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="driveUnit">
|
||||
<data type="string">
|
||||
<param name="pattern">[0-9]{1,2}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="featureName">
|
||||
<data type="string">
|
||||
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
|
||||
</data>
|
||||
</define>
|
||||
</grammar>
|
||||
|
@ -1,7 +1,13 @@
|
||||
<!-- A Relax NG schema for network interfaces -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
xmlns:v="http://netcf.org/xml/version/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
<start>
|
||||
<!-- Versions for this schema are simple integers that are incremented
|
||||
everytime a changed (but backwards compatible) version
|
||||
is released. The current version is indicated with the v:serial
|
||||
attribute on the start element.
|
||||
-->
|
||||
<start v:serial="4">
|
||||
<choice>
|
||||
<ref name="ethernet-interface"/>
|
||||
<ref name="bridge-interface"/>
|
||||
@ -109,12 +115,17 @@
|
||||
<ref name="on-or-off"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<oneOrMore>
|
||||
<!-- Bridge forward delay (see 'brctl setfd') -->
|
||||
<optional v:since="2">
|
||||
<attribute name="delay"><ref name="timeval"/></attribute>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<choice>
|
||||
<ref name="bare-ethernet-interface"/>
|
||||
<ref name="bare-vlan-interface"/>
|
||||
<ref v:since="2" name="bare-bond-interface"/>
|
||||
</choice>
|
||||
</oneOrMore>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</element>
|
||||
</define>
|
||||
@ -125,90 +136,105 @@
|
||||
<!--
|
||||
Bonds
|
||||
-->
|
||||
<define name="bond-interface-common">
|
||||
<attribute name="type">
|
||||
<value>bond</value>
|
||||
</attribute>
|
||||
<ref name="name-attr"/>
|
||||
</define>
|
||||
|
||||
<define name="bond-element">
|
||||
<element name="bond">
|
||||
<optional>
|
||||
<attribute name="mode">
|
||||
<choice>
|
||||
<value>balance-rr</value>
|
||||
<!-- The primary interface is the first interface child
|
||||
of the bond element -->
|
||||
<value>active-backup</value>
|
||||
<value>balance-xor</value>
|
||||
<value>broadcast</value>
|
||||
<value>802.3ad</value>
|
||||
<value>balance-tlb</value>
|
||||
<value>balance-alb</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
|
||||
<!-- FIXME: add more attributes
|
||||
|
||||
mode == 802.3ad
|
||||
ad_select
|
||||
lacp_rate
|
||||
xmit_hash_policy
|
||||
|
||||
mode == active-backup
|
||||
fail_over_mac
|
||||
num_grat_arp when mode == active-backup (since 3.3.0)
|
||||
num_unsol_na when mode == active-backup (ipv6, since 3.4.0)
|
||||
|
||||
mode == balance-xor
|
||||
xmit_hash_policy (since 2.6.3/3.2.2)
|
||||
-->
|
||||
|
||||
<choice>
|
||||
<element name="miimon">
|
||||
<!-- miimon frequency in ms -->
|
||||
<attribute name="freq"><ref name="uint"/></attribute>
|
||||
<optional>
|
||||
<attribute name="downdelay"><ref name="uint"/></attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="updelay"><ref name="uint"/></attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<!-- use_carrier -->
|
||||
<attribute name="carrier">
|
||||
<choice>
|
||||
<!-- use MII/ETHTOOL ioctl -->
|
||||
<value>ioctl</value>
|
||||
<!-- use netif_carrier_ok() -->
|
||||
<value>netif</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
<element name="arpmon">
|
||||
<attribute name="interval"><ref name="uint"/></attribute>
|
||||
<attribute name="target"><ref name="ipv4-addr"/></attribute>
|
||||
<optional>
|
||||
<attribute name="validate">
|
||||
<choice>
|
||||
<value>none</value>
|
||||
<value>active</value>
|
||||
<value>backup</value>
|
||||
<value>all</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</choice>
|
||||
<oneOrMore>
|
||||
<!-- The slave interfaces -->
|
||||
<ref name="bare-ethernet-interface"/>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="bare-bond-interface">
|
||||
<element name="interface">
|
||||
<ref name="bond-interface-common"/>
|
||||
<ref name="bond-element"/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="bond-interface">
|
||||
<element name="interface">
|
||||
<attribute name="type">
|
||||
<value>bond</value>
|
||||
</attribute>
|
||||
<ref name="name-attr"/>
|
||||
<ref name="bond-interface-common"/>
|
||||
<ref name="startmode"/>
|
||||
<ref name="mtu"/>
|
||||
<ref name="interface-addressing"/>
|
||||
<element name="bond">
|
||||
<optional>
|
||||
<attribute name="mode">
|
||||
<choice>
|
||||
<value>balance-rr</value>
|
||||
<!-- The primary interface is the first interface child
|
||||
of the bond element -->
|
||||
<value>active-backup</value>
|
||||
<value>balance-xor</value>
|
||||
<value>broadcast</value>
|
||||
<value>802.3ad</value>
|
||||
<value>balance-tlb</value>
|
||||
<value>balance-alb</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
|
||||
<!-- FIXME: add more attributes
|
||||
|
||||
mode == 802.3ad
|
||||
ad_select
|
||||
lacp_rate
|
||||
xmit_hash_policy
|
||||
|
||||
mode == active-backup
|
||||
fail_over_mac
|
||||
num_grat_arp when mode == active-backup (since 3.3.0)
|
||||
num_unsol_na when mode == active-backup (ipv6, since 3.4.0)
|
||||
|
||||
mode == balance-xor
|
||||
xmit_hash_policy (since 2.6.3/3.2.2)
|
||||
-->
|
||||
|
||||
<choice>
|
||||
<element name="miimon">
|
||||
<!-- miimon frequency in ms -->
|
||||
<attribute name="freq"><ref name="uint"/></attribute>
|
||||
<optional>
|
||||
<attribute name="downdelay"><ref name="uint"/></attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="updelay"><ref name="uint"/></attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<!-- use_carrier -->
|
||||
<attribute name="carrier">
|
||||
<choice>
|
||||
<!-- use MII/ETHTOOL ioctl -->
|
||||
<value>ioctl</value>
|
||||
<!-- use netif_carrier_ok() -->
|
||||
<value>netif</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
<element name="arpmon">
|
||||
<attribute name="interval"><ref name="uint"/></attribute>
|
||||
<attribute name="target"><ref name="ipv4-addr"/></attribute>
|
||||
<optional>
|
||||
<attribute name="validate">
|
||||
<choice>
|
||||
<value>none</value>
|
||||
<value>active</value>
|
||||
<value>backup</value>
|
||||
<value>all</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</choice>
|
||||
<oneOrMore>
|
||||
<!-- The slave interfaces -->
|
||||
<ref name="bare-ethernet-interface"/>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
<ref name="bond-element"/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
@ -245,47 +271,87 @@
|
||||
different protocols
|
||||
-->
|
||||
<define name="interface-addressing">
|
||||
<optional>
|
||||
<element name="protocol">
|
||||
<ref name="protocol-ipv4"/>
|
||||
</element>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<define name="protocol-ipv4">
|
||||
<attribute name="family">
|
||||
<value>ipv4</value>
|
||||
</attribute>
|
||||
<choice>
|
||||
<element name="dhcp">
|
||||
<optional>
|
||||
<attribute name="peerdns">
|
||||
<ref name="yes-or-no"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
<!-- FIXME: This format should be good enough for IPv4 and IPv6, i.e.
|
||||
|
||||
ipaddr="192.168.0.5/24"
|
||||
ipaddr="2001:DB8:ABCD::1/64"
|
||||
|
||||
but will cause some backend pain
|
||||
-->
|
||||
<group>
|
||||
<element name="ip">
|
||||
<attribute name="address"><ref name="ipv4-addr"/></attribute>
|
||||
<optional>
|
||||
<attribute name="prefix"><ref name="ipv4-prefix"/></attribute>
|
||||
</optional>
|
||||
</element>
|
||||
<optional>
|
||||
<element name="route">
|
||||
<attribute name="gateway"><ref name="ipv4-addr"/></attribute>
|
||||
</element>
|
||||
<ref name="protocol-ipv4"/>
|
||||
</optional>
|
||||
<optional v:since="3">
|
||||
<ref name="protocol-ipv6"/>
|
||||
</optional>
|
||||
</group>
|
||||
<group>
|
||||
<optional v:since="3">
|
||||
<ref name="protocol-ipv6"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="protocol-ipv4"/>
|
||||
</optional>
|
||||
</group>
|
||||
</choice>
|
||||
</define>
|
||||
|
||||
<define name="protocol-ipv4">
|
||||
<element name="protocol">
|
||||
<attribute name="family">
|
||||
<value>ipv4</value>
|
||||
</attribute>
|
||||
<choice>
|
||||
<ref name="dhcp-element"/>
|
||||
<group>
|
||||
<element name="ip">
|
||||
<attribute name="address"><ref name="ipv4-addr"/></attribute>
|
||||
<optional>
|
||||
<attribute name="prefix"><ref name="ipv4-prefix"/></attribute>
|
||||
</optional>
|
||||
</element>
|
||||
<optional>
|
||||
<element name="route">
|
||||
<attribute name="gateway"><ref name="ipv4-addr"/></attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</group>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="protocol-ipv6">
|
||||
<element name="protocol">
|
||||
<attribute name="family">
|
||||
<value>ipv6</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<element name="autoconf"><empty/></element>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="dhcp-element"/>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<element name="ip">
|
||||
<attribute name="address"><ref name="ipv6-addr"/></attribute>
|
||||
<optional>
|
||||
<attribute name="prefix"><ref name="ipv6-prefix"/></attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
<element name="route">
|
||||
<attribute name="gateway"><ref name="ipv6-addr"/></attribute>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="dhcp-element">
|
||||
<element name="dhcp">
|
||||
<optional>
|
||||
<attribute name="peerdns">
|
||||
<ref name="yes-or-no"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<!-- Jim Fehlig (<jfehlig@novell.com>) suggest the
|
||||
following additions to DHCP:
|
||||
|
||||
@ -342,6 +408,12 @@
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="timeval">
|
||||
<data type="double">
|
||||
<param name="minInclusive">0</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='device-name'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[a-zA-Z0-9_\.\-:/]+</param>
|
||||
@ -367,13 +439,27 @@
|
||||
|
||||
<define name='ipv4-addr'>
|
||||
<data type='string'>
|
||||
<param name="pattern">([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9]</param>
|
||||
<param name="pattern">(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))\.){3}((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='ipv4-prefix'>
|
||||
<data type='unsignedInt'>
|
||||
<param name="maxInclusive">32</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<!-- Based on http://blog.mes-stats.fr/2008/10/09/regex-ipv4-et-ipv6 -->
|
||||
<define name='ipv6-addr'>
|
||||
<data type='string'>
|
||||
<param name="pattern">[1-9]|[12][0-9]|3[0-2]</param>
|
||||
<!-- To understand this better, take apart the toplevel '|'s -->
|
||||
<param name="pattern">(([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))))|(([0-9A-Fa-f]{1,4}:){0,5}:((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))))|(::([0-9A-Fa-f]{1,4}:){0,5}((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:)</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name='ipv6-prefix'>
|
||||
<data type='unsignedInt'>
|
||||
<param name="maxInclusive">128</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
|
@ -2,19 +2,29 @@
|
||||
<element name="network" xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
<interleave>
|
||||
|
||||
<!-- The name of the network, used to refer to it through the API
|
||||
and in virsh -->
|
||||
<element name="name"><text/></element>
|
||||
<element name="name">
|
||||
<text/>
|
||||
</element>
|
||||
|
||||
<!-- <uuid> element -->
|
||||
<optional>
|
||||
<element name="uuid"><text/></element>
|
||||
</optional>
|
||||
|
||||
<!-- <bridge> element -->
|
||||
<optional>
|
||||
<!-- The name of the network to be set up; this will back
|
||||
the network on the host -->
|
||||
<element name="bridge">
|
||||
<optional>
|
||||
<attribute name="name"><text/></attribute>
|
||||
<attribute name="name">
|
||||
<text/>
|
||||
</attribute>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<attribute name="stp">
|
||||
<choice>
|
||||
@ -23,31 +33,46 @@
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<attribute name="delay"><data type="integer"/></attribute>
|
||||
<attribute name="delay">
|
||||
<data type="integer"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<!-- <forward> element -->
|
||||
<optional>
|
||||
<!-- The device through which the bridge is connected to the
|
||||
rest of the network -->
|
||||
<element name="forward">
|
||||
<optional><attribute name="dev"><text/></attribute></optional>
|
||||
<optional>
|
||||
<attribute name="dev">
|
||||
<text/>
|
||||
</attribute>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<attribute name="mode">
|
||||
<choice>
|
||||
<value>nat</value>
|
||||
<value>routed</value>
|
||||
<value>route</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<!-- <domain> element -->
|
||||
<optional>
|
||||
<element name="domain">
|
||||
<attribute name="name"><text/></attribute>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<!-- <ip> element -->
|
||||
<optional>
|
||||
<!-- The IP element sets up NAT'ing and an optional DHCP server
|
||||
local to the host. -->
|
||||
@ -84,6 +109,9 @@
|
||||
<optional>
|
||||
<element name="bootp">
|
||||
<attribute name="file"><text/></attribute>
|
||||
<optional>
|
||||
<attribute name="server"><text/></attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
|
@ -314,6 +314,11 @@
|
||||
<element name='media_size'>
|
||||
<ref name='uint'/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name='media_label'>
|
||||
<text/>
|
||||
</element>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
<optional>
|
||||
<element name='usage'>
|
||||
<choice>
|
||||
<ref name='usagevolume'>
|
||||
<ref name='usagevolume'/>
|
||||
<!-- More choices later -->
|
||||
</choice>
|
||||
</element>
|
||||
|
@ -188,6 +188,15 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='initiatorinfoiqn'>
|
||||
<element name='iqn'>
|
||||
<attribute name='name'>
|
||||
<text/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='devextents'>
|
||||
<oneOrMore>
|
||||
<element name='freeExtent'>
|
||||
@ -258,6 +267,7 @@
|
||||
<value>vfat</value>
|
||||
<value>hfs+</value>
|
||||
<value>xfs</value>
|
||||
<value>ocfs2</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</element>
|
||||
@ -361,6 +371,9 @@
|
||||
<element name='source'>
|
||||
<ref name='sourceinfohost'/>
|
||||
<ref name='sourceinfodev'/>
|
||||
<optional>
|
||||
<ref name='initiatorinfoiqn'/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name='sourceinfoauth'/>
|
||||
</optional>
|
||||
|
@ -9,9 +9,9 @@
|
||||
|
||||
<xsl:output
|
||||
method="xml"
|
||||
encoding="ISO-8859-1"
|
||||
encoding="UTF-8"
|
||||
indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0//EN"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
|
||||
|
||||
<xsl:variable name="href_base" select="''"/>
|
||||
|
@ -134,7 +134,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<a href="drvtest.html">Test</a>
|
||||
<span>Psuedo-driver simulating APIs in memory for test suites</span>
|
||||
<span>Pseudo-driver simulating APIs in memory for test suites</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="drvremote.html">Remote</a>
|
||||
@ -160,6 +160,10 @@
|
||||
<a href="drvone.html">OpenNebula</a>
|
||||
<span>Driver for OpenNebula</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="drvesx.html">VMware ESX</a>
|
||||
<span>Driver for VMware ESX</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
@ -202,10 +206,10 @@
|
||||
<a href="html/libvirt-virterror.html">virterror</a>
|
||||
<span>error handling interfaces for the libvirt library</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="hvsupport.html">Driver support</a>
|
||||
<span>matrix of API support per hypervisor per release</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="hvsupport.html">Driver support</a>
|
||||
<span>matrix of API support per hypervisor per release</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
@ -226,10 +230,10 @@
|
||||
<a href="internals.html">Internals</a>
|
||||
<span>Working on the internals of libvirt API, driver and daemon code</span>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="hacking.html">Contributor guidelines</a>
|
||||
<span>General hacking guidelines for contributors</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="hacking.html">Contributor guidelines</a>
|
||||
<span>General hacking guidelines for contributors</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="api_extension.html">API extensions</a>
|
||||
<span>Adding new public libvirt APIs</span>
|
||||
|
@ -45,8 +45,7 @@ libvirt.
|
||||
<target>
|
||||
<path>/var/lib/virt/images</path>
|
||||
</target>
|
||||
</pool>
|
||||
</pre>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
@ -101,8 +100,7 @@ libvirt.
|
||||
<target>
|
||||
<path>/var/lib/virt/images</path>
|
||||
</target>
|
||||
</pool>
|
||||
</pre>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
@ -172,8 +170,7 @@ libvirt.
|
||||
<target>
|
||||
<path>/var/lib/virt/images</path>
|
||||
</target>
|
||||
</pool>
|
||||
</pre>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
@ -215,8 +212,7 @@ libvirt.
|
||||
<target>
|
||||
<path>/dev/HostVG</path>
|
||||
</target>
|
||||
</pool>
|
||||
</pre>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
@ -248,8 +244,7 @@ libvirt.
|
||||
<target>
|
||||
<path>/dev</path>
|
||||
</target>
|
||||
</pool>
|
||||
</pre>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
@ -338,8 +333,7 @@ libvirt.
|
||||
<target>
|
||||
<path>/dev/disk/by-path</path>
|
||||
</target>
|
||||
</pool>
|
||||
</pre>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
|
5
examples/apparmor/Makefile.am
Normal file
5
examples/apparmor/Makefile.am
Normal file
@ -0,0 +1,5 @@
|
||||
EXTRA_DIST= \
|
||||
TEMPLATE \
|
||||
libvirt-qemu \
|
||||
usr.lib.libvirt.virt-aa-helper \
|
||||
usr.sbin.libvirtd
|
@ -1,4 +1,4 @@
|
||||
# Last Modified: Wed Jul 8 09:57:41 2009
|
||||
# Last Modified: Fri Nov 6 16:41:59 2009
|
||||
|
||||
#include <abstractions/base>
|
||||
#include <abstractions/consoles>
|
||||
@ -24,6 +24,31 @@
|
||||
#/sys/devices/*/*/usb[0-9]*/** r,
|
||||
#/dev/bus/usb/*/[0-9]* rw,
|
||||
|
||||
# WARNING: this gives the guest direct access to host hardware and specific
|
||||
# portions of shared memory. This is required for sound using ALSA with kvm,
|
||||
# but may constitute a security risk. If your environment does not require
|
||||
# the use of sound in your VMs, feel free to comment out or prepend 'deny' to
|
||||
# the rules for files in /dev.
|
||||
/dev/shm/ r,
|
||||
/dev/shm/pulse-shm* r,
|
||||
/dev/shm/pulse-shm* rwk,
|
||||
/dev/snd/* rw,
|
||||
capability ipc_lock,
|
||||
# 'kill' is not required for sound and is a security risk. Do not enable
|
||||
# unless you absolutely need it.
|
||||
deny capability kill,
|
||||
|
||||
/etc/pulse/client.conf r,
|
||||
@{HOME}/.pulse-cookie rwk,
|
||||
owner /root/.pulse-cookie rwk,
|
||||
owner /root/.pulse/ rw,
|
||||
owner /root/.pulse/* rw,
|
||||
/usr/share/alsa/** r,
|
||||
owner /tmp/pulse-*/ rw,
|
||||
owner /tmp/pulse-*/* rw,
|
||||
/var/lib/dbus/machine-id r,
|
||||
|
||||
# access to firmware's etc
|
||||
/usr/share/kvm/** r,
|
||||
/usr/share/qemu/** r,
|
||||
/usr/share/bochs/** r,
|
||||
@ -69,3 +94,16 @@
|
||||
/usr/bin/qemu-sparc32plus rmix,
|
||||
/usr/bin/qemu-sparc64 rmix,
|
||||
/usr/bin/qemu-x86_64 rmix,
|
||||
|
||||
# for save and resume
|
||||
/bin/dash rmix,
|
||||
/bin/dd rmix,
|
||||
/bin/cat rmix,
|
||||
|
||||
# The svirt driver does not relabel the state file
|
||||
# (https://bugzilla.redhat.com/show_bug.cgi?id=529363) resulting in denied
|
||||
# messages. Uncommenting these lines can work around this somewhat by
|
||||
# allowing users to save state files in the specified directory. We use
|
||||
# 'owner' to make sure we don't overwrite the user's files.
|
||||
#owner @{HOME}/libvirt-state-files/ r,
|
||||
#owner @{HOME}/libvirt-state-files/** rw,
|
||||
|
@ -23,6 +23,9 @@
|
||||
capability mknod,
|
||||
|
||||
network inet stream,
|
||||
network inet dgram,
|
||||
network inet6 stream,
|
||||
network inet6 dgram,
|
||||
|
||||
# Very lenient profile for libvirtd since we want to first focus on confining
|
||||
# the guests. Guests will have a very restricted profile.
|
||||
@ -32,6 +35,7 @@
|
||||
/sbin/* Ux,
|
||||
/usr/bin/* Ux,
|
||||
/usr/sbin/* Ux,
|
||||
/usr/lib/libvirt/* Ux,
|
||||
|
||||
# force the use of virt-aa-helper
|
||||
audit deny /sbin/apparmor_parser rwxl,
|
||||
|
@ -14,7 +14,7 @@
|
||||
__func__, __LINE__)
|
||||
#define DEBUG(fmt, ...) printf("%s:%d: " fmt "\n", \
|
||||
__func__, __LINE__, __VA_ARGS__)
|
||||
#define STREQ(a,b) (strcmp((a),(b)) == 0)
|
||||
#define STREQ(a,b) (strcmp(a,b) == 0)
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__((__unused__))
|
||||
@ -335,9 +335,10 @@ int main(int argc, char **argv)
|
||||
|
||||
sts = poll(&pfd, 1, TIMEOUT_MS);
|
||||
|
||||
/* We are assuming timeout of 0 here - so execute every time */
|
||||
if(t_cb && t_active)
|
||||
/* if t_timeout < 0 then t_cb must not be called */
|
||||
if (t_cb && t_active && t_timeout >= 0) {
|
||||
t_cb(t_timeout,t_opaque);
|
||||
}
|
||||
|
||||
if (sts == 0) {
|
||||
/* DEBUG0("Poll timeout"); */
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
|
||||
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la $(COVERAGE_LDFLAGS)
|
||||
LDADDS = $(STATIC_BINARIES) $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la $(COVERAGE_LDFLAGS)
|
||||
|
||||
noinst_PROGRAMS=info1
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
|
||||
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la $(COVERAGE_LDFLAGS)
|
||||
LDADDS = $(STATIC_BINARIES) $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la $(COVERAGE_LDFLAGS)
|
||||
|
||||
noinst_PROGRAMS=suspend
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
EXTRA_DIST= \
|
||||
README \
|
||||
dominfo.py domrestore.py domsave.py domstart.py
|
||||
dominfo.py domrestore.py domsave.py domstart.py esxlist.py
|
||||
|
@ -8,7 +8,26 @@ domstart.py - create a domU from an XML description if the domU isn't
|
||||
running yet
|
||||
domsave.py - save all running domU's into a directory
|
||||
domrestore.py - restore domU's from their saved files in a directory
|
||||
esxlist.py - list active domains of an VMware ESX host and print some info.
|
||||
also demonstrates how to use the libvirt.openAuth() method
|
||||
|
||||
The XML files in this directory are examples of the XML format that libvirt
|
||||
expects, and will have to be adapted for your setup. They are only needed
|
||||
for domstart.py
|
||||
|
||||
|
||||
Some additional notes for the esxlist.py example:
|
||||
|
||||
You may see remote errors complaining about missing certificates:
|
||||
|
||||
Cannot access CA certificate '/usr/local/etc/pki/CA/cacert.pem': No such file
|
||||
or directory
|
||||
|
||||
This is expected, libvirt tries to find network and storage drivers for ESX,
|
||||
but those are not implemented yet (November 2009). While searching for this
|
||||
drivers, libvirt may try to start a local libvirtd instance, but fails because
|
||||
of the missing certificates. It'll warn about that:
|
||||
|
||||
Failed to find the network: Is the daemon running?
|
||||
|
||||
This is also expected and can be ignored.
|
||||
|
155
examples/python/esxlist.py
Executable file
155
examples/python/esxlist.py
Executable file
@ -0,0 +1,155 @@
|
||||
#! /usr/bin/python
|
||||
# esxlist - list active domains of an ESX host and print some info.
|
||||
# also demonstrates how to use the libvirt.openAuth() method
|
||||
|
||||
import libvirt
|
||||
import sys
|
||||
import os
|
||||
import libxml2
|
||||
import getpass
|
||||
|
||||
|
||||
def usage():
|
||||
print "Usage: %s HOSTNAME" % sys.argv[0]
|
||||
print " List active domains of HOSTNAME and print some info"
|
||||
|
||||
|
||||
# This is the callback method passed to libvirt.openAuth() (see below).
|
||||
#
|
||||
# The credentials argument is a list of credentials that libvirt (actually
|
||||
# the ESX driver) would like to request. An element of this list is itself a
|
||||
# list containing 5 items (4 inputs, 1 output):
|
||||
# - the credential type, e.g. libvirt.VIR_CRED_AUTHNAME
|
||||
# - a prompt to be displayed to the user
|
||||
# - a challenge, the ESX driver sets this to the hostname to allow automatic
|
||||
# distinction between requests for ESX and vCenter credentials
|
||||
# - a default result for the request
|
||||
# - a place to store the actual result for the request
|
||||
#
|
||||
# The user_data argument is the user data item of the auth argument (see below)
|
||||
# passed to libvirt.openAuth().
|
||||
def request_credentials(credentials, user_data):
|
||||
for credential in credentials:
|
||||
if credential[0] == libvirt.VIR_CRED_AUTHNAME:
|
||||
# prompt the user to input a authname. display the provided message
|
||||
credential[4] = raw_input(credential[1] + ": ")
|
||||
|
||||
# if the user just hits enter raw_input() returns an empty string.
|
||||
# in this case return the default result through the last item of
|
||||
# the list
|
||||
if len(credential[4]) == 0:
|
||||
credential[4] = credential[3]
|
||||
elif credential[0] == libvirt.VIR_CRED_NOECHOPROMPT:
|
||||
# use the getpass module to prompt the user to input a password.
|
||||
# display the provided message and return the result through the
|
||||
# last item of the list
|
||||
credential[4] = getpass.getpass(credential[1] + ": ")
|
||||
else:
|
||||
return -1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def print_section(title):
|
||||
print "\n%s" % title
|
||||
print "=" * 60
|
||||
|
||||
|
||||
def print_entry(key, value):
|
||||
print "%-10s %-10s" % (key, value)
|
||||
|
||||
|
||||
def print_xml(key, ctx, path):
|
||||
res = ctx.xpathEval(path)
|
||||
|
||||
if res is None or len(res) == 0:
|
||||
value = "Unknown"
|
||||
else:
|
||||
value = res[0].content
|
||||
|
||||
print_entry(key, value)
|
||||
|
||||
return value
|
||||
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
usage()
|
||||
sys.exit(2)
|
||||
|
||||
|
||||
hostname = sys.argv[1]
|
||||
|
||||
# Connect to libvirt
|
||||
uri = "esx://%s/?no_verify=1" % hostname
|
||||
|
||||
# The auth argument is a list that contains 3 items:
|
||||
# - a list of supported credential types
|
||||
# - a callable that takes 2 arguments
|
||||
# - user data that will be passed to the callable as second argument
|
||||
#
|
||||
# In this example the supported credential types are VIR_CRED_AUTHNAME and
|
||||
# VIR_CRED_NOECHOPROMPT, the callable is the unbound method request_credentials
|
||||
# (see above) and the user data is None.
|
||||
#
|
||||
# libvirt (actually the ESX driver) will call the callable to request
|
||||
# credentials in order to log into the ESX host. The callable would also be
|
||||
# called if the connection URI would reference a vCenter to request credentials
|
||||
# in order to log into the vCenter
|
||||
auth = [[libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_NOECHOPROMPT],
|
||||
request_credentials, None]
|
||||
conn = libvirt.openAuth(uri, auth, 0)
|
||||
|
||||
if conn is None:
|
||||
print "Failed to open connection to %s" % hostname
|
||||
sys.exit(1)
|
||||
|
||||
state_names = { libvirt.VIR_DOMAIN_RUNNING : "running",
|
||||
libvirt.VIR_DOMAIN_BLOCKED : "idle",
|
||||
libvirt.VIR_DOMAIN_PAUSED : "paused",
|
||||
libvirt.VIR_DOMAIN_SHUTDOWN : "in shutdown",
|
||||
libvirt.VIR_DOMAIN_SHUTOFF : "shut off",
|
||||
libvirt.VIR_DOMAIN_CRASHED : "crashed",
|
||||
libvirt.VIR_DOMAIN_NOSTATE : "no state" }
|
||||
|
||||
for id in conn.listDomainsID():
|
||||
domain = conn.lookupByID(id)
|
||||
info = domain.info()
|
||||
|
||||
print_section("Domain " + domain.name())
|
||||
print_entry("ID:", id)
|
||||
print_entry("UUID:", domain.UUIDString())
|
||||
print_entry("State:", state_names[info[0]])
|
||||
print_entry("MaxMem:", info[1])
|
||||
print_entry("UsedMem:", info[2])
|
||||
print_entry("VCPUs:", info[3])
|
||||
|
||||
# Read some info from the XML desc
|
||||
print_section("Devices of " + domain.name())
|
||||
|
||||
xmldesc = domain.XMLDesc(0)
|
||||
doc = libxml2.parseDoc(xmldesc)
|
||||
ctx = doc.xpathNewContext()
|
||||
devs = ctx.xpathEval("/domain/devices/*")
|
||||
first = True
|
||||
|
||||
for d in devs:
|
||||
ctx.setContextNode(d)
|
||||
|
||||
if not first:
|
||||
print "------------------------------------------------------------"
|
||||
else:
|
||||
first = False
|
||||
|
||||
print_entry("Device", d.name)
|
||||
|
||||
type = print_xml("Type:", ctx, "@type")
|
||||
|
||||
if type == "file":
|
||||
print_xml("Source:", ctx, "source/@file")
|
||||
print_xml("Target:", ctx, "target/@dev")
|
||||
elif type == "block":
|
||||
print_xml("Source:", ctx, "source/@dev")
|
||||
print_xml("Target:", ctx, "target/@dev")
|
||||
elif type == "bridge":
|
||||
print_xml("Source:", ctx, "source/@bridge")
|
||||
print_xml("MAC Addr:", ctx, "mac/@address")
|
@ -333,12 +333,70 @@ struct _virDomainInterfaceStats {
|
||||
*/
|
||||
typedef virDomainInterfaceStatsStruct *virDomainInterfaceStatsPtr;
|
||||
|
||||
/**
|
||||
* Memory Statistics Tags:
|
||||
*/
|
||||
typedef enum {
|
||||
/* The total amount of data read from swap space (in kB). */
|
||||
VIR_DOMAIN_MEMORY_STAT_SWAP_IN = 0,
|
||||
/* The total amount of memory written out to swap space (in kB). */
|
||||
VIR_DOMAIN_MEMORY_STAT_SWAP_OUT = 1,
|
||||
|
||||
/*
|
||||
* Page faults occur when a process makes a valid access to virtual memory
|
||||
* that is not available. When servicing the page fault, if disk IO is
|
||||
* required, it is considered a major fault. If not, it is a minor fault.
|
||||
* These are expressed as the number of faults that have occurred.
|
||||
*/
|
||||
VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT = 2,
|
||||
VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT = 3,
|
||||
|
||||
/*
|
||||
* The amount of memory left completely unused by the system. Memory that
|
||||
* is available but used for reclaimable caches should NOT be reported as
|
||||
* free. This value is expressed in kB.
|
||||
*/
|
||||
VIR_DOMAIN_MEMORY_STAT_UNUSED = 4,
|
||||
|
||||
/*
|
||||
* The total amount of usable memory as seen by the domain. This value
|
||||
* may be less than the amount of memory assigned to the domain if a
|
||||
* balloon driver is in use or if the guest OS does not initialize all
|
||||
* assigned pages. This value is expressed in kB.
|
||||
*/
|
||||
VIR_DOMAIN_MEMORY_STAT_AVAILABLE = 5,
|
||||
|
||||
/*
|
||||
* The number of statistics supported by this version of the interface.
|
||||
* To add new statistics, add them to the enum and increase this value.
|
||||
*/
|
||||
VIR_DOMAIN_MEMORY_STAT_NR = 6,
|
||||
} virDomainMemoryStatTags;
|
||||
|
||||
typedef struct _virDomainMemoryStat virDomainMemoryStatStruct;
|
||||
|
||||
struct _virDomainMemoryStat {
|
||||
int tag;
|
||||
unsigned long long val;
|
||||
};
|
||||
|
||||
typedef virDomainMemoryStatStruct *virDomainMemoryStatPtr;
|
||||
|
||||
|
||||
/* Domain core dump flags. */
|
||||
typedef enum {
|
||||
VIR_DUMP_CRASH = (1 << 0), /* crash after dump */
|
||||
VIR_DUMP_LIVE = (1 << 1), /* live dump */
|
||||
} virDomainCoreDumpFlags;
|
||||
|
||||
/* Domain migration flags. */
|
||||
typedef enum {
|
||||
VIR_MIGRATE_LIVE = (1 << 0), /* live migration */
|
||||
VIR_MIGRATE_PEER2PEER = (1 << 1), /* direct source -> dest host control channel */
|
||||
VIR_MIGRATE_TUNNELLED = (1 << 2), /* tunnel migration data over libvirtd connection */
|
||||
VIR_MIGRATE_PERSIST_DEST = (1 << 3), /* persist the VM on the destination */
|
||||
VIR_MIGRATE_UNDEFINE_SOURCE = (1 << 4), /* undefine the VM on the source */
|
||||
VIR_MIGRATE_PAUSED = (1 << 5), /* pause on remote side */
|
||||
} virDomainMigrateFlags;
|
||||
|
||||
/* Domain migration. */
|
||||
@ -487,6 +545,8 @@ int virConnectClose (virConnectPtr conn);
|
||||
const char * virConnectGetType (virConnectPtr conn);
|
||||
int virConnectGetVersion (virConnectPtr conn,
|
||||
unsigned long *hvVer);
|
||||
int virConnectGetLibVersion (virConnectPtr conn,
|
||||
unsigned long *libVer);
|
||||
char * virConnectGetHostname (virConnectPtr conn);
|
||||
char * virConnectGetURI (virConnectPtr conn);
|
||||
|
||||
@ -633,6 +693,10 @@ int virDomainInterfaceStats (virDomainPtr dom,
|
||||
const char *path,
|
||||
virDomainInterfaceStatsPtr stats,
|
||||
size_t size);
|
||||
int virDomainMemoryStats (virDomainPtr dom,
|
||||
virDomainMemoryStatPtr stats,
|
||||
unsigned int nr_stats,
|
||||
unsigned int flags);
|
||||
int virDomainBlockPeek (virDomainPtr dom,
|
||||
const char *path,
|
||||
unsigned long long offset,
|
||||
@ -928,6 +992,10 @@ virInterfacePtr virInterfaceLookupByMACString (virConnectPtr conn,
|
||||
const char* virInterfaceGetName (virInterfacePtr iface);
|
||||
const char* virInterfaceGetMACString (virInterfacePtr iface);
|
||||
|
||||
typedef enum {
|
||||
VIR_INTERFACE_XML_INACTIVE = 1 /* dump inactive interface information */
|
||||
} virInterfaceXMLFlags;
|
||||
|
||||
char * virInterfaceGetXMLDesc (virInterfacePtr iface,
|
||||
unsigned int flags);
|
||||
virInterfacePtr virInterfaceDefineXML (virConnectPtr conn,
|
||||
@ -1647,6 +1715,47 @@ int virStreamAbort(virStreamPtr st);
|
||||
int virStreamFree(virStreamPtr st);
|
||||
|
||||
|
||||
int virDomainIsActive(virDomainPtr dom);
|
||||
int virDomainIsPersistent(virDomainPtr dom);
|
||||
|
||||
int virNetworkIsActive(virNetworkPtr net);
|
||||
int virNetworkIsPersistent(virNetworkPtr net);
|
||||
|
||||
int virStoragePoolIsActive(virStoragePoolPtr pool);
|
||||
int virStoragePoolIsPersistent(virStoragePoolPtr pool);
|
||||
|
||||
int virInterfaceIsActive(virInterfacePtr iface);
|
||||
|
||||
int virConnectIsEncrypted(virConnectPtr conn);
|
||||
int virConnectIsSecure(virConnectPtr conn);
|
||||
|
||||
/*
|
||||
* CPU specification API
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
VIR_CPU_COMPARE_ERROR = -1,
|
||||
VIR_CPU_COMPARE_INCOMPATIBLE = 0,
|
||||
VIR_CPU_COMPARE_IDENTICAL = 1,
|
||||
VIR_CPU_COMPARE_SUPERSET = 2
|
||||
} virCPUCompareResult;
|
||||
|
||||
/**
|
||||
* virConnectCompareCPU:
|
||||
*
|
||||
* @conn: virConnect connection
|
||||
* @xmlDesc: XML description of either guest or host cpu with <cpu> root tag
|
||||
* @flags: comparison flags
|
||||
*
|
||||
* Compares given CPU with host cpu.
|
||||
*
|
||||
* Returns virCPUCompareResult.
|
||||
*/
|
||||
int virConnectCompareCPU(virConnectPtr conn,
|
||||
const char *xmlDesc,
|
||||
unsigned int flags);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -68,6 +68,7 @@ typedef enum {
|
||||
VIR_FROM_ESX, /* Error from ESX driver */
|
||||
VIR_FROM_PHYP, /* Error from IBM power hypervisor */
|
||||
VIR_FROM_SECRET, /* Error from secret storage */
|
||||
VIR_FROM_CPU, /* Error from CPU driver */
|
||||
} virErrorDomain;
|
||||
|
||||
|
||||
@ -170,6 +171,10 @@ typedef enum {
|
||||
VIR_WAR_NO_SECRET, /* failed to start secret storage */
|
||||
VIR_ERR_INVALID_SECRET, /* invalid secret */
|
||||
VIR_ERR_NO_SECRET, /* secret not found */
|
||||
VIR_ERR_CONFIG_UNSUPPORTED, /* unsupported configuration construct */
|
||||
VIR_ERR_OPERATION_TIMEOUT, /* timeout occurred during operation */
|
||||
VIR_ERR_MIGRATE_PERSIST_FAILED, /* a migration worked, but making the
|
||||
VM persist on the dest host failed */
|
||||
} virErrorNumber;
|
||||
|
||||
/**
|
||||
|
@ -53,12 +53,14 @@
|
||||
%define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}}
|
||||
%define with_numactl 0%{!?_without_numactl:%{server_drivers}}
|
||||
%define with_selinux 0%{!?_without_selinux:%{server_drivers}}
|
||||
%define with_hal 0%{!?_without_hal:%{server_drivers}}
|
||||
|
||||
# A few optional bits off by default, we enable later
|
||||
%define with_polkit 0%{!?_without_polkit:0}
|
||||
%define with_capng 0%{!?_without_capng:0}
|
||||
%define with_netcf 0%{!?_without_netcf:0}
|
||||
%define with_udev 0%{!?_without_udev:0}
|
||||
%define with_hal 0%{!?_without_hal:0}
|
||||
%define with_yajl 0%{!?_without_yajl:0}
|
||||
|
||||
# Non-server/HV driver defaults which are always enabled
|
||||
%define with_python 0%{!?_without_python:1}
|
||||
@ -72,6 +74,10 @@
|
||||
%define with_xen 0
|
||||
%endif
|
||||
|
||||
# Numactl is not available on s390[x]
|
||||
%ifarch s390 s390x
|
||||
%define with_numactl 0
|
||||
%endif
|
||||
|
||||
# RHEL doesn't ship OpenVZ, VBox, UML, OpenNebula, PowerHypervisor or ESX
|
||||
%if 0%{?rhel}
|
||||
@ -129,6 +135,18 @@
|
||||
%define with_netcf 0%{!?_without_netcf:%{server_drivers}}
|
||||
%endif
|
||||
|
||||
# udev is used to manage host devices in Fedora 12 / RHEL-6 or newer
|
||||
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
|
||||
%define with_udev 0%{!?_without_udev:%{server_drivers}}
|
||||
%else
|
||||
%define with_hal 0%{!?_without_hal:%{server_drivers}}
|
||||
%endif
|
||||
|
||||
# Enable yajl library for JSON mode with QEMU
|
||||
%if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
|
||||
%define with_yajl 0%{!?_without_yajl:%{server_drivers}}
|
||||
%endif
|
||||
|
||||
# Force QEMU to run as non-root
|
||||
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
|
||||
%define qemu_user qemu
|
||||
@ -175,6 +193,9 @@ Requires: iptables
|
||||
%if %{with_hal}
|
||||
Requires: hal
|
||||
%endif
|
||||
%if %{with_udev}
|
||||
Requires: udev >= 145
|
||||
%endif
|
||||
%if %{with_polkit}
|
||||
%if 0%{?fedora} >= 12 || 0%{?rhel} >=6
|
||||
Requires: polkit >= 0.93
|
||||
@ -238,6 +259,13 @@ BuildRequires: gnutls-devel
|
||||
%if %{with_hal}
|
||||
BuildRequires: hal-devel
|
||||
%endif
|
||||
%if %{with_udev}
|
||||
BuildRequires: libudev-devel >= 145
|
||||
BuildRequires: libpciaccess-devel >= 0.10.9
|
||||
%endif
|
||||
%if %{with_yajl}
|
||||
BuildRequires: yajl-devel
|
||||
%endif
|
||||
%if %{with_avahi}
|
||||
BuildRequires: avahi-devel
|
||||
%endif
|
||||
@ -308,7 +336,7 @@ BuildRequires: libcap-ng-devel >= 0.5.0
|
||||
BuildRequires: libssh2-devel
|
||||
%endif
|
||||
%if %{with_netcf}
|
||||
BuildRequires: netcf-devel
|
||||
BuildRequires: netcf-devel >= 0.1.4
|
||||
%endif
|
||||
|
||||
# Fedora build root suckage
|
||||
@ -341,7 +369,7 @@ virtualization capabilities of recent versions of Linux (and other OSes).
|
||||
%package devel
|
||||
Summary: Libraries, includes, etc. to compile with the libvirt library
|
||||
Group: Development/Libraries
|
||||
Requires: libvirt = %{version}-%{release}
|
||||
Requires: libvirt-client = %{version}-%{release}
|
||||
Requires: pkgconfig
|
||||
%if %{with_xen}
|
||||
Requires: xen-devel
|
||||
@ -472,6 +500,14 @@ of recent versions of Linux (and other OSes).
|
||||
%define _without_hal --without-hal
|
||||
%endif
|
||||
|
||||
%if ! %{with_udev}
|
||||
%define _without_udev --without-udev
|
||||
%endif
|
||||
|
||||
%if ! %{with_yajl}
|
||||
%define _without_yajl --without-yajl
|
||||
%endif
|
||||
|
||||
%configure %{?_without_xen} \
|
||||
%{?_without_qemu} \
|
||||
%{?_without_openvz} \
|
||||
@ -498,6 +534,8 @@ of recent versions of Linux (and other OSes).
|
||||
%{?_without_netcf} \
|
||||
%{?_without_selinux} \
|
||||
%{?_without_hal} \
|
||||
%{?_without_udev} \
|
||||
%{?_without_yajl} \
|
||||
--with-qemu-user=%{qemu_user} \
|
||||
--with-qemu-group=%{qemu_group} \
|
||||
--with-init-script=redhat \
|
||||
@ -672,9 +710,6 @@ fi
|
||||
%if %{with_network}
|
||||
%dir %{_localstatedir}/run/libvirt/network/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/iptables/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/iptables/filter/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/iptables/nat/
|
||||
%endif
|
||||
|
||||
%if %{with_qemu}
|
||||
@ -739,6 +774,8 @@ fi
|
||||
%{_datadir}/libvirt/schemas/secret.rng
|
||||
%{_datadir}/libvirt/schemas/storageencryption.rng
|
||||
|
||||
%{_datadir}/libvirt/cpu_map.xml
|
||||
|
||||
%if %{with_sasl}
|
||||
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
|
||||
%endif
|
||||
@ -778,6 +815,23 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Feb 3 2010 Daniel Veillard <veillard@redhat.com> - 0.7.6-1
|
||||
|
||||
* Wed Dec 23 2009 Daniel Veillard <veillard@redhat.com> - 0.7.5-1
|
||||
- Add new API virDomainMemoryStats
|
||||
- Public API and domain extension for CPU flags
|
||||
- vbox: Add support for version 3.1
|
||||
- Support QEMU's virtual FAT block device driver
|
||||
- a lot of fixes
|
||||
|
||||
* Fri Nov 20 2009 Daniel Veillard <veillard@redhat.com> - 0.7.3-1
|
||||
- udev node device backend
|
||||
- API to check object properties
|
||||
- better QEmu monitor processing
|
||||
- MAC address based port filtering for qemu
|
||||
- support IPv6 and multiple addresses per interfaces
|
||||
- a lot of fixes
|
||||
|
||||
* Tue Sep 15 2009 Daniel Veillard <veillard@redhat.com> - 0.7.1-1
|
||||
- ESX, VBox driver updates
|
||||
- mutipath support
|
||||
|
@ -2,13 +2,18 @@ daemon/dispatch.c
|
||||
daemon/libvirtd.c
|
||||
daemon/remote.c
|
||||
daemon/stream.c
|
||||
src/conf/cpu_conf.c
|
||||
src/conf/domain_conf.c
|
||||
src/conf/domain_event.c
|
||||
src/conf/interface_conf.c
|
||||
src/conf/network_conf.c
|
||||
src/conf/node_device_conf.c
|
||||
src/conf/secret_conf.c
|
||||
src/conf/storage_conf.c
|
||||
src/conf/storage_encryption_conf.c
|
||||
src/cpu/cpu.c
|
||||
src/cpu/cpu_map.c
|
||||
src/cpu/cpu_x86.c
|
||||
src/datatypes.c
|
||||
src/interface/netcf_driver.c
|
||||
src/libvirt.c
|
||||
@ -17,16 +22,21 @@ src/lxc/lxc_controller.c
|
||||
src/lxc/lxc_driver.c
|
||||
src/network/bridge_driver.c
|
||||
src/node_device/node_device_driver.c
|
||||
src/node_device/node_device_hal_linux.c
|
||||
src/node_device/node_device_linux_sysfs.c
|
||||
src/node_device/node_device_udev.c
|
||||
src/nodeinfo.c
|
||||
src/opennebula/one_conf.c
|
||||
src/opennebula/one_driver.c
|
||||
src/openvz/openvz_conf.c
|
||||
src/openvz/openvz_driver.c
|
||||
src/phyp/phyp_driver.c
|
||||
src/qemu/qemu_bridge_filter.c
|
||||
src/qemu/qemu_conf.c
|
||||
src/qemu/qemu_driver.c
|
||||
src/qemu/qemu_monitor.c
|
||||
src/qemu/qemu_monitor_json.c
|
||||
src/qemu/qemu_monitor_text.c
|
||||
src/qemu/qemu_security_dac.c
|
||||
src/remote/remote_driver.c
|
||||
src/secret/secret_driver.c
|
||||
src/security/security_driver.c
|
||||
@ -46,9 +56,11 @@ src/uml/uml_conf.c
|
||||
src/uml/uml_driver.c
|
||||
src/util/bridge.c
|
||||
src/util/conf.c
|
||||
src/util/iptables.c
|
||||
src/util/hostusb.c
|
||||
src/util/json.c
|
||||
src/util/logging.c
|
||||
src/util/pci.c
|
||||
src/util/processinfo.c
|
||||
src/util/storage_file.c
|
||||
src/util/util.c
|
||||
src/util/uuid.c
|
||||
|
8712
po/bn_IN.po
8712
po/bn_IN.po
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user