Ubuntu16.04中安装KVM

基本的 Ubuntu 操作系统装好之后,安装 KVM 需要的包

1、在此之前先确认是否CPU支持虚拟化

 执行命令:   egrep -o '(vmx|svm)' /proc/cpuinfo

如何有返回值则说明支持,例如返回带有vmx的值

2、配置国内镜像源,否则会出现各种无法安装的问题(遇到很多稀奇古怪的问题)

现在用的是阿里源, cd  /etc/apt 修改sources.list文件中的内容

deb http: //mirrors .aliyun.com /ubuntu/ xenial main restricted universe multiverse 
deb http: //mirrors .aliyun.com /ubuntu/ xenial-security main restricted universe multiverse 
deb http: //mirrors .aliyun.com /ubuntu/ xenial-updates main restricted universe multiverse 
deb http: //mirrors .aliyun.com /ubuntu/ xenial-backports main restricted universe multiverse 
##测试版源 
deb http: //mirrors .aliyun.com /ubuntu/ xenial-proposed main restricted universe multiverse 
# 源码 
deb-src http: //mirrors .aliyun.com /ubuntu/ xenial main restricted universe multiverse 
deb-src http: //mirrors .aliyun.com /ubuntu/ xenial-security main restricted universe multiverse 
deb-src http: //mirrors .aliyun.com /ubuntu/ xenial-updates main restricted universe multiverse 
deb-src http: //mirrors .aliyun.com /ubuntu/ xenial-backports main restricted universe multiverse 
##测试版源 
deb-src http: //mirrors .aliyun.com /ubuntu/ xenial-proposed main restricted universe multiverse 
# Canonical 合作伙伴和附加 
deb http: //archive .canonical.com /ubuntu/ xenial partner 
deb http: //extras .ubuntu.com /ubuntu/ xenial main

修改后sudo apt-get update


3、 安装KVM及相关依赖包

sudo apt-get install qemu-kvm
sudo apt-get install qemu
sudo apt-get install virt-manager
sudo apt-get install virt-viewer
sudo apt-get install libvirt-bin

sudo apt-get install bridge-utils

4、

 确认 Libvirtd 服务已经启动

# service libvirt-bin status

libvirt-bin start/running, process 1478

5、启动KVM验证

完成KVM安装



  • 1
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值