{"id":561,"date":"2015-11-12T20:38:49","date_gmt":"2015-11-12T12:38:49","guid":{"rendered":"http:\/\/www.datarelab.com\/blog\/?p=561"},"modified":"2015-11-12T20:40:51","modified_gmt":"2015-11-12T12:40:51","slug":"ubuntu-server-kvm-qemu-%e6%90%ad%e5%bb%ba%e8%99%9a%e6%8b%9f%e6%9c%ba","status":"publish","type":"post","link":"https:\/\/www.datarelab.com\/blog\/Technical_literature\/561.html","title":{"rendered":"Ubuntu Server + kvm + qemu \u642d\u5efa\u865a\u62df\u673a"},"content":{"rendered":"<p><strong>\u67e5\u770bcpu\u662f\u5426\u652f\u6301\u3002<\/strong><br \/>\n$ grep vmx \/proc\/cpuinfo<br \/>\nflags\u6807\u8bb0\u4e2d\u5b58\u5728vmx\u5373\u53ef<br \/>\n<strong>\u5b89\u88c5kvm+qemu<\/strong><br \/>\n$ sudo apt-get install kvm qemu libvirt-bin virtinst virt-manager virt-viewer<br \/>\n<strong>\u67e5\u770bkvm\u662f\u5426\u5b89\u88c5\u6210\u529f<\/strong><br \/>\n$ sudo virsh -c qemu:\/\/\/system list<br \/>\n<strong>\u521b\u5efa kvm\u6587\u4ef6\u5939<\/strong><br \/>\n$ sudo mkdir \/home\/kvm<br \/>\n<strong>\u7528qemu-img\u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u865a\u62df\u78c1\u76d8<\/strong><br \/>\n$ qemu-img create -f qcow2 \/home\/kvm\/ubuntu1204.img 10G<br \/>\n<em>NOTE:create\u610f\u601d\u662f\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u78c1\u76d8\uff0c-f\u6307\u5b9a\u8be5\u78c1\u76d8\u7684\u7c7b\u578b\uff0c\u53ef\u4ee5\u521b\u5efaraw\u7684\uff0c\u4e5f\u53ef\u4ee5\u521b\u5efavmware\u517c\u5bb9\u7684\uff0c\u8fd9\u91cc\u9009\u62e9qcow2,qemu\u81ea\u5df1\u7684\u7c7b\u578b\u6765\u5b89\u88c5ubuntu\uff0c\u63a5\u4e0b\u91cc\u7684\u53c2\u6570\u5c31\u662f\u865a\u62df\u78c1\u76d8\u7684\u6587\u4ef6\u540d\uff0c\u53ef\u4ee5\u653e\u5728\u4f60\u559c\u6b22\u7684\u4efb\u4f55\u5730\u65b9\uff0c\u7136\u540e\u5c31\u662f\u78c1\u76d8\u521d\u59cb\u5927\u5c0f\uff0c\u4e00\u822c5G\uff0c10G\u90fd\u53ef\u4ee5\uff0cqemu\u7684\u78c1\u76d8\u5927\u5c0f\u662f\u968f\u7740\u9700\u8981\u53ef\u4ee5\u81ea\u52a8\u7684\u589e\u5927\u7684\uff0c\u6240\u4ee5\u521d\u59cb\u53ef\u4ee5\u9009\u62e9\u5c0f\u70b9\u3002<\/em><br \/>\n<em>\u4e0b\u8f7d\u955c\u50cf\u5305\u5e76\u4e14\u5b89\u88c5\u865a\u62df\u673a\u64cd\u4f5c\u7cfb\u7edf<\/em><br \/>\n<em>\u4e0a\u4f20iso\u955c\u50cf<\/em><br \/>\n<span style=\"color: #ff0000;\">$ sudo qemu-system-x86_64 -hda \/home\/kvm\/ubuntu1204.img -cdrom \/home\/kvm\/ubuntu-12.04-server-amd64.iso -boot d -m 1024 -no-acpi -vga std -k en-us -vnc :1<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong>VNC Viewer \u8fde\u63a5\u6210\u529f\u540e\u95ea\u9000\u7684\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p>\u4f9d\u6b21\u70b9Option--&gt;Advanced--&gt;Expert\u627e\u5230ColourLevel\uff0c\u9ed8\u8ba4\u503c\u662fpal8\uff0c\u4fee\u6539\u4e3argb222\u6216full\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u67e5\u770bcpu\u662f\u5426\u652f\u6301\u3002 $ grep vmx \/proc\/cpuinfo flags\u6807\u8bb0\u4e2d\u5b58\u5728vmx\u5373\u53ef \u5b89\u88c5k [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-561","post","type-post","status-publish","format-standard","hentry","category-Technical_literature"],"views":1499,"_links":{"self":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/comments?post=561"}],"version-history":[{"count":0,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/561\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/media?parent=561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/categories?post=561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/tags?post=561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}