Doing this to keep your VM running well in the new platform.
1. Prepare:
· For how to generate SSH PUBLIC KEY please read this doc: How to generate SSH RSA Key
· If you forgot your ROOT password, and you want to keep the data. You can follow this doc to reset < Reset root password when the system didn't install cloud-init plugin >
2. Go to your VM control panel to upload SSH Public Key to our system.
· Click your VM on client area.
· There is a button named “Upload SSH Public Key “. Click it.
· Input the SSH-RSA Public key and submit.
3. Install essential cloud-based program:
· Ubuntu/Debian: apt-get install cloud-init qemu-guest-agent cloud-initramfs-growroot cloud-utils
· CentOS: yum install cloud-init qemu-guest-agent cloud-utils-growpart cloud-utils
· SUSE: yum install cloud-init qemu-guest-agent growpart
If you don't do this, you may not:
- Reset root password via control panel;
- Soft shutdown (Safe Shutdown);
- Automatically setting. (IP, SSHKEY, HOSTNAME, ROOT PASS)
- Accurate CPU/RAM usage data
Done.
---------------------------------------------
If your VM cannot access the Internet:
Plan A: Fix it.
· Connect to your VM over [View Console] function.
· If not, type ip addr to check the interface setting.
· Make sure interface name is eth0. If not. Please doing following thing to make it to eth0.
· Debian/Ubuntu:
· Type [ vim etc/default/grub ]
· Find GRUB_CMDLINE_LINUX
· Insert net.ifnames=0 biosdevname=0 to GRUB_CMDLINE_LINUX if it’s not included.
· Type [ grub-mkconfig -o /boot/grub/grub.cfg ]
· Go to vim /etc/network/interfaces ,
· And then change the interface all the ensX to eth0
· Reboot
· CentOS
· Type [ vim etc/default/grub ]
· Fine GRUB_CMDLINE_LINUX
· Insert net.ifnames=0 biosdevname=0 to GRUB_CMDLINE_LINUX if it’s not included.
· Type [ grub2-mkconfig -o /boot/grub2/grub.cfg ]
· Go to cd /etc/sysconfig/network-scripts/
· And then mv ifcfg-ensXX ifcfg-eth0
· Reboot.
Plan B: Reinstall system.
- 6 Utenti hanno trovato utile questa risposta