PageRenderTime 43ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/source/vmwareapi_readme.rst

https://github.com/jkoelker/nova
ReStructuredText | 226 lines | 161 code | 65 blank | 0 comment | 0 complexity | 1cf5912bf6b026029e012df2cfcdc883 MD5 | raw file
  1. ..
  2. Copyright (c) 2010 Citrix Systems, Inc.
  3. Copyright 2010 OpenStack LLC.
  4. Licensed under the Apache License, Version 2.0 (the "License"); you may
  5. not use this file except in compliance with the License. You may obtain
  6. a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  10. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  11. License for the specific language governing permissions and limitations
  12. under the License.
  13. VMware ESX/ESXi Server Support for OpenStack Compute
  14. ====================================================
  15. Introduction
  16. ------------
  17. A module named 'vmwareapi' is added to 'nova.virt' to add support of VMware ESX/ESXi hypervisor to OpenStack compute (Nova). Nova may now use VMware vSphere as a compute provider.
  18. The basic requirement is to support VMware vSphere 4.1 as a compute provider within Nova. As the deployment architecture, support both ESX and ESXi. VM storage is restricted to VMFS volumes on local drives. vCenter is not required by the current design, and is not currently supported. Instead, Nova Compute talks directly to ESX/ESXi.
  19. The 'vmwareapi' module is integrated with Glance, so that VM images can be streamed from there for boot on ESXi using Glance server for image storage & retrieval.
  20. Currently supports Nova's flat networking model (Flat Manager) & VLAN networking model.
  21. .. image:: images/vmwareapi_blockdiagram.jpg
  22. System Requirements
  23. -------------------
  24. Following software components are required for building the cloud using OpenStack on top of ESX/ESXi Server(s):
  25. * OpenStack
  26. * Glance Image service
  27. * VMware ESX v4.1 or VMware ESXi(licensed) v4.1
  28. VMware ESX Requirements
  29. -----------------------
  30. * ESX credentials with administration/root privileges
  31. * Single local hard disk at the ESX host
  32. * An ESX Virtual Machine Port Group (For Flat Networking)
  33. * An ESX physical network adapter (For VLAN networking)
  34. * Need to enable "vSphere Web Access" in "vSphere client" UI at Configuration->Security Profile->Firewall
  35. Python dependencies
  36. -------------------
  37. * suds-0.4
  38. * Installation procedure on Ubuntu/Debian
  39. ::
  40. easy_install suds==0.4
  41. Configuration flags required for nova-compute
  42. ---------------------------------------------
  43. ::
  44. --connection_type=vmwareapi
  45. --vmwareapi_host_ip=<VMware ESX Host IP>
  46. --vmwareapi_host_username=<VMware ESX Username>
  47. --vmwareapi_host_password=<VMware ESX Password>
  48. --vmwareapi_vlan_interface=<Physical ethernet adapter name in VMware ESX host for vlan networking E.g vmnic0> [Optional, only for VLAN Networking]
  49. Configuration flags required for nova-network
  50. ---------------------------------------------
  51. ::
  52. --network_manager=nova.network.manager.FlatManager [or nova.network.manager.VlanManager]
  53. --flat_network_bridge=<ESX Virtual Machine Port Group> [Optional, only for Flat Networking]
  54. Configuration flags required for nova-console
  55. ---------------------------------------------
  56. ::
  57. --console_manager=nova.console.vmrc_manager.ConsoleVMRCManager
  58. --console_driver=nova.console.vmrc.VMRCSessionConsole [Optional, only for OTP (One time Passwords) as against host credentials]
  59. Other flags
  60. -----------
  61. ::
  62. --image_service=nova.image.glance.GlanceImageService
  63. --glance_host=<Glance Host>
  64. --vmwareapi_wsdl_loc=<http://<WEB SERVER>/vimService.wsdl>
  65. Note:- Due to a faulty wsdl being shipped with ESX vSphere 4.1 we need a working wsdl which can to be mounted on any webserver. Follow the below steps to download the SDK,
  66. * Go to http://www.vmware.com/support/developer/vc-sdk/
  67. * Go to section VMware vSphere Web Services SDK 4.0
  68. * Click "Downloads"
  69. * Enter VMware credentials when prompted for download
  70. * Unzip the downloaded file vi-sdk-4.0.0-xxx.zip
  71. * Go to SDK->WSDL->vim25 & host the files "vimService.wsdl" and "vim.wsdl" in a WEB SERVER
  72. * Set the flag "--vmwareapi_wsdl_loc" with url, "http://<WEB SERVER>/vimService.wsdl"
  73. Debug flag
  74. ----------
  75. .. note::
  76. suds logging is very verbose and turned off by default. If you need to
  77. debug the VMware API calls, change the default_log_levels flag appropriately.
  78. VLAN Network Manager
  79. --------------------
  80. VLAN network support is added through a custom network driver in the nova-compute node i.e "nova.network.vmwareapi_net" and it uses a Physical ethernet adapter on the VMware ESX/ESXi host for VLAN Networking (the name of the ethernet adapter is specified as vlan_interface flag in the nova-compute configuration flag) in the nova-compute node.
  81. Using the physical adapter name the associated Virtual Switch will be determined. In VMware ESX there can be only one Virtual Switch associated with a Physical adapter.
  82. When VM Spawn request is issued with a VLAN ID the work flow looks like,
  83. 1. Check that a Physical adapter with the given name exists. If no, throw an error.If yes, goto next step.
  84. 2. Check if a Virtual Switch is associated with the Physical ethernet adapter with vlan interface name. If no, throw an error. If yes, goto next step.
  85. 3. Check if a port group with the network bridge name exists. If no, create a port group in the Virtual switch with the give name and VLAN id and goto step 6. If yes, goto next step.
  86. 4. Check if the port group is associated with the Virtual Switch. If no, throw an error. If yes, goto next step.
  87. 5. Check if the port group is associated with the given VLAN Id. If no, throw an error. If yes, goto next step.
  88. 6. Spawn the VM using this Port Group as the Network Name for the VM.
  89. Guest console Support
  90. ---------------------
  91. | VMware VMRC console is a built-in console method providing graphical control of the VM remotely.
  92. |
  93. | VMRC Console types supported:
  94. | # Host based credentials
  95. | Not secure (Sends ESX admin credentials in clear text)
  96. |
  97. | # OTP (One time passwords)
  98. | Secure but creates multiple session entries in DB for each OpenStack console create request.
  99. | Console sessions created is can be used only once.
  100. |
  101. | Install browser based VMware ESX plugins/activex on the client machine to connect
  102. |
  103. | Windows:-
  104. | Internet Explorer:
  105. | https://<VMware ESX Host>/ui/plugin/vmware-vmrc-win32-x86.exe
  106. |
  107. | Mozilla Firefox:
  108. | https://<VMware ESX Host>/ui/plugin/vmware-vmrc-win32-x86.xpi
  109. |
  110. | Linux:-
  111. | Mozilla Firefox
  112. | 32-Bit Linux:
  113. | https://<VMware ESX Host>/ui/plugin/vmware-vmrc-linux-x86.xpi
  114. |
  115. | 64-Bit Linux:
  116. | https://<VMware ESX Host>/ui/plugin/vmware-vmrc-linux-x64.xpi
  117. |
  118. | OpenStack Console Details:
  119. | console_type = vmrc+credentials | vmrc+session
  120. | host = <VMware ESX Host>
  121. | port = <VMware ESX Port>
  122. | password = {'vm_id': <VMware VM ID>,'username':<VMware ESX Username>, 'password':<VMware ESX Password>} //base64 + json encoded
  123. |
  124. | Instantiate the plugin/activex object
  125. | # In Internet Explorer
  126. | <object id='vmrc' classid='CLSID:B94C2238-346E-4C5E-9B36-8CC627F35574'>
  127. | </object>
  128. |
  129. | # Mozilla Firefox and other browsers
  130. | <object id='vmrc' type='application/x-vmware-vmrc;version=2.5.0.0'>
  131. | </object>
  132. |
  133. | Open vmrc connection
  134. | # Host based credentials [type=vmrc+credentials]
  135. | <script type="text/javascript">
  136. | var MODE_WINDOW = 2;
  137. | var vmrc = document.getElementById('vmrc');
  138. | vmrc.connect(<VMware ESX Host> + ':' + <VMware ESX Port>, <VMware ESX Username>, <VMware ESX Password>, '', <VMware VM ID>, MODE_WINDOW);
  139. | </script>
  140. |
  141. | # OTP (One time passwords) [type=vmrc+session]
  142. | <script type="text/javascript">
  143. | var MODE_WINDOW = 2;
  144. | var vmrc = document.getElementById('vmrc');
  145. | vmrc.connectWithSession(<VMware ESX Host> + ':' + <VMware ESX Port>, <VMware VM ID>, <VMware ESX Password>, MODE_WINDOW);
  146. | </script>
  147. Assumptions
  148. -----------
  149. 1. The VMware images uploaded to the image repositories have VMware Tools installed.
  150. FAQ
  151. ---
  152. 1. What type of disk images are supported?
  153. * Only VMware VMDK's are currently supported and of that support is available only for thick disks, thin provisioned disks are not supported.
  154. 2. How is IP address information injected into the guest?
  155. * IP address information is injected through 'machine.id' vmx parameter (equivalent to XenStore in XenServer). This information can be retrived inside the guest using VMware tools.
  156. 3. What is the guest tool?
  157. * The guest tool is a small python script that should be run either as a service or added to system startup. This script configures networking on the guest. The guest tool is available at tools/esx/guest_tool.py
  158. 4. What type of consoles are supported?
  159. * VMware VMRC based consoles are supported. There are 2 options for credentials one is OTP (Secure but creates multiple session entries in DB for each OpenStack console create request.) & other is host based credentials (It may not be secure as ESX credentials are transmitted as clear text).
  160. 5. What does 'Vim' refer to as far as vmwareapi module is concerned?
  161. * Vim refers to VMware Virtual Infrastructure Methodology. This is not to be confused with "VIM" editor.