From 45f4b75491ef9f77b454792770609e0aa003a6e5 Mon Sep 17 00:00:00 2001 From: sateesh Date: Mon, 21 Feb 2011 19:42:20 +0530 Subject: * Removed nova/virt/guest-tools/guest_tool.bat & nova/virt/guest-tools/guest_tool.sh as guest_tool.py can be invoked directly during guest startup. * Removed 'nova/virt/guest-tools/' and the encompassed script 'guest_tool.py' is moved to 'etc/vmware_guest_tool.py' * Moved image vmwareapi_blockdiagram.jpg from 'nova/virt/' to 'doc/source/images/' so that it'll be picked up by document build scripts. * Moved vmwareapi_readme.rst from 'nova/virt/' to 'doc/source/' so that it'll be handled by document build scripts. * Added 'Introduction' section to 'vmwareapi_readme.rst' * Added vmwareapi module diagram to readme document. Added reference to 'images/vmwareapi_blockdiagram.jpg' in document 'vmwareapi_readme.rst' --- doc/source/images/vmwareapi_blockdiagram.jpg | Bin 0 -> 75363 bytes doc/source/vmwareapi_readme.rst | 87 +++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 doc/source/images/vmwareapi_blockdiagram.jpg create mode 100644 doc/source/vmwareapi_readme.rst (limited to 'doc/source') diff --git a/doc/source/images/vmwareapi_blockdiagram.jpg b/doc/source/images/vmwareapi_blockdiagram.jpg new file mode 100644 index 000000000..1ae1fc8e0 Binary files /dev/null and b/doc/source/images/vmwareapi_blockdiagram.jpg differ diff --git a/doc/source/vmwareapi_readme.rst b/doc/source/vmwareapi_readme.rst new file mode 100644 index 000000000..e354237fe --- /dev/null +++ b/doc/source/vmwareapi_readme.rst @@ -0,0 +1,87 @@ +.. + + Copyright (c) 2010 Citrix Systems, Inc. + Copyright 2010 OpenStack LLC. + + Licensed under the Apache License, Version 2.0 (the "License"); you may + not use this file except in compliance with the License. You may obtain + a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations + under the License. + +VMware ESX/ESXi Server Support for OpenStack Compute +==================================================== + +Introduction +------------ +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. + +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. + +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. + +Currently supports Nova's flat networking model (Flat Manager). + +.. image:: images/vmwareapi_blockdiagram.jpg + + +System Requirements +------------------- +Following software components are required for building the cloud using OpenStack on top of ESX/ESXi Server(s): + +* OpenStack (Bexar Release) +* Glance Image service (Bexar Release) +* VMware ESX v4.1 or VMware ESXi(licensed) v4.1 + +VMware ESX Requirements +----------------------- +* ESX credentials with administration/root privileges +* Single local hard disk at the ESX host +* An ESX Virtual Machine Port Group (Bridge for Flat Networking) + +Python dependencies +------------------- +* ZSI-2.0 + +Configuration flags required for nova-compute +--------------------------------------------- +:: + + --connection_type=vmwareapi + --vmwareapi_host_ip= + --vmwareapi_host_username= + --vmwareapi_host_password= + +Other flags +----------- +:: + + --network_manager=nova.network.manager.FlatManager + --flat_network_bridge= + --image_service=nova.image.glance.GlanceImageService + --glance_host= + +FAQ +--- + +1. What type of disk images are supported? + +* Only VMware VMDK's are currently supported and of that support is available only for thick disks, thin provisioned disks are not supported. + + +2. How is IP address information injected into the guest? + +* 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. + + +3. What is the guest tool? + +* 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. + + -- cgit From 1a912276eb636fb89849e6a2573b2c5159d500e9 Mon Sep 17 00:00:00 2001 From: sateesh Date: Tue, 1 Mar 2011 23:22:09 +0530 Subject: Updated with flags for nova-compute, nova-network and nova-console. Added the flags, --vlan_interface= --network_driver=nova.network.vmwareapi_net [Optional, only for VLAN Networking] --flat_network_bridge= [Optional, only for Flat Networking] --console_manager=nova.console.vmrc_manager.ConsoleVMRCManager --console_driver=nova.console.vmrc.VMRCSessionConsole [Optional for OTP (One time Passwords) as against host credentials] --vmwareapi_wsdl_loc=/vimService.wsdl> Removed ZSI from python dependency list. Added suds-0.4 to python depndency list. Added installation instructions for suds on Ubuntu/Debian. Updated ESX requirements section with new requirements that came from support of VLAN networking. Updated FAQ with a question on type of consoles supported. --- doc/source/vmwareapi_readme.rst | 54 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) (limited to 'doc/source') diff --git a/doc/source/vmwareapi_readme.rst b/doc/source/vmwareapi_readme.rst index e354237fe..d30853a39 100644 --- a/doc/source/vmwareapi_readme.rst +++ b/doc/source/vmwareapi_readme.rst @@ -43,11 +43,23 @@ VMware ESX Requirements ----------------------- * ESX credentials with administration/root privileges * Single local hard disk at the ESX host -* An ESX Virtual Machine Port Group (Bridge for Flat Networking) - +* An ESX Virtual Machine Port Group (For Flat Networking) +* An ESX physical network adapter (For VLAN networking) +* Need to enable "vSphere Web Access" in Configuration->Security Profile->Firewall + Python dependencies ------------------- -* ZSI-2.0 +* suds-0.4 + +* Installation procedure on Ubuntu/Debian + +:: + + sudo apt-get install python-setuptools + wget https://fedorahosted.org/releases/s/u/suds/python-suds-0.4.tar.gz + tar -zxvf python-suds-0.4.tar.gz + cd python-suds-0.4 + sudo python setup.py install Configuration flags required for nova-compute --------------------------------------------- @@ -57,6 +69,25 @@ Configuration flags required for nova-compute --vmwareapi_host_ip= --vmwareapi_host_username= --vmwareapi_host_password= + --network_driver=nova.network.vmwareapi_net [Optional, only for VLAN Networking] + --vlan_interface= [Optional, only for VLAN Networking] + + +Configuration flags required for nova-network +--------------------------------------------- +:: + + --network_manager=nova.network.manager.FlatManager [or nova.network.manager.VlanManager] + --flat_network_bridge= [Optional, only for Flat Networking] + + +Configuration flags required for nova-console +--------------------------------------------- +:: + + --console_manager=nova.console.vmrc_manager.ConsoleVMRCManager + --console_driver=nova.console.vmrc.VMRCSessionConsole [Optional, only for OTP (One time Passwords) as against host credentials] + Other flags ----------- @@ -66,6 +97,19 @@ Other flags --flat_network_bridge= --image_service=nova.image.glance.GlanceImageService --glance_host= + --console_manager=nova.console.vmrc_manager.ConsoleVMRCManager + --console_driver=nova.console.vmrc.VMRCSessionConsole [Optional for OTP (One time Passwords) as against host credentials] + --vmwareapi_wsdl_loc=/vimService.wsdl> + +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, + +* Go to http://www.vmware.com/support/developer/vc-sdk/ +* Go to section VMware vSphere Web Services SDK 4.0 +* Click "Downloads" +* Enter VMware credentials when prompted for download +* Unzip the downloaded file vi-sdk-4.0.0-xxx.zip +* Go to SDK->WSDL->vim25 & host the files "vimService.wsdl" and "vim.wsdl" in a WEB SERVER +* Set the flag "--vmwareapi_wsdl_loc" with url, "http:///vimService.wsdl" FAQ --- @@ -85,3 +129,7 @@ FAQ * 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. +4. What type of consoles are supported? + +* 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). + -- cgit From 8fdfcf2c33ee2a244aaa17115fcd181c8f7a42dc Mon Sep 17 00:00:00 2001 From: sateesh Date: Wed, 2 Mar 2011 00:37:55 +0530 Subject: Minor modification to document. Removed excess flags. --- doc/source/vmwareapi_readme.rst | 4 ---- 1 file changed, 4 deletions(-) (limited to 'doc/source') diff --git a/doc/source/vmwareapi_readme.rst b/doc/source/vmwareapi_readme.rst index d30853a39..da396f6d7 100644 --- a/doc/source/vmwareapi_readme.rst +++ b/doc/source/vmwareapi_readme.rst @@ -93,12 +93,8 @@ Other flags ----------- :: - --network_manager=nova.network.manager.FlatManager - --flat_network_bridge= --image_service=nova.image.glance.GlanceImageService --glance_host= - --console_manager=nova.console.vmrc_manager.ConsoleVMRCManager - --console_driver=nova.console.vmrc.VMRCSessionConsole [Optional for OTP (One time Passwords) as against host credentials] --vmwareapi_wsdl_loc=/vimService.wsdl> 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, -- cgit From cd381ae3e1fc4c4e53d3b60272cc8e6ee9fc6352 Mon Sep 17 00:00:00 2001 From: sateesh Date: Fri, 11 Mar 2011 20:52:59 +0530 Subject: * Updated the readme file with description about VLAN Manager support & guest console support. Also added the configuration instructions for the features. * Added assumptions section to the readme file. --- doc/source/vmwareapi_readme.rst | 95 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 4 deletions(-) (limited to 'doc/source') diff --git a/doc/source/vmwareapi_readme.rst b/doc/source/vmwareapi_readme.rst index 03eaa44e8..b56cae074 100644 --- a/doc/source/vmwareapi_readme.rst +++ b/doc/source/vmwareapi_readme.rst @@ -35,8 +35,8 @@ System Requirements ------------------- Following software components are required for building the cloud using OpenStack on top of ESX/ESXi Server(s): -* OpenStack (Bexar Release) -* Glance Image service (Bexar Release) +* OpenStack +* Glance Image service * VMware ESX v4.1 or VMware ESXi(licensed) v4.1 VMware ESX Requirements @@ -45,7 +45,7 @@ VMware ESX Requirements * Single local hard disk at the ESX host * An ESX Virtual Machine Port Group (For Flat Networking) * An ESX physical network adapter (For VLAN networking) -* Need to enable "vSphere Web Access" in Configuration->Security Profile->Firewall +* Need to enable "vSphere Web Access" in "vSphere client" UI at Configuration->Security Profile->Firewall Python dependencies ------------------- @@ -104,6 +104,93 @@ Note:- Due to a faulty wsdl being shipped with ESX vSphere 4.1 we need a working * Go to SDK->WSDL->vim25 & host the files "vimService.wsdl" and "vim.wsdl" in a WEB SERVER * Set the flag "--vmwareapi_wsdl_loc" with url, "http:///vimService.wsdl" + +VLAN Network Manager +-------------------- +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. + +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. + +When VM Spawn request is issued with a VLAN ID the work flow looks like, + +1. Check that a Physical adapter with the given name exists. If no, throw an error.If yes, goto next step. + +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. + +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. + +4. Check if the port group is associated with the Virtual Switch. If no, throw an error. If yes, goto next step. + +5. Check if the port group is associated with the given VLAN Id. If no, throw an error. If yes, goto next step. + +6. Spawn the VM using this Port Group as the Network Name for the VM. + + +Guest console Support +--------------------- +| VMware VMRC console is a built-in console method providing graphical control of the VM remotely. +| +| VMRC Console types supported: +| # Host based credentials +| Not secure (Sends ESX admin credentials in clear text) +| +| # OTP (One time passwords) +| Secure but creates multiple session entries in DB for each OpenStack console create request. +| Console sessions created is can be used only once. +| +| Install browser based VMware ESX plugins/activex on the client machine to connect +| +| Windows:- +| Internet Explorer: +| https:///ui/plugin/vmware-vmrc-win32-x86.exe +| +| Mozilla Firefox: +| https:///ui/plugin/vmware-vmrc-win32-x86.xpi +| +| Linux:- +| Mozilla Firefox +| 32-Bit Linux: +| https:///ui/plugin/vmware-vmrc-linux-x86.xpi +| +| 64-Bit Linux: +| https:///ui/plugin/vmware-vmrc-linux-x64.xpi +| +| OpenStack Console Details: +| console_type = vmrc+credentials | vmrc+session +| host = +| port = +| password = {'vm_id': ,'username':, 'password':} //base64 + json encoded +| +| Instantiate the plugin/activex object +| # In Internet Explorer +| +| +| +| # Mozilla Firefox and other browsers +| +| +| +| Open vmrc connection +| # Host based credentials [type=vmrc+credentials] +| +| +| # OTP (One time passwords) [type=vmrc+session] +| + + +Assumptions +----------- +1. The VMware images uploaded to the image repositories have VMware Tools installed. + + FAQ --- @@ -119,7 +206,7 @@ FAQ 3. What is the guest tool? -* 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 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 4. What type of consoles are supported? -- cgit From 45ca7b71a8e749cbd9b7729b922190e9aaa53744 Mon Sep 17 00:00:00 2001 From: sateesh Date: Wed, 16 Mar 2011 21:54:02 +0530 Subject: * Updated document vmware_readme.rst to mention VLAN networking * Corrected docstrings as per pep0257 recommentations. * Stream-lined the comments. * Updated code with locals() where ever applicable. * VIM : It stands for VMware Virtual Infrastructure Methodology. We have used the terminology from VMware. we have added a question in FAQ inside vmware_readme.rst in doc/source * New fake db: vmwareapi fake module uses a different set of fields and hence the structures required are different. Ex: bridge : 'xenbr0' does not hold good for VMware environment and bridge : 'vmnic0' is used instead. Also return values varies, hence went for implementing separate fake db. * Now using eventlet library instead and removed io_utils.py from branch. * Now using glance.client.Client instead of homegrown code to talk to Glance server to handle images. * Corrected all mis-spelled function names and corresponding calls. Yeah, an auto-complete side-effect! --- doc/source/vmwareapi_readme.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc/source') diff --git a/doc/source/vmwareapi_readme.rst b/doc/source/vmwareapi_readme.rst index b56cae074..fb0e42b80 100644 --- a/doc/source/vmwareapi_readme.rst +++ b/doc/source/vmwareapi_readme.rst @@ -26,7 +26,7 @@ The basic requirement is to support VMware vSphere 4.1 as a compute provider wit 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. -Currently supports Nova's flat networking model (Flat Manager). +Currently supports Nova's flat networking model (Flat Manager) & VLAN networking model. .. image:: images/vmwareapi_blockdiagram.jpg @@ -213,3 +213,7 @@ FAQ * 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). +5. What does 'Vim' refer to as far as vmwareapi module is concerned? + +* Vim refers to VMware Virtual Infrastructure Methodology. This is not to be confused with "VIM" editor. + -- cgit From cbcda1ec466fd498fb8e9fe47c72b52c2d4b3dde Mon Sep 17 00:00:00 2001 From: sateesh Date: Thu, 17 Mar 2011 20:13:48 +0530 Subject: 1) Update few comments where whitespace is missing after '#' 2) Update document so that copy right notice doesn't appear in generated document 3) Now using self.flag(...) instead of setting the flags like FLAGS.vmwareapi_username by direct assignment. 4) Added the missing double quote at the end a string in vim_util.py --- doc/source/vmwareapi_readme.rst | 1 - 1 file changed, 1 deletion(-) (limited to 'doc/source') diff --git a/doc/source/vmwareapi_readme.rst b/doc/source/vmwareapi_readme.rst index fb0e42b80..85f2694c0 100644 --- a/doc/source/vmwareapi_readme.rst +++ b/doc/source/vmwareapi_readme.rst @@ -1,5 +1,4 @@ .. - Copyright (c) 2010 Citrix Systems, Inc. Copyright 2010 OpenStack LLC. -- cgit