Image Preparation fails using MCS on GCP due to Google's deprecated images disk export workflow
book
Article ID: CTX692290
calendar_today
Updated On:
Description
Symptoms or Error
Customers cannot create new catalogs or update the images of existing catalogs.

Solution
Citrix is currently working on a fix.
Workaround:
Customers can update the json files to use a newer image and script.Below is the step-by-step process. There are 2 options to update the files. One uses gsutil which is a gcloud utility from Google and the other one is a manual process
Option 1 - Manual change
- From your Google Cloud console, go to the following object:
GCP Console --> Cloud Storage --> Buckets --> citrix-mcs-prov-disks-<HostingUnitRegion>-<RandomCharacters> --> daisy
The bucket naming convention is: citrix-mcs-prov-disks-<HostingUnitRegion>-<RandomCharacters>
Note: If you do not find the daisy folder or the bucket, proceed with creating a catalog. Although it will fail, it will generate the necessary bucket resources that we will modify in the following steps.

- Download files disk_export.wf.json and image_export_ext.wf.json from this location (Download button from file → it opens in browser → right click → Save as )


- Modify the following lines at 18 in disk_export_ext.wf
"export_instance_disk_image": {
"Value": "projects/compute-image-import/global/images/family/debian-9-worker",
"Description": "image to use for the exporter instance"
},
- Similarly, modify image_export_ext.wf.json
- Upload files back to the same place in GCP (Note: Make sure to remove the prefix daisy_ before uploading files)
- Delete the rule called "Delete object" that discards these files after 1 day. This rule can be located at
GCP Console --> Cloud Storage --> Buckets --> <bucket> --> Lifecycle --> Rules

Note: CVAD adds this rule each time a preparation machine is created. Therefore, you should delete this rule after each image preparation process (new catalog creation and master image update on existing catalog).
If you choose not to delete this rule, you will need to repeat all the above steps each time you create a catalog or update an image. This is because the rule will discard the modified files. - If you have multiple hosting regions, make sure to follow the above steps for all the hosting unit regions.
Option 2 - Using gsutil
- Download and install gsutil from https://cloud.google.com/storage/docs/gsutil_install
- Copy the gsutil path of json files disk_export_ext.wf.json and image_export_ext.wf.json from Google Cloud Console -> Storage -> Buckets -> citrix-mcs-prov-disks-<HostingUnitRegion>-<RandomCharacters> -> daisy

- Execute the attached PowerShell script using Google Cloud SDK Shell in Administrator mode (Make sure you have authenticated to gcloud using command gcloud auth)
Update-Files.ps1

Problem Cause
GCP has modified the endpoints that are used to obtain image workers for daisy VMs. These endpoints are used by our MCS Plugin for the disk export process using Cloud Build. This modification by Google breaks our code and causes the image preparation process to fail during the catalog update or creation process.
Environment
The above mentioned sample code is provided to you as is with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the sample code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the sample code.
Was this article helpful?
thumb_up
Yes
thumb_down
No