Commit ed0af76a authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Merge branch 'release-0.16' into debian-release-0.16

parents 1f82d31c 6a2620fd
2014-09-01, v0.16rc1
2014-09-17, v0.16rc2
* Add support for Desktop variants of Windows
* Add support for archipelago images
* Update the documentation
......@@ -52,8 +52,7 @@ Although diskdump is a lot more flexible than the older formats, there are
still some rules to follow:
* For Linux:
* All block devices in */etc/fstab* should be specified using persistent
names (UUID or LABEL)
* All block devices in */etc/fstab* should be specified using persistent names (UUID or LABEL)
* LVM partitions are not supported
* Only ext{2,3,4} file systems are supported
* For FreeBSD:
......@@ -63,6 +62,64 @@ still some rules to follow:
* For {Open,Net}BSD:
* Only FFS file systems should be used
.. _windows-deployment:
Windows Deployment
snf-image performs Windows customization by installing an Answer File for
Unattended Installation (typically named Unattend.xml) into the VM's hard
disk and customizing the file accordingly. The VM will auto-configure itself
the first time it boots. For this to work, the used Windows image must have
previously been generalized [#f1]_ with a command like this:
.. code-block:: console
Sysprep /generalize /shutdown /oobe
The pre-included Unattend.xml file that snf-image will by default install on
the VM's hard disk is this one:
.. literalinclude:: ../snf-image-helper/unattend.xml
:language: xml
:emphasize-lines: 7,21-30
The file above is expected to work with all AMD64 releases (Server or Desktop)
of Microsoft Windows starting from version 6.1. The table below lists the
releases the developers have confirmed it to work with:
|Version|Marketing name | Editions |
|6.1 |Windows 7 |Professional, Ultimate|
| +----------------------+----------------------+
| |Windows Server 2008 R2|Datacenter |
|6.2 |Windows 8 |Professional |
| +----------------------+----------------------+
| |Windows Server 2012 |Datacenter |
|6.3 |Windows 8.1 |Professional |
| +----------------------+----------------------+
| |Windows Server 2012 R2|Datacenter |
Nevertheless, the user may want to use a custom Unattend.xml file that better
fits his needs. To do so, he can either update the **UNATTEND** configuration
parameter in ``/etc/default/snf-image`` to point to such a file in the host
system or put his copy of the file in the root directory of the image's
%SystemDrive% (snf-image will not install an Unattend.xml file if it is already
present in the image, unless IGNORE_UNATTEND image property is defined). The
latter is the recommended way to do it since it allows to provide answer files
in a per-image basis.
.. warning::
When using custom Unattend.xml files, keep in mind that the highlighted
entries (lines 7 & 21-30) are crucial for snf-image to work. You may remove
or add settings in the file but the highlighted entries must be present.
Progress Monitoring Interface
......@@ -156,3 +213,7 @@ standard error output stream of *snf-image-helper*. Valid *error* messages look
like this:
``{"subtype": "error", "type": "image-helper", "messages": ["The image contains a(n) MSDOS partition table. For FreeBSD images only GUID Partition Tables are supported."], "timestamp": 1379507910.799365}``
.. rubric:: Footnotes
.. [#f1]
......@@ -39,7 +39,7 @@ master_doc = 'index'
# General information about the project.
project = u'snf-image'
copyright = u'2011, 2012, 2013 GRNET S.A. All rights reserved'
copyright = u'2011, 2012, 2013, 2014 GRNET S.A. All rights reserved'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
......@@ -141,6 +141,16 @@ Optional properties
whole process. If for some reason you need to disable this behavior, use the
*DO_SYNC* image property.
When deploying a Windows image, the InstallUnattend configuration task will
install an Answer File for Unattended Installation (the one shipped with
snf-image or the one pointed out by the UNATTEND configuration parameter)
only if such a file is not already present in the root directory of the
image's %SystemDrive%. By defining this property, the installation of the
external answer file is always performed, even if such a file already exists
in the above-mentioned location. For more information on "answer files"
please refer to :ref:`windows-deployment`.
* **PASSWORD_HASHING_METHOD=md5|sha1|blowfish|sha256|sha512**
This property can be used on Unix instances to specify the method to be used
to hash the users password. By default this is determined by the type of the
......@@ -227,14 +237,21 @@ array supports the following keys:
* **mode**: The permission mode of the file (number)
The first two (path, contents) are mandatory. The others (owner, group, mode)
are optional and their default value is root, root and 0440 respectively.
are optional and their default value is root, root and 288 (0440) respectively.
.. warning::
The mode field expects is a decimal number. ``chmod`` and the other similar
Unix tools expect octal numbers. The ``-r--r-----`` mode which is written as
440 is in fact the octal number 0440 which equals to 288. Since the JSON
standard does not support octal number formats, the user needs to do the
translation himself.
The JSON string below defines two files (*/tmp/test1*, */tmp/test2*) whose
content is ``test1\n`` and ``test2\n``, they are both owned by *root:root* and
their permissions are ``-rw-r--r--`` [#]_
their permissions are ``-rw-r--r--`` (0644):
| [
| {
......@@ -242,7 +259,7 @@ their permissions are ``-rw-r--r--`` [#]_
| "contents": "dGVzdDENCg==",
| "owner": "root",
| "group": "root",
| "mode": 0644
| "mode": 420
| },
| {
| "path": "/tmp/test2",
......@@ -253,4 +270,3 @@ their permissions are ``-rw-r--r--`` [#]_
| }
| ]
.. [#] The first mode is in octal representation and the second in decimal.
__version__ = "0.16rc1"
__version__ = "0.16rc2"
......@@ -479,7 +479,7 @@ get_unattend() {
# Workaround to search for $target/Unattend.xml in an case insensitive way.
exists=$(find "$target"/ -maxdepth 1 -iname unattend.xml)
exists=$(find "$target"/ -maxdepth 1 -iregex ".*/\(auto\)?unattend\.xml" )
if [ $(wc -l <<< "$exists") -gt 1 ]; then
log_error "Found multiple Unattend.xml files in the image:" $exists
......@@ -47,7 +47,7 @@ mkdir -p "$target/Windows/Setup/Scripts"
unattend=$(get_unattend "$target")
if [ -n "$unattend" -a -z "$SNF_IMAGE_PROPERTY_USE_DEFAULT_UNATTEND" ]; then
if [ -n "$unattend" -a -z "$SNF_IMAGE_PROPERTY_IGNORE_UNATTEND" ]; then
warn "Using the Unattend.xml file found in the image"
rm -f "$unattend"
......@@ -82,7 +82,7 @@ windows_password() {
echo -n "Installing new password for user \`$usr'..."
echo "net user $usr $password" >> \
echo done
......@@ -5,6 +5,8 @@
<TimeZone>GTB Standard Time</TimeZone>
......@@ -17,30 +19,30 @@
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="" xmlns:xsi="">
<RunSynchronousCommand wcm:action="add">
<Description>Enable Build-in Account</Description>
<Description>Change User Passwords</Description>
<RunSynchronousCommand wcm:action="add">
<Description>Change Administrator Password</Description>
<RunSynchronousCommand wcm:action="add">
<Description>Extend the filesystem</Description>
<Path>diskpart.exe /s C:\Windows\SnfScripts\ExtendFilesystem</Path>
<RunSynchronousCommand wcm:action="add">
<Description>Enable RDP</Description>
<Path>cmd /C reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f</Path>
<RunSynchronousCommand wcm:action="add">
<Description>Enable Automatic Updates</Description>
<Path>cmd /C reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 4 /f</Path>
<RunSynchronousCommand wcm:action="add">
<Description>Supress local user account setup</Description>
<Path>cmd /C reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OOBE /v UnattendCreatedUser /t REG_DWORD /d 1 /f</Path>
......@@ -60,6 +62,8 @@
......@@ -76,10 +76,10 @@
# input of this program.
# UNATTEND: This variables overwrites the unattend.xml file used when deploying
# UNATTEND: This variable overwrites the unattend.xml file used when deploying
# a Windows image. snf-image-helper will use its own unattend.xml file if this
# variable is empty. Please unless you really know what you are doing, leave
# this empty.
# variable is empty. Please leave this empty, unless you really know what you
# are doing.
# Paths for needed programs. Uncomment and change the variables below if you
m4_define([devflow_version], [0.16rc1])
m4_define([devflow_version], [0.16rc2])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment