virt-install : Xen guest installation manager

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” :

[[email protected] ~]# 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
[[email protected] ~]#

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

[[email protected] ~]# 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
[[email protected] ~]#

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

[[email protected] ~]# 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 *

Previous Post

Vmware Virtual machine monitoring tools

Next Post


Related Posts