virt-install is a python script that helps in installing & creating xen virtual machines. virt-install is command line based and virt-manager is GUI based one. You can get them from Using virt-install is very simple, you have to answer few questions about size of ram, image location etc and the virtual machine will be ready.

Interactive execution of “virt-install” :

[root@foo23 ~]# virt-install
Would you like a fully virtualized guest (yes or no)?
This will allow you to run unmodified operating systems. yes
What is the name of your virtual machine? honda
How much RAM should be allocated (in megabytes)? 1024
What would you like to use as the disk (file path)? /vmfs/cars/honda.img
How large would you like the disk (/vmfs/cars/honda.img) to be (in gigabytes)? 40
Would you like to enable graphics support? (yes or no) yes
What is the virtual CD image, CD device or install location? /repository/iso/Centos-5.2.iso

Starting install…
Creating storage file…  100% |=========================| 8.0 GB    00:00
Creating domain…                                                 0 B 00:01
[root@foo23 ~]#

This will create the vm named “honda” and boot it up. You can check that by “xm list” or “virsh list”.

[root@foo23 ~]# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     2048     4 r—–  23331.4
honda                                      1     1024     1 r—–      1.0
[root@foo23 ~]#

If you donot want interactive “virt-install”, you can also pass options and arguments to it. Here is an example.

[root@foo23 ~]# virt-install -d -n toyoto -f /vmfs/cars/toyoto.img -v -c /repository/iso/Centos-5.2.iso -r 1024 –vnc

This creates the vm named “toyoto” and you can use vnc to connect to the console.

More Xen docs :

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like
Read More

Linux stress testing

Stress [] is a simple workload generator for Linux. It imposes a configurable amount of CPU, memory, I/O,…
Read More

Netapp – how to identify disk speed

Command: storage show disk –a (or) vol status –r  Filer> storage show disk –a Disk:             2b.18Shelf:            1Bay:              2Serial:          …