2. 安装kvm前的准备工作
a. 清除iptables规则
service iptables stop; service iptables save
b. 关闭selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce 0
192.168.1.1 网关
────────────────┤ Manual TCP/IP Configuration ├─────────────────┐
│ │
│ Enter the IPv4 and/or the IPv6 address and prefix (address / │
│ prefix). For IPv4, the dotted-quad netmask or the CIDR-style │
│ prefix are acceptable. The gateway and name server fields must │
│ be valid IPv4 or IPv6 addresses. │
│ │
│ IPv4 address: 192.168.1.125___ / 255.255.255.0___ │
│ Gateway: 192.168.1.1______________________________ │
│ Name Server: 8.8.8.8__________________________________ │
│ │
│ ┌────┐ ┌──────┐ │
│ │ OK │ │ Back │ │
│ └────┘ └──────┘ │
│ │
│ │
└──────────────────────────────────────────────────────
进行下载
下载完后选择 re-initialize all
Pick a root password. You must type it │
│ twice to ensure you know it and do not │
│ make a typing mistake. │
│ │
│ Password: ******__________________ │
│ Password (confirm): ******__________________ │
│ │
│ ┌────┐ ┌──────┐ │
│ │ OK │ │ Back │ │
│ └────┘ └──────┘
选择Use Anyway
───────────────────┤ Weak Password ├────────────────────┐
│ │
│ You have provided a weak password: it does not contain │
│ enough DIFFERENT characters │
│ │
│ ┌────────┐ ┌────────────┐ │
│ │ Cancel │ │ Use Anyway │ │
│ └────────┘ └────────────┘ │
│
直接ok
│
│ Use entire drive │
│ Replace existing Linux system │
│ Use free space │
│ │
│ Which drive(s) do you want to use for this installation? │
│
┌─────────────┤ Writing storage configuration to disk ├──────────────┐
│ │
│ The partitioning options you have selected will now be written to │
│ disk. Any data on deleted or reformatted partitions will be lost. │
│ │
│ ┌─────────┐ ┌───────────────────────┐ │
│ │ Go back │ │ Write changes to disk │ │
│ └─────────┘ └───────────────────────┘ │
│
│
│ Enter the IPv4 and/or the IPv6 address and prefix (address / │
│ prefix). For IPv4, the dotted-quad netmask or the CIDR-style │
│ prefix are acceptable. The gateway and name server fields must │
│ be valid IPv4 or IPv6 addresses. │
│ │
│ IPv4 address: 192.168.1.116___ / 255.255.255.0___ │
│ Gateway: 192.168.1.1______________________________ │
│ Name Server: 8.8.8.8__________________________________ │
│ │
│ ┌────┐ ┌──────┐ │
│ │ OK │ │ Back │ │
│ └────┘ └──────┘ │
│
接下来配置nfs
yum install -y nfs-utile rpcbind
vim /etc/exports
/mnt 192.168.1.0/24
/etc/init.d/rpcbind start
/etc/init.d/nfs start
showmount -e 192.168.1.124
Export list for 192.168.1.124:
/mnt 192.168.1.0/24
192.168.1.124 在那台机器上配置的nfs就写那个ip
┌───────────────────────────┤ NFS Setup ├─────────────────────┐
│ │
│ Please enter the server and NFSv3 path to your CentOS installation │
│ image and optionally additional NFS mount options. │
│ │
│ NFS server name: 192.168.1.124_____________ │
│ CentOS directory: /mnt/images/install.img_ │
│ NFS mount options (optional): ro______________________ │
│ │
│ ┌────┐ ┌──────┐ │
│ │ OK │ │ Back │ │
│ └────┘ └──────┘ │
│ │
│ │
└──────────────────────────────────────────────────────
│
│ Error processing drive: ↑ │
│ ? │
│ pci-0000:00:05.0-virtio-pci-virtio1 ? │
│ 10240MB ? │
│ Virtio Block Device ? │
│ ? │
│ This device may need to be reinitialized. ? │
│ ? │
│ REINITIALIZING WILL CAUSE ALL DATA TO BE LOST! ? │
│ ? │
│ This action may also be applied to all other disks ? │
│ needing reinitialization. ↓ │
│ │
│ ┌────────┐ ┌────────────┐ ┌───────────────┐ ┌──────┐ │
│ │ Ignore │ │ Ignore all │ │ Re-initialize │ │ Re-initialize all │ │
│ └────────┘ └────────────┘ └───────────────┘ └─────┘ │
│ │
│