加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

gentoo kvm qemu

发布时间:2020-12-14 04:27:30 所属栏目:大数据 来源:网络整理
导读:首先使用 grep --color -E "vmx|svm" /proc/cpuinfo 检查 cpu 能不能支持虚拟化,注意 biso 里面要开启虚拟化。 内核开启相应选项 [*] Virtualization --- * Kernel-based Virtual Machine (KVM) support[*] Virtualization --- M KVM for Intel processors

首先使用 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

安装 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 重启服务.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读