5 - Configure External network connectivity for Virtual machine
2021/6/5 10:21:17
本文主要是介绍5 - Configure External network connectivity for Virtual machine,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
Prerequisites:
- CentOS7 virtual machine on Hyper-V
Now that we have a CentOS system working on Internal network, that's good. Next let's bring it access to Internet.
Configure Internet access for CentOS:
- Make sure you shutdown CentOS properly before we move onto below steps
- Go back to Hyper-V, now we going to create another Virtual network switch
- Click on Virtual switch manager
- From the new prompt screen, highlight New Virtual network switch -> External -> Create Virtual Switch
-
You will get a new configure sreen. Put name External-VM-Switch ( Whatever the name you like is fine ) for new external switch, Connection type we choose to External networks this time, then choose the network you have on your local host Windows 10, here i am using wireless WIFI, then click OK
- Once created the external switch, you can also find it on Network sharing center on your Windows 10 system.
Windows Home Button -> Control Panel -> Network and sharing center -> Change adapter settings - Now we've done for create external network switch, now we can apply it to CentOS, to let CentOS access to internet
- Highlight k8s-master on Hyper-V, right click -> Settings -> highlight Add Hardware - Select network adapter, We are going to add another network device to virtual machine, click on Add
Note: If you got options Add Hardware, Network Adapter greyed out, that means you haven't shutdown your CentOS system it's still running ! - For the new introduced Network adapter, we make it apply to External-VM-Switch this time
Believe you will notice we now have 2 Network adapter for our Vitual machine now, as below:
Network Adapter 1 - using switch Internal-VM-Switch - It's for internal access local host remote to virtual machine
Network Adapter 2 - using switch External-VM-Switch - it's for external access let CentOS wave to Internet - Now it's time to give it a try from Vitual machine access to Internet, release the monster !
- Start and connect virtual machine again, try ping to www.baidu.com
-
Working as expected, awesome ! Now we have enabled Virtual machine CentOS access to Internet.
Remebmer to apply the same for another vitual machine k8s-node1 from step 8 to 11
这篇关于5 - Configure External network connectivity for Virtual machine的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-07-06有没有什么开源的py项目可以对图像进行分类-icode9专业技术文章分享
- 2024-07-05feign默认connecttimeout和readtimeout是多少-icode9专业技术文章分享
- 2024-07-05idea控制台,日志太多,导致部分想看得日志被刷走 搜不到-icode9专业技术文章分享
- 2024-07-05The server selected protocol version Tls10 is not accepted by client preferences [TLs12]-icode9专业技术文章分享
- 2024-07-05怎么清理项目缓存-icode9专业技术文章分享
- 2024-07-04安装 Eyoucms详细图文教程-icode9专业技术文章分享
- 2024-07-04ueditor 复制文章时,图片的链接是一个下载图片地址,该如何处理?-icode9专业技术文章分享
- 2024-07-04怎样判断host有没有对wordpress有缓存呢-icode9专业技术文章分享
- 2024-07-04具有编译功能的系统make后,无法ssh连接-icode9专业技术文章分享
- 2024-07-04make后如何升级ssh-icode9专业技术文章分享