DomU Install with Virt-Install
Installing new Xen guests using the command line virt-install
Virt-install is not part of Xen, but it's developed by Redhat and included in Fedora, and it can be used to install new Xen guests, among others.
Note: This was done using a Fedora 13 dom0. However, it should work fine with later Fedora releases.
Check the virt-manager examples above for all the basic LVM usage tips and how to install required packages. virt-install gets installed automatically when you install virt-manager and related packages as shown in the examples above.
In this example we're going to install Fedora 13 x86 (32bit) Xen PV guest using the command line virt-install tool.
First we'll create a new LVM volume to be used as the virtual disk for the F13 Xen guest:
[root@f13 ~]# lvcreate -nf13 -L40G /dev/vg_f13 Logical volume "f13" created
Next make sure you have the ssh X11 forwarding enabled, since the command below will open graphical VNC window for the guest console to show the graphical Fedora installer.
Start the Fedora 13 installation using virt-install. Specify the newly created LVM volume as the guest virtual disk ("-f" parameter):
[root@f13 ~]# virt-install -n f13 -r 768 --vcpus=1 -f /dev/vg_f13/f13 --vnc -p -l "http://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/13/Fedora/i386/os"
Example output from virt-install:
[root@f13 ~]# virt-install -n f13 -r 768 --vcpus=1 -f /dev/vg_f13/f13 --vnc -p -l "http://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/13/Fedora/i386/os" Starting install... Retrieving file .treeinfo... | 2.8 kB 00:00 ... Retrieving file vmlinuz-PAE... | 6.7 MB 00:02 ... Retrieving file initrd-PAE.img... | 74 MB 00:01 ... Creating domain... | 0 B 00:01
And then graphical window opens where you can see Fedora 13 installer booting up.
Select IPV4 networking with DHCP in the Fedora installer. Note about disk partitioning for the guest VM: It's good to make the "/boot" partition "ext3" to avoid problems with pygrub loading the kernel from the guest. Xen 4.0.1 properly supports ext4 /boot with pygrub, but you never know if you need to move the image to older systems lacking ext4 support.
After the installer files have been downloaded the graphical phase of the Fedora 13 installer starts:
Install Fedora 13 as usual.