AD

ubuntu使用virt manager kvm

标签: it 分类: linux及相关工具

  1. 首先在确定自己的CPU支持硬件虚拟化,有些可能要在BIOS中开启

找到 Intel Virtualization Technlogy 并打开

  1. 要确定自己的内核支持KVM

    uname -a

  2. 2.6以上的内核一般都支持
  3. 安装KVM和virt软件包
    virt-manager (图形化管理工具) python-vm-builder (创建基于Ubuntu的虚拟机的脚本,可选)

    sudo apt-get install kvm ubuntu-virt-server kvm-pxe
    sudo apt-get install virt-manager
    sudo apt-get install python-vm-builder

  4. 配置kvm
    加载相关内核模块:

    sudo modprobe kvm
    sudo modprobe kvm-intel

AMD 使用下面这条

<!-- lang: shell -->
sudo modprobe kvm-amd

验证加载成功:

<!-- lang: shell -->
lsmod | grep kvm
kvm_intel              61643  0
kvm                   383822  1 kvm_intel

  1. 确认开启libvirtd后台服务

    sudo service libvirt-bin status
    libvirt-bin start/running, process 6715

  2. 配置网络
    在libvirt软件包安装完成之后,会默认配置一个虚拟的网络桥接设备virbr0。它提供了一个虚拟网络供guest使用(通过NAT转发,提供从guest到外部网络-outbound的通讯)。其默认ip地址为192.168.122.x。

如果要获得完整的网络访问(inbound/outbound),进行如下配置(可选):

<!-- lang: shell -->
sudo apt-get install bridge-utils
sudo vi /etc/network/interfaces

内容如下:

auto lo

iface lo inet loopback

添加以下部分

auto eth0
iface eth0 inet dhcp

auto br0
iface br0 inet dhcp

    bridge_ports eth0
    bridge_fd 9
    bridge_hello 2
    bridge_maxage 12
    bridge_stp off

重启网络

<!-- lang: shell -->
sudo /etc/init.d/networking restart

检测网络配置

<!-- lang: shell -->
ifconfig

可以同时看到br0和eth0

  1. 添加用户权限
    将当前用户添加到libvirtd和kvm用户组

    sudo adduser userid libvirtd
    sudo adduser userid kvm

然后重启一下电脑,不然权限可能会有问题。

  1. 用virt-manager创建kvm guest

    virt-manager

在里面创建自己的虚拟机就可以了,用法跟其它的虚拟机差不多,然后安装系统即可。

标签: kvm
分类: linux
时间: 2015-05-12

相关文章

  1. ubuntu startup file manager has been started there is a solution

    This situation occurs, generally nautilus problem, but the rest of the system services to start, and the termi ...
  2. kvm virtual machine ubuntu server in the installation and use of

    ubuntu server installation in kvm virtual machine Server environment: ubuntu 11.04 amd64, cpu in the bios to t ...
  3. kvm ubuntu server in the installation and use of virtual machines

    ubuntu server installation in kvm virtual machine Server environment: ubuntu 11.04 amd64, cpu in the bios to t ...
  4. First install Ubuntu can not start graphical interface, graphical interface to install

    If the initial installation of Ubuntu can not start the graphical interface, it is likely that you install the ...
  5. Ubuntu Tips: Ubuntu software installation method is completely manual (turn)

    Just getting started with Ubuntu users often have this problem, I want to install new software how to do?. Exe ...
  6. linux virtual combat - kvm (kernel-based virtual machine)

    Environment: CentOS5.5 Desktop Environment: CentOS5.5 (for Ubuntu Desktop) 2 Installing KVM CentOS 5.2 KVM hos ...
  7. Ubuntu in the desktop environment to install and uninstall Gnome.KDE.XFACE

    Ubuntu, Gnome, KDE, XFACE desktop environment to install and uninstall A) In the terminal run the installation ...
  8. Linux ubuntu lamp install and configure the environment phpmyadmin

    Indicate Reprinted: http://farlee.info/archives/linux-ubuntu-lamp-apache-mysql-php-phpmyadmin-install-configur ...
  9. Why choose Ubuntu system as a server where the copied someone else's

    Why choose Ubuntu system as a server? Ubuntu official website recently listed Why choose Ubuntu Server Edition ...
  10. Comparison KVM Xen Virtualization

    Linux users of virtualization technology There are two free, open source management program can choose: Xen an ...
  11. kvm基本原理2

    KVM的思想是在Linux内个的基础上添加虚拟机管理模块,重用Linux内核中已经完善的进程调度,内存管理,IO管理等部分,因此KVM并不是一个完整的模拟器,而只是一个提供虚拟化功能的内核插件,具体的模拟器工作是借助QE ...
  12. 安装Cloud Stack Agent端(即Host主机也就是物理服务器)

    作者:沈小然 日期:2013-11-15 安装Cloud Stack代理(即Host主机端物理服务器) 本文安装版本:cloudstack-agent-4.2.0-1 官网参考文档: http://cloudstack. ...
  13. Linux学习视频教程

    source: . http://www.boobooke.com/bbs/viewthread.php?tid=4623 [Videos]海明老师Linux版视频收集贴(6.14更新) Ubuntu 9 Linux系列 ...
  14. mysql-master-ha:mysql master高可用性管理工具

    mysql-master-ha : mysql master 高可用性管理工具 一. MHA 介绍 MHA 自动化主服务器故障转移,快速将从服务器晋级为主服务器 ( 通常在 10-30s) ,而不影响复制的一致性,不需要 ...
  15. [MHA]mysql-master-ha:mysql master高可用性管理工具 (转)

    转自:http://hi.baidu.com/cloudhorizon/item/26bf393b2f142642033edc94 Centos安装参考:http://ylw6006.blog.51cto.com/470 ...
  16. 运维自动化.虚拟化

    一.运维自动化:ansible.saltstack 1.安装Ansible: rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8 ...
  17. ASP.NET 5系列教程 (二):Hello World

    本篇文章内容比较基础,主要是向大家展示如何创建一个 ASP.NET 5 工程,主要包含内容如下: 创建ASP.NET 5 工程 添加 Todo 控制器 安装 K Version Manager 执行 EF 迁移 打开Vi ...
  18. Ubuntu下的KVM详解

    1. 首先检查Bios中是否已经打开VT-x(intel)或者SVM(AMD)支持. 2. 检查kernel版本,确认不是运行在Xen下(kvm与Xen不兼容) $uname -a Linux XXXXXX-ThinkC ...
  19. Ubuntu archive manager to extract the rar files

    1. To the official website RAR download rar for linux http://www.rarlab.com/download.htm 2. Unzip, modify make ...