Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
20190705_VMwareDevOpsMeetup.pdf
Search
MasahiroIrie
July 05, 2019
Technology
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20190705_VMwareDevOpsMeetup.pdf
MasahiroIrie
July 05, 2019
More Decks by MasahiroIrie
See All by MasahiroIrie
Is that compatibility... actually OK?
mirie_sd
0
53
Expiration of Secure Boot Certificates for vSphere Virtual Machines
mirie_sd
0
960
Making new vExpert badge sticker
mirie_sd
0
530
How to use "VMware"
mirie_sd
0
610
The key to VCP-VCF
mirie_sd
0
2.8k
Now is the time to check the vSphere Security Configuration and Hardening Guide
mirie_sd
0
1.3k
Using vROPs API with Swagger
mirie_sd
0
230
Cooking operations with Salt
mirie_sd
0
780
Blog vExperts use
mirie_sd
0
230
Other Decks in Technology
See All in Technology
Foxgloveについて 実際にExtensionを開発して公開するまでの話 / About Foxglove: The Story of Developing and Releasing an Extension
ry0_ka
0
290
Alphaモジュール使っていいのかい!?いけないのかい!?どっちなんだいっ!?
watany
1
260
AIと共生する開発者プラットフォーム:バクラクのモノレポ×マイクロサービス基盤
sakajunquality
2
3.7k
ヘルスケア領域における AI 活用と その安全性担保のための取り組み (Leveraging AI in Healthcare and Our Efforts to Ensure Its Safety) - Google I/O Extended Tokyo 2026, July 11, 2026
zettaittenani
0
410
DatabricksにおけるMCPソリューション
taka_aki
1
270
2年前に削除したPHPクラスが、 ある日突然決済をエラーにした
ykagano
1
240
壊して学ぶAWS CDK: そのcdk deployで消えるもの、残るもの
k_adachi_01
1
330
[2026-07-15] AI Ready なはずだったアーキテクチャと、見えてきた課題・次に目指す状態
wxyzzz
9
3.9k
脱金融のフューチャー・デザイン / Future Design Beyond Finance
ks91
PRO
0
150
【Claude Code】鹿野さんに聞く 私の推しの並行開発環境 大公開 / claude-code-parallel-2026-07-15
tonkotsuboy_com
12
8.5k
地域 SRE コミュニティ最前線 / SRE NEXT 2026 Discussion Night Track C
muziyoshiz
0
230
SRE依存からの脱却 運用を開 発チームへ移す、 フルサイ クル開 発体制の実践
joooee0000
0
3k
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
370
Become a Pro
speakerdeck
PRO
31
6k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
45k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
190
Speed Design
sergeychernyshev
33
1.9k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
310
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
Navigating Team Friction
lara
192
16k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
300
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Transcript
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. 2019年7月5日
入江 正博 OVF Environment を使って VM デプロイ
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. 自己紹介
2 入江 正博 @IrieMasahiro • ヤフー株式会社 プライベートクラウドチーム • VMUG インフラ仮想部会 • vExpert 2019
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. 色々なところにVMを立てる
3 • 仮想マシン作成、インストールメディアを接続 して OS インストール → vSphere (Web) Clinet で作業… • デプロイツール (Packer, Ansible etc.) → 導入コスト、学習コスト… • OVA インポート → よさげ → でも NW 設定とかはコンソール?
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. Self-Configuration
and the OVF Environment 4 https://blogs.vmware.com/vapp/2009/07/selfconfi guration-and-the-ovf-environment.html • OVF Environment を使った VM カスタマイズの話 • VM を立てるときに NW 設定やアプリ設定を OVF Environment として VM 外部から渡せる → OVA アプライアンスでよくある • 準備しておくもの • OVF プロパティ定義 • OVF Environment トランスポート設定 • VM 内で設定を行っていく glue code
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. 要は
5 vApp オプションから設定 (もしくは OVFファイルを直書き)
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. 要は
6 # vmtoolsd --cmd 'info-get guestinfo.ovfenv' <?xml version="1.0" encoding="UTF-8"?> <Environment xmlns="http://schemas.dmtf.org/ovf/environment/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [中略] <PropertySection> <Property oe:key="key1" oe:value="test"/> </PropertySection> <ve:EthernetAdapterSection> <ve:Adapter ve:mac="00:50:56:a7:94:d9" ve:network="VM Network" ve:unitNumber="7"/> </ve:EthernetAdapterSection> vmtoolsd で OVF プロパティが取得できるので、 その値で OS 側の設定を行う glue code を仕込めば良い。 (daemon として起動していなくても OK)
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. 実装例
7 vCenter Server Appliance
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. OVF
プロパティ 8
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. vCSA
での流れ 9 • systemd の init script の一つ • /etc/init.d/vaos → /opt/vmware/share/vami/vami_ovf_env を 呼び出し NW 設定などを行う。 → /opt/vmware/bin/ovfenv を呼び出し。 OVF プロパティ周りを扱うラッパー → vmware-rpctool ‘info-get guestinfo.ovfEnv’ (※) を 発行し、 OVF プロパティを取得 → その他でも都度都度 OVF プロパティ取得して設定 ※ open-vm-tools に同梱。 OVF プロパティの RPC 部分のみの実装?
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. 試しに
10 Photon OS で 実装してみた
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. Photon
OS で self-configuration 11 • Python で 100行くらい → https://vhoge.hateblo.jp/entry/2019/06/25/020111 • vmtoolsd を実行し、XML 文字列を取得 • Hostname / IP / NW Prefix / GW / DNS を設定 → OVF プロパティとしても定義 • systemd で systemd-networkd の起動前に仕込む • OVA 化は OVF Export で
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. OVF
プロパティ 12
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. 面倒なところ
13 • XML が 面倒な 厳格な形式なので OVF プ ロパティの値の取得に一手間 • key も value も attribute • namespace 指定 <Property oe:key="ip" oe:value="192.168.0.100"/> ↑コレ ↑コレ ET.find("oe:PropertySection/oe:Property[@oe:key='ip']",{'oe': 'http://schemas.dmtf.org/ovf/environment/1'}).attrib["{http:/ /schemas.dmtf.org/ovf/environment/1}value"]) • ElementTree で ↑ の IP を取得すると
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. VM
量産体制 14 • ovftool で CLI から OVF インポート • OVF プロパティは prop オプションで指定 % ovftool -n=‘photon-vm’ ¥ -ds=datastore1 ¥ -dm=thin ¥ --net:’VM Network=VM Network’ ¥ --prop:hostname=photon.test ¥ --prop:ip=192.168.0.100 ¥ --prop:prefix=24 ¥ --prop:gateway=192.168.0.1 ¥ --prop:dns=192.168.0.3 ¥ --noSSLVerify ¥ --powerOn ¥ --allowExtraConfig ¥ --acceptAllEulas ¥ ./photoninit.ova ¥ 'vi://vcsa.test/dc01/host/cluster01/host01'
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. まとめ
15 • Self-configuration な OVA を作るには • OVF プロパティ定義 • OVF Environment トランスポート設定 • OVF Environment をもとに設定するコード • OVF Environment は vmtoolsd コマンド にオプションつけて取得 • XML の Value 取得に一癖 • 量産するなら OVF Tool
Copyright (C) 2019 Yahoo Japan Corporation. All Rights Reserved. EOP