Gentoo安装kvm桥接网络

本来最先是在 Gentoo 上实现 KVM 的,后来又在 Debian 上玩了玩:http://blog.csdn.net/cenziboy/article/details/6957890

后来觉得还是有必要再总结总结,只当是复习罢了,于是乎出现了此文。

一 安装前准备

1. KVM需要硬件支持,并在BIOS中开启CPU虚拟化功能


2. 配置 kernel 

kvm 模块

[*] Virtualization --->
    --- Virtualization
    <M> Kernel-based Virtual Machine (KVM) support
    <M>   KVM for Intel processors support  #我是 intel CPU
    < >   KVM for AMD processors support


3. TUN/TAP 模块,桥接网络要用到

Device Drivers --->
    [*] Network device support --->
            <M> Universal TUN/TAP device driver support

Networking support --->
    Networking options --->
        <*> 802.1d Ethernet Bridging
        <*> 802.1Q VLAN Support


4. 半虚拟化(可选,根据自己需求)

Processor type and features --->
    [*] Paravirtualized guest support  --->
            [*]   KVM paravirtualized clock                                                     
            [*]   KVM Guest support                                                             
            -*-   Enable paravirtualization code
            [*]     Paravirtualization layer for spinlocks


编译并安装内核(模块)

# make
# make install
# make modules_install


二 安装qemu 

kvm是内核模块,用户无法直接使用。这里就要借助 qemu ( 也叫 kvm 的前段工具)来使用 kvm

1. 先看看 qemu-kvm :

# emerge -pv qemu-kvm

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-emulation/qemu-kvm-0.15.1-r1  USE="aio alsa jpeg ncurses png pulseaudio sdl ssl vhost-net -bluetooth -brltty -curl -debug (-esd) -fdt -hardened -nss -qemu
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值