Download and install VirtualBox
Download CentOS everything iso image
-
Click on
New
-
Customize VM
-
Name:
VM1
-
Type:
Linux
-
Version:
Other Linux (64-bit)
-
-
Click on
Create
-
Click on
Create
-
Select
VM1
-
Settings
->Storage
-
Click on 💿
Empty
-
In Attributes click on icon 💿 and select
Choose Virtual Optical Disk File
-> choose the downloaded CentOS everything iso image -
OK
-
Select
VM1
-
Start
-
SOFTWARE SELECTION
- enableDevelopment Tools
than click onDone
-
INSTALLATION DESTINATION
- click onATA VBOX HARDDISK
than click onDone
-
Begin Installation
-
ROOT PASSWORD
- set your password e.g.root
-
Reboot
-
Login into
VM1
:-
Login:
root
-
Password:
root
-
-
Name the VM e.g.
vm1
, executehostnamectl set-hostname "vm1"
-
Select
VM1
-
Settings
-
Network
->Adapter 1
->Enable Network Adapter
-> ChooseHost-only Adapter
-
Network
->Adapter 2
-> ChooseNAT
-
OK
-
Start
VM1
-
Login into
VM1
-
Execute
cd /etc/sysconfig/network-scripts
-
Edit file
ifcfg-interface_name
e.g.ifcfg-enp0s3
, notifcfg-lo
- loopback interface, via text editor e.g.vi
-
Change
ONBOOT
value fromno
toyes
-
Save the file and reboot
-
You are now connected to the internet, try out
ping 8.8.8.8
-
If you would like to work with the virtual maching
VM1
via your shell, get the IP address of the network interface viaip addr
.Open your shell and type
ssh root@IP
e.g.ssh root@192.168.56.3
and login into virtual machineVM1
.At ssh issue
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
execute commandssh-keygen -f "/home/USERNAME/.ssh/known_hosts" -R IP
e.g.ssh-keygen -f "/home/adrian/.ssh/known_hosts" -R 192.168.56.3
-
Right click
on the VM1 -
Choose
Clone
-
Name it, e.g
VM2
-
Next
-
Clone
-
Select
VM2
-
Settings
-
Network
-
Adapter 1
->Advanced
-> Press the icon 🔄 atMAC Address
-
Adapter 2
->Advanced
-> Press the icon 🔄 atMAC Address
-
OK
-
Launch and login into
VM2
:-
Login:
root
-
Password:
root
-
-
Name the VM e.g.
vm2
, executehostnamectl set-hostname "vm2"