如何在使用KVM的CentOS最小安装中安装客户操作系统?

KVM新手在这里,所以要宽容的PLZ。 我正在尝试在Centos7的最小安装中安装客户操作系统。 我一直在寻找Web上的教程,但似乎都使用VMM(虚拟机pipe理器)的graphics主机。

我最小的服务器没有graphics界面,显然没有安装VMM。 那么,如何在没有graphics界面的主机上安装guest虚拟机呢? 什么是VMM的cliselect? 我该如何渲染graphics化安装向导?

我的意图是要全面了解整个过程。 谢谢。

KVM(或者说,在虚拟机内提供仿真设备的qemu)可以通过VNC提供仿真的键盘/鼠标/屏幕。 这将允许您与虚拟机的控制台进行交互,就像它是您坐在前面的物理机器一样。

那么,我能弄清楚。 按照这些简单的步骤安装一个最小安装CentOS 6.6的虚拟机:

[acool@localhost ~]$ # 1.- install all these [acool@localhost ~]$ sudo yum groupinstall "Virtualization Platform" "Virtualization Tools" [acool@localhost ~]$ sudo yum install python-virtinst [acool@localhost ~]$ sudo yum install bridge-utils [acool@localhost ~]$ [acool@localhost ~]$ # 1.a- dd image from CD-ROM [acool@localhost ~]$ sudo dd if=/dev/sr0 of=/usr/share/CentOS-6.6.iso [acool@localhost ~]$ [acool@localhost ~]$ # 2.- start this [acool@localhost ~]$ sudo service libvirtd start [acool@localhost ~]$ sudo chkconfig libvirtd on [acool@localhost ~]$ [acool@localhost ~]$ # 3.- modify eth0 and create network bridge file [acool@localhost ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=90:2B:34:10:25:C0 TYPE=Ethernet UUID=c74e1b53-a135-4573-ac74-8fd00b06a7ea ONBOOT=yes NM_CONTROLLED=no BRIDGE=br0 [acool@localhost ~]$ [acool@localhost ~]$ cat /etc/sysconfig/network-scripts/ifcfg-br0 DEVICE=br0 TYPE=Bridge BOOTPROTO=static ONBOOT=yes IPADDR=192.168.1.45 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=4.2.2.2 DNS2=4.2.2.1 DNS3=8.8.8.8 [acool@localhost ~]$ # 4.- restart networking [acool@localhost ~]$ sudo service network restart [acool@localhost ~]$ [acool@localhost ~]$ # 5.- put all these parameters in a file [acool@localhost ~]$ cat virt-install.sh sudo virt-install --connect qemu:///system \ -n vm20 \ -r 1024 \ --vcpus=2 \ --disk path=/var/lib/libvirt/images/vm20.img,size=12 \ -c /usr/share/CentOS-6.6.iso \ --graphics vnc \ --noautoconsole \ --os-type linux \ --accelerate \ --network=bridge:br0 \ --hvm [acool@localhost ~]$ [acool@localhost ~]$ # 6.- create VM !! [acool@localhost ~]$ ./virt-install.sh Starting install... Allocating 'vm20.img' | 12 GB 00:00 Creating domain... | 0 B 00:00 Domain installation still in progress. You can reconnect to the console to complete the installation process. [acool@localhost ~]$ [acool@localhost ~]$ # 7.- make sure it's running [acool@localhost ~]$ sudo virsh list --all Id Name State ---------------------------------------------------- 1 vm20 running [acool@localhost ~]$ [acool@localhost ~]$ [acool@localhost ~]$ # In another computer, open Virtual Machine Manager and connect to 192.168.1.45 and install linux in vm20 :)