Virt-install Character Interface Install KVM Guest instance

Source: Internet
Author: User
Tags centos

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.