Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Xen domU not starting INIT
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Zarhan
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1016

PostPosted: Mon Oct 06, 2008 2:08 pm    Post subject: Xen domU not starting INIT Reply with quote

Hi,

I'm testing around Xen, and grabbed the gentoo and fedora images from jailtime.org. Anyway, I can't get them to work properly - they never get past the kernel. In fact, after boot, they end up at blocked state. How do I determine what's causing the block?

The domain configuration is as

Code:
kernel = "/mnt/data/xen/kernels/vmlinuz-domU"
memory = 384
name = "gentootest"
#vif = [ "" ]
#dhcp = "dhcp"
disk = ['file:/mnt/data/xen/disks/gentoo.2008-0.64.img,sda1,w']
root = "/dev/sda1 ro"
extra = "gentoo=nodevfs"


(I've commented out the network stuff just to make sure this isn't about networking...)

Code:
configs # xm create gentoo-test
Using config file "./gentoo-test".
Started domain gentootest
configs # xm console gentootest
floppy0: no floppy controllers found
loop: loaded (max 8 devices)
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
netconsole: not configured, aborting
Xen virtual console successfully installed as xvc0
Event-channel device installed.
netfront: Initialising virtual ethernet driver.
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
device-mapper: ioctl: 4.7.0-ioctl (2006-06-24) initialised: dm-devel@redhat.com
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
xen-vbd: registered block device major 8
blkfront: sda1: barriers enabled
XENBUS: Device with no driver: device/console/0
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 128k freed
configs # xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  7667     4     r-----    128.0
gentootest                                  17   384     1     -b----      2.8
configs #


Xend.log gives me

Code:
[2008-10-06 17:06:35 6234] DEBUG (XendDomainInfo:89) XendDomainInfo.create(['vm', ['name', 'gentootest'], ['memory', 384], ['vcpus', 1], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['image', ['linux', ['kernel', '/mnt/data/xen/kernels/vmlinuz-domU'], ['root', '/dev/sda1 ro'], ['args', 'gentoo=nodevfs']]], ['device', ['vbd', ['uname', 'file:/mnt/data/xen/disks/gentoo.2008-0.64.img'], ['dev', 'sda1'], ['mode', 'w']]]])
[2008-10-06 17:06:35 6234] DEBUG (XendDomainInfo:2028) XendDomainInfo.constructDomain
[2008-10-06 17:06:35 6234] DEBUG (balloon:132) Balloon: 396332 KiB free; need 2048; done.
[2008-10-06 17:06:35 6234] DEBUG (XendDomain:447) Adding Domain: 19
[2008-10-06 17:06:35 6234] DEBUG (XendDomainInfo:2134) XendDomainInfo.initDomain: 19 256
[2008-10-06 17:06:35 6234] DEBUG (XendDomainInfo:2215) _initDomain:shadow_memory=0x0, memory_static_max=0x18000000, memory_static_min=0x0.
[2008-10-06 17:06:35 6234] DEBUG (balloon:132) Balloon: 396324 KiB free; need 395264; done.
[2008-10-06 17:06:35 6234] INFO (image:166) buildDomain os=linux dom=19 vcpus=1
[2008-10-06 17:06:35 6234] DEBUG (image:631) domid          = 19
[2008-10-06 17:06:35 6234] DEBUG (image:632) memsize        = 384
[2008-10-06 17:06:35 6234] DEBUG (image:633) image          = /mnt/data/xen/kernels/vmlinuz-domU
[2008-10-06 17:06:35 6234] DEBUG (image:634) store_evtchn   = 1
[2008-10-06 17:06:35 6234] DEBUG (image:635) console_evtchn = 2
[2008-10-06 17:06:35 6234] DEBUG (image:636) cmdline        = root=/dev/sda1 ro gentoo=nodevfs
[2008-10-06 17:06:35 6234] DEBUG (image:637) ramdisk        =
[2008-10-06 17:06:35 6234] DEBUG (image:638) vcpus          = 1
[2008-10-06 17:06:35 6234] DEBUG (image:639) features       =
[2008-10-06 17:06:35 6234] INFO (XendDomainInfo:1900) createDevice: vbd : {'uuid': '9d488442-4865-5f3f-4fc2-dfc2cd995007', 'bootable': 1, 'driver': 'paravirtualised', 'dev': 'sda1', 'uname': 'file:/mnt/data/xen/disks/gentoo.2008-0.64.img', 'mode': 'w'}
[2008-10-06 17:06:35 6234] DEBUG (DevController:122) DevController: writing {'virtual-device': '2049', 'device-type': 'disk', 'protocol': 'x86_64-abi', 'backend-id': '0', 'state': '1', 'backend': '/local/domain/0/backend/vbd/19/2049'} to /local/domain/19/device/vbd/2049.
[2008-10-06 17:06:35 6234] DEBUG (DevController:124) DevController: writing {'domain': 'gentootest', 'frontend': '/local/domain/19/device/vbd/2049', 'uuid': '9d488442-4865-5f3f-4fc2-dfc2cd995007', 'dev': 'sda1', 'state': '1', 'params': '/mnt/data/xen/disks/gentoo.2008-0.64.img', 'mode': 'w', 'online': '1', 'frontend-id': '19', 'type': 'file'} to /local/domain/0/backend/vbd/19/2049.
[2008-10-06 17:06:35 6234] DEBUG (XendDomainInfo:2729) Storing VM details: {'on_xend_stop': 'ignore', 'shadow_memory': '0', 'uuid': 'c4f83291-a18d-2046-3f27-5728c17614a3', 'on_reboot': 'restart', 'start_time': '1223301995.57', 'on_poweroff': 'destroy', 'on_xend_start': 'ignore', 'on_crash': 'restart', 'xend/restart_count': '0', 'vcpus': '1', 'vcpu_avail': '1', 'image': "(linux (kernel /mnt/data/xen/kernels/vmlinuz-domU) (args 'root=/dev/sda1 ro gentoo=nodevfs') (notes (FEATURES 'writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel') (VIRT_BASE 18446744071562067968) (GUEST_VERSION 2.6) (PADDR_OFFSET 18446744071562067968) (GUEST_OS linux) (HYPERCALL_PAGE 18446744071564189696) (LOADER generic) (SUSPEND_CANCEL 1) (ENTRY 18446744071564165120) (XEN_VERSION xen-3.0)))", 'name': 'gentootest'}
[2008-10-06 17:06:35 6234] DEBUG (XendDomainInfo:1359) Storing domain details: {'console/ring-ref': '2217904', 'image/entry': '18446744071564165120', 'console/port': '2', 'store/ring-ref': '2217905', 'image/loader': 'generic', 'vm': '/vm/c4f83291-a18d-2046-3f27-5728c17614a3', 'control/platform-feature-multiprocessor-suspend': '1', 'image/guest-os': 'linux', 'image/features/writable-descriptor-tables': '1', 'image/virt-base': '18446744071562067968', 'memory/target': '393216', 'image/guest-version': '2.6', 'image/features/supervisor-mode-kernel': '1', 'console/limit': '1048576', 'image/paddr-offset': '18446744071562067968', 'image/hypercall-page': '18446744071564189696', 'image/suspend-cancel': '1', 'cpu/0/availability': 'online', 'image/features/pae-pgdir-above-4gb': '1', 'image/features/writable-page-tables': '1', 'console/type': 'xenconsoled', 'image/features/auto-translated-physmap': '1', 'name': 'gentootest', 'domid': '19', 'image/xen-version': 'xen-3.0', 'store/port': '1'}
[2008-10-06 17:06:35 6234] DEBUG (DevController:122) DevController: writing {'protocol': 'x86_64-abi', 'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/console/19/0'} to /local/domain/19/device/console/0.
[2008-10-06 17:06:35 6234] DEBUG (DevController:124) DevController: writing {'domain': 'gentootest', 'frontend': '/local/domain/19/device/console/0', 'uuid': 'e6904810-41a4-769c-649f-0c42f6694a2a', 'frontend-id': '19', 'state': '1', 'location': '2', 'online': '1', 'protocol': 'vt100'} to /local/domain/0/backend/console/19/0.
[2008-10-06 17:06:35 6234] DEBUG (XendDomainInfo:1443) XendDomainInfo.handleShutdownWatch
[2008-10-06 17:06:35 6234] DEBUG (DevController:155) Waiting for devices vif.
[2008-10-06 17:06:35 6234] DEBUG (DevController:155) Waiting for devices vscsi.
[2008-10-06 17:06:35 6234] DEBUG (DevController:155) Waiting for devices vbd.
[2008-10-06 17:06:35 6234] DEBUG (DevController:160) Waiting for 2049.
[2008-10-06 17:06:35 6234] DEBUG (DevController:645) hotplugStatusCallback /local/domain/0/backend/vbd/19/2049/hotplug-status.
[2008-10-06 17:06:35 6234] DEBUG (DevController:645) hotplugStatusCallback /local/domain/0/backend/vbd/19/2049/hotplug-status.
[2008-10-06 17:06:35 6234] DEBUG (DevController:659) hotplugStatusCallback 1.
[2008-10-06 17:06:35 6234] DEBUG (DevController:155) Waiting for devices irq.
[2008-10-06 17:06:35 6234] DEBUG (DevController:155) Waiting for devices vkbd.
[2008-10-06 17:06:35 6234] DEBUG (DevController:155) Waiting for devices vfb.
[2008-10-06 17:06:35 6234] DEBUG (DevController:155) Waiting for devices console.
[2008-10-06 17:06:35 6234] DEBUG (DevController:160) Waiting for 0.
[2008-10-06 17:06:35 6234] DEBUG (DevController:155) Waiting for devices pci.
[2008-10-06 17:06:35 6234] DEBUG (DevController:155) Waiting for devices ioports.
[2008-10-06 17:06:35 6234] DEBUG (DevController:155) Waiting for devices tap.
[2008-10-06 17:06:35 6234] DEBUG (DevController:155) Waiting for devices vtpm.
[2008-10-06 17:06:35 6234] INFO (XendDomain:1172) Domain gentootest (19) unpaused.


Anyway, the kernel seems to boot just fine, it just never executes INIT. What's the problem here?
Back to top
View user's profile Send private message
dakaz
n00b
n00b


Joined: 16 Jun 2005
Posts: 17

PostPosted: Mon Oct 06, 2008 3:33 pm    Post subject: Reply with quote

Its possible your problem isn't with the xen domU's booting, its that your console isn't attaching. I had a bugger of a time with this myself before I got it to work. I haven't used the pre-built images you are referring to, but I can tell you what I had to do.

In my domU xen config file, I added
Code:
extra = " console=xvc0 xencons=xvc0";


And in my domU's inittab I had to add:
Code:
co:12345:respawn:/sbin/agetty 38400 xvc0 vt100-nav


Note: my domU is a gentoo domU, for fedora the inittab entry may differ.

--Kaz
Back to top
View user's profile Send private message
Zarhan
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1016

PostPosted: Mon Oct 06, 2008 4:13 pm    Post subject: Reply with quote

That did the trick - thanks!

I wonder why the prebuilt ones are assumed to work... is there some way to capture the standard console to Xen's version?

Hmm. I also cannot do root logins from this console..
Back to top
View user's profile Send private message
dakaz
n00b
n00b


Joined: 16 Jun 2005
Posts: 17

PostPosted: Mon Oct 06, 2008 7:37 pm    Post subject: Reply with quote

To root login from the xm console:
Code:
echo "xvc0" >> /etc/securetty

In your domU. Glad it helped
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum