Speed up IS Windows provisioning if slow when using Integrated Storage
Disclaimer **Note this wrapper has not been through QA and is provided as is. This will be implemented into OnApp in upcoming releases.**
Issue
Windows VMs take a long time stuck in Provisioning. It may take up to 4 hours or more to provision a Windows VM.
Environment
All Windows* templates
Cloud-boot Hypervisors & Backup server
OnApp Storage Version (all)
OnApp Platform 3.x.x
Resolution
Essentially what the wrapper will do on the fly:
a) Create a non-sparse raw format of the windows template in the templates directory ntfsclone -r -O /onapp/templates/win12_x64_dc-ver3.2-kvm-nonspecial.img /onapp/templates/win12_x64_dc-ver3.2-kvm.img
b) dd the contents using non-buffered IO and large block size for efficient IO performance
dd if=/onapp/templates/win12_x64_dc-ver3.2-kvm-nonspecial.img of=/dev/mapper/hpmw5sn1cal08yX1 bs=64M iflag=direct oflag=direct
Note the first time a template is deployed using this it will be slow provisioning, after that it should be faster.
Here are the steps to apply the wrapper on your cloud.
For OnApp 3.0:
1. On Control Panel server:
cd /tftpboot/images/centos5/diskless/snapshot/<BS_MAC_ADDRESS>
2. On the Backup Server (also add to custom config):
#Wrapper IS ntfsclone
cp /.rw/ntfsclone_3.0 /sbin/
mv /sbin/ntfsclone /sbin/ntfsclone.orig
mv /sbin/ntfsclone_3.0 /sbin/ntfsclonechmod 766 /sbin/ntfsclone
** Reboot your backup server for the changes to take effect, or execute step 2 manually on your backup server
** Note the first time a template is deployed using this it will be slow provisioning, after that it should be faster.
For OnApp 3.1:
1. On Control Panel server:
cd /tftpboot/images/centos5/diskless/snapshot/<BS_MAC_ADDRESS>
2. On the Backup Server (also add to custom config):
#Wrapper IS ntfsclone
cp /.rw/ntfsclone_3.1 /sbin/
mv /sbin/ntfsclone /sbin/ntfsclone.orig
mv /sbin/ntfsclone_3.1 /sbin/ntfsclonechmod 766 /sbin/ntfsclone
** Reboot your backup server for the changes to take effect, or execute step 2 manually on your backup server
** Note the first time a template is deployed using this it will be slow provisioning, after that it should be faster.
For OnApp 3.1.2:
1. On Control Panel server:
cd /tftpboot/images/centos5/diskless/snapshot/<BS_MAC_ADDRESS>
2. On the Backup Server (also add to custom config):
#Wrapper IS ntfsclone
cp /.rw/ntfsclone_3.1.2 /sbin/
mv /sbin/ntfsclone /sbin/ntfsclone.orig
mv /sbin/ntfsclone_3.1.2 /sbin/ntfsclonechmod 766 /sbin/ntfsclone
** Reboot your backup server for the changes to take effect, or execute step 2 manually on your backup server
** Note the first time a template is deployed using this it will be slow provisioning, after that it should be faster.
For OnApp 3.2:
1. On Control Panel server:
cd /tftpboot/images/centos5/diskless/snapshot/<BS_MAC_ADDRESS>
2. On the Backup Server (also add to custom config):
#Wrapper IS ntfsclone
cp /.rw/ntfsclone_3.2 /sbin/
mv /sbin/ntfsclone /sbin/ntfsclone.orig
mv /sbin/ntfsclone_3.2 /sbin/ntfsclonechmod 766 /sbin/ntfsclone
#Wrapper IS mkfs.ntfscp /.rw/mkfs.ntfs_3.2 /sbin/
mv /sbin/mkfs.ntfs /sbin/mkfs.ntfs.orig
mv /sbin/mkfs.ntfs_3.2 /sbin/mkfs.ntfs
chmod +x /sbin/mkfs.ntfs
** Reboot your backup server for the changes to take effect, or execute step 2 manually on your backup server
** Note the first time a template is deployed using this it will be slow provisioning, after that it should be faster.
Cause
This is a known issue with provisioning Windows VMs when using Integrated Storage. It's due to the block size used by ntfsclone. We are recreating Windows templates that will solve the issue.
-
Hello,
i have tested on Centos 6.4 and Onapp 3.1.2
I have change 2 Lines(Line12, 15) in the Script because i don't have a dd in /sbin/
#!/bin/bash
#if ntfsclone is used for taking a -s backup or restore backup
#then use ntfsclone.orig
if [[ $@ == *-s* ]] || [[ $@ == *backups* ]]; then
/sbin/ntfsclone.orig $@
exit 0;
fi
#Workaround CORE-1194
if [ -f $5_core-1194 ]; then
/bin/dd if=$5_core-1194 of=$4 bs=64M oflag=direct
else
/sbin/ntfsclone.orig $1 $2 $3 $5_core-1194 $5 > /dev/null
/bin/dd if=$5_core-1194 of=$4 bs=64M oflag=direct
fiThanks
Marcel
-
Hello,
I've tested on CentOS 5.9 with OnApp 3.1,it was failed at "Provisioning" step and open a support ticket regarding this failure,then got below reply:
"Looks like the wrapper hasn't been through QA testing however, and is provided as is. As such, the admins have advised to revert to using the normal method until it has passed QA testing."
Dean
Please sign in to leave a comment.
Comments
5 comments