Properly write non-raw LVM images on creation

Fixes bug 1075333

When force_raw_images=False and libvirt_images_type=lvm were set
together, selecting anything other than a RAW image would result in
an unbootable instance. This is because the downloaded image was
being directly dd'd onto the new LVM root, which will obviously not
work for any format other than RAW.

Simple change to use qemu-img to read from the image (letting it
decide the format) and write to the LVM root as raw.

Change-Id: I36494e6d0671c07f7511c10ef886c8cf84c18df7
Libvirt: Implement snapshots for LVM-backed roots

Uses the built-in LVM snapshotting mechanism to create a new
snapshot, use qemu-img to extract the full root into an image file,
then delete the snapshot volume. Although we typically zero deleted
LVM volumes manually, this is not necessary for snapshots, as LVM
handles it for us (per the documentation).

Change-Id: I82f21488671ffa3be3d0feba73ff631fa2a51ec0
Fixes: Bug 1120809
Flags: DocImpact
Refine PowerVM MAC address generation algorithm

Change MAC address generation algorithm on PowerVM to generate
an additional 4 bits of data and improve comments around it.

Change-Id: Icdfba54161bcb043c17127c26c57503af497d001
Remove locking declarator in ServiceGroup __new__()

The lock-based synchronization is not re-entrant, which
would introduce a deadlock with the new conductor patch.
Because race condition is not be possible in the
eventlet threading model with GIL, we simply remove the
synchronized declarator.

Change-Id: I03e52227385dafd2b2b66bca18cab8445c91f3be
Move allowvssprovider=false to vm-data field

Currently we're setting allowvssprovider=false in the other-config
field. However, this setting is not honored in the other-config field,
allowing vss-based snapshots to be created.

The allowvssprovider=false should be moved to the vm-data field in
xenstore as that field is used to decide whether vss snapshotting is allowed or not.

Amended to change: 'str(False)' to 'false'.

Relevant code:

https://github.com/openstack/nova/blob/master/nova/virt/xenapi/vm_utils.py#L233

Manually set allowvssprovider=false in the vm-data field:

xe vm-param-set uuid=<VM-UUID> xenstore-data:vm-data/allowvssprovider=false

References:

https://github.com/mcclurmc/xcp-storage-managers/blob/master/drivers/vss_control#L38
https://github.com/mcclurmc/xcp-storage-managers/blob/master/snapwatchd/snapwatchd#L298

Change-Id: I96efbc18cb7eb0ee2d0e6526b3c4f3502a68e1dd
Fixes: bug #1112673
Merge "Refine PowerVM MAC address generation algorithm"
Merge "Remove locking declarator in ServiceGroup __new__()"
Merge "Properly write non-raw LVM images on creation"
Merge "Libvirt: Implement snapshots for LVM-backed roots"
Merge "Move allowvssprovider=false to vm-data field"