Available in VPC
Learn how to check the conversion compatibility of the source server OS when an error occurs during server image conversion from Xen to KVM, and how to respond based on the results.
This guide includes examples for Ubuntu 20.04, which is scheduled to be supported.
- Validate the source server before creating a Xen server image for conversion.
- Install the validation script to check Xen VM conversion compatibility.
- This feature is supported only in Xen environments running Rocky Linux 8.10 or Ubuntu 20.04.
Pre-check steps before VM validation
The following tasks must be completed before validating the VM:
Check default settings of the original Xen VM
Check whether the main files for each OS exist and whether they are editable.
# Rocky8.10
'/etc/yum.repos.d/Rocky-BaseOS.repo' '/etc/rc.d/rc.local' '/etc/default/grub' '/etc/sysconfig/network-scripts/ifcfg-eth0' '/etc/udev/rules.d' '/etc/fstab /etc/resolv.conf'
# Ubuntu20.04
'/etc/apt/sources.list' '/etc/rc.local' '/etc/default/grub' '/etc/network/interfaces' '/etc/udev/rules.d' '/etc/fstab'
Check key environment settings
- Check that the repo URL points to http://repo.ncloud.com/.
- Check that at least 1 MB of space remains inside the VM.
- Check if there is any error in /etc/fstab.
Download validation script
On the server to be converted, download the validation script x2k_validate.
The validation script runs only on OSes that support conversion.
- Supported OSes: Rocky 8.10, Ubuntu 20.04
# If not a root account, proceed with sudo.
# wget http://init.ncloud.com/server/linux/x2k-migration/x2k_validate
# chmod +x x2k_validate
How to check validation results and take actions
You can take actions based on the results of running the script that checks the conversion compatibility of the source server OS.
Checked and no issues found
If the validation result shows SUCCESS, there is no issue to address.
root@s1950d11189a: ~ # ./x2k_validate
Fri 11 Apr 2025 05:10:33 PM KST
Execute ./x2k_validate - start
x2k convert for ubuntu 20.04 : v1.0.0-2025041102
[OK] checkExistFile : /etc/apt/sources.list exists
[OK] checkImmutable : /etc/apt/sources.list mutable
[OK] checkExistFile : /etc/rc.local exists
[OK] checkImmutable : /etc/rc.local mutable
[OK] checkExistFile : /etc/default/grub xists
[OK] checkImmutable : /etc/default/grub mutable
[OK] checkExistFile : /etc/network/interfaces exists
[OK] checkImmutable : /etc/network/interfaces mutable
[OK] checkExistFile : /etc/udev/rules.d exists
[OK] checkImmutable : /etc/udev/rules.d mutable
[OK] checkExistFile : /etc/fstab exists
[OK] checkImmutable : /etc/fstab mutable
[OK] checkRepo : the repo url valid
[OK] checkSpace : enough disk space
[OK] checkFstab : fstab is valid
Execute ./x2k_validate - end
SUCCESS
How to check and take actions by issues
If issues are found during validation, the methods for checking results and taking actions for each issue are as follows:
-
checkRoot: Ensures that the script can be executed as the root user.
- FAIL log
[FAIL] checkRoot : this script must be run as root or with 'sudo' - How to proceed
ncloud@s1950d11189a:~$ sudo ./x2k_validate
- FAIL log
-
SupportOS: Check whether the OS and version are supported.
- FAIL log
[FAIL] supportOS : unsupported OS Version - How to run
root@s1950d11189a:~# cat /etc/os-release
- FAIL log
-
checkExistFile: Check whether the configuration file exists.
- FAIL log
[FAIL] checkExistFile : /etc/apt/sources.list does not exist - How to check
root@s1950d11189a:~# ls /etc/apt/sources.list ls: cannot access '/etc/apt/sources.list': No such file or directory - How to resolve
- Create file identical to the base image.
- FAIL log
-
checkRepo: Check whether the default repo address points internally.
- FAIL log
[FAIL] checkRepo : /etc/apt/sources.list some repo urls are not valid - How to check
root@s1950d11189a:~# grep -v '^$\|^#' /etc/apt/sources.list |grep 'main restricted' deb http://repo.gov-ncloud.com/ubuntu focal main restricted deb http://repo.gov-ncloud.com/ubuntu focal-updates main restricted deb http://repo.gov-ncloud.com/ubuntu focal-backports main restricted universe multiverse deb http://repo.gov-ncloud.com/ubuntu focal-security main restricted - How to resolve
- Open the source file and edit the default repo address so that it points to the internal repository.
root@s1950d11189a:~# grep -v '^$\|^#' /etc/apt/sources.list |grep 'main restricted' deb http://repo.gov-ncloud.com/ubuntu focal main restricted deb http://repo.gov-ncloud.com/ubuntu focal-updates main restricted deb http://repo.gov-ncloud.com/ubuntu focal-backports main restricted universe multiverse deb http://repo.gov-ncloud.com/ubuntu focal-security main restricted
- FAIL log
-
checkSpace: Check that at least 1 MB of space remains in the root file system.
- FAIL log
[FAIL] checkSpace : not enough disk space - How to check
root@s1950d11189a:~# df |grep '/$' /dev/vda2 10215700 2688948 6986236 28% / - How to resolve
- Delete unnecessary files so that the root file system has at least 1 MB of free space.
- FAIL log
-
checkFstab: In the fstab configuration file, check the status of / or /boot, excluding additional disks.
- FAIL log
[FAIL] checkFstab : fstab is not valid - How to check
- Check that / or /boot is valid in the fstab configuration file, excluding any additional disks.
root@s1950d11189a:~# findmnt --verify findmnt: /etc/fstab: parse error at line 10 -- ignored 1 parse error, 0 errors, 0 warnings - How to resolve
- Edit /etc/fstab so that running findmnt --verify returns no errors for / or /boot.
root@s1950d11189a:~# findmnt --verify Success, no errors or warnings detected
- FAIL log
-
checkFstab: Check whether devices such as /dev/xvd* exist in the fstab configuration file.
- FAIL log
[FAIL] checkFstab : fstab containes /dev/xvd* device - How to check
- Check that / or /boot is valid in the fstab configuration file, excluding any additional disks.
root@s1950d11189a:~# grep ^/dev/xvd /etc/fstab /dev/xvdb1 /root/test ext4 defaults 0 1 - How to resolve
- Edit /etc/fstab to ensure that no entries related to /dev/xvd* devices remain.
root@s1950d11189a:~# grep ^/dev/xvd /etc/fstab root@s1950d11189a:~#
- FAIL log