Zero-based installation of linux virtual machine (VirtualBox)

        VMware and VirtualBox are relatively easy-to-use software for installing virtual machines. VMware is paid software, and VirtualBox is free software. See what software you need to use. I wrote an article before using VMware to install virtual machines: Zero-based installation of linux virtual machines (VMware)_Baoge66's Blog-CSDN Blog

        The current version of VirtualBox is iterative, and it may no longer be applicable to the old windows system. If there is a failure to create a new one, please download the old version and install it.

 The following describes the installation steps in detail:
click New, and the following figure will pop up. The name of the virtual machine will generally automatically match the type and version at this time. If it does not match, you need to manually select the type and version.

After clicking Next in the above picture:
 

 Select or directly enter the memory allocated to the virtual machine, and click Next:

 Select here, install the virtual machine, whether to create a hard disk, the default selection is "Create a virtual hard disk now", click "Create"

Hard disk file type, it is not recommended to modify, click "Next"

Choose whether to create a hard disk with "Fixed Size" or "Dynamic Allocation". After that, you will be asked to set a value for the hard disk size. If you choose "Fixed size", creating a virtual hard disk will take up so much disk space; if you choose "Dynamic allocation", as more virtual hard disks are used, the computer disk space will gradually increase until it reaches the set value. I chose "Dynamic Allocation", click "Next"

 The name of the virtual machine is displayed in the form above. If you need to change the location of the virtual machine, click the button on the right side of the form to modify the path. Next is to choose the size of the virtual hard disk. Click "Create" to complete the creation.

 Look at the marked position in the figure, and select the virtual disk iso image. You can start the installation.
After the installation is complete, you need to configure the network

         systemctl status network Check the network status (status is to check the status, start is to start, stop is to stop), if it is not started, try to start, if the start fails to report an error: failed to start LSB: Bring, (if it is other problems that cannot access the Internet, also You can try this solution) The solution is as follows:

 Use the command ip addr to find the address of my box. Then use the command vim /etc/sysconfig/network-scripts/ifcfg-enp0s3, where the number after ifcfg-... may be different for some systems, don’t worry about it. Add: HWADDR=08:00:27:88:27:ff

         Among them, ONBOOT=yes means that the operating system does not need to be restarted, only the network service needs to be restarted, and the modification of the configuration file will take effect. (vi and vim commands can edit files, the vi system comes with it, vim needs to be installed by yourself, after opening, press "i" or "insert" to enter the editing mode, after editing, press "ESC", after exiting the editing state, the keyboard input ": wq" to save the written content, among which w write, q quit. Because Xiaobai doesn't know much, avoid detours, hereby record)
        service network restart After restarting the network, you should be able to connect to the Internet.

        The above is a bridged network, similar to two machines, the host and the virtual machine. The ip on the same network segment as the host is used. If it is troublesome to assign ip or the computer is not connected to the Internet, you can try to use network address translation (NAT). But when logging in with ssh, port forwarding needs to be configured. View screenshots:


        In order to avoid the trouble of port access problems, the local virtual machine can directly disable the firewall. Centos7 as an example:
turn off the firewall: systemctl stop firewalld
disable the firewall: systemctl disable firewalld

Guess you like

Origin blog.csdn.net/u011471105/article/details/124154885