CRT connection Vitualbox in CentOS virtual machine

Source: Internet
Author: User

After installing the CentOS virtual machine in the Virtalbox, it is inconvenient to operate directly in the virtual machine, so I want to use the CRT to connect the virtual machine.

1, open VirtualBox, set-Network, network connection 2 Set the connection mode is "bridged Adapter"

2, start the virtual machine, ifconfig view eth1 network status, if the machine is dynamic acquisition of IP, here eth1 will appear a and native IP similar IP, this IP is the CRT available IP

Later, the company changed to manually set the IP, and the station and fixed IP was bound, the original settings can not be used, changed to manually obtain the IP, if the above two steps, after the start of the virtual machine prompts eth1 boot failure, view eth1 does not have an IP address. Because the native IP is 192.168.60.x1, the available virtual machine is requested IP:192.168.60.X2

Sudo ifconfig eth1 192.168.60.x2 netmask 255.255.255.0

Sudo ifconfig eth1 up

Ifconfig after viewing eth1 has been shown as configured IP, at this time ping outside the network, ping the host, the host ping virtual machine can be, (at first do not know the virtual machine configuration and host the same network segment, the result is not the host ping different virtual, is the virtual machine ping not through the host)

Restart Network Service: Service network restart

The result still prompts eth1 to fail

4, the above method only use a single connection virtual machine, if you want to connect each time, you have to modify the eth1 file configuration

Vim/etc/sysconfig/network-scripts/ifcfg-eth1

Change Onboot=no to Onboot=yes activate NIC

Change BOOTPROTO=DHCP to Bootproto=static

Add ipaddr and NETMASK (subnet mask)

Configured as follows

Configure and then restart the Network Service services Network Restart,ok

Virtual Machine ping host, ping outside the network, the host ping virtual machine can be ping, and finally with the CRT can connect the configured virtual machine IP

CRT connection Vitualbox in CentOS virtual machine

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.