The present disclosure provides a virtual resource management method and device, belonging to the field of virtualization technology. The method includes: determining the target virtual network card from a plurality of virtual network cards corresponding to the target network card, the target network card being a network card with residual bandwidth greater than the target bandwidth, the target virtual network card being a virtual network card which is not currently bound to any virtual machine, binding the target virtual machine to the target virtual network card, and virtual target. The virtual network card is mapped to the target virtual machine; the port information used to indicate the target network card and the target virtual network card is obtained, and the port information is returned to the virtual management system VMS. According to the target bandwidth required for transmitting a message, the present disclosure takes the network card whose residual bandwidth is greater than the target bandwidth as the target network card, and assigns the target virtual network card to the target virtual machine in the target network card, provides the user with the mapping virtual network card actively, and guarantees the user's demand for bandwidth when transmitting the message. Higher energy.
【技术实现步骤摘要】
虚拟资源管理方法及装置
本公开涉及虚拟化
,特别涉及一种虚拟资源管理方法及装置。
技术介绍
随着虚拟化
的不断发展,越来越多的应用构建在云基础设施或云服务等云计算之上,享受到云计算带来的诸如低成本投入、快速上线、部署运维效率提升、业务弹性伸缩等诸多好处。云计算是一种通过互联网以服务的方式提供动态可伸缩的虚拟化的资源的计算模式,因此,虚拟化是云计算领域的核心技术之一。在云计算中,借助虚拟化技术可以创建虚拟机,基于虚拟机完成对底层硬件设施的抽象和隔离,使得多个云计算用户可以共享同一套硬件环境而互不干扰。虚拟机使得每一个云计算用户均认为自己拥有一套独立的硬件环境,为基础设施即服务(InfrastructureasaService,IaaS)得以构建提供了基础。虚拟机需要在物理机上运行Hypervisor(虚拟机监视器),Hypervisor负责管理和分配系统资源给虚拟机。在虚拟化网络创建虚拟机时,一种通用的解决方案是在Hypervisor构建虚拟网络层,负责为虚拟机分配资源以及虚拟机与外部的通信,例如,参见图1A,可在Hypervisor构建一个开放虚拟交换 ...
【技术保护点】
1.一种虚拟资源管理方法,其特征在于,所述方法包括:从目标网卡所对应的多个虚拟网卡中,确定目标虚拟网卡,所述目标网卡为剩余带宽大于目标带宽的网卡,所述目标虚拟网卡为当前未与任何虚拟机进行绑定的虚拟网卡;将所述目标虚拟机与所述目标虚拟网卡绑定,并将所述目标虚拟网卡映射至所述目标虚拟机;获取用于指示所述目标网卡和所述目标虚拟网卡的端口信息,并向虚拟化管理系统VMS返回所述端口信息。
【技术特征摘要】
1.一种虚拟资源管理方法,其特征在于,所述方法包括:从目标网卡所对应的多个虚拟网卡中,确定目标虚拟网卡,所述目标网卡为剩余带宽大于目标带宽的网卡,所述目标虚拟网卡为当前未与任何虚拟机进行绑定的虚拟网卡;将所述目标虚拟机与所述目标虚拟网卡绑定,并将所述目标虚拟网卡映射至所述目标虚拟机;获取用于指示所述目标网卡和所述目标虚拟网卡的端口信息,并向虚拟化管理系统VMS返回所述端口信息。2.根据权利要求1所述的方法,其特征在于,所述从目标网卡所对应的多个虚拟网卡中,确定目标虚拟网卡之前,所述方法还包括:接收所述VMS发送的虚拟资源分配请求,所述虚拟资源分配请求携带目标带宽和目标虚拟机标识;从网卡列表中获取各个网卡的剩余带宽,并将剩余带宽大于所述目标带宽的网卡作为所述目标网卡。3.根据权利要求1所述的方法,其特征在于,所述从所述目标网卡所对应的多个虚拟网卡中,确定目标虚拟网卡包括:查询所述目标网卡的虚拟网卡列表,所述虚拟网卡列表包括至少一项虚拟网卡信息,每项虚拟网卡信息用于指示虚拟网卡的绑定状态;将绑定状态为未绑定的一个虚拟网卡作为所述目标虚拟网卡,并在所述目标虚拟网卡的虚拟网卡信息中添加目标虚拟机标识。4.根据权利要求1所述的方法,其特征在于,所述方法还包括:接收所述VMS发送的虚拟资源释放请求,所述虚拟资源释放请求携带所述端口信息;根据所述端口信息,将所述目标虚拟网卡与所述目标虚拟机解除绑定,并解除所述目标虚拟网卡到所述目标虚拟机的映射。5.根据权利要求4所述的方法,其特征在于,所述根据所述端口信息,将所述目标虚拟网卡与所述目标虚拟机解除绑定包括:清除所述目标虚拟网卡在所述目标网卡的虚拟网卡列表中的虚拟网卡信息中的虚拟机标识。6....
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。