WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

Re: [XenPPC] xm restore: xc_get_pfn_list() returns bogus mfns

> Dan, we assumed that xend built a domain shell before the restor  
> process, is this not the case.

The restore code does not call initDomain(), so allocMem() is never run:
If I change restore to include initDomain(), then good mfns showup...
Uncomfortable with this 'hack' - don't know where initDomain() came from,
and why it was omitted from restore code?


XendDomainInfo.py:
def create(config):
    """Create a VM from a configuration.

    @param config    configuration
    @raise: VmError for invalid configuration
    """

    log.debug("XendDomainInfo.create(%s)", config)

    vm = findDomainClass()(parseConfig(config))
    try:
        vm.construct()
        vm.initDomain()
        vm.storeVmDetails()
        vm.storeDomDetails()
        vm.registerWatches()
        vm.refreshShutdown()
        return vm
    except:
        log.exception('Domain construction failed')
        vm.destroy()
        raise

def restore(config):
    """Create a domain and a VM object to do a restore.

    @param config: domain configuration
    """

    log.debug("XendDomainInfo.restore(%s)", config)

    vm = findDomainClass()(parseConfig(config), None, None, False, False, True)
    try:
        vm.construct()
        vm.storeVmDetails()
        vm.createDevices()
        vm.createChannels()
        vm.storeDomDetails()
        vm.endRestore()
        return vm
    except:
        vm.destroy()
        raise



_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel