栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

将腾讯云的云服务器迁移至轻量云服务器Ubuntu

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

将腾讯云的云服务器迁移至轻量云服务器Ubuntu

将腾讯云的云服务器迁移至轻量云服务器(Ubuntu)出现的问题

通过“镜像”,可以将整个硬盘都迁移过去,这是最好的方案。具体可以看腾讯云怎么操作。

但是这会面临一些问题,比如密码登陆不上,ssh连接不上等等。

密码登陆不上:这是自动将ubuntu的密码重置了,腾讯云自带的控制台修改即可。ssh连接不上:根本原因是网络配置错误。暂且发现是MAC地址配置错误,这是因为直接移动硬盘,忽略了网络环境的影响。我们修改/etc/netplan/50-cloud-init.yaml中的MAC地址即可,新的MAC地址可以通过先重装系统看对应文件,然后复制下来安装镜像之后修改即可。如果无效,可以对比一下/etc下新旧服务器有关net的文件的区别,然后一一更改。

写博客完整过程是用英文写的,完整见下

Full Procedure

My cloud service will expire soon. So I bought a cheaper one called lightweight cloud server. So I need to transfer all my data to it.

OS: Ubuntu Server 18.04.1 LTS 64bit

Instance: Tencentyun

Make mirror and load it into the new server

But we have met some problems. If we found that the password is wrong, we can simply change it in Tencentyun Control center.

The second is that we can’t use ssh to connect with it.

When trying to install ssh, it says we can’t resolve tencentyun.com.Also, we can’t even ping it.No package has been sent out.When I use the server to ping other networks, it says network is unreachableWhen I use service network restart to restart the network, it says Unit network.service not found..

We use wrong command. This is right. service networking restart

Overall, I think that this is caused by network configuration difference. Because two sever has different network environment, the same setting can cause different results. So I reset the sever and check the difference as follows:

Solutions

According to technique articles that I have found, the configuration file won’t be changed when transferring to other servers. Among all the files, the key one is the MAC configuration in /etc/netplan/50-cloud-init.yaml.

You will find information of new server once you install the same OS in it. once you have recorded it, you can start your transferring and the MAC modification later.

But next, if you will find that your ssh is polluted, you can refer to related material.

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/718226.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号