1

The following log contains an error which happens while executing the template creation script on a SolusVM powered CentOS 6 server.

CREATING MBR IMAGE...

1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00333337 s, 154 kB/s

MAPPING PARTITIONS...

device-mapper: create ioctl on vps-vm8719_img1part1-LVM-J84GGKhjRXDSpg3JqOywHfCbScGX9ElH2dGq7jfoWbeixiXqEihb21TqHzrajZjU failed: Device or resource busy
create/reload failed on vps-vm8719_img1

CREATING FILESYSTEM IMAGE...

ntfsclone v2.0.0 (libntfs 10:0:0)
ERROR(2): Failed to check '/dev/mapper/vps-vm8719_img1' mount state: No such file or directory

UNMAPPING PARTITIONS...

CREATING ARCHIVE...

windows-server2003r2-template-create-test/
windows-server2003r2-template-create-test/windows-server2003r2-template-create-test.mbr

CLEANING UP...

COMPLETE...

1 Answers1

1

From the log, we can understand that we are trying to create a template using a Xen Virtual Machine which is vm8719 and its Operating system is Windows server 2003 R2 64bit.

The following fix should help you with solving the errors which are given in the above log. Please note that you have to change the VM name with respect to your VM while executing the fix which is given below.

[root@node]:~$ kpartx -av /dev/vps/vm8719_img
device-mapper: create ioctl on vps-vm8719_img1part1-LVM-j84GGjdklawjdadk2082210kdll29dkkdlklmldHAld3 failed: Device or resource busy create/reload failed on vps-vm8719_img1
[root@node]:~$ dmsetup remove vps-vm8719_imgp1
[root@node]:~$ kpartx -av /dev/vps/vm8719_img
add map vps-vm8719_img1 (253:80): 0 61886464 linear /dev/vps/vm8719_img 1026048

Now you may run the template creation script again and it should work without any issues.

This post was imported from my Blog: https://blog.digindominic.net/2018/11/fixing-solusvm-xen-hvm-template-creation-error/