Posted by: kezhong | April 8, 2010

Install Fedora 12 as Xen guest on CentOS 5.4

I tried to install Fedora 12 as Xen guest using virt-install command on CentOS 5.4, But I met a lot of problems which I recorded as below. I finally installed successfully with the image from http://jailtime.org/.

Install a para-virtualized guest with virt-install command(Failed)
# virt-install –prompt
Would you like a fully virtualized guest (yes or no)? This will allow you to run unmodified operating systems. no
What is the name of your virtual machine? fc12
How much RAM should be allocated (in megabytes)? 512
What would you like to use as the disk (file path)? /vm/fc12.img
How large would you like the disk (/vm/fc12.img) to be (in gigabytes)? 16
What is the install URL? http://mirrors.kernel.org/fedora/releases/12/Fedora/x86_64/os/

Starting install…
Retrieving file .treeinfo…                             | 1.2 kB     00:00
Retrieving file vmlinuz…                               | 3.3 MB     00:29
Retrieving file initrd.im 72% [=======-      ] 43kB/s    | 16 MB         1:08 ETA

… …
rebooting system
Restarting system.

Guest installation complete… restarting guest.
POST operation failed: xend_post: error from xen daemon: (xend.err “Error creating domain: Boot loader didn’t return any data!”)
Domain installation may not have been
successful.  If it was, you can restart your domain
by running ‘virsh start fc12’; otherwise, please
restart your installation.

ERROR    POST operation failed: xend_post: error from xen daemon: (xend.err “Error creating domain: Boot loader didn’t return any data!”)
Traceback (most recent call last):
File “/usr/sbin/virt-install”, line 861, in ?
main()
File “/usr/sbin/virt-install”, line 779, in main

dom.create()
File “/usr/lib64/python2.4/site-packages/libvirt.py”, line 287, in create
if ret == -1: raise libvirtError (‘virDomainCreate() failed’, dom=self)
libvirtError: POST operation failed: xend_post: error from xen daemon: (xend.err “Error creating domain: Boot loader didn’t return any data!”)

Install a fully-virtualized guest with virt-install command(Failed)
# virt-install –prompt
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? vm01

How much RAM should be allocated (in megabytes)? 512
What would you like to use as the disk (file path)? /vm/vm01.img
How large would you like the disk (/vm/vm01.img) to be (in gigabytes)? 16
What is the install CD-ROM/ISO or URL? http://mirrors.kernel.org/fedora/releases/12/Fedora/x86_64/os/

Starting install…
Retrieving file .treeinfo…                             | 1.2 kB     00:00
Retrieving file boot.iso…                              | 171 MB     18:08
Creating storage file…                                 |  16 GB     00:00
Creating domain…                                       |    0 B     00:00
Connected to domain vm01
Escape character is ^]

Install with the image from http://jailtime.org(Success)
# cd /tmp
# wget http://stacklet.com/sites/default/files/fedora/fedora.12.x86-64.20091124.img.tar.bz2
# tar jxvf fedora.12.x86-64.20091124.img.tar.bz2
Modify the fedora.12.x86-64.xen3.pygrub.cfg file
# vi fedora.12.x86-64.xen3.pygrub.cfg
bootloader = “/usr/bin/pygrub”
memory = 256
name = “Fedora.12.x86-64″
vif = [ ” ]

disk = [‘file:/tmp/fedora.12.x86-64.img,xvdb,w’]
root = “/dev/xvdb”
extra = “fastboot”

# xm create -c fedora.12.x86-64.xen3.pygrub.cfg

# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0    29550     8 r—–   1134.6
Fedora.12.x86-64                          22      256     1 -b—-     26.4


Responses

  1. jailtime.org aka stacklet.com charges for their images now.

    I have had decent success with Fedora 8, which was the last version to have an image (and guest kernel maybe?) built for Xen.

    http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/8/Fedora/x86_64/os/ is the URL to use to get it for Xen under CentOS 5.4, or you can use a DVD iso mounted to a local web server directory that the Xen dom0 is on. (faster)

    Hope that helps someone else, and fingers crossed that the Fedora project will once again provide a paravirtualized set of files in a new release!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: