gentoo kvm qemu

首先使用 grep --color -E "vmx|svm" /proc/cpuinfo 检查 cpu 能不能支持虚拟化,注意 biso 里面要开启虚拟化。

内核开启相应选项

[*] Virtualization  --->
    <*>   Kernel-based Virtual Machine (KVM) support

[*] Virtualization  --->
    <M>   KVM for Intel processors support

[*] Virtualization  --->
    <M>   KVM for AMD processors support

[*] Virtualization  --->
    <*>   Host kernel accelerator for virtio net

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

[*] Networking support  --->
        Networking options  --->
            <*> The IPv6 protocol
            <*> 802.1d Ethernet Bridging

Kernel hacking  --->
        Compile-time checks and compiler options  --->
            [*] Debug Filesystem

File systems  --->
    <*> The Extended 4 (ext4) filesystem
    [*]   Ext4 Security Labels

然后根据需要 qemu 使用的客户端,修改 make.conf

QEMU_SOFTMMU_TARGETS="arm x86_64 i386"
QEMU_USER_TARGETS="x86_64 arm armeb i386"

增加 qemu 的 USE : accessibility gtk ncurses python sdl spice usbredir
然后安装 qemu: emerge --ask app-emulation/qemu
加入 kvm组: gpasswd -a kvm

安装 virt-manager: emerge -v virt-manager,注意开启 USE: gtk
配置让普通用户使用 qemu:
groupadd libvirt
usermod -a -G libvirt

vim /etc/libvirt/libvirtd.conf

unix_sock_group = "libvirt"
unix_sock_ro_perms = "0777"
unix_sock_rw_perms = "0770"

退出重新登录后,rc-service libvirtd restart 重启服务.

posted on 2018-12-15 13:25 ramlife 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/ramlife/p/10123078.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值