試用過程以下:php
環境: Ubuntu 14.04 64bitpython
2, 啓動 linux 系統 (強烈建議裝64位的linux版本,不然虛擬機內存將被限制在2G以內)mysql
(1)查看一下linux是32位仍是64位linux
file /bin/ls
返回結果中將顯示 64bit 或 32bitsql
(2)確認一下 CPU支持硬件虛擬化 apache
egrep -o '(vmx|svm)' /proc/cpuinfo
若是有結果顯示,就OKwindows
3, 安裝相關軟件包網絡
(爲了下載快,安裝前要把apt的源改成 163.com或sohu.com)ide
開始安裝 post
$ sudo apt-get install qemu-kvm qemu-system libvirt-bin bridge-utils
libvirt-bin provides libvirtd which you need to administer qemu and kvm instances using libvirt
qemu-kvm 是虛擬機 (qemu is the backend)
bridge-utils 用於網絡橋接 (provides a bridge from your network to the virtual machines)
sudo apt-get install virt-manager python-spice-client-gtk
kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be used
這代表你的CPU不支持硬件虛擬化。 這時你仍是能夠跑虛擬機,不過會很是慢。
sudo lsmod | grep kvm
sudo modprobe kvm
apt-get install xserver-xorg
apt-get install x-window-system-core
dpkg-reconfigure xserver-xorg
apt-get install gnome-core
apt-get install gdm xscreensaver
startx
virt-manager
apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql phpmyadmin
chmod -R 777 /var/www