{"id":383,"date":"2015-10-27T09:30:28","date_gmt":"2015-10-27T01:30:28","guid":{"rendered":"https:\/\/drho.club\/?p=383"},"modified":"2015-10-27T09:30:28","modified_gmt":"2015-10-27T01:30:28","slug":"python-libvirt-classes","status":"publish","type":"post","link":"https:\/\/104.es\/index.php\/2015\/10\/27\/python-libvirt-classes\/","title":{"rendered":"Python-libvirt\u7684\u4e3b\u8981\u985e\u5225\u4ee5\u53ca\u61c9\u7528"},"content":{"rendered":"<p style=\"font-family: \u5fae\u8edf\u6b63\u9ed1\u9ad4; font-size: 12pt; line-height: 200%; letter-spacing: 2pt;\">\u5728\u524d\u9762\u7684\u5e7e\u7bc7\u6587\u7ae0\u4e2d\u6709\u7c21\u55ae\u5730\u4ecb\u7d39\u4f7f\u7528python-libvirt\u4f86\u64cd\u4f5cVM\u7684\u4fbf\u5229\u6027\uff0c\u5728\u9019\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5011\u518d\u4f86\u7c21\u55ae\u5730\u4ecb\u7d39\u9019\u500b\u7a0b\u5f0f\u5eab\u4e2d\u6709\u54ea\u4e9b\u985e\u5225\u53ef\u4ee5\u4f7f\u7528\uff0c\u4ee5\u53ca\u900f\u904e\u5f71\u7247\u4f86\u793a\u7bc4\u64cd\u4f5c\u7684\u65b9\u6cd5\u3002\u7576\u7136\uff0c\u8981\u505a\u9019\u4e9b\u64cd\u4f5c\u4e4b\u524d\uff0c\u5047\u8a2d\u4f60\u5df2\u7d93\u5728\u4f60\u7684Host\u6a5f\u5668\u4e2d\u5206\u5225\u5b89\u88dd\u4e86qemu-kvm\u4ee5\u53calibvirt\u548cpython-libvirt\u7b49\u76f8\u95dc\u7684\u7a0b\u5f0f\uff0c\u6b64\u5916\u8981\u80fd\u5920\u9806\u5229\u5730\u4f7f\u7528Live Migration\u7684\u529f\u80fd\uff0cNFS\u4e5f\u8981\u5b89\u88dd\u4ee5\u53ca\u6b63\u78ba\u5730\u8a2d\u5b9a\u597d\u76f8\u5c0d\u61c9\u7684\u76ee\u9304\u624d\u884c\u3002\u6211\u5011\u4f7f\u7528\u7684\u662fCentOS 7\u7576\u505a\u662fHost\u7684\u4f5c\u696d\u7cfb\u7d71\u3002<\/p>\n<p style=\"font-family: \u5fae\u8edf\u6b63\u9ed1\u9ad4; font-size: 12pt; line-height: 200%; letter-spacing: 2pt;\">\u5728Python-libvirt\u4e2d\uff0c\u5b83\u628alibvirt API\u90fd\u5305\u88dd\u8d77\u4f86\uff0c\u7136\u5f8c\u4f9d\u7167\u5176\u529f\u80fd\uff0c\u5206\u6210\u5e7e\u500bClass\u4f86\u64cd\u4f5c\uff0c\u5206\u5225\u662fvirConnect, virDomain, virNetwork, , virInterface, virStoragePool, virStorageVol, virNodeDevice, virSecret, virNWFilter, virStream, virDomainSnapshot, \u3002\u9019\u4e9b\u6211\u5011\u6703\u5206\u5225\u5728\u5f8c\u7e8c\u7684\u6587\u7ae0\u4e2d\u505a\u4ecb\u7d39\uff0c\u800c\u5176\u4e2d\u6709\u4e00\u4e9b\u5df2\u7d93\u5728\u524d\u9762\u7684\u6587\u7ae0\u61c9\u7528\u904e\u4e86\u3002\u4ee5\u4e0b\u4e9b\u793a\u7bc4\u5982\u4f55\u7c21\u55ae\u5730\u64cd\u4f5c\u55ae\u4e00\u7684\u865b\u64ec\u6a5f\u3002<\/p>\n<p><iframe loading=\"lazy\" title=\"\u5728Python\u4ea4\u8ac7\u5f0f\u4ecb\u9762\u4e2d\u64cd\u4f5cVM\" width=\"640\" height=\"480\" src=\"https:\/\/www.youtube.com\/embed\/EEBABuGKiw4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p style=\"font-family: \u5fae\u8edf\u6b63\u9ed1\u9ad4; font-size: 12pt; line-height: 200%; letter-spacing: 2pt;\">\u5728\u5f71\u7247\u4e2d\u9996\u5148\u662f\u5728OS\u4e0b\u900f\u904evirsh command\u986f\u793a\u7576\u524d\u865b\u64ec\u6a5f\u7684\u72c0\u614b\uff0c\u7136\u5f8c\u9032\u5165Python\u7684\u4ea4\u8ac7\u5f0f\u4ecb\u9762\u4e2d\uff0c\u628a\u8a72\u865b\u64ec\u6a5f\u958b\u555f\u57f7\u884c\u4e4b\u3002\u53e6\u5916\uff0c\u6211\u5011\u9084\u793a\u7bc4\u5982\u4f55\u4f7f\u7528Python\u4ecb\u9762\u4e2d\u7684dir\u547d\u4ee4\uff0c\u5217\u51fa\u6240\u6709\u53ef\u4ee5\u61c9\u7528\u5728domain\u4e0a\u7684\u65b9\u6cd5\uff0c\u770b\u8d77\u4f86\u975e\u5e38\u591a\uff0c\u7528\u6cd5\u53ef\u4ee5\u518d\u53e6\u5916\u67e5\u8a62\u3002<\/p>\n<p style=\"font-family: \u5fae\u8edf\u6b63\u9ed1\u9ad4; font-size: 12pt; line-height: 200%; letter-spacing: 2pt;\">\u6700\u5f8c\uff0c\u6211\u5011\u9000\u51faPython\u4e4b\u5f8c\uff0c\u518d\u7528virsh command\u7684list\u6aa2\u8996\uff0c\u8a72\u865b\u64ec\u6a5f\u78ba\u5be6\u662f\u88ab\u6211\u5011\u958b\u555f\u57f7\u884c\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728Python-libvirt\u4e2d\uff0c\u5b83\u628alibvirt API\u90fd\u5305\u88dd\u8d77\u4f86\uff0c\u7136\u5f8c\u4f9d\u7167\u5176\u529f\u80fd\uff0c\u5206\u6210\u5e7e\u500bClass\u4f86\u64cd\u4f5c\uff0c\u5206\u5225\u662fvirConnect, virDomain, virNetwork, virStoragePool, virStorageVol, \u4ee5\u53cavirNodeDev\u3002\u9019\u4e9b\u6211\u5011\u6703\u5206\u5225\u5728\u5f8c\u7e8c\u7684\u6587\u7ae0\u4e2d\u505a\u4ecb\u7d39\uff0c\u800c\u5176\u4e2d\u6709\u4e00\u4e9b\u5df2\u7d93\u5728\u524d\u9762\u7684\u6587\u7ae0\u61c9\u7528\u904e\u4e86\u3002\u4ee5\u4e0b\u4e9b\u793a\u7bc4\u5982\u4f55\u7c21\u55ae\u5730\u64cd\u4f5c\u55ae\u4e00\u7684\u865b\u64ec\u6a5f\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[97,15,100],"tags":[167],"class_list":["post-383","post","type-post","status-publish","format-standard","hentry","category-kvm-libvirt","category-python","category-vm","tag-python-libvirt"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/posts\/383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/comments?post=383"}],"version-history":[{"count":0,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/posts\/383\/revisions"}],"wp:attachment":[{"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/media?parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/categories?post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/tags?post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}