博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在Fedora 20上将Xen作为Domain-0安装
阅读量:2516 次
发布时间:2019-05-11

本文共 4158 字,大约阅读时间需要 13 分钟。

I ever introduced as the first try to use the xen package delivered from Fedora and get away from manually compiling Xen and patching the kernel. In this post, I introduce installing Xen Dom0 on Fedora 20.

我曾经介绍过形式这是第一次尝试使用从Fedora提供的xen软件包,而不必手动编译Xen和修补内核。 在本文中,我将介绍在Fedora 20上安装Xen Dom0。

安装Xen (Installing Xen)

First, install the xen pacakges:

首先,安装xen pacakges:

# yum install xen

The kernel is already ready to run in Domain-0 with enabled.

内核已经准备启用在Domain-0中运行。

Run -mkconfig

运行 -mkconfig

Run this command to make config for grub2 again:

运行以下命令再次为grub2进行配置:

# grub2-mkconfig -o /boot/grub2/grub.cfg

Otherwise, the kernel may fail to boot.

否则,内核可能无法启动。

Then, we can boot the Fedora to run on Xen as Domain-0 by selecting the Fedora, with Xen hypervisor in Grub2 during booting the system. We can also .

然后,我们可以通过选择Fedora来启动Fedora,使其在Xen上以Domain-0的身份在Xen上运行,并在系统启动过程中在Grub2中使用Xen虚拟机管理程序 。 我们还可以 。

After booting Linux on Xen as Domain-0, we can list the information by ‘xl info’ as follow to verify that Xen works.

在Xen上将Linux作为Domain-0引导后,我们可以按“ xl info”列出信息,如下所示,以验证Xen是否有效。

# xl infohost                   : localhostrelease                : 3.15.6-200.fc20.x86_64version                : #1 SMP Fri Jul 18 02:36:27 UTC 2014machine                : x86_64nr_cpus                : 4max_cpu_id             : 3nr_nodes               : 1cores_per_socket       : 2threads_per_core       : 2cpu_mhz                : 3392hw_caps                : bfebfbff:2c100800:00000000:00007f00:77dafbbf:00000000:00000021:000027abvirt_caps              :total_memory           : 8064free_memory            : 128sharing_freed_memory   : 0sharing_used_memory    : 0outstanding_claims     : 0free_cpus              : 0xen_major              : 4xen_minor              : 3xen_extra              : .2xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p xen_scheduler          : creditxen_pagesize           : 4096platform_params        : virt_start=0xffff800000000000xen_changeset          : xen_commandline        : placeholdercc_compiler            : gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7)cc_compile_by          : mockbuildcc_compile_domain      : [unknown]cc_compile_date        : Fri Jun 20 21:32:24 UTC 2014xend_config_format     : 4

配置网络 (Configuring the network)

Here, we use bridged .

在这里,我们使用桥接 。

NetworkManager does not work with bridge currently. To use bridge-based network for Xen. We should change the network management service from NetworkManager to network. The networking configuration is stored in ‘/etc/sysconfig/network-scripts/’.

NetworkManager当前不适用于网桥。 为Xen使用基于桥接的网络。 我们应该将网络管理服务从NetworkManager更改为网络。 网络配置存储在“ / etc / sysconfig / network-scripts /”中。

First, disable NetworkManager and start network:

首先,禁用NetworkManager并启动网络:

# systemctl disable NetworkManager.service && systemctl restart network.service

Make sure that the network service is automatically started by:

确保通过以下方式自动启动网络服务:

# chkconfig network on

Then, we can create the configuration file for the bridge. Let’s call the bridge ‘xenbr0’.

然后,我们可以为网桥创建配置文件。 我们将桥称为“ xenbr0”。

Edit ‘/etc/sysconfig/network-scripts/ifcfg-xenbr0’ (we assume dhcp here. You can also give the bridge a static IP as for the other network devices.):

编辑“ / etc / sysconfig / network-scripts / ifcfg-xenbr0”(此处假设为dhcp。您也可以像其他网络设备一样为网桥提供静态IP。):

DEVICE=xenbr0TYPE=BridgeONBOOT=yesDELAY=0NM_CONTROLLED=noBOOTPROTO=dhcp

Then find the configuration file for your existing network adapter (e.g. ifcfg-p2p1) and add this line.

然后找到现有网络适配器的配置文件(例如ifcfg-p2p1)并添加此行。

BRIDGE=xenbr0

Also make sure that

同时确保

NM_CONTROLLED=no

Finally, make the network configuration take effect by:

最后,通过以下方法使网络配置生效:

# systemctl restart network.service

一个示例Dom-U配置文件 (One example Dom-U configuration file)

I give one example Domain-U configuration file here as follows.

我在下面给出一个示例Domain-U配置文件。

name="10.8.1.210"vcpus=2memory=2048disk=['phy:/dev/vg_xen/vm-10.8.1.210,xvda,w']vif=['bridge=xenbr0']bootloader="/usr/bin/pygrub"on_reboot="restart"on_crash="restart"# extra="single"

Most of the old ‘xm’ commands for Domain-U management work under ‘xl’ by just simply replacing ‘xm’ with ‘xl’.

只需将“ xm”替换为“ xl”,大多数用于Domain-U管理的“ xm”命令就可以在“ xl”下运行。

翻译自:

转载地址:http://whowd.baihongyu.com/

你可能感兴趣的文章
.net core跨域传递cookie
查看>>
SpringMVC <mvc:view-controller path=""/>标签
查看>>
adobe flash player升级coredump分析
查看>>
pycharm快捷键、经常使用设置、配置管理
查看>>
element-ui table 最后一行合计,单元格合并
查看>>
.NET 常用加密、解密& 数字签名算法
查看>>
开博声明
查看>>
FileReader读取文件
查看>>
逆向-攻防世界-re2-cpp-is-awesome
查看>>
Oracle分割字符串 REGEXP_SUBSTR用法
查看>>
O/R Mapping实际开发经验之谈(转)
查看>>
今天才知道原来我还没弄清楚js中全局变量和局部变量的定义...
查看>>
用户心理特征
查看>>
【z05】聪明的质检员
查看>>
【5001】n皇后问题
查看>>
【codeforces 796D】Police Stations
查看>>
数据库事务与锁详解
查看>>
linux 配置ssh免密码登录
查看>>
《重构》的读后感
查看>>
MySQL索引分析和优化
查看>>