IT技术互动交流平台

openstack:nova中“从镜像启动”建虚拟机的流程

来源:IT165收集  发布日期:2015-08-24 22:38:00

openstack版本为K版本。

从镜像启动虚拟机之:创建镜像+创建虚拟机并开机的流程

 

nova.api.openstack.compute.servers.Controller.create
->nova.compute.api.API.create
->nova.compute.api.API._create_instance
->nova.comductor.ComputeTaskAPI.build_instances
->nova.conductor. rpcapi.ComputeTaskAPI.build_instances
->nova.conductor. manager.ComputeTaskAPI.build_instances
->nova.compute.rpcapi.ComputeAPI.build_and_run_instance
->nova.compute.manager.ComputeAPI.build_and_run_instance
->nova.compute.manager.ComputeAPI._locked_do_build_and_run_instance
->nova.compute.manager.ComputeAPI._do_build_and_run_instance
->nova.compute.manager.ComputeAPI._build_and_run_instance
->nova.virt.libvirt.driver.LibvirtDriver.spawn
->Nova.virt.libvirt.driver._create_image //创建系统盘
 ->Nova.virt.libvirt.driver._try_fetch_image_cache
 ->Nova.virt.libvirt.imagebackend.Image.cache
 ->Nova.virt.libvirt.imagebackend.Qcow2.create_image
   ->Nova.virt.libvirt.imagebackend.Qcow2.create_image:prepare_template即fetch_image
     ->Nova.virt.libvirt.utils.fetch_image
       ->Nova.virt.images.fetch_to_raw
         ->Nova.virt.images.fetch  	 	#下载系统镜像到/var/lib/nova/instances/_base/目录
           ->nova.image.glance.GlanceImageService.download
             ->nova.image.glance.GlanceClientWrapper.call
  ->Nova.virt.images.convert_image    #若镜像不是raw格式,且nova.conf中force_raw_images=True,则将backing file强制转换为raw格式
  ->Nova.virt.libvirt.imagebackend.Qcow2.create_image:copy_qcow2_image
  ->nova.virt.libvirt.utils.create_cow_image
->nova.virt.libvirt.driver._get_guest_xml //创建虚拟机的xml文件
->nova.virt.libvirt.driver._create_domain_and_network //创建主机和主机网络
->nova.virt.driver.block_device_info_get_mapping //块设备映射
->nova.virt.driver.get_image_from_system_metadata //获取镜像和元数据
->nova.virt.libvirt.driver.LibvirtDriver.attach_volume //挂载云硬盘
->nova.virt.libvirt.firewall.prepare_instance_filter //准备网络
->nova.virt.libvirt.driver.LibvirtDriver._create_domain //创建主机
->nova.virt.libvirt.driver.LibvirtDriver._create_domain :domain = self._conn.defineXML
->/usr/lib64/python2.7/site-packages/libvirt.py:defineXML
->nova.virt.libvirt.firewall.apply_instance_filter//使用网络,实际上全在prepare_instance_filter中做了,这里都是空
->nova.virt.libvirt.driver.power_on //开机

Tag标签: 镜像   流程  
  • 专题推荐

About IT165 - 广告服务 - 隐私声明 - 版权申明 - 免责条款 - 网站地图 - 网友投稿 - 联系方式
本站内容来自于互联网,仅供用于网络技术学习,学习中请遵循相关法律法规