Migrate ALTO user docs to rst
[docs.git] / manuals / user-guide / src / main / asciidoc / vtn / VTN_How_To_Support_for_Microsoft_SCVMM.adoc
1 ==== Support for Microsoft SCVMM 2012 R2 with ODL VTN
2
3 ===== Introduction
4
5 System Center Virtual Machine Manager (SCVMM) is Microsoft's virtual machine support center for window's based emulations. SCVMM is a management solution for the virtualized data center. You can use it to configure and manage your virtualization host, networking, and storage resources in order to create and deploy virtual machines and services to private clouds that you have created.
6
7 The VSEM Provider is a plug-in to bridge between SCVMM and OpenDaylight.
8
9 Microsoft Hyper-V is a server virtualization developed by Microsoft, which provides virtualization services through hypervisor-based emulations.
10
11 .Set-Up Diagram
12 image::vtn/setup_diagram_SCVMM.png["Setup" ,width= 500]
13
14 *The topology used in this set-up is:*
15
16 * A SCVMM with VSEM Provider installed and a running VTN Coordinator and OpenDaylight with VTN Feature installed.
17
18 * PF1000 virtual switch extension has been installed in the two Hyper-V servers as it implements the OpenFlow capability in Hyper-V.
19
20 * Three OpenFlow switches simulated using mininet and connected to Hyper-V.
21
22 * Four VM's hosted using SCVMM.
23
24 *It is implemented as two major components:*
25
26 * SCVMM
27
28 * OpenDaylight (VTN Feature)
29
30 * VTN Coordinator
31
32 ===== VTN Coordinator
33
34 OpenDaylight VTN as Network Service provider for SCVMM where VSEM provider is added in the Network Service which will handle all requests from SCVMM and communicate with the VTN Coordinator. It is used to manage the network virtualization provided by OpenDaylight.
35
36 ====== Installing HTTPS in VTN Coordinator
37
38 * System Center Virtual Machine Manager (SCVMM) supports only https protocol.
39
40 *Apache Portable Runtime (APR) Installation Steps*
41
42 * Enter the command "yum install *apr*" in VTN Coordinator installed machine.
43
44 * In /usr/bin, create a soft link as "ln –s /usr/bin/apr-1-config /usr/bin/apr-config".
45
46 * Extract tomcat under "/usr/share/java" by using the below command "tar -xvf apache-tomcat-8.0.27.tar.gz –C /usr/share/java".
47
48 NOTE:
49 Please go through the bleow link to download apache-tomcat-8.0.27.tar.gz file,
50 https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.27/bin/
51
52 * Please go to the directory "cd /usr/share/java/apache-tomcat-8.0.27/bin and unzip tomcat-native.gz using this command "tar -xvf tomcat-native.gz".
53
54 * Go to the directory "cd /usr/share/java/apache-tomcat-8.0.27/bin/tomcat-native-1.1.33-src/jni/native".
55
56 * Enter the command "./configure --with-os-type=bin --with-apr=/usr/bin/apr-config".
57
58 * Enter the command "make" and "make install".
59
60 * Apr libraries are successfully installed in "/usr/local/apr/lib".
61
62 *Enable HTTP/HTTPS in VTN Coordinator*
63
64 Enter the command "firewall-cmd --zone=public --add-port=8083/tcp --permanent" and "firewall-cmd --reload" to enable firewall settings in server.
65
66 *Create a CA's private key and a self-signed certificate in server*
67
68 * Execute the following command "openssl req -x509 -days 365 -extensions v3_ca -newkey rsa:2048 –out /etc/pki/CA/cacert.pem –keyout /etc/pki/CA/private/cakey.pem" in a single line.
69
70 [options="header",cols="30%,70%"]
71 |===
72 | Argument | Description
73 | Country Name | Specify the country code. +
74 For example, JP
75 | State or Province Name | Specify the state or province. +
76 For example, Tokyo
77 | Locality Name | Locality Name +
78 For example, Chuo-Ku
79 | Organization Name | Specify the company.
80 | Organizational Unit Name | Specify the department, division, or the like.
81 | Common Name | Specify the host name.
82 | Email Address | Specify the e-mail address.
83 |===
84
85 * Execute the following commands: "touch /etc/pki/CA/index.txt" and "echo 00 > /etc/pki/CA/serial" in server after setting your CA's private key.
86
87 *Create a private key and a CSR for web server*
88
89 * Execute the following command "openssl req -new -newkey rsa:2048 -out csr.pem –keyout /usr/local/vtn/tomcat/conf/key.pem" in a single line.
90
91 * Enter the PEM pass phrase: Same password you have given in CA's private key PEM pass phrase.
92
93 [options="header",cols="30%,70%"]
94 |===
95 | Argument | Description
96 | Country Name | Specify the country code. +
97 For example, JP
98 | State or Province Name | Specify the state or province. +
99 For example, Tokyo
100 | Locality Name | Locality Name +
101 For example, Chuo-Ku
102 | Organization Name | Specify the company.
103 | Organizational Unit Name | Specify the department, division, or the like.
104 | Common Name | Specify the host name.
105 | Email Address | Specify the e-mail address.
106 | A challenge password | Specify the challenge password.
107 | An optional company name | Specify an optional company name.
108 |===
109
110 *Create a certificate for web server*
111
112 * Execute the following command "openssl ca –in csr.pem –out /usr/local/vtn/tomcat/conf/cert.pem –days 365 –batch" in a single line.
113
114 * Enter pass phrase for /etc/pki/CA/private/cakey.pem: Same password you have given in CA's private key PEM pass phrase.
115
116 * Open the tomcat file using "vim /usr/local/vtn/tomcat/bin/tomcat".
117
118 * Include the line " TOMCAT_PROPS="$TOMCAT_PROPS -Djava.library.path=\"/usr/local/apr/lib\"" " in 131th line and save the file.
119
120 *Edit server.xml file and restart the server*
121
122 * Open the server.xml file using "vim /usr/local/vtn/tomcat/conf/server.xml" and add the below lines.
123 +
124 ----
125 <Connector port="${vtn.port}" protocol="HTTP/1.1" SSLEnabled="true"
126 maxThreads="150" scheme="https" secure="true"
127 SSLCertificateFile="/usr/local/vtn/tomcat/conf/cert.pem"
128 SSLCertificateKeyFile="/usr/local/vtn/tomcat/conf/key.pem"
129 SSLPassword=same password you have given in CA's private key PEM pass phrase
130 connectionTimeout="20000" />
131 ----
132 +
133 * Save the file and restart the server.
134
135 * To stop vtn use the following command.
136 +
137 ----
138 /usr/local/vtn/bin/vtn_stop
139 ----
140 +
141 * To start vtn use the following command.
142 +
143 ----
144 /usr/local/vtn/bin/vtn_start
145 ----
146 +
147 * Copy the created CA certificate from cacert.pem to cacert.crt by using the following command,
148 +
149 ----
150 openssl x509 –in /etc/pki/CA/cacert.pem –out cacert.crt
151 ----
152 +
153 *Checking the HTTP and HTTPS connection from client*
154
155 * You can check the HTTP connection by using the following command:
156 +
157 ----
158 curl -X GET -H 'contenttype:application/json' -H 'username:admin' -H 'password:adminpass' http://<server IP address>:8083/vtn-webapi/api_version.json
159 ----
160 +
161 * You can check the HTTPS connection by using the following command:
162 +
163 ----
164 curl -X GET -H 'contenttype:application/json' -H 'username:admin' -H 'password:adminpass' https://<server IP address>:8083/vtn-webapi/api_version.json --cacert /etc/pki/CA/cacert.pem
165 ----
166 +
167 * The response should be like this for both HTTP and HTTPS:
168 +
169 ----
170 {"api_version":{"version":"V1.4"}}
171 ----
172
173 ===== Prerequisites to create Network Service in SCVMM machine, Please follow the below steps
174
175 . Please go through the below link to download VSEM Provider zip file,
176  https://nexus.opendaylight.org/content/groups/public/org/opendaylight/vtn/application/vtnmanager-vsemprovider/2.0.0-Beryllium/vtnmanager-vsemprovider-2.0.0-Beryllium-bin.zip
177
178 . Unzip the vtnmanager-vsemprovider-2.0.0-Beryllium-bin.zip file anywhere in your SCVMM machine.
179
180 . Stop SCVMM service from *"service manager->tools->servers->select system center virtual machine manager"* and click stop.
181
182 . Go to *"C:/Program Files"* in your SCVMM machine. Inside *"C:/Program Files"*, create a folder named as *"ODLProvider"*.
183
184 . Inside *"C:/Program Files/ODLProvider"*, create a folder named as "Module" in your SCVMM machine.
185
186 . Inside "C:/Program Files/ODLProvider/Module", Create two folders named as *"Odl.VSEMProvider"* and *"VSEMOdlUI"* in your SCVMM machine.
187
188 . Copy the *"VSEMOdl.dll"* file from *"ODL_SCVMM_PROVIDER/ODL_VSEM_PROVIDER"* to *"C:/Program Files/ODLProvider/Module/Odl.VSEMProvider"* in your SCVMM machine.
189
190 . Copy the *"VSEMOdlProvider.psd1"* file from *"application/vsemprovider/VSEMOdlProvider/VSEMOdlProvider.psd1"* to *"C:/Program Files/ODLProvider/Module/Odl.VSEMProvider"* in your SCVMM machine.
191
192 . Copy the *"VSEMOdlUI.dll"* file from *"ODL_SCVMM_PROVIDER/ODL_VSEM_PROVIDER_UI"* to *"C:/Program Files/ODLProvider/Module/VSEMOdlUI"* in your SCVMM machine.
193
194 . Copy the *"VSEMOdlUI.psd1"* file from *"application/vsemprovider/VSEMOdlUI"* to *"C:/Program Files/ODLProvider/Module/VSEMOdlUI"* in your SCVMM machine.
195
196 . Copy the *"reg_entry.reg"* file from *"ODL_SCVMM_PROVIDER/Register_settings"* to your SCVMM desktop and double click the *"reg_entry.reg"* file to install registry entry in your SCVMM machine.
197
198 . Download *"PF1000.msi"* from this link, https://www.pf-info.com/License/en/index.php?url=index/index_non_buyer and place into *"C:/Program Files/Switch Extension Drivers"* in your SCVMM machine.
199
200 . Start SCVMM service from *"service manager->tools->servers->select system center virtual machine manager"* and click start.
201
202 ===== System Center Virtual Machine Manager (SCVMM)
203
204 It supports two major features:
205
206 * Failover Clustering
207 * Live Migration
208
209 ====== Failover Clustering
210
211 A single Hyper-V can host a number of virtual machines. If the host were to fail then all of the virtual machines that are running on it will also fail, thereby resulting in a major outage. Failover clustering treats individual virtual machines as clustered resources. If a host were to fail then clustered virtual machines are able to fail over to a different Hyper-V server where they can continue to run.
212
213 ====== Live Migration
214
215 Live Migration is used to migrate the running virtual machines from one Hyper-V server to another Hyper-V server without any interruptions.
216 Please go through the below video for more details,
217
218 * https://youtu.be/34YMOTzbNJM
219
220 ===== SCVMM User Guide
221
222 * Please go through the below link for SCVMM user guide: https://wiki.opendaylight.org/images/c/ca/ODL_SCVMM_USER_GUIDE_final.pdf
223
224 * Please go through the below links for more details
225
226 ** OpenDaylight SCVMM VTN Integration: https://youtu.be/iRt4dxtiz94
227
228 ** OpenDaylight Congestion Control with SCVMM VTN: https://youtu.be/34YMOTzbNJM