Install and configure the Ubuntu network in Hyper-V

Source: Internet
Author: User
Installing and configuring Ubuntu network installation in Hyper-V 1. to install Ubuntu in Hyper-V, follow these steps to install Ubuntu tuserver2. after installation, edit the file # sudovi/etc/initramfs-tools/modules in Ubuntu, add the configuration line at the end of the File :... installing and configuring Ubuntu network installation in Hyper-V 1. to install Ubuntu in Hyper-V, follow these steps to install Ubuntu Server 2. after the installation is complete, edit the file # sudo vi/etc/initramfs-tools/modules in Ubuntu and add the configuration line hv_vmbus hv_storvsc hv_blkvsc hv_netvsc 3 at the end of the file. run update-initramfs and reboot system # update-initramfs-u # reboot 4. after the reboot UT is started again After Hyper-v ic (enable) is enabled, you can use the lsmod command for verification: # lsmod | grep hv_vmbus 50431 4 hv_utils, hv_netvsc, hv_blkvsc, hv_storvsc 5. set the IP address, Gateway, and mask. Sudo vi/etc/network/interfaces, add the following content: use static IP (recommended): iface eth0 inet static address 192.168.1.200 netmask 255.255.255.0 gateway 192.168.1.1 auto eth0 use DHCP: auto eth0 iface eth0 inet dhcp 6. add DNS: vi/etc/resolv. conf (may be created), add the following content: # add the domain name server nameserver 192.168.1.1/etc/resolv. the conf file will be generated again after it is restarted, and previous modifications will be lost, so # sudo vi/etc/resolvconf/resolv. conf. d/tail then add the DNS in this file, in the same format as the previous/etc/resolv. conf file consistency: nameserver 192.168.1.1, enter wq to save and exit, and restart resolvconf to make the configuration take effect: #/etc/init. d/resolvconf restart 7. restart the network: # sudo/etc/init. d/networking restart if an error is reported in this step, RTNETLINK answers: File exists Failed to bring up ethX may need to be executed first: # sudo iptables-save. In addition, pay attention to the network configuration, you can modify the network configuration in the upper-right corner. Static IP configuration is recommended.
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.