Well I've tried this method with no success. Here are my specifics:
Fedora Core 5 machine (4 dual-core AMD cpu's).
Trying to install a RedHat AS 4 update 4 OS as a guest OS. (I have the
installation CD's copied to local disk and I used createrepo to yum'ify
it).
Following the instructions here is what I've done:
dd if=/dev/zero of=ca1alx02 bs=1GB count=22
mkfs.ext3 ca1alx02
mount -o loop /vhosts2/ca1alx02 /mnt
mkdir -p /mnt/etc/yum.repos.d /mnt/proc /mnt/var/lock/rpm /mnt/dev
for i in console null zero random ; do MAKEDEV -d /mnt/dev -x ${i} ;
done
mount -t proc none /mnt/proc
head -1 /etc/passwd > /mnt/etc/passwd
head -1 /etc/shadow > /mnt/etc/shadow && chmod 0400
/mnt/etc/shadow
cat <<EOF > /mnt/etc/fstab NOTE: I tried
both /dev/xvda and /dev/sda
/dev/sda1 / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
EOF
cp /sysadm/config/linux/redhat/yum.repos.d/rhel-base.repo
/mnt/etc/yum.repos.d
cp /sysadm/config/linux/redhat/yum.conf /mnt/etc/yum.conf
echo "exactarch=0" >> /mnt/etc/yum.conf
cp /etc/resolv.conf /mnt/etc/resolv.conf
mkdir /mnt/sysadm
mount nfs1:/sysadm/ /mnt/sysadm/
yum -y --installroot=/mnt install yum
chroot /mnt yum -y install \*
chroot /mnt rpm -Uvh
/sysadm/RPMS.kernel/kernel-xenU-2.6.9-42.23.EL.x86_64.rpm (this is the
Xen RH kernel I got from xen source)
cat <<EOF > /mnt/boot/grub/grub.conf
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$LEMxY1Hf$g/d3qMr0kyzuQML.ulV2a1
title Red Hat Enterprise Linux AS (2.6.9-42.23.ELxenU)
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-42.23.ELxenU ro root=/dev/sda1 rhgb quiet
initrd /boot/initrd-2.6.9-42.23.ELxenU.img
EOF
ln -s ../boot/grub/grub.conf /mnt/etc/grub.conf
sync
umount /mnt/proc
umount /mnt/sysadm
umount /mnt
Created a /etc/xen/ca1alx02 xen configuration file:
name = "ca1alx02"
memory = "512"
disk = [ 'file:/vhosts2/ca1alx02,sda,w' ]
#vif0 = [ 'mac=00:16:3e:4c:6a:b2' ]
vif = ['']
uuid = "083a8ddf-1d1d-5488-9933-ff034243ab55"
bootloader="/usr/bin/pygrub"
on_reboot = 'restart'
on_crash = 'restart'
xm create -c ca1alx02
Now it just hangs for some time and then eventually comes back with an
error:
Using config file "/etc/xen/ca1alx02".
Going to boot Red Hat Enterprise Linux AS (2.6.9-42.23.ELxenU)
kernel: /boot/vmlinuz-2.6.9-42.23.ELxenU
initrd: /boot/initrd-2.6.9-42.23.ELxenU.img
Error: Device 0 (vif) could not be connected. Hotplug scripts not
working.
I get a lot of junk in the /var/log/xen/xend.log file:
[2006-11-20 12: 2:03 xend.XendDomainInfo 3213] DEBUG
(XendDomainInfo:190) XendDomainInfo.create(['vm', ['name', 'ca1alx02'],
['memory', '512'], ['on_reboot', 'restart'], ['on_crash', 'restart'],
['vcpus', 1], ['uuid', '083a8ddf-1d1d-5488-9933-ff034243ab55'],
['bootloader', '/usr/bin/pygrub'], ['image', ['linux', ['ramdisk',
'/var/lib/xen/initrd.mroFH5'], ['kernel',
'/var/lib/xen/vmlinuz.HCMMkC'], ['args', 'ro root=/dev/sda1 rhgb
quiet'], ['vncunused', 1], ['xauthority', '/root/.Xauthority']]],
['device', ['vbd', ['uname', 'file:/vhosts2/ca1alx02'], ['dev', 'sda'],
['mode', 'w']]], ['device', ['vif']]])
[2006-11-20 12: 2:03 xend.XendDomainInfo 3213] DEBUG
(XendDomainInfo:296) parseConfig: config is ['vm', ['name',
'ca1alx02'], ['memory', '512'], ['on_reboot', 'restart'], ['on_crash',
'restart'], ['vcpus', 1], ['uuid',
'083a8ddf-1d1d-5488-9933-ff034243ab55'], ['bootloader',
'/usr/bin/pygrub'], ['image', ['linux', ['ramdisk',
'/var/lib/xen/initrd.mroFH5'], ['kernel',
'/var/lib/xen/vmlinuz.HCMMkC'], ['args', 'ro root=/dev/sda1 rhgb
quiet'], ['vncunused', 1], ['xauthority', '/root/.Xauthority']]],
['device', ['vbd', ['uname', 'file:/vhosts2/ca1alx02'], ['dev', 'sda'],
['mode', 'w']]], ['device', ['vif']]]
[2006-11-20 12: 2:03 xend.XendDomainInfo 3213] DEBUG
(XendDomainInfo:395) parseConfig: result is {'shadow_memory': None,
'uuid': '083a8ddf-1d1d-5488-9933-ff034243ab55', 'on_crash': 'restart',
'on_reboot': 'restart', 'localtime': None, 'image': ['linux',
['ramdisk', '/var/lib/xen/initrd.mroFH5'], ['kernel',
'/var/lib/xen/vmlinuz.HCMMkC'], ['args', 'ro root=/dev/sda1 rhgb
quiet'], ['vncunused', 1], ['xauthority', '/root/.Xauthority']],
'on_poweroff': None, 'bootloader_args': None, 'cpus': None, 'name':
'ca1alx02', 'backend': [], 'vcpus': 1, 'cpu_weight': None, 'features':
None, 'vcpu_avail': None, 'memory': 512, 'device': [('vbd', ['vbd',
['uname', 'file:/vhosts2/ca1alx02'], ['dev', 'sda'], ['mode', 'w']]),
('vif', ['vif'])], 'bootloader': '/usr/bin/pygrub', 'cpu': None,
'maxmem': None}
[2006-11-20 12: 2:03 xend.XendDomainInfo 3213] DEBUG
(XendDomainInfo:1253) XendDomainInfo.construct: None
[2006-11-20 12: 2:03 xend.XendDomainInfo 3213] DEBUG
(XendDomainInfo:1285) XendDomainInfo.initDomain: 14 1.0
[2006-11-20 12: 2:03 xend 3213] INFO (image:214) configuring linux guest
[2006-11-20 12: 2:03 xend 3213] DEBUG (balloon:127) Balloon: 525156 KiB
free; need 524288; done.
[2006-11-20 12: 2:03 xend 3213] INFO (image:138) buildDomain os=linux
dom=14 vcpus=1
[2006-11-20 12: 2:03 xend 3213] DEBUG (image:193) dom = 14
[2006-11-20 12: 2:03 xend 3213] DEBUG (image:194) image =
/var/lib/xen/vmlinuz.HCMMkC
[2006-11-20 12: 2:03 xend 3213] DEBUG (image:195) store_evtchn = 1
[2006-11-20 12: 2:03 xend 3213] DEBUG (image:196) console_evtchn = 2
[2006-11-20 12: 2:03 xend 3213] DEBUG (image:197) cmdline = ro
root=/dev/sda1 rhgb quiet
[2006-11-20 12: 2:03 xend 3213] DEBUG (image:198) ramdisk =
/var/lib/xen/initrd.mroFH5
[2006-11-20 12: 2:03 xend 3213] DEBUG (image:199) vcpus = 1
[2006-11-20 12: 2:03 xend 3213] DEBUG (image:200) features =
[2006-11-20 12: 2:03 xend 3213] DEBUG (DevController:110)
DevController: writing {'backend-id': '0', 'virtual-device': '2048',
'device-type': 'disk', 'state': '1', 'backend':
'/local/domain/0/backend/vbd/14/2048'} to
/local/domain/14/device/vbd/2048.
[2006-11-20 12: 2:03 xend 3213] DEBUG (DevController:112)
DevController: writing {'domain': 'ca1alx02', 'frontend':
'/local/domain/14/device/vbd/2048', 'dev': 'sda', 'state': '1',
'params': '/vhosts2/ca1alx02', 'mode': 'w', 'online': '1',
'frontend-id': '14', 'type': 'file'} to
/local/domain/0/backend/vbd/14/2048.
[2006-11-20 12: 2:03 xend 3213] DEBUG (DevController:110)
DevController: writing {'backend-id': '0', 'mac': '00:16:3e:3f:de:c0',
'handle': '0', 'state': '1', 'backend':
'/local/domain/0/backend/vif/14/0'} to /local/domain/14/device/vif/0.
[2006-11-20 12: 2:03 xend 3213] DEBUG (DevController:112)
DevController: writing {'domain': 'ca1alx02', 'handle': '0', 'script':
'/etc/xen/scripts/vif-bridge', 'state': '1', 'frontend':
'/local/domain/14/device/vif/0', 'mac': '00:16:3e:3f:de:c0', 'online':
'1', 'frontend-id': '14'} to /local/domain/0/backend/vif/14/0.
[2006-11-20 12: 2:03 xend.XendDomainInfo 3213] DEBUG
(XendDomainInfo:712) Storing VM details: {'shadow_memory': '0', 'uuid':
'083a8ddf-1d1d-5488-9933-ff034243ab55', 'on_reboot': 'restart',
'start_time': '1164052923.99', 'on_poweroff': 'destroy', 'name':
'ca1alx02', 'xend/restart_count': '0', 'vcpus': '1', 'vcpu_avail': '1',
'memory': '512', 'on_crash': 'restart', 'image': "(linux (ramdisk
/var/lib/xen/initrd.mroFH5) (kernel /var/lib/xen/vmlinuz.HCMMkC) (args
'ro root=/dev/sda1 rhgb quiet') (vncunused 1) (xauthority
/root/.Xauthority))", 'maxmem': '512'}
[2006-11-20 12: 2:04 xend.XendDomainInfo 3213] DEBUG
(XendDomainInfo:747) Storing domain details: {'console/ring-ref':
'1608338', 'console/port': '2', 'name': 'ca1alx02', 'console/limit':
'1048576', 'vm': '/vm/083a8ddf-1d1d-5488-9933-ff034243ab55', 'domid':
'14', 'cpu/0/availability': 'online', 'memory/target': '524288',
'store/ring-ref': '1316274', 'store/port': '1'}
[2006-11-20 12: 2:04 xend.XendDomainInfo 3213] DEBUG
(XendDomainInfo:933) XendDomainInfo.handleShutdownWatch
[2006-11-20 12: 2:04 xend 3213] DEBUG (DevController:143) Waiting for
devices vif.
[2006-11-20 12: 2:04 xend 3213] DEBUG (DevController:149) Waiting for 0.
[2006-11-20 12: 2:04 xend 3213] DEBUG (DevController:464)
hotplugStatusCallback /local/domain/0/backend/vif/14/0/hotplug-status.
[2006-11-20 12: 3:44 xend.XendDomainInfo 3213] DEBUG
(XendDomainInfo:1449) XendDomainInfo.destroy: domid=14
[2006-11-20 12: 3:44 xend.XendDomainInfo 3213] DEBUG
(XendDomainInfo:1457) XendDomainInfo.destroyDomain(14)
I think I am getting closer but I'm stuck again. Any help with this is
greatly appreciated!
- Stefano
Michael Lang wrote:
On Tue, 2006-11-14 at 18:26 -0800, Stefano Harding wrote:
Hello all,
I am trying to get a RedHat 4 guest OS running under a Fedora Core 5
domain 0. I have several FC5 guest os's running without a problem but
have had no luck trying to figure out how to get RHEL to install and
run. I've google'ed for days and tried all kinds of stuff with no
success. Anyone out there able to get RHEL4 running as a guest domain?
Any help is greatly appreciated!
have a look at http://wiki.xensource.com/xenwiki/Centos4Yuminstallation
all you need is to adapt the Yum configs to fetch RHEL4 packages.
A possible solution for that (AFAIK theres no public RHEL Repository)
*) copy all packages from your RHEL Media to a local FTP/HTTP
accessable store
*) get the createrepo package (yum -y install createrepo, or
http://linux.duke.edu/projects/metadata/
*) create the repository for the local Packages
*) modify the Yum.repo Config file to fetch the packages from your
FTP/HTTP Repository
the rest should be done as mentioned on the Centos4Yuminstallation
WikiPage
Kind regars
Michael Lang
- Stefano
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|