You need to change your network adapter setting. You can follow the below steps.
- Open the configuration file.
$ vim /etc/sysconfig/network-scripts/ifcfg-enp0s3
You need to change ONBOOT no to yes. Now you will get your IP automatically when you start your VM. After that, restart your VM. It will work.