vSphere Integrated Containers (VIC) 1.0 をためしてみる。
昨年末、vSphere Integrated Containers (vIC) の 1.0.0 がリリースされました。
今回は vIC をインストールしてみます。
検証環境
今回の検証環境は vSphere 6.5 上に構築しています。
Environment Prerequisites for VCH Deployment にサポートされる環境の情報が掲載されています。このページによると vIC を作成する際にサポートされるプラットフォームは 64bit 版の以下と書かれています。
プラットフォーム |
バージョン |
Windows |
7, 10 |
Mac OS X |
10.11 (El Capitan) |
Linux |
Ubuntu 16.04 LTS |
CentOS は表記が無いのですが、今回は敢えて CentOS から vIC をデプロイしてみました(特に問題無く、インストール出来ました)。
セキュリティポリシーの変更
VCH Deployment Fails with Firewall Validation に詳しく書かれているのですが、2377/TCP の outbound 通信が許可されていなければインストール時に(インストール前の検証時に、以下のようなエラーとなってしまいます。
| ERRO[2017-01-14T10:46:18+09:00] Firewall configuration incorrect on hosts:
ERRO[2017-01-14T10:46:18+09:00] "/MyDatacenter/host/MyCluster/172.31.98.231"
ERRO[2017-01-14T10:46:18+09:00] Firewall must permit dst 2377/tcp outbound to the VCH management interface
|
そこで vIC をインストールする前にセキュリティポリシーを修正しておきます。
セキュリティポリシーの確認
セキュリティポリシーの設定は esxcli network firewall ruleset list で確認出来ます。
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 | [root@esxi-01:~] esxcli network firewall ruleset list
Name Enabled
------------------------ -------
sshServer true
sshClient false
nfsClient false
nfs41Client false
dhcp true
dns true
snmp true
ntpClient false
CIMHttpServer true
CIMHttpsServer true
CIMSLP true
iSCSI true
vpxHeartbeats true
updateManager true
faultTolerance true
webAccess true
vMotion true
vSphereClient true
activeDirectoryAll false
NFC true
HBR true
ftpClient false
httpClient false
gdbserver false
DVFilter false
DHCPv6 true
DVSSync true
syslog false
WOL true
vSPC false
remoteSerialPort false
rdt false
cmmds false
vsanvp false
rabbitmqproxy true
ipfam false
vvold false
iofiltervp true
esxupdate false
vsanEncryption false
pvrdma false
vsanhealth-multicasttest false
|
検証前のセキュリティポリシー
セキュリティポリシーの設定は ESXi ホストの /etc/vmware/firewall/service.xml で定義されています。今回、検証した環境では以下のようになっていました(id が 0000 〜 0043 まで定義されていました。長いですが、全て掲載しておきます)。
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859 | <!-- Firewall configuration information -->
<ConfigRoot>
<!-- Known and blessed services -->
<service id='0000'>
<id>sshServer</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>22</port>
</rule>
<enabled>true</enabled>
<required>true</required>
</service>
<service id='0001'>
<id>sshClient</id>
<rule>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>22</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id='0002'>
<id>nfsClient</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>0</begin>
<end>65535</end>
</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id='0003'>
<id>nfs41Client</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>0</begin>
<end>65535</end>
</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id='0004'>
<id>dhcp</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>68</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>src</porttype>
<port>68</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0005'>
<id>dns</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>53</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>53</port>
</rule>
<rule id='0002'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>53</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0006'>
<id>snmp</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>161</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0007'>
<id>ntpClient</id>
<rule>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>123</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<!-- First-party optional services -->
<service id='0008'>
<id>CIMHttpServer</id>
<rule>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>5988</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0009'>
<id>CIMHttpsServer</id>
<rule>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>5989</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0010'>
<id>CIMSLP</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>427</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>427</port>
</rule>
<rule id='0002'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>427</port>
</rule>
<rule id='0003'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>427</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0011'>
<id>iSCSI</id>
<rule>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>3260</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id='0012'>
<id>vpxHeartbeats</id>
<rule>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>902</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0013'>
<id>updateManager</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>80</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>9000</begin>
<end>9100</end>
</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0014'>
<id>faultTolerance</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>80</port>
</rule>
<rule id='0001'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>8300</port>
</rule>
<rule id='0002'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>8300</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0015'>
<id>webAccess</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>80</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0016'>
<id>vMotion</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>8000</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>8000</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0017'>
<id>vSphereClient</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>902</port>
</rule>
<rule id='0001'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>443</port>
</rule>
<enabled>true</enabled>
<required>true</required>
</service>
<service id='0018'>
<id>activeDirectoryAll</id>
<!--
the required ports are listed here:
http://download1.beyondtrust.com/Technical-Support/Downloads/files/pbiso/Manuals/likewise-open-guide.html#OpenOutboundPorts
-->
<!-- Kerberos 5 -->
<rule id='0000'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>88</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>88</port>
</rule>
<!-- NTP -->
<rule id='0002'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>123</port>
</rule>
<!-- NetBIOS Name Service -->
<rule id='0003'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>137</port>
</rule>
<!-- NetBIOS Session (SMB) -->
<rule id='0004'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>139</port>
</rule>
<!-- LDAP -->
<rule id='0005'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>389</port>
</rule>
<rule id='0006'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>389</port>
</rule>
<!-- SMB over TCP -->
<rule id='0007'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>445</port>
</rule>
<!-- Machine password changes -->
<rule id='0008'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>464</port>
</rule>
<rule id='0009'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>464</port>
</rule>
<!-- Global Catalog search -->
<rule id='0010'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>3268</port>
</rule>
<!-- CAM service -->
<rule id='0011'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>7476</port>
</rule>
<!-- VMAFD service -->
<rule id='0012'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>2020</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id='0019'>
<id>NFC</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>902</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>902</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id='0020'>
<id>HBR</id>
<!-- vSphere Replication traffic initiated from VMkernel on
port 31031 (initial sync), and port 44046 (on-going replication).
See PR 610578. -->
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>31031</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>44046</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<!-- Just for active mode ftp access -->
<service id='0021'>
<id>ftpClient</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>21</port>
</rule>
<rule id='0001'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>src</porttype>
<port>20</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id="0022">
<id>httpClient</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>80</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>443</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id='0023'>
<id>gdbserver</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>1000</begin>
<end>9999</end>
</port>
</rule>
<rule id='0001'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>50000</begin>
<end>50999</end>
</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id="0024">
<id>DVFilter</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>2222</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id="0025">
<id>DHCPv6</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>547</port>
</rule>
<rule id='0001'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>546</port>
</rule>
<rule id='0002'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>547</port>
</rule>
<rule id='0003'>
<direction>inbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>546</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id="0026">
<id>DVSSync</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>8302</port>
</rule>
<rule id='0001'>
<direction>inbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>8301</port>
</rule>
<rule id='0002'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>8301</port>
</rule>
<rule id='0003'>
<direction>inbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>8302</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<service id="0027">
<id>syslog</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>514</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>514</port>
</rule>
<rule id='0002'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>1514</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<!-- IKED="0028" has been removed -->
<service id="0029">
<id>WOL</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>9</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<!-- Remote serial port with vSPC: all remote serial port traffic is initiated by us -->
<service id="0030">
<id>vSPC</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>0</begin>
<end>65535</end>
</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<!-- Remote serial port without vSPC: we may be listening -->
<service id="0031">
<id>remoteSerialPort</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>0</begin>
<end>65535</end>
</port>
</rule>
<rule id='0001'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>23</port>
</rule>
<rule id='0002'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>1024</begin>
<end>65535</end>
</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<!-- vprobeServer service id='0032' removed. -->
<!-- VSAN services -->
<service id='0033'>
<id>rdt</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>2233</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>2233</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id='0034'>
<id>cmmds</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>12345</port>
</rule>
<rule id='0001'>
<direction>inbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>23451</port>
</rule>
<rule id='0002'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>12345</port>
</rule>
<rule id='0003'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>23451</port>
</rule>
<rule id='0004'>
<direction>inbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>12321</port>
</rule>
<rule id='0005'>
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>12321</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id='0035'>
<id>vsanvp</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<port type='dst'>8080</port>
<flags>-m state --state NEW</flags>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<port type='dst'>8080</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id='0036'>
<id>rabbitmqproxy</id>
<rule>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>5671</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
<!-- DI service for IP Forwarding Module -->
<service id='0037'>
<id>ipfam</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>6999</port>
</rule>
<rule id='0001' >
<direction>outbound</direction>
<protocol>udp</protocol>
<porttype>dst</porttype>
<port>6999</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id='0038'>
<id>vvold</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>0</begin>
<end>65535</end>
</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<service id='0039'>
<id>iofiltervp</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<port type='dst'>9080</port>
<flags>-m state --state NEW</flags>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<!-- Ports get opened during esxupdate process to download VIBs -->
<service id='0040'>
<id>esxupdate</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<port type='dst'>443</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<!-- vit service id='0041' removed. -->
<service id='0042'>
<id>vsanEncryption</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>0</begin>
<end>65535</end>
</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
<!-- Ports opened for PVRDMA devices to connect to each other. -->
<service id="0043">
<id>pvrdma</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>28250</begin>
<end>28761</end>
</port>
</rule>
<rule id='0001'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>28250</begin>
<end>28761</end>
</port>
</rule>
<enabled>false</enabled>
<required>false</required>
</service>
</ConfigRoot>
|
セキュリティポリシーの修正
vIC で利用する 2377/TCP を追加するように設定を修正していきます。/etc/vmware/firewall/service.xml を編集出来るようにします。
| chmod 644 /etc/vmware/firewall/service.xml
chmod +t /etc/vmware/firewall/service.xml
|
/etc/vmware/firewall/service.xml へ以下を追記します。追記の状態では id が 0043 まで使われていたので、id は『0044』としました。
| <service id='0044'>
<id>vicoutgoing</id>
<rule id='0000'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<port type='dst'>2377</port>
</rule>
<enabled>true</enabled>
<required>true</required>
</service>
|
/etc/vmware/firewall/service.xml の権限を元に戻します。
| chmod -t /etc/vmware/firewall/service.xml
chmod 444 /etc/vmware/firewall/service.xml
|
設定を反映します。
| esxcli network firewall refresh
|
これでセキュリティポリシーに vIC で必要とされる 2377/TCP を許可するルールが追加されました。
| [root@esxi-01:~] esxcli network firewall ruleset list | grep vicoutgoing
vicoutgoing true
|
インストールする
予め、vIC のバイナリは用意しておきます。
| # ls -l
total 235776
-rw-r--r-- 1 root root 241427448 Jan 14 10:28 vic_0.8.0-7315-c8ac999.tar.gz
|
展開します。
| tar zxvf vic_0.8.0-7315-c8ac999.tar.gz
cd vic
|
インストーラを実行します。
| ./vic-machine-linux create --target 172.31.98.230 --user "administrator@example.local" --password PASSWORD --compute-resource 'MyCluster' --bridge-network 'VLAN-3101' --public-network 'VLAN-3102' --image-store datastore1 --no-tlsverify --force
|
今回は 172.31.2.150 としてインストールされたので、VHC Admin Portal は https://172.31.2.150:2378
になりました。
| INFO[2017-01-14T11:18:04+09:00] VCH Admin Portal:
INFO[2017-01-14T11:18:04+09:00] https://172.31.2.150:2378
INFO[2017-01-14T11:18:04+09:00]
INFO[2017-01-14T11:18:04+09:00] Published ports can be reached at:
INFO[2017-01-14T11:18:04+09:00] 172.31.2.150
INFO[2017-01-14T11:18:04+09:00]
INFO[2017-01-14T11:18:04+09:00] Docker environment variables:
INFO[2017-01-14T11:18:04+09:00] DOCKER_HOST=172.31.2.150:2376
|
使ってみる
nginx の image を pull してみます。docker がインストールされた環境から -H オプションで VHC Admins Portal のアドレス/ポート番号を指定して実行します。
| root@centos7:~# docker -H 172.31.2.150:2376 --tls pull nginx
Using default tag: latest
Pulling from library/nginx
75a822cd7888: Pull complete
a3ed95caeb02: Pull complete
0aefb9dc4a57: Pull complete
046e44ee6057: Pull complete
Digest: sha256:2b942f7dd01a57ceeb5985a0472a2f92735eb81a910dec70c2183c61fc54298c
Status: Downloaded newer image for library/nginx:latest
|
イメージがダウンロードされました。
| root@centos7:~# docker -H 172.31.2.150:2376 --tls images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 25c9fe76c2fe 2 weeks ago 181.6 MB
|
ダウンドードしたイメージからコンテナを起動します。
| root@centos7:~# docker -H 172.31.2.150:2376 --tls run -d -p 8080:80 --name web01 nginx
1c30361cedc44f1c42d97877169fcf72c60feb59398ab823774a1f30c7834c4b
|
コンテナが起動しました。
| root@centos7:~# docker -H 172.31.2.150:2376 --tls ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1c30361cedc4 nginx "nginx -g daemon off;" 6 minutes ago Up About a minute 172.31.2.150:8080->80/tcp web01
|
ブラウザから起動したコンテナ上の Nginx にアクセス出来ました。
参考:「vic-machine-linux」のヘルプ表示
参考までに、vic-machine-linux のヘルプを引用しておきます。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 | # ./vic-machine-linux
NAME:
vic-machine-linux - Create and manage Virtual Container Hosts
USAGE:
vic-machine-linux [global options] command [command options] [arguments...]
VERSION:
v0.8.0-7315-c8ac999
COMMANDS:
create Deploy VCH
delete Delete VCH and associated resources
ls List VCHs
inspect Inspect VCH
version Show VIC version information
debug Debug VCH
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
|