reference:https://help.ubuntu.com/community/KVM/Installation
Installation
Pre-installation checklist
Check that your CPU supports hardware virtualization
To run KVM, you need a processor that supports hardware virtualization. Intel and AMD both have developed extensions for their processors, deemed respectively Intel VT-x (code name Vanderpool) and AMD-V (code name Pacifica). To see if your processor supports one of these, you can review the output from this command:
egrep -c '(vmx|svm)' /proc/cpuinfo
If 0 it means that your CPU doesn't support hardware virtualization.
If 1 or more it does - but you still need to make sure that virtualization is enabled in the BIOS.
By default, if you booted into XEN kernel it will not display svm or vmx flag using the grep command. To see if it is enabled or not from xen, enter:
cat /sys/hypervisor/properties/capabilities
You must see hvm flags in the output.
Alternatively, you may execute:
kvm-ok
which may provide an output like this:
INFO: /dev/kvm exists KVM acceleration can be used
If you see :
INFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used
You can still run virtual machines, but it'll be much slower without the KVM extensions.
NOTE: You may see a message like "KVM acceleration can/can NOT be used". This is misleading and only means if KVM is *currently* available (i.e. "turned on"), *not* if it is supported.
Use a 64 bit kernel (if possible)
Running a 64 bit kernel on the host operating system is recommended but not required.
-
To serve more than 2GB of RAM for your VMs, you must use a 64-bit kernel (see 32bit_and_64bit). On a 32-bit kernel install, you'll be limited to 2GB RAM at maximum for a given VM.
- Also, a 64-bit system can host both 32-bit and 64-bit guests. A 32-bit system can only host 32-bit guests.
To see if your processor is 64-bit, you can run this command:
egrep -c ' lm ' /proc/cpuinfo
If 0 is printed, it means that your CPU is not 64-bit.
If 1 or higher, it is. Note: lm stands for Long Mode which equates to a 64-bit CPU.
Now see if your running kernel is 64-bit, just issue the following command:
uname -m
x86_64 indicates a running 64-bit kernel. If you use see i386, i486, i586 or i686, you're running a 32-bit kernel.
Note: x86_64 is synonymous with amd64.
Installation of KVM
Install Necessary Packages
For the following setup, we will assume that you are deploying KVM on a server, and therefore do not have any X server on the machine.
You need to install a few packages first:
Lucid (10.04) or later
$ sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
Karmic (9.10) or earlier
$ sudo aptitude install kvm libvirt-bin ubuntu-vm-builder bridge-utils
-
libvirt-bin provides libvirtd which you need to administer qemu and kvm instances using libvirt
-
qemu-kvm (kvm in Karmic and earlier) is the backend
-
ubuntu-vm-builder powerful command line tool for building virtual machines
-
bridge-utils provides a bridge from your network to the virtual machines
You might also want to install virt-viewer, for viewing instances.
Add Users to Groups
Karmic (9.10) and later (but not 14.04 LTS)
You need to ensure that your username is added to the group libvirtd:
$ sudo adduser `id -un` libvirtd Adding user '<username>' to group 'libvirtd' ...
After this, you need to relogin so that your user becomes an effective member of the libvirtd group. The members of this group can run virtual machines. (You can also 'newgrp kvm' in a terminal, but this will affect only that terminal.)
Releases prior to Karmic (9.10)
You need to ensure that your username is added to the groups: kvm and libvirtd.
To check:
$ groups adm dialout cdrom floppy audio dip video plugdev fuse lpadmin admin sambashare kvm libvirtd
To add your <username> to the groups:
$ sudo adduser `id -un` kvm Adding user '<username>' to group 'kvm' ... $ sudo adduser `id -un` libvirtd Adding user '<username>' to group 'libvirtd' ...
After the installation, you need to relogin so that your user becomes an effective member of kvm and libvirtd user groups. The members of this group can run virtual machines.
Verify Installation
You can test if your install has been successful with the following command:
$ virsh -c qemu:///system list Id Name State ---------------------------------- $
If on the other hand you get something like this:
$ virsh -c qemu:///system list libvir: Remote error : Permission denied error: failed to connect to the hypervisor $
Something is wrong (e.g. you did not relogin) and you probably want to fix this before you move on. The critical point here is whether or not you have write access to /var/run/libvirt/libvirt-sock.
The sock file should have permissions similar to:
$ sudo ls -la /var/run/libvirt/libvirt-sock srwxrwx--- 1 root libvirtd 0 2010-08-24 14:54 /var/run/libvirt/libvirt-sock
Also, /dev/kvm needs to be in the right group. If you see:
$ ls -l /dev/kvm crw-rw----+ 1 root root 10, 232 Jul 8 22:04 /dev/kvm
You might experience problems when creating a virtual machine. Change the device's group to kvm/libvirtd instead:
sudo chown root:libvirtd /dev/kvm
Now you need to either relogin or restart the kernel modules:
rmmod kvm modprobe -a kvm
Optional: Install virt-manager (graphical user interface)
If you are working on a desktop computer you might want to install a GUI tool to manage virtual machines.
$ sudo apt-get install virt-manager
Virtual Machine Manager will appear in Applications -> System Tools menu. First create a new connection to local QEMU instance from File ->Add Connection menu. Localhost (QEMU) or QEMU/KVM should appear in the virtual machine list. Note: there already exist Localhost (QEMU Usermode) connection but this does not work at least on Ubuntu 10.04.
Create a new virtual machine by pressing the top left Create a new virtual machine toolbar button.
Version-specific Notes
8.10 (Intrepid) Notes
-
Two meta packages have been added: ubuntu-virt-server and ubuntu-virt-mgmt. Ubuntu-virt-server installs the packages needed to setup a base virtulization host (kvm, libvirt-bin and openssh-server) and ubuntu-virt-mgmt installs what you need to administer it from a management station (virt-manager, python-vm-builder and virt-viewer).
-
ubuntu-vm-builder has been replaced by python-vm-builder (tutorial).
Note: libdevmapper does not load its module when it is installed (bug 277648) , so you will either need to do a
-
$ sudo modprobe dm-loop
or reboot your system before being able to use it.
11.10 (Oneric) Notes
Switching to the server kernel might be helpful if there are start problems with virtual machines (i.e. Windows XP freezes approximately once every 5 starts )
相关推荐
本文档详细介绍了如何在CentOS6和RHEL6操作系统上安装KVM(基于内核的虚拟机)并管理虚拟化环境。KVM是一种开源的虚拟化技术,它依赖于Linux内核中的虚拟化扩展,即Intel VT或AMD-V技术。以下是文档中提及的关键知识...
Ganeti是一款专为Linux系统设计的虚拟化管理工具,它支持基于XEN或KVM的虚拟化技术。本指南旨在详细介绍如何安装和配置Ganeti,使其能够在集群环境中有效管理和运行虚拟实例。Ganeti的设计理念是与Linux发行版无关,...
virtualizor是一个虚拟服务器(VPS)的控制面板,可以用来管理OpenVZ、XEN、KVM、XenServer等虚拟技术的VPS,功能类似于SolusVM,同样可以与WHMCS进行整合,从而实现自动化管理。 virtualizor官方网站:...
RHEL6提供了强大的虚拟化支持,包括但不限于KVM(Kernel-based Virtual Machine)技术,这是一种开源的全虚拟化解决方案,适用于Linux操作系统。KVM结合QEMU(Quick Emulator),能够提供高性能的虚拟化服务,支持...
在“Vine Installation and User Manual”中,我们将探讨如何安装VINE以及如何利用它进行恶意代码分析。 首先,VINE的安装过程可能涉及以下几个步骤: 1. **系统需求**:确保你的计算机满足VINE的硬件和软件需求,...
移至GitLabUbuntu Overssh重新安装 如果您的... 无需kvm / ipmi / vnc。 很简单,根据您的网络和预置的url文件创建修改过的iso,然后继续通过ssh进行安装。 我使用mini.iso是因为它很小,并且可以从ubuntu存储库中获取
IP地址和域名规划如下:Win7为**.**.*.**,IP-KVM为**.**.*.***,ESXi 5.5为**.**.*.***,域控制器为**.**.*.***,数据库服务器为**.**.*.***,vCenter 5.5A为**.**.*.***。 知识点四:ESXi基础配置 ESXi安装完成后...
#### CERTIFICATION OBJECTIVE 2.01: Configure KVM for Red Hat KVM (Kernel-based Virtual Machine) is an essential component for setting up virtual machines in a Red Hat environment. In this section, we...
1.安装ubuntu时使用的virt-install的配置: virt-install \ --name test4 \ --ram 1024 \ --disk path=/data/01_ubuntu/ubuntu4.img,size=6 \ --vcpus 1 \ --hvm \ --os-type linux \ --network network=default \ ...
"linux-unattended-installation"项目就是为了实现这一目标而设计的,它提供了创建最小化Linux安装程序进行无人值守安装的全面解决方案。这个项目适用于对Linux操作系统进行快速、高效且无错误的部署,尤其在需要...
- "Red_Hat_Enterprise_Linux-7-Virtualization_Deployment_and_Administration_Guide-en-US.pdf" 和其副本提供了如何在RHEL7中部署和管理KVM(Kernel-based Virtual Machine)虚拟机的详细步骤,包括创建、配置、...
KVM, VMware, VirtualBox, OpenStack 可选 服务器配置 最低1核1G,安装时所需的带宽不低于10M 建议采用按量100M带宽 组件 包含的核心组件为:MariaDB(10.1/10.2/10.3/10.4 版本可选安装),phpMyAdmin on Docke
- **Hypervisors**:OpenStack支持多种虚拟机监控程序(hypervisor),如KVM、Xen等。 - **Database Management**:通常使用MySQL或PostgreSQL作为数据库管理系统。 - **Messaging**:RabbitMQ用于消息队列管理。 - ...
安装 OpenStack Icehouse 需要对基础架构有深入理解,包括操作系统(通常为 Ubuntu 或 CentOS)、网络配置、虚拟化技术(如 KVM)以及自动化部署工具。在这个指南中,Puppet 被用作配置管理工具,Puppet 是一种流行...
Cisco Wireless LAN Small Scale Virtual Controller Installation with 60 day evaluation license (KVM) v8.10.151.0 MD5 Checksum : a71251d32654f029ad82f13f5fcf4291
installation/ 手动安装文档等 ##教学内容 ###初识OpenStack OpensSack 现场演示 详细介绍OpenStack涉及到的概念,并结合实际应用场景介绍相关概念的应用。 基本概念:Tenant、User和Role 高级概念:Region、AZ、...
1. **远程控制**:通过网络,iDRAC7可以提供远程KVM(键盘、视频、鼠标)功能,使得管理员能够像坐在服务器前一样操作服务器,无需物理接触。 2. **硬件监控**:iDRAC7能实时监控服务器的硬件状态,如温度、风扇...
- 选择KVM作为Hypervisor。 - 上传NOS安装包(nutanix_installer_package-danube-<version>-<update>.tar)至Foundation指定目录。 - 创建Cluster并设置Cluster名称、外部IP地址、DNS/NTP服务器等。 - 选择所有...