{"id":120918,"date":"2018-09-26T08:32:26","date_gmt":"2018-09-26T00:32:26","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=120918"},"modified":"2018-09-25T10:33:41","modified_gmt":"2018-09-25T02:33:41","slug":"management-command-virsh","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/management-command-virsh.html","title":{"rendered":"\u804a\u804a\uff1akvm\u865a\u62df\u673a\u7ba1\u7406\u547d\u4ee4virsh\u7684\u57fa\u672c\u64cd\u4f5c"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nKernel-based Virtual Machine\u7684\u7b80\u79f0\uff0c\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u7cfb\u7edf\u865a\u62df\u5316\u6a21\u5757\uff0c\u81eaLinux 2.6.20\u4e4b\u540e\u96c6\u6210\u5728Linux\u7684\u5404\u4e2a\u4e3b\u8981\u53d1\u884c\u7248\u672c\u4e2d\u3002\u5b83\u4f7f\u7528Linux\u81ea\u8eab\u7684\u8c03\u5ea6\u5668\u8fdb\u884c\u7ba1\u7406\uff0c\u6240\u4ee5\u76f8\u5bf9\u4e8eXen\uff0c\u5176\u6838\u5fc3\u6e90\u7801\u5f88\u5c11\u3002KVM\u76ee\u524d\u5df2\u6210\u4e3a\u5b66\u672f\u754c\u7684\u4e3b\u6d41VMM\u4e4b\u4e00\u3002\u5176\u4e2dvirsh\u662fkvm\u865a\u62df\u673a\u5e38\u7528\u7684\u7ba1\u7406\u5de5\u5177\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u547d\u4ee4\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

1\u3001\u67e5\u770b\u5728\u8fd0\u884c\u7684\u865a\u62df\u673a<\/strong><\/div>\n
\r\nvirsh list\r\n<\/pre>\n
2\u3001\u67e5\u770b\u521b\u5efa\u7684\u6240\u6709\u865a\u62df\u673a<\/strong><\/div>\n
\r\nvirsh list --all\r\n<\/pre>\n
3\u3001\u542f\u52a8\u865a\u62df\u673a<\/strong><\/div>\n
\r\nvirsh start win10\r\n\r\nwin10\u662f\u865a\u62df\u673a\u7684domain\u540d\u79f0\uff0c\u4e0b\u540c\u3002\r\n<\/pre>\n
4\u3001\u6302\u8d77\u865a\u62df\u673a<\/strong><\/div>\n
\r\nvirsh suspend win10\r\n<\/pre>\n
5\u3001\u6062\u590d\u88ab\u6302\u8d77\u7684\u865a\u62df\u673a<\/strong><\/div>\n
\r\nvirsh resume win10\r\n<\/pre>\n
6\u3001\u5f00\u673a\u542f\u52a8\u865a\u62df\u673a\uff0c\u5373\u5728\u865a\u62df\u673a\u670d\u52a1\uff08libvirt\uff09\u542f\u52a8\u7684\u65f6\u5019\uff0c\u5c31\u542f\u52a8\u865a\u62df\u673a\u3002<\/strong><\/div>\n
\r\nvirsh autostart win10\r\n<\/pre>\n
7\u3001\u5173\u95ed\u5f00\u673a\u542f\u52a8\u865a\u62df\u673a<\/strong><\/div>\n
\r\nvirsh auto start --disable win10\r\n<\/pre>\n
8\u3001\u5173\u95ed\u865a\u62df\u673a\uff08\u9700\u8981ACPID\u670d\u52a1\u7684\u652f\u6301\uff0cACPI\u662fAdvanced Configuration and PowerInterface\u7f29\u5199\uff0c\u9ad8\u7ea7\u914d\u7f6e\u548c\u7535\u6e90\u7ba1\u7406\u63a5\u53e3 <\/strong><\/div>\n
\r\nvirsh shutdown win10\r\n<\/pre>\n
9\u3001\u5f3a\u5236\u5173\u95ed\u865a\u62df\u673a\uff0c\u8fd9\u79cd\u65b9\u5f0f\u662f\u4ecevirsh list\u5217\u8868\u4e2d\u5c06\u865a\u62df\u673a\u5220\u9664\uff0c\u4ecd\u7136\u53ef\u4ee5start\u8d77\u6765<\/strong><\/div>\n
\r\nvirsh destory win10\r\n<\/pre>\n
10\u3001\u542f\u52a8\u9ed8\u8ba4\u7684\u7f51\u7edc<\/strong><\/div>\n
\r\nvirsh net-start default\r\n<\/pre>\n
11\u3001\u81ea\u542f\u52a8\u9ed8\u8ba4\u7f51\u7edc<\/strong><\/div>\n
\r\nvirsh net-autostart default\r\n<\/pre>\n
12\u3001\u5f7b\u5e95\u5220\u9664\u865a\u62df\u673a\u6b65\u9aa4<\/strong><\/div>\n
\r\n1\uff09\u5173\u95ed\u865a\u62df\u673a\uff1avirsh destroy win10\r\n\r\n2\uff09\u5220\u9664\u5b9a\u4e49\uff1avirsh undefine win10\r\n\r\n3\uff09\u5220\u9664\u865a\u62df\u673a\u6587\u4ef6\uff08\u5728\/var\/lib\/libvirtd\/\u4e0b\u7684\u76f8\u5173\u6587\u4ef6\uff09\r\n<\/pre>\n
\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/www.toutiao.com\/a6603952037619040781\/<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttps:\/\/lrxjmw.cn\/management-command-virsh.html\u200e<\/a>\u7f16\u8f91\uff1a\u738b\u5065\u8fbe\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb Kernel-based Virtual Machine\u7684\u7b80\u79f0\uff0c\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u7cfb\u7edf\u865a\u62df\u5316\u6a21\u5757\uff0c\u81eaLinux […]<\/p>\n","protected":false},"author":1893,"featured_media":120920,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-120918","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/120918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1893"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=120918"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/120918\/revisions"}],"predecessor-version":[{"id":121480,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/120918\/revisions\/121480"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/120920"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=120918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=120918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=120918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}