Skip to content
Snippets Groups Projects
hyperv-guide.rst 5.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • Dan Ardelean's avatar
    Dan Ardelean committed
    .. _hyperv-guide:
    
    
    ===========
    Nova HyperV
    ===========
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    
    .. note::
    
       Hyper-V support has been deprecated and will be removed in the Victoria cycle.
    
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    Overview
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    Currently, Kolla can deploy the following OpenStack services for Hyper-V:
    
    * nova-compute
    * neutron-hyperv-agent
    * wsgate
    
    It is possible to use Hyper-V as a compute node within an OpenStack Deployment.
    The nova-compute service runs as openstack-compute, a 64-bit service directly
    upon the Windows platform with the Hyper-V role enabled. The necessary Python
    components as well as the nova-compute service are installed directly onto
    the Windows platform. Windows Clustering Services are not needed for
    functionality within the OpenStack infrastructure.
    
    The wsgate is the FreeRDP-WebConnect service that is used for accessing
    virtual machines from Horizon web interface.
    
    .. note::
    
    
       HyperV services are not currently deployed as containers. This functionality
       is in development. The current implementation installs OpenStack services
       via MSIs.
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    
    .. note::
    
    
       HyperV services do not currently support outside the box upgrades. Manual
       upgrades are required for this process. MSI release versions can be found
       `here <https://cloudbase.it/openstack-hyperv-driver/>`__.
       To upgrade an existing MSI to a newer version, simply uninstall the current
       MSI and install the newer one. This will not delete the configuration files.
       To preserve the configuration files, check the Skip configuration checkbox
       during installation.
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    
    Preparation for Hyper-V node
    
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    Ansible communicates with Hyper-V host via WinRM protocol. An HTTPS WinRM
    listener needs to be configured on the Hyper-V host, which can be easily
    
    created with `this PowerShell script
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    <https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1>`__.
    
    
    A virtual switch has to be created with which Hyper-V virtual machines
    communicate with OpenStack. To quickly enable an interface to be used as a
    Virtual Interface the following PowerShell may be used:
    
    .. code-block:: console
    
    
       PS C:\> $if = Get-NetIPAddress -IPAddress 192* | Get-NetIPInterface
       PS C:\> New-VMSwitch -NetAdapterName $if.ifAlias -Name YOUR_BRIDGE_NAME -AllowManagementOS $false
    
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    .. note::
    
    
       It is very important to make sure that when you are using a Hyper-V node
       with only 1 NIC the ``-AllowManagementOS`` option is set on ``True``,
       otherwise you will lose connectivity to the Hyper-V node.
    
    To prepare the Hyper-V node to be able to attach to volumes provided by
    cinder you must first make sure the Windows iSCSI initiator service is
    running and started automatically.
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    .. code-block:: console
    
    
       PS C:\> Set-Service -Name MSiSCSI -StartupType Automatic
       PS C:\> Start-Service MSiSCSI
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    Preparation for Kolla deployer node
    
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    Hyper-V role is required, enable it in ``/etc/kolla/globals.yml``:
    
    
    .. code-block:: yaml
    
       enable_hyperv: "yes"
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    Hyper-V options are also required in ``/etc/kolla/globals.yml``:
    
    
    .. code-block:: yaml
    
       hyperv_username: <HyperV username>
       hyperv_password: <HyperV password>
       vswitch_name: <HyperV virtual switch name>
       nova_msi_url: "https://www.cloudbase.it/downloads/HyperVNovaCompute_Beta.msi"
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    
    If tenant networks are to be built using VLAN add corresponding type in
    ``/etc/kolla/globals.yml``:
    
    .. code-block:: yaml
    
       neutron_tenant_network_types: 'flat,vlan'
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    The virtual switch is the same one created on the HyperV setup part.
    
    For nova_msi_url, different Nova MSI (Mitaka/Newton/Ocata) versions can
    be found on `Cloudbase website
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    <https://cloudbase.it/openstack-hyperv-driver/>`__.
    
    Add the Hyper-V node in ``ansible/inventory`` file:
    
    
    .. code-block:: ini
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    
       [hyperv:vars]
       ansible_user=<HyperV user>
       ansible_password=<HyperV password>
       ansible_port=5986
       ansible_connection=winrm
       ansible_winrm_server_cert_validation=ignore
    
    
    ``pywinrm`` package needs to be installed in order for Ansible to work
    on the HyperV node:
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    .. code-block:: console
    
    
       pip install "pywinrm>=0.2.2"
    
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    .. note::
    
    
       In case of a test deployment with controller and compute nodes as
       virtual machines on Hyper-V, if VLAN tenant networking is used,
       trunk mode has to be enabled on the VMs:
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    .. code-block:: console
    
    
       Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList <VLAN ID> -NativeVlanId 0 <VM name>
    
    
    networking-hyperv mechanism driver is needed for neutron-server to
    communicate with HyperV nova-compute. This can be built with source
    images by default. Manually it can be intalled in neutron-server
    container with pip:
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    .. code-block:: console
    
    
       pip install "networking-hyperv>=4.0.0"
    
    
    For neutron_extension_drivers, ``port_security`` and ``qos`` are
    currently supported by the networking-hyperv mechanism driver.
    By default only ``port_security`` is set.
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    
    Verify Operations
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    OpenStack HyperV services can be inspected and managed from PowerShell:
    
    .. code-block:: console
    
    
       PS C:\> Get-Service nova-compute
       PS C:\> Get-Service neutron-hyperv-agent
    
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    .. code-block:: console
    
    
       PS C:\> Restart-Service nova-compute
       PS C:\> Restart-Service neutron-hyperv-agent
    
    Dan Ardelean's avatar
    Dan Ardelean committed
    
    For more information on OpenStack HyperV, see
    
    :nova-doc:`Hyper-V virtualization platform
    <admin/configuration/hypervisor-hyper-v.html>`.