Installing and Configuring Fedora KVM Virtualization

   2023-02-10 学习力0
核心提示:KVM support is pre-built into the Fedora Linux kernel for Fedorarelease 7 and later. As a result KVM support is already available in thestandard kernel negating the need to install and boot from a specialkernel.The tools required to setup a

KVM support is pre-built into the Fedora Linux kernel for Fedora release 7 and later. As a result KVM support is already available in the standard kernel negating the need to install and boot from a special kernel.

The tools required to setup and maintain virtualized system are not, however, installed by default. To fully utilize the KVM support built into the kernel the following packages are required:

  • qemu-kvm
  • virt-manager
  • virt-viewer
  • python-virtinst

Check to find out if these packages are already installed on your system by running the following commands:

rpm -q qemu-kvm virt-manager virt-viewer python-virtinst

If any of these packages are reported as not installed they may be installed using the yum package manager:

su -
yum install qemu-kvm virt-manager virt-viewer python-virtinst

The packages required to implement virtualization can change from one Fedora release to the next. To avoid the necessity to know the exact package names to install, the required packages can also be installed as a group as follows:

yum groupinstall 'Virtualization'

This command will install all the required packages.

[edit ] Building a Fedora KVM Virtual System

Virtual systems can easily be configured using either the virt-install command-line tool, or the virt-manager GUI tool. For the purposes of this chapter we will use the virt-manager tool.

Begin by launching virt-manager either by selecting the Applications->System Tools->Virtual Machine Manager or from the command-line in a terminal window by running virt-manager . Once loaded, the virtual manager will prompt for the root password prior to displaying the following screen:


Installing and Configuring Fedora KVM Virtualization

@import "/extensions/GoogleAdSense/GoogleAdSense.css";
<script type="text/javascript">&lt;!-- e9 = new Object(); e9.size = &quot;300x250&quot;; e9.noAd = 1; //--&gt;</script>Installing and Configuring Fedora KVM Virtualization
<noscript> &lt;img src="http://b.scorecardresearch.com/b?c1=8&amp;c2=2102&amp;c3=106&amp;c4=502380&amp;c5=&amp;c6=&amp;c15=&amp;c16=&amp;cv=1.3&amp;cj=1" style="display:none" width="0" height="0" alt="" /&gt; </noscript>

The main virt-manager screen lists the current virtual machines running on the system. At this point there should only be one, the host system. By default the manager should be connected to the host. If it is not, connect to the host system by right clicking on the entry in the list and selecting Connect from the popup menu. The Status field for this VM should now change to Active , and the New button at the bottom of the dialog should be enabled.

To create a new virtual system, click on the New button to display the first configuration screen. Click the Forward button to proceed to the Naming screen and enter a name for the virtual system which can be any name you choose. On this screen, also select the location of the media from which the guest operating system will be installed. This can either be a CD or DVD drive, an ISO image file accessible to the local host or a network install using HTTP, FTP, NFS or PXE:


Installing and Configuring Fedora KVM Virtualization


Clicking Forward once more will display a screen seeking additional information about the installation process. The screen displayed and information required will depend on selection made in the preceding screen. For example, if a CD, DVD or ISO was selected, this screen will ask for the specific location of the ISO file or physical device.

[edit ] Configuring the KVM Virtual System

Clicking Forward once more will display a screen seeking additional information about the installation process. The screen displayed and information required will depend on selection made in the preceding screen. For example, if a CD, DVD or ISO was selected, this screen will ask for the specific location of the ISO file or physical device. This screen also asks that you specify the type and version of the guest operating system to be installed (for example Windows Vista or Ubuntu Linux):


Installing and Configuring Fedora KVM Virtualization


Once these settings are complete, click Forward to configure CPU and memory settings. The optimal settings will depend on the number of CPUs and amount of physical memory present in the host and the requirements of other applications and virtual machines that will run in parallel with the new virtual machine:


Installing and Configuring Fedora KVM Virtualization


The last item to configure before creating the virtual machine is the storage space for the guest operating system and corresponding user data. This takes the form of a virtual disk drive. A virtual disk drive is essentially an image file hosted on the file system of the host computer which is seen by the virtual machine as a physical disk drive.

Options are available to create an image disk of a specified size, select a pre-existing volume or to create a storage volume of a specified format (raw, vmdk, iso etc). Unless you have a specific need to use a particular format (for example you might need to use vmdk to migrate to a VMware based virtualization environment at a later date) or need to use a dedicated disk or partition, it is generally safe to simply specify a size on this screen. The option is also available to pre-allocate the space now. If you choose not to pre-allocate the space, space will be allocated up to the specified maximum only as it is needed by the guest operating system. This has the advantage that space on the host file system is not used until it is needed. Downsides are that performance may degrade as space is allocated in real-time and allocation will fail if another process uses up the free space on the host file system before it can be assigned to the virtual machine:


Installing and Configuring Fedora KVM Virtualization


Once these settings are configured, click the Forward key once more. The final screen displays a summary of the configuration. Review the information displayed. Advanced options are also available to configure bridged networking (where the virtual machine has direct access to a host network adapter) and to configure a specific MAC address if required:

Installing and Configuring Fedora KVM Virtualization


注意:做好选择网桥,这需要事先在主机上配置好网桥,具体的配置过程参见本博相关文章。

Starting the KVM Virtual System

Click on the Finish button to begin the creation process. The virtualization manager will create the disk and configure KVM before starting the system. Once started, the guest OS installation will begin:


Installing and Configuring Fedora KVM Virtualization


From this point on, simply follow the operating installation instructions to install the guest OS.

 
反对 0举报 0 评论 0
 

免责声明:本文仅代表作者个人观点,与乐学笔记(本网)无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
    本网站有部分内容均转载自其它媒体,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责,若因作品内容、知识产权、版权和其他问题,请及时提供相关证明等材料并与我们留言联系,本网站将在规定时间内给予删除等相关处理.

  • [转]Fedora 15 安装与配置一览
    Fedora 15 将于2011.5.24日发布,今日离正式版发布还有4天。笨兔兔这里提前给大家支招用好Fedora 15。下面是笨兔兔在安装、配置Fedora 15 过程中的小结,希望给大家配置自己的Fedora 15 带来方便。仅供参考,如有错误,敬请指出。『一』安装介绍Fedora 15 Bet
    03-08
  • 新换的 Fedora Core Linux 桌面,来秀一秀(多
    1、桌面、终端、文件浏览器,已经设置好字体、自动挂载硬盘,不是很麻烦2、即时通讯:QQ,Skype3、firefox4、D4X、BT、电驴5、开发工具:eclipse netbeans6、openoffice 大开 word 公式文档,输出 PDF7、小企鹅输入法,支持微软双拼8、星际译王,linux 下免费
    02-10
  • Fedora 14添加RPM Fusion源
    RPM Fusion 是 Fedora 和 Red Hat 企业版的软件仓库,是由Dribble, Freshrpms 和 RPM Fusion 合并而来的。各种各样的应用程序包含在这个软件仓库中,比如MP3、未加密的DVD 、Mplayer, VLX, Xine 等多媒体应用程序使用的解码库,以及闭源的 Nvidia 和 ATI 显卡
    02-10
  • Fedora中安装VMtools步骤 vmware虚拟机安装fedo
      第一次玩Fedora的系统,通过VMware工具安装的一个虚拟机,由于公司要求尽可能的留有足够空间,所以安装的时候就没选开发环境选项。安装成功后,又要准备安装VMware--tools工具,在此记录安装的过程,以及安装过程中遇到的一些问题。一、准备工作  确保
    02-10
  • Fedora 23 配置
    刻到u盘上下好iso后准备刻录到u盘...可是查了一下只能在用一个叫dd的东西刻= =于是学了下...然而就是一句话:dd if=/path/xxx.iso of=/dev/sdx其中前面是文件,后面是盘,注意是整个盘sdx而不是什么sdx1啥的,注意这样做会格式化整个盘...请不要乱实验...。(
    02-10
  • Fedora 9安装说明 Fedor
     Fedora 9 安装手册◆准备工作硬件       硬盘空间:5G以上;       内存容量:384 M以上(256M也可以,但在分区后会提示您启用swap分区);       光盘介质:Fedora 9 安装光盘(1张DVD);设置BIOS为从光盘引导;启动计算机,将安装盘的
    02-10
  • fedora linux源代码下载
    fedora linux源代码下载
    yumdownloader --source kernel如果是下载insight就是 yumdownloader --source insight下载到的是当前目录.然后在用rpm2cpio 生成 压缩文件rpm2cpio insight-7.4.50-8.20120403cvs.fc17.src.rpm|cpio -idrpm2cpio 的使用 在 http://www.rpm.org/max-rpm/s1-rp
    02-10
  • Fedora 7系统安装配置心得(转)(有图哦)
    Fedora 7系统安装配置心得(转)(有图哦)
    计算机基本配置如下: CPU:Intel Core 2 Duo E4300 显卡:NVidia GeForce 7600GS 主板:ABit IB9(P965+ICH8) 内存2G/硬盘160G 安装时选择用户定制,加上开发环境,以防止编译时找不到相关的模块. 系统内核为默认的2.6.21-1.3194.fc7. 以下配置基于Gnome环境. 来
    02-10
  • fedora27安装DB2 Express-C 11
    首先在官网下载对应的安装包和语言包两个文件。然后通过tar -zxvf命令将下载的两个文件解压。其中一个文件解压后是名为expc的文件,进入这个文件。里面有一个名为db2setup的文件。在命令行下首先通过命令su切换到超级用户,然后通过./db2setup进入图形化界面
    02-10
  • Red Hat Linux、rhel 和 Fedora Core 以及 Cent
    Red Hat Linux、rhel 和 Fedora Core 以及 Centos 区别与联系1. Red Hat LinuxLinux是GNU/Linux的缩写,通常指各种Linux发行版的通称,Red Hat Linux是redhat最早发行的个人版本的linux, 其1。0版本于1994年11月3日发行。虽然其历史不及其它linux发行
    02-10
点击排行