Install CentOS 7 on VirtualBox as any network-connected machine

In this article I will explain a hundreds virtualbox bridge mode. That is, how to install it so that it looks like a machine a local ip. You may need to make the machine available from the outside and then create a virtual server to redirect a particular router port to a specific ip of the virtual server.

Centos is a very widespread distribution because it is stable, fast and very up-to-date. We can say that it is part of the RedHat family. In fact, the Fedora project is the desktop equivalent, and the CentOS project is the desktop equivalent.

If youā€™re bored reading the whole article or if thereā€™s a few steps you didnā€™t understand, you can watch the video at the bottom of the page or leave a comment anyway. Iā€™ll answer you as soon as possible.

1. Download the ISO CentOS 7

First, you need to download the iso from the site you can find by searching on google, for convenience I enter the direct link. You can also use this procedure on a physical machine by burning the iso on a CD. In this case, go directly to step 3. If you do not know how to burn the iso of a CD, which does not mean simply copying the file to the cd, I recommend you read a guide on how to burn an iso file on cd.


2. Configuring the virtual machine

After you download the iso, you need to open VirtualBox. If you havenā€™t installed it yet, we recommend that you read an article about how to install virtualboxes.

You must click on the blue circular icon to start the wizard that will allow you to create your own virtual machine. Enter a name, I chose to enter a name that contains the word CentOS because in this way the system automatically chooses the template for the most similar operating system. If you want to enter a different name you can do it but you will have to choose from the drop-down menus the appropriate template, in this case the type must be Linux and the version must be RedHat (64bit).

I chose the 64-bit system because it is the best choice if we do not want to have problems related to memory management and file size. If you canā€™t see 64-bit operating systems in the drop-down menu, you havenā€™t enabled virtualization or your hardware doesnā€™t support it in your bios. So if you donā€™t know how to enable this option I recommend you read an article on how to enable virtualization in bios.

Then click on and choose the amount of ram, I recommend you to enter at least 512 MB, I have left the recommended setting that is 1024MB.

By clicking on, you will be asked to create a file system, you can choose from the various types of file system. I chose the (VirtualBox Disk Image) because I donā€™t need to share this file system with other virtualization platforms.

The next screen asks you if you want to dynamically allocate space or if you want a specified fixed size. The difference between dynamically allocated space and specified space is that with the first option it temporarily saves disk space because, although the virtual disk is set to reach a certain size at most, this space has not yet been allocated. The second option already allocates the space you set and generally increases performance.

After setting up the virtual hardisk, we return to the main virtualbox screen, we will display our virtual machine on the left. Right-click on the virtual machine and choose ā€œsettingsā€ then select ā€œnetworkā€ from the menu on the left and set network adapter 1 as active and connected in ā€œTab with Bridgeā€ mode and make sure that the name of the card is that of the connected to the network of the computer hosting the virtual machine.

Now we have to mount the iso so that the virtual machine sees it as a CD. Select ā€œAchiviationā€ from the left menu under IDE controller select the CD image and choose the CD icon on the right. I, having already tried this procedure, I already have in the quick selection menu the iso. If this is your first time doing this test, youā€™ll need to select the iso file by entering the path to the image you downloaded in step 1.

Click the ā€œOKā€ button and launch the virtual machine by pressing the green arrow to the right.

3. Installing the operating system

The virtual machine window will open and you will notice that you are proposed to choose. If you donā€™t touch anything, the system will check the image. You can still select the direct installation with the darts ā€œupā€ and ā€œdownā€ next to the numeric keypad. Donā€™t get confused with ā€œpage upā€ and ā€œpage down.ā€ The darts I say, theyā€™re 4 and they form a kind of triangle.

If youā€™ve never used virtualboxes, youā€™ll see messages informing you how to activate the mouse inside the virtual machine. In fact, what we are interested to know is that to act with the mouse inside the virtual machine, you have to click inside the window twice with the left mouse button. To exit and use our desktop normally, simply press the right ā€œctrlā€ key on the keyboard. If you have trouble assimilating these concepts, we recommend that you read an article on how to move around within the virtualbox window.

After the installation has started, youā€™ll see a window asking for your language after some time. Select your language and click the blue button at the bottom right. A window will open where you will have to choose the destination of the installation: our virtual hardisk. I have selected the ā€œI want to make more space availableā€ option to select the entire file system. I then clicked on the blue confirmation button in the upper left and i chose ā€œdelete allā€ in the lower right window that opened. To confirm then I clicked on the ā€œRecover Spaceā€ button.


There are better ways to partition a disk, especially if you want a high-performance and secure system but in this article I wonā€™t talk about it. If you want to find out about this I recommend you read an article about the various types of configuration for partitioning a linux system.

Itā€™s time to set up our network and then click on ā€œNetwork & HostNameā€. We activate our network adapter by simply clicking on the button next to ā€œOFFā€ which will change color and label for switching to the status of ā€œONā€.

Theoretically, in this way, the system should automatically hook up to the DHCP server and configure itself but I much prefer to enter the data by hand. I then clicked on the button at the bottom left ā€œConfigureā€, I selected the ā€œIPV4 settingsā€ tab in the window that opened, I selected it as a ā€œmanualā€ method and I entered in the address list the local ip address 192.168.1.29 because it is not used by other machines. I chose the mask 255.255.255.0 and the Gateway 192.168.1.1 because it is the ip address of my router. As a DNS server I always prefer to enter the google one because it seems to me the fastest and most reliable, so I entered 8.8.8.8 .

When you click the ā€œsaveā€ button, youā€™ll notice that your virtual network adapter settings have changed. I have chosen the appropriate settings to the internet, I have an adsl router.

If you donā€™t know which settings to enter you can skip the manual configuration and leave everything automatically. The system, if a ā€œDHCPā€ server is available, should automatically detect ip addresses. Itā€™s not wise anyway. For this reason, if you feel the need to learn more and understand what you are doing, I recommend you read an article on the theory of networks (work networks).

To proceed, you need to click the blue button at the top left and you will return to the previous screen. Here, you will need to confirm everything by clicking on the blue button at the bottom right ā€œStart Installationā€.

During the unattended installation process, which can take several minutes, you will be asked to set a root password (the user administrator of linux systems). Click over the key icon and enter two identical and possibly complex passwords that you will confirm by clicking on the blue button on the top left.

If you donā€™t know how to choose a strong password I recommend you read an article on how to choose a strong password.

At this point, after some time, you will find that the procedure is finished when you see the blue ā€œrestartā€ button in the bottom right that you will click.

The next time you restart, the system will start automatically, you will place in the linux shell ā€œrootā€ as the username and password you have chosen. End.

If you follow the steps I described, you should not have any problems because I tested the whole step by step. I did this test with virtualbox installed on a windows 10 machine. If you donā€™t know the difference between these two things, I recommend you read an article that illustrates the differences between a development environment, a test environment and a production environment.

Never perform procedures that you donā€™t know perfectly in a production environment and never without a backup. In this video, you can see all the steps.


It's possible to leave a comment as registered users to the site, accessing through social, wordpress account or as anonymous users. If you want to leave a comment as an anonymous user you will be notified by email of a possible response only if you enter the email address (optional). The insertion of any data in the comment fields is totally optional. Whoever decides to insert any data accepts the treatment of these last ones for the inherent purposes of the service that is the answer to the comment and the strictly necessary communications.


Leave a Reply