debuggers.hg

changeset 21014:351a34c2fd48

xend: notify xenpv device model that console info is ready

Sometimes PV domain with vfb doesn't boot up. /sbin/kudzu is stuck.
After investigation, I've found that the evtchn for console is not
bound at all.

Normal sequence of evtchn initialization in qemu-dm for xenpv is:
1) watch xenstore backpath (/local/domain/0/backend/console/<domid>/0)
2) read console info (/local/domain/<domid>/console/{type, ring-ref,
port..=
})
3) bind the evtchn to the port.

But in some case, xend writes to the backpath before the console info
is prepared, and never write to the backpath again. So the qemu-dm
fails at 2) and never reach to 3).

When this happens, manually xenstore-write command on Domain-0
resumes the guest.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Feb 24 09:38:35 2010 +0000 (2010-02-24)
parents 4ba4323889b9
children 8cb6e7eff2ba
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Feb 22 18:47:22 2010 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Wed Feb 24 09:38:35 2010 +0000
     1.3 @@ -1642,6 +1642,11 @@ class XendDomainInfo:
     1.4                  console_uuid = serial_consoles[0].get('uuid')
     1.5                  self.info.console_update(console_uuid, 'location',
     1.6                                           self.console_port)
     1.7 +                # Notify xenpv device model that console info is ready
     1.8 +                if not self.info.is_hvm() and self.info.has_rfb():
     1.9 +                    console_ctrl = self.getDeviceController('console')
    1.10 +                    # The value is unchanged. Just for xenstore watcher
    1.11 +                    console_ctrl.writeBackend(0, 'uuid', console_uuid)
    1.12                  
    1.13  
    1.14          # Update VNC port if it exists and write to xenstore