Here to install a centos-minimal system for example:
1. Copy the files from the installation ISO and modify the. treeinfo file to specify the correct kernel and INITRD.
The code is as follows |
Copy Code |
mount/data/nfs/images/centos-6.4-x86_64-minimal.iso/mnt/-O loop Cp-r/mnt//root/cent-os |
Vim/root/cent-os/.treeinfo Modify this file:
The relevant sections before the modification are:
The code is as follows |
Copy Code |
[Images-x86_64]
INITRD = images/pxeboot/initrd.img |
Modified to:
The code is as follows |
Copy Code |
[Images-x86_64]
Kernel = Isolinux/vmlinuz INITRD = isolinux/initrd.img Boot.iso =/data/nfs/images/centos-6.4-x86_64-minimal.iso # It seems that the boot.iso is not directly used. |
If you do not specify the correct kernel and INITRD, you may experience the following error when you follow Virt-install:
The code is as follows |
Copy Code |
Starting install ... Retrieving file. Treeinfo | 552 B 00:00 ... ERROR No option ' kernel ' in: ' images-x86_64 ' Domain installation does not appear to have been successful. If It is, can restart your domain by running: Virsh--connect Qemu:///system Start vm1 Otherwise, please restart your installation. |
2. Start Virt-install to install guest:
The code is as follows |
Copy Code |
Virt-install--name=vm1--ram=1024--vcpus=1--file=/var/lib/libvirt/images/vm1.img--nographics-- Extra-args= ' Console=ttys0 '-v--location=/root/cent-os/ |
Note: –nographics,–extra-args= ' console=ttys0′,–location=/root/cent-os/this three parameters.
If everything works, the kernel will be loaded properly for installation.
However, when choosing where to install the mirror, I chose image on remote NFS to install (the other local CD/DVD, Hard Drive did not try; I did not match it).
The code is as follows |
Copy Code |
The following options are stated: What type of media contains│ │the installation image? │ ││ │local cd/dvd│ │hard drive│ │nfs Directory |