标签:ns3 system 虚拟机 creat aes man mct gui 虚拟
[root@k8s-01 yum.repos.d]# grep -E ‘vmx|svm‘ /proc/cpuinfo flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm epb ibrs ibpb stibp tpr_shadow vnmi ept vpid tsc_adjust dtherm ida arat pln pts spec_ctrl intel_stibp flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm epb ibrs ibpb stibp tpr_shadow vnmi ept vpid tsc_adjust dtherm ida arat pln pts spec_ctrl intel_stibp
注意:intel为vmx,amd为svm。
[root@k8s-01 yum.repos.d]# cat /proc/cpuinfo | grep name | cut -d: -f2 | uniq -c 2 Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz [root@k8s-01 yum.repos.d]# cat /proc/cpuinfo | grep physical | sort -n | uniq -c 2 address sizes : 42 bits physical, 48 bits virtual 2 physical id : 0
[root@k8s-01 yum.repos.d]# dmidecode | grep -A16 "Memory Device" | grep Speed | sort -n | uniq -c 128 Speed: Unknown 主频
配置好公共yum源,推荐网易yum源。
[root@k8s-01 yum.repos.d]# sestatus SELinux status: disabled
[root@k8s-01 yum.repos.d]# yum -y install qemu-kvm libvirt libvirt-python libguestfs-tools virt-install virt-manager [root@k8s-01 yum.repos.d]# lsmod | grep kvm kvm_intel 188688 0 kvm 636931 1 kvm_intel irqbypass 13503 1 kvm
[root@k8s-01 yum.repos.d]# systemctl enable libvirtd [root@k8s-01 yum.repos.d]# systemctl start libvirtd [root@k8s-01 yum.repos.d]# virsh -c qemu:///system list #查看虚拟机环境(virsh list --all) Id 名称 状态 ---------------------------------------------------- [root@k8s-01 yum.repos.d]#
[root@k8s-01 yum.repos.d]# mkdir -p /data/images #存放kvm虚拟机目录 [root@k8s-01 yum.repos.d]# mkdir -p /data/iso #存放ISO镜像目录
[root@k8s-01 yum.repos.d]# cat /etc/sysconfig/network-scripts/ifcfg-ens33 NAME=ens33 DEVICE=ens33 ONBOOT=yes BRIDGE=br0 [root@k8s-01 yum.repos.d]# cat /etc/sysconfig/network-scripts/ifcfg-br0 TYPE=Bridge BOOTPROTO=static DEVICE=br0 ONBOOT=yes DNS1=114.114.114.114 IPADDR=192.168.1.221 PREFIX=24 GATEWAY=192.168.1.1 DELAY=0 [root@k8s-01 yum.repos.d]# vi /etc/sysctl.conf # sysctl settings are defined through files in # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/. # # Vendors settings live in /usr/lib/sysctl.d/. # To override a whole file, create a new file with the same in # /etc/sysctl.d/ and put new settings there. To override # only specific settings, add a file with a lexically later # name in /etc/sysctl.d/ and put new settings there. # # For more information, see sysctl.conf(5) and sysctl.d(5). net.ipv4.ip_forward=1 [root@k8s-01 yum.repos.d]# sysctl -p net.ipv4.ip_forward = 1 [root@k8s-01 yum.repos.d]# systemctl restart network
[root@k8s-01 yum.repos.d]# brctl show bridge name bridge id STP enabled interfaces br0 8000.000c292e1bfd no ens33 virbr0 8000.5254003fa4a6 yes virbr0-nic
标签:ns3 system 虚拟机 creat aes man mct gui 虚拟
原文地址:https://www.cnblogs.com/liujunjun/p/12246139.html