ubuntu使用virt manager kvm

2015-05-12  来源:本站原创  分类:linux  人气:1673 

标签: 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

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

相关文章
  • ubuntu使用virt manager kvm 2015-05-12

    标签: it 分类: linux及相关工具 首先在确定自己的CPU支持硬件虚拟化,有些可能要在BIOS中开启 找到 Intel Virtualization Technlogy 并打开 要确定自己的内核支持KVM uname -a 2.6以上的内核一般都支持 安装KVM和virt软件包 virt-manager (图形化管理工具) python-vm-builder (创建基于Ubuntu的虚拟机的脚本,可选) sudo apt-get install kvm ubuntu-virt-serve

  • ubuntu startup file manager has been started there is a solution 2011-04-03

    This situation occurs, generally nautilus problem, but the rest of the system services to start, and the terminal to normal operation, based on this, the solution is as follows: 1, in a terminal type nautilus, if the problem continues to occur, can b

  • kvm virtual machine ubuntu server in the installation and use of 2011-09-13

    ubuntu server installation in kvm virtual machine Server environment: ubuntu 11.04 amd64, cpu in the bios to turn on the vt. Installing software sudo apt-get install kvm libvirt-bin python-vm-builder Configure virtual machine networking I am here to

  • kvm ubuntu server in the installation and use of virtual machines 2011-09-13

    ubuntu server installation in kvm virtual machine Server environment: ubuntu 11.04 amd64, cpu in the bios to turn on the vt. Installing software sudo apt-get install kvm libvirt-bin python-vm-builder Configure virtual machine networking I have used h

  • First install Ubuntu can not start graphical interface, graphical interface to install 2010-09-15

    If the initial installation of Ubuntu can not start the graphical interface, it is likely that you install the Ubuntu version, graphical interface package, then. You need to download Ubuntu's graphical interface package. Solution as follows (reproduc

  • Ubuntu Tips: Ubuntu software installation method is completely manual (turn) 2010-11-12

    Just getting started with Ubuntu users often have this problem, I want to install new software how to do?. Exe files are where and how software has so many formats? RPM packages,. Tar.gz What is it? How is the installation can not ah?, Etc. etc., etc

  • linux virtual combat - kvm (kernel-based virtual machine) 2010-11-18

    Environment: CentOS5.5 Desktop Environment: CentOS5.5 (for Ubuntu Desktop) 2 Installing KVM CentOS 5.2 KVM host: Run system-config-securitylevel And open the SELinux (SELinux is disabled if you, virt-install will not work.) Then check whether the CPU

  • Ubuntu in the desktop environment to install and uninstall Gnome.KDE.XFACE 2010-12-10

    Ubuntu, Gnome, KDE, XFACE desktop environment to install and uninstall A) In the terminal run the installation: 1, the installation XFACE: sudo apt-get install xubuntu-desktop point above the menu "Applications - Accessories - Terminal" into the

  • Linux ubuntu lamp install and configure the environment phpmyadmin 2010-12-30

    Indicate Reprinted: http://farlee.info/archives/linux-ubuntu-lamp-apache-mysql-php-phpmyadmin-install-configuration.html of FarLee PHP development and server operating environment of choice LAMP combination, that Linux + Apache + Mysql + Php / Perl /

  • Why choose Ubuntu system as a server where the copied someone else's 2010-12-31

    Why choose Ubuntu system as a server? Ubuntu official website recently listed Why choose Ubuntu Server Edition operating system, the six reasons, respectively, from the cost, system integration, virtualization, cloud computing, security, system manag

  • Comparison KVM Xen Virtualization 2011-05-12

    Linux users of virtualization technology There are two free, open source management program can choose: Xen and KVM. As virtualization technology appeared earlier, Xen is a "first class" on the run on bare metal hypervisor (Hypervisor), is also

  • kvm基本原理2 2013-04-01

    KVM的思想是在Linux内个的基础上添加虚拟机管理模块,重用Linux内核中已经完善的进程调度,内存管理,IO管理等部分,因此KVM并不是一个完整的模拟器,而只是一个提供虚拟化功能的内核插件,具体的模拟器工作是借助QEMU来完成的. 在Xen的体系结构中,Xen Hypervisor运行于硬件之上,并且将系统资源进行了虚拟化,将虚拟化的资源分配给上层的虚拟机(VM),然后通过虚拟机VM来运行相应的客户机操作系统. 在KVM中,一个虚拟机就是一个传统的Linux中的进程,拥有自己的PID号,也可

  • 安装Cloud Stack Agent端(即Host主机也就是物理服务器) 2013-11-15

    作者:沈小然 日期:2013-11-15 安装Cloud Stack代理(即Host主机端物理服务器) 本文安装版本:cloudstack-agent-4.2.0-1 官网参考文档: http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Installation_Guide/hypervisor-installation.html 总统来说,安装部署CloudStack Agent端很简单,只要安装后Agent的

  • Linux学习视频教程 2010-06-09

    source: . http://www.boobooke.com/bbs/viewthread.php?tid=4623 [Videos]海明老师Linux版视频收集贴(6.14更新) Ubuntu 9 Linux系列培训: -------------------安装篇--------------------- [V]海明工作室 - Ubuntu 9 Linux系列培训 - 1 简介 [V]海明工作室 - Ubuntu 9 Linux系列培训 - 2 安装篇-CD [V]海明工作室 - Ubu

  • mysql-master-ha:mysql master高可用性管理工具 2014-03-23

    mysql-master-ha : mysql master 高可用性管理工具 一. MHA 介绍 MHA 自动化主服务器故障转移,快速将从服务器晋级为主服务器 ( 通常在 10-30s) ,而不影响复制的一致性,不需要花钱买更多的新服务器,不会有性能损耗,容易安装,不必更改现有的部署环境,适用于任何存储引擎. MHA 提供在线主服务器切换,改变先正运行的主服务器到另外一台上,这个过程只需 0.5-2s 的时间,这个时间内数据无法写入. MHA Manager 通过 ssh 连接 mysql s

  • [MHA]mysql-master-ha:mysql master高可用性管理工具 (转) 2014-03-23

    转自:http://hi.baidu.com/cloudhorizon/item/26bf393b2f142642033edc94 Centos安装参考:http://ylw6006.blog.51cto.com/470441/890360 一.MHA介绍 MHA自动化主服务器故障转移,快速将从服务器晋级为主服务器(通常在10-30s),而不影响复制的一致性,不需要花钱买更多的新服务器,不会有性能损耗,容易安装,不必更改现有的部署环境,适用于任何存储引擎. MHA提供在线主服务器切换,改变先正运

  • 运维自动化.虚拟化 2014-08-03

    一.运维自动化:ansible.saltstack 1.安装Ansible: rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum install ansible 2. 安装saltstack: rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum insta

  • ASP.NET 5系列教程 (二):Hello World 2014-12-25

    本篇文章内容比较基础,主要是向大家展示如何创建一个 ASP.NET 5 工程,主要包含内容如下: 创建ASP.NET 5 工程 添加 Todo 控制器 安装 K Version Manager 执行 EF 迁移 打开Visual Studio 2015 Preview.选择 "File" 菜单,选择New > Project. 在New Project 对话框中,点击Templates > Visual C# > Web,选择ASP.NET Web Applicati

  • Ubuntu下的KVM详解 2012-01-03

    1. 首先检查Bios中是否已经打开VT-x(intel)或者SVM(AMD)支持. 2. 检查kernel版本,确认不是运行在Xen下(kvm与Xen不兼容) $uname -a Linux XXXXXX-ThinkCentre-M58p 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:05:14 UTC 2011 i686 i686 i386 GNU/Linux 3. 安装kvm和virt软件包 $sudo apt-get install kvm

  • Ubuntu archive manager to extract the rar files 2010-02-03

    1. To the official website RAR download rar for linux http://www.rarlab.com/download.htm 2. Unzip, modify makefile file prefix = / usr / local / RAR, and then run the command line: sudo make install 3. To establish the soft link: sudo ln-s / usr / lo