File: windows.rst

package info (click to toggle)
murano 1%3A6.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,644 kB
  • sloc: python: 34,127; sh: 717; pascal: 269; makefile: 83
file content (172 lines) | stat: -rw-r--r-- 5,217 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
MS Windows image builder for OpenStack Murano
=============================================

Introduction
------------

This repository contains MS Windows templates, powershell scripts and bash scripted logic used to create qcow2 images
for QEMU/KVM based virtual machines used in OpenStack.

MS Windows Versions
-------------------

Supported by builder versions with en_US localization:

* Windows 2012 R2
* Windows 2012 R2 Core
* Windows 2008 R2
* Windows 2008 R2 Core

Getting Started
---------------

Trial versions of Windows 2008 R2 / 2012 R2 used by default. You could use these images for 180 days without activation.
You could download evaluation versions from official Microsoft website:

* `[Windows 2012 R2 - download] <https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2012-r2>`_
* `[Windows 2008 R2 - download] <https://www.microsoft.com/en-us/download/details.aspx?id=11093>`_

System requirements
~~~~~~~~~~~~~~~~~~~

* Debian based Linux distribution, like Ubuntu, Mint and so on.
* Packages required:
  ``qemu-kvm virt-manager virt-goodies virtinst bridge-utils libvirt-bin
  uuid-runtime samba samba-common cifs-utils``
* User should be able to run sudo without password prompt!

  .. code-block:: console

    sudo echo "${USER}    ALL = NOPASSWD: ALL" > /etc/sudoers.d/${USER}
    sudo chmod 440 /etc/sudoers.d/${USER}

* Free disk space > 50G on partition where script will spawn virtual machines because of ``40G`` required by virtual
  machine HDD image.
* Internet connectivity.
* Samba shared resource.

Configuring builder
~~~~~~~~~~~~~~~~~~~

Configuration parameters to tweak:

``[default]``

* ``workdir`` - place where script would prepare all software required by build scenarios. By `default` is not set,
  i.e. script directory would used as root of working space.
* ``vmsworkdir`` - must contain valid path, this parameter tells script where it should spawn virtual machines.
* ``runparallel`` - *true* of *false*, **false** set by default. This parameter describes how to start virtual machines,
  one by one or in launch them in background.

``[samba]``

* ``mode`` - *local* or *remote*. In local mode script would try to install and configure Samba server locally. If set
  to remote, you should also provide information about connection.
* ``host`` - in local mode - is 192.168.122.1, otherwise set proper ip address.
* ``user`` - set to **guest** by default in case of guest rw access.
* ``domain`` - Samba server user domain, if not set `host` value used.
* ``password`` - Samba server user password.
* ``image-builder-share`` - Samba server remote directory.

MS Windows install preparation:

``[win2k12r2]`` or ``[win2k8r2]`` - shortcuts for 2012 R2 and 2008 R2.

* ``enabled`` - *true* of *false*, include or exclude release processing by script.
* ``editions`` - standard, core or both(space used as delimiter).
* ``iso`` - local path to iso file

By default ``[win2k8r2]`` - disabled, if you need you can enable this release in *config.ini* file.

Run
---

Preparation
~~~~~~~~~~~

Run ``chmod +x *.sh`` in builder directory to make script files executable.

Command line parameters:
~~~~~~~~~~~~~~~~~~~~~~~~

``runme.sh`` - the main script

* ``--help`` - shows usage
* ``--forceinstall-dependencies`` - Runs dependencies install.
* ``--check-smb`` - Run checks or configuration of Samba server.
* ``--download-requirements`` - Download all required and configures software except MS Windows ISO.
* ``--show-configured`` - Shows configured and available to use MS Windows releases.
* ``--run`` - normal run

Experimental options:
^^^^^^^^^^^^^^^^^^^^^

* ``--config-file`` - Set configuration file location instead of default.

Use cases
---------

All examples below describes changes in ``config.ini`` file

1. I want to build one image for specific version and edition. For example: version - **2012 R2** and edition -
   **standard**. Steps to reach the goal:

 * Disable ``[win2k8r2]`` from script processing.

   .. code-block:: ini

    [win2k8r2]
    enabled=false

 - Update ``[win2k12r2]`` with desired edition(**standard**).

   .. code-block:: ini

     [win2k12r2]
     enabled=true
     editions=standard

 * Execute ``runme.sh --run``

2. I want to build two images for specific version with all supported by script editions. For example: **2012 R2** and
   editions - **standard** and **core**. Steps to reach the goal:

 * Disable `[win2k8r2]` from script processing.

   .. code-block:: ini

     [win2k8r2]
     enabled=false

 * Update ``[win2k12r2]`` with desired editions(**standard** and **core**).

   .. code-block:: ini

     [win2k12r2]
     enabled=true
     editions=standard core


 * Execute ``runme.sh --run``

3. I want to build two images for all supported by script versions with specific editions. For example: versions -
   **2012 R2** and **2008 R2** and edition - **core**. Steps to reach the goal:

 * Update ``[win2k8r2]`` with desired edition(**core**).

   .. code-block:: ini

      [win2k8r2]
      enabled=true
      editions=core

 * Update ``[win2k12r2]`` with desired edition(**core**).

   .. code-block:: ini

      [win2k12r2]
      enabled=true
      editions=core

 * Execute ``runme.sh --run``