Configuring instances with user-defined guest policies
Container-Optimized OS includes the
OS Config
agent. You can use OS Config's guest policies to configure your
instance. packages and
packageRepositories features of guest policies are not supported on Container-Optimized OS.
Here is an example that shows how users can use assignment and recipes
features of guest policies to create a file on instances located at
us-central1-a.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eContainer-Optimized OS includes the OS Config agent, which allows instance configuration through guest policies.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003epackages\u003c/code\u003e and \u003ccode\u003epackageRepositories\u003c/code\u003e features of guest policies are not supported on Container-Optimized OS.\u003c/p\u003e\n"],["\u003cp\u003eUsers can utilize the \u003ccode\u003eassignment\u003c/code\u003e and \u003ccode\u003erecipes\u003c/code\u003e features of guest policies to perform actions such as creating files on instances.\u003c/p\u003e\n"],["\u003cp\u003eUnlike other distros, Container-Optimized OS requires an \u003ccode\u003einterpreter\u003c/code\u003e to execute scripts in recipes and runs recipes on every boot due to the stateless nature of most directories.\u003c/p\u003e\n"],["\u003cp\u003eWhile it's optional to provide an \u003ccode\u003einterpreter\u003c/code\u003e on other distros, Container-Optimized OS requires it to execute the given script.\u003c/p\u003e\n"]]],[],null,[]]