博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
openstack juno 配置vmware(vcenter、vsphere)
阅读量:4183 次
发布时间:2019-05-26

本文共 4145 字,大约阅读时间需要 13 分钟。

官方配置文档:





When you use the VMwareVCDriver (vCenter versions 5.1 and later) with OpenStack Compute, add the following VMware-specific configuration options to the nova.conf file:

Select Text
1
2
3
4
5
6
7
8
9
[DEFAULT]
compute_driver=vmwareapi.VMwareVCDriver
[vmware]
host_ip=<vCenter host IP>
host_username=<vCenter username>
host_password=<vCenter password>
cluster_name=<vCenter cluster name>
datastore_regex=<optional datastore regex>





将qcow2的镜像格式转化为vmdk:
$ qemu-img convert -f qcow2 ~/Downloads/trusty-server-cloudimg-amd64-disk1.img \ -O vmdk trusty-server-cloudimg-amd64-disk1.vmdk       
$ glance image-create --name trusty-cloud --is-public False \ --container-format bare --disk-format vmdk \ --property vmware_disktype="sparse" \ --property vmware_adaptertype="ide" < \ trusty-server-cloudimg-amd64-disk1.vmdk







将kvm 节点stop,让虚拟机调度到vcenter:





也可以通过zone来控制生成虚拟机到对应的节点:








官方juno对vmware的支持:
<  
Feature
Launch ✔ *(12)
Reboot ✔*(11)
Terminate
Resize

* (15) * (15)
Rescue




Pause

* (15) * (15)
Un-pause

* (15) * (15)
Suspend

* (15) * (15)
Resume

* (15) * (15)
Inject Networking ✔*(1)(2) ✔*(1) ✔*(1)


✔*


Inject File ✔* ✔*



✗*(6)

Serial Console Output ✔(4)




VNC Console ✔* ✔* ✔*


SPICE Console


RDP Console

Attach Volume


Detach Volume


Live Migration

✗ (10) * (15) * (15)
Snapshot

✔ * (13) * (15) * (15)
iSCSI





iSCSI CHAP






Fibre Channel







Set Admin Pass


✗*(6) * (15) * (15)

Get Guest Info




Get Host Info




Glance Integration

Service Control





VLAN Networking ✗*(7) ✗*(16)

Flat Networking
Security Groups ✗*(9) ✗*(7)


Firewall Rules

✗ *(14) ✗*(7) * (15) * (15)

Routing

✗*(7)

nova diagnostics




Config Drive

Auto configure disk



Evacuate




Volume swap




Volume rate limiting




  1. Inject Networking only works with nova-network in Flat mode, and only with Debian/Ubuntu based virtual machines, and only at boot time
  2.  integration also supports using a guest agent to inject networking settings, at any time when a VM has the guest agent installed, through an admin API extension
  3. (unused)
  4. XenAPI support for serial console 
  5. (unsued)
  6. Functionality provided by cloudbase-init for windows 
  7. Vlan and Routing is only supported on Hyper-V when using the Quantum / Neutron Hyper-V Agent; VlanManager mode is not supported with nova-network.
  8. Support of Xen using Libvirt
  9. Security Groups supported on VC/ESX Driver when using the Quantum NVP Plugin
  10. Copy on write images are not suported (see bug ).
  11. Only cold-snapshots are available.
  12. Feature does not make sense for Baremetal / Ironic
  13. Feature currently enabled by some Ironic drivers, but not all.

在juno版本中,不能支持的功能:
1、pause、unpause(vspherer没有此功能,注: 
Suspend与Pause不一样,支持Suspend
2、热迁移不支持
3、resize 
不支持

具体更多关于热迁移,resize请参考博客(注:博客还未整理):

2、目前对vmwareapi驱动的虚拟机进行resize 
时,正常应该吧finish_migration函数的rpc消息发给vmware驱动所在机器,实际确发送给了qemu
所在机器,因此就出现了问题。
3、初步判断原因为,当将虚拟机从host1 resize到host2  
finish_migration
将在host1上面执行。当 
使用了vmwareapi驱动时,按照kvm的resize逻辑,还是将 
finish_migration 放到了kvm所在节点进行执行,因此出错了。正确情况为需要适配vmwareapi驱动 
的resize,将 
finish_migration 
  
执行仍然放到自身节点上。
4、根据上述步骤3分析,由于resize代码逻辑太过复杂,就先强行修改rpc发送消息的目标节点到vmwareapi驱动所在节点,避过步骤三的错误。看到在vsphere底层对opentack 调用的resize流程,走的是克隆的方式,假若原始虚拟机为869a86b4-fdd8-49dd-8502-b2af1ec847b5在resize时候,则会克隆一个名为869a86b4-fdd8-49dd-8502-b2af1ec847b5-orig的虚拟机。当调用finish_migration时,则将原始虚拟机为869a86b4-fdd8-49dd-8502-b2af1ec847b5删除掉,再将869a86b4-fdd8-49dd-8502-b2af1ec847b5-orig修改为869a86b4-fdd8-49dd-8502-b2af1ec847b5。

总结:假若想让opentack适配vmware的resize,需要对nova的resize代码进行分析,工作量稍大(resize目前是opentack里面最复杂的逻辑,调用了创建虚拟机,迁移虚拟机等一系列opesntck的基础功能),其次修改适配的话对opentack原生代码侵入也较大。



你可能感兴趣的文章
HTML5学习之——HTML 5 应用程序缓存
查看>>
HTML5学习之——HTML 5 服务器发送事件
查看>>
SVG学习之——HTML 页面中的 SVG
查看>>
mysql中用命令行复制表结构的方法
查看>>
hbase shell出现ERROR: org.apache.hadoop.hbase.ipc.ServerNotRunningYetException
查看>>
解决Rhythmbox乱码
查看>>
豆瓣爱问共享资料插件发布啦
查看>>
kermit的安装和配置
查看>>
linux中cat命令使用详解
查看>>
java中的异常机制
查看>>
商务智能-基本方法-数据钻取
查看>>
eclipse下生成Java类图和时序图,生成UML图
查看>>
M文件程序设计(matlab)
查看>>
matlab基础知识
查看>>
程序员的职业素养
查看>>
一道面试题深入了解java底层
查看>>
java下载附件
查看>>
cron表达式每个月最后一天
查看>>
Oracle中Like与Instr模糊查询性能大比拼
查看>>
使用spring的好处
查看>>