Virt-install

From JJBwiki

Jump to: navigation, search


Start the interactive install process by running the virt-install program:

  • /usr/sbin/virt-install

The following questions about the new guest OS will be presented. This information can also be passed as command line options; run with an argument of --help for more details. In particular, kickstart options can be passed with -x ks=options. Remember to use the -p flat for para-virtualization. You want this. It is much faster.

  1. What is the name of your virtual machine? This is the label that will identify the guest OS. This label will be used for various xm commands and also appear in virt-manager the Gnome-panel Xen applet. In addition, it will be the name of the /etc/xen/<name> file that stores the guest's configuration information.
  2. How much RAM should be allocated (in megabytes)? This is the amount of RAM to be allocated for the guest instance in megabytes (eg, 256). Note that installation with less than 256 megabytes is not recommended.
  3. What would you like to use as the disk (path)? The local path and file name of the file to serve as the disk image for the guest (eg, /home/joe/xenbox1). This will be exported as a full disk to your guest.
  4. How large would you like the disk to be (in gigabytes)? The size of the virtual disk for the guest (only appears if the file specified above does not already exist). 4.0 gigabytes is a reasonable size for a "default" install
  5. Would you like to enable graphics support (yes or no): Should the graphical installer be used?
  6. What is the install location? This is the path to a Fedora Core 6 installation tree in the format used by anaconda. NFS, FTP, and HTTP locations are all supported. Examples include:

[edit] Example

[root@xenhost xen]# virt-install -p -x ks=nfs:kickstart01:/kickstart/kscfgs/RHEL5-xen.cfg -l nfs:kickstart01:/kickstart/install/rhel5
What is the name of your virtual machine? testvm01
How much RAM should be allocated (in megabytes)? 2048
What would you like to use as the disk (path)? /xen/testvm01
How large would you like the disk (/xen/mgra01) to be (in gigabytes)? 20
Would you like to enable graphics support? (yes or no) no


After this the install will start. From there its almost the same as a default install. A good example kickstart (ks) file can be found here.

Personal tools