Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
80
Expiration of Secure Boot Certificates for vSphere Virtual Machines
mirie_sd
0
1.3k
Making new vExpert badge sticker
mirie_sd
0
670
How to use "VMware"
mirie_sd
0
770
The key to VCP-VCF
mirie_sd
0
3k
Now is the time to check the vSphere Security Configuration and Hardening Guide
mirie_sd
0
1.4k
Using vROPs API with Swagger
mirie_sd
0
240
Cooking operations with Salt
mirie_sd
0
800
Blog vExperts use
mirie_sd
0
230
Other Decks in Technology
See All in Technology
2026_devsumi_ozono.pdf
o3
2
380
enechainの内製セルフサービスプラットフォーム
hiyosi
0
160
家のリアーキテクト・リファクタリング
suguruooki
0
110
GoCon2026 - Open Source, Open World
sanposhiho
4
3.2k
AIオーケストレーションを活用した 開発ワークフローの設計と実践
bqnq
0
130
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
1
240
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
110
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
2.6k
あるけみー式LTスライド作成術
alchemy1115
1
180
2026-09-10 【Snowflake World Tour Tokyo 2026】dbt Core と Snowflake で実現する多層的なデータガバナンス / Multi-Layered Data Governance Powered by dbt Core and Snowflake
civitaspo
0
330
SQL文一行も書けない人事がCortexもろもろを使って人事業務を楽にしてみる
ponponmikankan
1
220
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
160
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
GitHub's CSS Performance
jonrohan
1033
470k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
500
Building the Perfect Custom Keyboard
takai
2
870
Paper Plane (Part 1)
katiecoart
PRO
1
11k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
210
Music & Morning Musume
bryan
47
7.4k
Speed Design
sergeychernyshev
33
2.1k
Technical Leadership for Architectural Decision Making
baasie
3
560
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