How to change CD ISO in Xen

I was setting up some virtual machines by using Xen and virt-manager, but was stuck with being unable to change CDs when the installer asked to put in the CD number 2.

After some googling and dead-ends I found finally this approach that worked. First find out the ID of your virtual machine
root@cardolan:/var/lib/libvirt# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 4886 4 r----- 402051.2
mosaic 800 1 123.6
test-i386-redhat-7.2-template 27 800 1 -b---- 103.6
test-i386-ubuntu-8.04-firefox-1.0 24 800 1 --p--- 132.8
test-ubuntu8.04-mozilla19990128 800 1 115.8
ubuntu804-template 800 1 7.8
winxp 1024 1 18674.4

The one that we are setting up is the ID 27. Then check out what disks the host is using:
root@cardolan:/var/lib/libvirt# xm block-list -l 27
(768
((backend-id 0)
(virtual-device 768)
(device-type disk)
(state 1)
(backend /local/domain/0/backend/vbd/27/768)
)
)
(832
((backend-id 0)
(virtual-device 832)
(device-type cdrom)
(state 1)
(backend /local/domain/0/backend/vbd/27/832)
(eject eject)
)
)

We are interested of the find out wich device-type cdrom. Copy the backend path i.e. /local/domain/0/backend/vbd/27/832 . Then add /params to the end to see the current mounted iso
root@cardolan:/var/lib/libvirt# xenstore-read /local/domain/0/backend/vbd/27/832/params
/home/downloads/seawolf-i386-disc2.iso

Change the ISO
xenstore-write /local/domain/0/backend/vbd/27/832/params /home/downloads/seawolf-i386-disc2.iso

and voilà you can continue the installation!