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 http://libvirt.org/. 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
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”.
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 :