LoginSignup
3
7

More than 5 years have passed since last update.

VMwarePlayerでAmazon Linux 2を起動

Last updated at Posted at 2018-07-06

前提条件

  • VMware Player インストール済み
  • vmnetcfg.exe でDHCPサービス起動済み
  • genisoimage を実行するLinuxサーバが使用可能

※VMware Player でvmnetcfg.exeを使用する方法は検索お願いします。

参考URL

1. イメージのダウンロード

https://cdn.amazonlinux.com/os-images/2017.12.0.20180330/vmware/
から、"amzn2-vmware_esx-2017.12.0.20180330-x86_64.xfs.gpt.ova"をダウンロードする。

2. インポート

ダウンロードした上記のファイルをダブルクリックする。

01_import.png

失敗するが、"再試行"をクリック
02_retry.png

GRUBメニューからブートする前にシャットダウンする。
03_grub.png

3. seed.iso の作成

meta-data
local-hostname: zephyranthes
user-data
#cloud-config
# vim:syntax=yaml
users:
# A user by the name ec2-user is created in the image by default.
  - default
# Following entry create user1 and assigns password specified in plain text.
# Please not use of plain text password is not recommended from security best
# practises standpoint
  - name: ryouma
    groups: sudo
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
    plain_text_passwd: password
    lock_passwd: false
chpasswd:
  list: |
    ec2-user:password
    root:password

write_files:
  - content: |
    # Disable network configuration after first boot
    network:
      config: disabled
    path: /etc/cloud/cloud.cfg.d/80_disable_network_after_firstboot.cfg

※root,ec2-userのパスワード、追加ユーザを設定しました。

以下のコマンドでseed.isoを作成し、VMwarePlayerからアクセスできるところに配置する。


genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data

4. 仮想マシンの設定変更

メニューを開く
04_config_1.png

CD/DVDドライブを追加
05_config_2.png
"ISOイメージを使用する"を選択
06_config_3.png
作成したseed.isoを指定
07_config_4.png
環境に応じて、ネットワークアダプタの設定を変更(NATにした)
08_config_5.png

5. 仮想マシンを起動

無事に起動しました。
sshや固定IPなどの設定はよしなに。

09_login.png
10_ssh.png

3
7
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
7