def _get_existing_domain_xml(self, instance, network_info, block_device_info=None):
    try:
        virt_dom = self._lookup_by_name(instance['name'])
        xml = virt_dom.XMLDesc(0)
    except exception.InstanceNotFound:
        disk_info = blockinfo.get_disk_info(CONF.libvirt.virt_type, instance, block_device_info)
        xml = self._get_guest_xml(nova_context.get_admin_context(), instance, network_info, disk_info, block_device_info=block_device_info)
    return xml
def _get_existing_domain_xml(self, instance, network_info, block_device_info=None):
    try:
        virt_dom = self._lookup_by_name(instance['name'])
        xml = virt_dom.XMLDesc(0)
    except exception.InstanceNotFound:
        disk_info = blockinfo.get_disk_info(CONF.libvirt.virt_type, instance, block_device_info)
        xml = self._get_guest_xml(nova_context.get_admin_context(), instance, network_info, disk_info, block_device_info=block_device_info)
    return xml