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...
4
  • Hi, Still using/deploying 2003R2 ?
    – yagmoth555
    Nov 26 '18 at 18:45
  • It's an example and it is not Operating System specific. Nov 26 '18 at 18:47
  • @yagmoth555 Many hosting providers still deploy 2003 RDP. Nov 26 '18 at 18:48
  • It's a bad practice as it's no longer supported
    – yagmoth555
    Nov 26 '18 at 18:55
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/

1
  • So this is a stuck dmsetup device then.
    – Nils
    Nov 27 '18 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.