LoginSignup
7
11

More than 5 years have passed since last update.

VMware ESXi 仮想マシン(CentOS7.1)作成 VMware toolsインストール

Posted at

概要

VMware ESXi 6.0 を使用して仮想マシンを作成します。
ゲストOSはCentOS 7.1 を使用します。
また、作成後にVMware toolsをインストールします。

手順

仮想マシン作成+CentOSインストール

ESXiをvSphere Clientで開き、「新規仮想マシンの作成」をクリックします。

SnapCrab_2015-12-13_No-002.png

カスタムを選びます。
SnapCrab_2015-12-13_No-003.png

適当に名前を入力します。
SnapCrab_2015-12-13_No-004.png

SnapCrab_2015-12-13_No-005.png

SnapCrab_2015-12-13_No-006.png

CentOS7を選択します。ここで選択した種類に応じてVMware toolsのインストールする処理が変更されるので、
間違ったものを選択するとインストールできません。ここの種類は後で変更可能です。
SnapCrab_2015-12-13_No-007.png

SnapCrab_2015-12-13_No-008.png

SnapCrab_2015-12-13_No-009.png

SnapCrab_2015-12-13_No-010.png

SnapCrab_2015-12-13_No-011.png

SnapCrab_2015-12-13_No-012.png

SnapCrab_2015-12-13_No-013.png

SnapCrab_2015-12-13_No-014.png

「終了」を選択すると仮想マシンが作成されます。
SnapCrab_2015-12-13_No-015.png

作成完了したので、仮想マシンをパワーオンします。
SnapCrab_2015-12-13_No-016.png

操作端末にあるCentOS7のISOを接続します。なお、ISOをデータストアに事前に格納してインストールする方法もあります。
SnapCrab_2015-12-13_No-017.png

CentOS7のISOを選択します。
SnapCrab_2015-12-13_No-018.png

ゲストOS側に Ctrl Alt Del を送信し、リブートを実行します。
SnapCrab_2015-12-13_No-019.png

ISOが読み込まれました。
SnapCrab_2015-12-13_No-020.png

諸々選択していきます。
SnapCrab_2015-12-13_No-021.png

SnapCrab_2015-12-13_No-022.png

SnapCrab_2015-12-13_No-023.png

SnapCrab_2015-12-13_No-024.png

SnapCrab_2015-12-13_No-025.png

SnapCrab_2015-12-13_No-026.png

SnapCrab_2015-12-13_No-027.png

SnapCrab_2015-12-13_No-028.png

SnapCrab_2015-12-13_No-029.png

インストール完了後、リブートを実行するとログインが可能です。
SnapCrab_2015-12-13_No-030.png

VMware Toolsをインストール

ESXi上でインストールしたい仮想マシンを選択し、右クリック→ゲスト→VMware Toolsのインストールを選択します。
これを選択すると、ゲストOS上のcdromにインストーラが認識されます。
SnapCrab_2015-12-14_No-004.png

VMware Toolsのインストールにperlやnet-toolsが必要です。
open-vm-toolsの方がインストールを推奨されてますが、不安なので公式のものをインストールします。

[root@mng-server ~]# yum -y install perl net-tools

以下コマンドでインストールしていきます。

[root@mng-server ~]# mkdir /mnt/cdrom
[root@mng-server ~]# mount /dev/cdrom /mnt/cdrom/
mount: /dev/sr0 is write-protected, mounting read-only
[root@mng-server ~]# cd /mnt/cdrom/
[root@mng-server cdrom]#
[root@mng-server cdrom]# ls -la
合計 68478
dr-xr-xr-x. 2 root root     2048  8月 13 19:21 .
drwxr-xr-x. 3 root root       18 12月 14 00:12 ..
-r--r--r--. 1 root root 68644875  8月 13 18:55 VMwareTools-9.10.5-2981885.tar.gz
-r-xr-xr-x. 1 root root     2011  8月 13 18:55 manifest.txt
-r--r--r--. 1 root root     1850  8月 13 18:52 run_upgrader.sh
-r-xr-xr-x. 1 root root   699332  8月 13 18:54 vmware-tools-upgrader-32
-r-xr-xr-x. 1 root root   769784  8月 13 18:54 vmware-tools-upgrader-64
[root@mng-server cdrom]#
[root@mng-server cdrom]# cp /mnt/cdrom/VMwareTools-9.10.5-2981885.tar.gz /tmp/
[root@mng-server cdrom]#
[root@mng-server cdrom]# cd /tmp/
[root@mng-server cdrom]# umount /mnt/cdrom
[root@mng-server tmp]# tar xzf VMwareTools-9.10.5-2981885.tar.gz
[root@mng-server tmp]# cd vmware-tools-distrib/
[root@mng-server vmware-tools-distrib]# ./vmware-install.pl
open-vm-tools are available from the OS vendor and VMware recommends using
open-vm-tools. See http://kb.vmware.com/kb/2073803 for more information.
Do you still want to proceed with this legacy installer? [no] yes ← yesを入力します。open-vm-toolsの方が推奨と警告を受けます。

Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

In which directory do you want to install the binary files?
[/usr/bin]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/rc.d]

What is the directory that contains the init scripts?
[/etc/rc.d/init.d]

In which directory do you want to install the daemon files?
[/usr/sbin]

In which directory do you want to install the library files?
[/usr/lib/vmware-tools]

The path "/usr/lib/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]
The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes]
The installation of VMware Tools 9.10.5 build-2981885 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".


Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes]
Initializing...


Making sure services for VMware Tools are stopped.

Stopping vmware-tools (via systemctl):                     [  OK  ]


The module vmci has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer.

The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer.

The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer.

The VMware Host-Guest Filesystem allows for shared folders between the host OS
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish
to enable this feature? [no]
The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

The vmblock enables dragging or copying files between host and guest in a
Fusion or Workstation virtual environment.  Do you wish to enable this feature?
[no]
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. This feature can
be enabled/disabled by re-running vmware-config-tools.pl.

Would you like to enable VMware automatic kernel modules?
[no]
Do you want to enable Guest Authentication (vgauth)? [yes]

No X install found.

Creating a new initrd boot image for the kernel.
Starting vmware-tools (via systemctl):                     [  OK  ]
The configuration of VMware Tools 9.10.5 build-2981885 for Linux for this
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take
effect.

You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
command line.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

[root@mng-server vmware-tools-distrib]#

Enjoy が表示されればインストール完了です。

7
11
0

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
7
11