# INSTALAR ROCKY LINUX NO VMWARE

#### AJUSTE NECESSÁRIO NA PROPRIEDADE DA VM

Em VM Options &gt; Boot Options &gt; Desmaque o Enabled do Secure Boot

[![image-1636747396835.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747396835.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747396835.png)

[![image-1636747535960.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747535960.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747535960.png)

[![image-1636747621662.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747621662.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747621662.png)

[![image-1636747659237.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747659237.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747659237.png)

Clique em Network &amp; Host Name

[![image-1636747693658.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747693658.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747693658.png)

Clique no botão ON para pegar IP automaticamente e em Host Name adicione o nome FQDN da VM

[![image-1636747789440.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747789440.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747789440.png)

Clique no botão Configure para atribuir um IP fixo:

[![image-1636747927369.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747927369.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747927369.png)

[![image-1636748003742.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748003742.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748003742.png)

[![image-1636748029972.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748029972.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748029972.png)

Clique no botão DONE

[![image-1636748062431.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748062431.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748062431.png)

Clique em Time &amp; Date e selecione a cidade igual a imagem abaixo. Por fim clique em Done

[![image-1636748095301.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748095301.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748095301.png)

[![image-1636748137526.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748137526.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748137526.png)

Clique em Installation Destination

[![image-1636748182582.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748182582.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748182582.png)

Clique em Custom e no botão Done

[![image-1636748224477.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748224477.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748224477.png)

Aparecerá a tela abaixo:

[![image-1636748250935.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748250935.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748250935.png)

Clique no link "Click here to create them automatically"

[![image-1636748293562.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748293562.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748293562.png)

Agora precisamos fazer os ajustes nos volumes existentes. Iremos seguir a prática do CIS Benckmarks Red Hat Enterprise 8. Segundo o CIS é importante que os volumes abaixo seja criado como partições separadas:

/home

/var/tmp

/var/log

/var/log/audit

/tmp

Levando em consideração que temos um disco de 100GB o espaço ficará distribuído da seguinte forma:

/home -&gt; 5 GB

/var -&gt; 20 GB

/var/tmp -&gt; 5 GB

/var/log -&gt; 20 GB

/var/log/audit -&gt; 5GB

/tmp - 10GB

/ -&gt; 30 GB

Como adicionar uma partição? Clique em "**+**":

[![image-1636748738289.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748738289.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748738289.png)

Clique em Add mount point. Repita isso para todas as partições definidas.

A estrutura ficou assim:

[![image-1636748946583.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748946583.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748946583.png)

Cliqu em Done

[![image-1636749001486.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749001486.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749001486.png)

Clique em Accept Changes

[![image-1636749040086.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749040086.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749040086.png)

Clique em Software Selection

[![image-1636749079463.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749079463.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749079463.png)

Selecione Minimal Install e marque os itens como está na imagem:

[![image-1636749137752.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749137752.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749137752.png)

Clique em Done

[![image-1636749164872.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749164872.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749164872.png)

Selecione Root Password

[![image-1636749208730.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749208730.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749208730.png)

Clique em Done

[![image-1636749232382.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749232382.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749232382.png)

Clique em User Creation

[![image-1636749281486.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749281486.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749281486.png)

Clique em Done

[![image-1636749340471.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749340471.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749340471.png)

Clique em Begin Installation

[![image-1636749377028.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749377028.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749377028.png)

E por fim, clique em Reboot System

[![image-1636749880340.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749880340.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749880340.png)

Agora login via ssh e execute o update

```shell
[root@old ~]# yum update -y
```

Desative o selinux

```shell
[root@old ~]# vi /etc/selinux/config
Altere de:
SELINUX=enforcing
Para
SELINUX=permissive
```

#### INSTALAR O VMWARE TOOLS

Clique em Install VMware Tools

[![image-1636750468191.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636750468191.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636750468191.png)

Clique em MOUNT

[![image-1636750517729.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636750517729.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636750517729.png)

Agora via ssh execute

```shell
[root@old vmware-tools-distrib]# yum install policycoreutils-python-utils -y
[root@old ~]# mount -t iso9660 /dev/cdrom /mnt
[root@old ~]# cd /mnt
[root@old mnt]# cp VMwareTools-10.3.23-17030940.tar.gz /tmp
[root@old mnt]# cd /tmp/
[root@old tmp]# tar -zxvf VMwareTools-10.3.23-17030940.tar.gz 
[root@old tmp]# cd vmware-tools-distrib/
[root@old vmware-tools-distrib]# ./vmware-install.pl 
A previous installation of VMware Tools has been detected.

The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

You have a version of VMware Tools installed.  Continuing this install will 
first uninstall the currently installed version.  Do you wish to continue? 
(yes/no) [yes] 

INPUT: [yes]  default

Uninstalling the tar installation of VMware Tools.


ValueError: O contexto de arquivo para /usr/sbin/vmtoolsd não está definido
semanageFcontext: unable to set SELinux fcontext - command: "semanage fcontext 
-d /usr/sbin/vmtoolsd"
There was an error configuring the SELinux security context for VMware Tools.  
Please make certain that SELinux is configured correctly.

Stopping services for VMware Tools

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

The removal of VMware Tools 10.3.23 build-17030940 for Linux completed 
successfully.

Installing VMware Tools.

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

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

INPUT: [/etc/rc.d]  default

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

INPUT: [/etc/rc.d/init.d]  default

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

INPUT: [/usr/sbin]  default

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

INPUT: [/usr/lib/vmware-tools]  default

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] 

INPUT: [yes]  default

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 

INPUT: [/usr/share/doc/vmware-tools]  default

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] 

INPUT: [yes]  default

The installation of VMware Tools 10.3.23 build-17030940 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] 

INPUT: [yes]  default

Initializing...


Making sure services for VMware Tools are stopped.

Parando 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] 

INPUT: [no]  default

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] 

INPUT: [no]  default


Skipping configuring automatic kernel modules as no drivers were installed by 
this installer.

Do you want to enable Guest Authentication (vgauth)? [yes] 

INPUT: [yes]  default

No X install found.


Skipping rebuilding initrd boot image for kernel as no drivers to be included 
in boot image were installed by this installer.

The configuration of VMware Tools 10.3.23 build-17030940 for Linux for this 
running kernel completed successfully.

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

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
3. Restart your X session.

Warning no default label for /tmp/vmware-block-restore-68272.0/tmp_file
Enjoy,

--the VMware team
```