nova/nova/virt/hyperv
ChangBo Guo(gcb) 69fef14509 Performance: leverage dict comprehension in PEP-0274
PEP-0274 introduced dict comprehensions to replace dict constructor
with a sequence of length-2 sequences, these are benefits copied
from [1]:
  The dictionary constructor approach has two distinct disadvantages
  from the proposed syntax though.  First, it isn't as legible as a
  dict comprehension.  Second, it forces the programmer to create an
  in-core list object first, which could be expensive.
Nova dropped python 2.6 support, we can leverage this now.
There is deep dive about PEP-0274[2] and basic tests about
performance[3].
Note: This commit doesn't handle dict constructor with kwagrs.
This commit also adds a hacking rule.

[1]http://legacy.python.org/dev/peps/pep-0274/
[2]http://doughellmann.com/2012/11/12/the-performance-impact-of-using-dict-instead-of-in-cpython-2-7-2.html
[3]http://paste.openstack.org/show/154798/

Change-Id: Ifb5cb05b9cc2b8758d5a8e34f7792470a73d7c40
2015-01-16 10:06:13 +08:00
..
README.rst Adds Hyper-V support in nova-compute (with new network_info model), including unit tests 2012-08-16 03:38:51 +03:00
__init__.py Add Hyper-V driver in the "compute_driver" option description 2014-07-24 02:47:32 -07:00
basevolumeutils.py Merge "Hyper-V: fix tgt iSCSI targets disconnect issue" 2015-01-13 15:03:58 +00:00
constants.py Fixes Hyper-V agent IDE/SCSI related refactoring 2014-11-25 18:19:00 +02:00
driver.py virt: pass instance object to block_stats & get_instance_disk_info 2014-12-17 15:48:13 +00:00
hostops.py compute: rename hvtype.py to hv_type.py 2014-11-20 11:26:39 +00:00
hostutils.py Adds host power actions support for Hyper-V 2014-11-17 06:29:19 -08:00
imagecache.py Fix use of extract_flavor() in hyper-v driver 2014-11-26 06:38:57 -08:00
ioutils.py Fixes HyperV VM Console Log 2014-09-18 16:42:29 +03:00
livemigrationops.py Hyper-V: attach volumes via SMB 2014-12-08 16:38:17 +02:00
livemigrationutils.py Hyper-V: attach volumes via SMB 2014-12-08 16:38:17 +02:00
migrationops.py Replacement `_` on `_LE` in all LOG.error 2014-10-21 06:40:05 +00:00
networkutils.py Fix and Gate on E265 2014-07-24 08:11:00 -04:00
networkutilsv2.py Use oslo.i18n 2014-07-18 14:28:09 -04:00
pathutils.py Hyper-V: attach volumes via SMB 2014-12-08 16:38:17 +02:00
rdpconsoleops.py console: add typed console objects 2014-09-01 12:02:31 +00:00
rdpconsoleutils.py Hyper-V driver RDP console access support 2014-02-07 23:41:33 +02:00
rdpconsoleutilsv2.py Hyper-V driver RDP console access support 2014-02-07 23:41:33 +02:00
snapshotops.py Replacement `_` on `_LW` in all LOG.warning part 4 2014-12-04 13:43:38 +02:00
utilsfactory.py Fixes Hyper-V agent force_hyperv_utils_v1 flag issue 2014-08-14 20:23:06 +03:00
vhdutils.py Fixes differencing VHDX images issue on Hyper-V 2014-11-18 17:07:50 +02:00
vhdutilsv2.py Drop workarounds for python2.6 2015-01-03 18:26:03 +08:00
vif.py Fix and Gate on E265 2014-07-24 08:11:00 -04:00
vmops.py Merge "rename oslo.concurrency to oslo_concurrency" 2014-12-08 22:40:45 +00:00
vmutils.py Performance: leverage dict comprehension in PEP-0274 2015-01-16 10:06:13 +08:00
vmutilsv2.py Hyper-V: attach volumes via SMB 2014-12-08 16:38:17 +02:00
volumeops.py Merge "Fixes Hyper-V volume discovery exception message" 2014-12-12 10:44:18 +00:00
volumeutils.py Add CHAP credentials support 2014-11-19 18:29:32 +02:00
volumeutilsv2.py Add CHAP credentials support 2014-11-19 18:29:32 +02:00

README.rst

Hyper-V Volumes Management

To enable the volume features, the first thing that needs to be done is to enable the iSCSI service on the Windows compute nodes and set it to start automatically.

sc config msiscsi start= auto net start msiscsi

In Windows Server 2012, it's important to execute the following commands to prevent having the volumes being online by default:

diskpart san policy=OfflineAll exit

How to check if your iSCSI configuration is working properly:

On your OpenStack controller:

1. Create a volume with e.g. "nova volume-create 1" and note the generated volume id

On Windows:

  1. iscsicli QAddTargetPortal <your_iSCSI_target>
  2. iscsicli ListTargets

The output should contain the iqn related to your volume: iqn.2010-10.org.openstack:volume-<volume_id>

How to test Boot from volume in Hyper-V from the OpenStack dashboard:

  1. Fist of all create a volume
  2. Get the volume ID of the created volume

3. Upload and untar to the Cloud controller the next VHD image: http://dev.opennebula.org/attachments/download/482/ttylinux.vhd.gz 4. sudo dd if=/path/to/vhdfileofstep3 of=/dev/nova-volumes/volume-XXXXX <- Related to the ID of step 2 5. Launch an instance from any image (this is not important because we are just booting from a volume) from the dashboard, and don't forget to select boot from volume and select the volume created in step2. Important: Device name must be "vda".