Create kms_main