KVM 虚拟化.docxKVM 虚拟化
本人刚开始安装KVM时,,前面KVM和qemu都还好说,只是一些软件没有安装上,apt-get就可以啦,可是安装libvirt的时候遇到问题啦,virt-manager开启的时候遇到版本不兼容问题,就是那个我下载编译安装的是libvirt-,可是ubuntu软件比较新要求libvirt--manager好悲伤啊,后来弄了好久都没有成功编译安装,。当然我放弃Ubuntu的原因并不是这么简单,还有一些其他因素,希望遇到那位大神问题能够解决,然后告诉我啊。
1、libvirt的编译与安装
下载libvirt
Wget /sources/libvirt-
配置
cd libvirt-/
./configure --help
配置编译环境的命令
./configure
虚拟机修改root用户登录
vim /usr/share/lightdm/-
:greeter-show-manual-login=true 保存关闭。
Root用户登录提示错误:
解决方法为:gedit /root/.profile将文件末尾一句 mesg n 更改为:tty -s && mesg n
sudo ufw disable
在ubuntu中允许root远程访问
apt-get install -y openssh-server
编辑vim /etc/ssh/sshd_config文件,将PermitRootLogin 的值改为yes
因为为root账户设置了密码,所以还要更改PermitEmptyPasswords为 no。然后:wq保存文件,然后重启ssh服务:service ssh restart
1配置KVM
apt-get install git
git clone git://git./pub/scm/virt/kvm/
Kvm编译时出错
Make menuconfig
sudo apt-get install libncurses5-dev
sudo apt-get install libssl-dev
2 Qemu安装
Git clone git://-/
3 Libvirt安装
******@ubuntu:/# wget /sourves/libvirt-
--2016-06-10 21:56:46-- /sourves/libvirt-
******@ubuntu:/# tar -zxf libvirt-
******@ubuntu:/libvirt-# ./configure --help
******@ubuntu:/libvirt-# ./configure
configure: error: You must install the libyajl library & headers pile libvirt
在执行./configure的时候出现:You must install the libyajl library & headers pile libvirt
提示缺少libyajl库,属于JSON库。
最开始采用rpm安装该库,出错,改为采用源码安装libyajl库,该库托管在github上
安装方法:git clone git:///lloyd/yajl
cd yajl
./configure
//////////////// apt-get install cmake
make
make install
There seems to be no Makefile in this directory.
You must run ./configure before running 'make'.
GNUmakefile:106: recipe for target 'abort-due-to-no-makefile' failed
make: *** [abort-due-to-no-makefile] Error 1
sudo apt-get install libc-ares-dev
安装后需要打开
实验1基于KVM/QEMU的虚拟化环境的搭建
1
KVM 虚拟化 来自淘豆网m.daumloan.com转载请标明出处.