KVM服务器创建虚拟节点
< 返回列表时间: 2020-04-24来源:OSCHINA
【围观】麒麟芯片遭打压成绝版,华为亿元投入又砸向了哪里?>>>
KVM服务器创建虚拟节点 Usage: mkvm <NodeName> <cpus> <memsize(GB)> <disk(GB)> <ip> mkvm gz-yx33145 8 24 80 192.168.33.145
目录路径:/datafs2/vm/gz-yx33145
创建磁盘 qemu-img create -f qcow2 data-33.145.qcow2 150G
打开图形界面 virt-manager


add hardware添加硬盘




yum install xorg-x11-font-utils
826 virt-manager
827 export DISPLAY=localho st:0.0
828 export DISPLAY=localhost:10.0
829 virt-manager
830 echo $DISPLAY
831 virt-manager
832 vim /etc/profile
833 /etc/profile
834 source /etc/profile
835 virt-manager
836 echo $DISPLAY
837 virt-manager
838 export DISPLAY=localhost:10.0
839 virt-manager
840 export DISPLAY=localhost:11.0
841 virt-manager
842 w
843 export DISPLAY=localhost:11.0
844 virt-manager
cat /proc/meminfo | grep Huge
863 free
864 free -m
865 cat /proc/meminfo | grep Huge
866 cat /proc/cpuinfo |grep "cores"|uniq
867 cat /proc/cpuinfo
868 cat /proc/cpuinfo |grep "cores"|uniq
869 initial apicid : 47
870 cat /proc/cpuinfo
871 cat /proc/cpuinfo |grep processor |wc -l
872 cat /proc/cpuinfo |grep ""|uniq
873 dmidecode -m CPU
874 dmidecode
875 dmidecode --help
876 dmidecode -mcpu
877 dmidecode -m cpu
878 dmidecode -m memory
879 dmidecode
880 dmidecode -t Memory
881 dmidecode -t Cpu
882 dmidecode -t processor
mkvm mkvm gz-yx33147 8 24 80 192.168.33.147
914 mkvm gz-yx33147 8 24 80 192.168.33.147
915 ls
916 ls gz-yx33147
917 ls gz-yx33145
918 cd gz-yx33147/
919 qemu-img create -f qcow2 data-33.14.qcow2 150G
920 dcli -g list 'lvcreate -l +100%FREE data --name data'
921 du -sh *
922 virsh edit gz-yx3384
923 cd ..
924 cd gz-yx33146
925 ls
926 pwd
927 /datafs2/vm/gz-yx33146
928 ls
929 cd /datafs2/vm/
930 ls
931 cd gz-yx33147/
932 ls
933 qemu-img create -f qcow2 data-33.147.qcow2 150G
热门排行