[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eConfidential VM instances with N2D machine types, AMD EPYC Milan CPU, AMD SEV Confidential Computing, and created after January 15, 2024, support live migration, while all others require the \u003ccode\u003eonHostMaintenance\u003c/code\u003e policy to be set to \u003ccode\u003eTERMINATE\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eConfidential VM instances not supporting live migration will stop during host maintenance events, but they automatically restart afterwards, with a default \u003ccode\u003ehostErrorTimeoutSeconds\u003c/code\u003e set between \u003ccode\u003e90\u003c/code\u003e and \u003ccode\u003e330\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can minimize the impact of host maintenance events by monitoring for event notices, simulating events, adjusting workloads, or provisioning Confidential VMs on sole-tenant nodes.\u003c/p\u003e\n"],["\u003cp\u003eMonitoring the \u003ccode\u003e/computeMetadata/v1/instance/maintenance-event\u003c/code\u003e metadata value allows you to receive advanced notice of upcoming host maintenance events, with notification periods varying by the Confidential Computing technology used, ranging from none to 7 days.\u003c/p\u003e\n"],["\u003cp\u003eIf you need complete control of maintenance, you may provision Confidential VM instances on a sole-tenant node, allowing you to decide on a 4-hour maintenance window, and also perform manual live migration.\u003c/p\u003e\n"]]],[],null,["# Live migration\n\nA Confidential VM instance must have the following configuration to support [live migration](/compute/docs/instances/live-migration-process):\n\n\u003cbr /\u003e\n\n- An N2D machine type with AMD EPYC Milan CPU platform\n\n- AMD SEV Confidential Computing technology\n\n- An\n [operating system image that supports live migration](/confidential-computing/confidential-vm/docs/supported-configurations#operating-systems)\n\n- Be created after January 15, 2024\n\nAll other Confidential VM types don't support live migration, and must set their\n[`onHostMaintenance` policy](/compute/docs/instances/host-maintenance-options#settingoptions)\nto `TERMINATE` when being created. This means the VM stops during\n[host maintenance events](/compute/docs/instances/host-maintenance-overview#maintenanceevents).\n\nHost maintenance events for Confidential VM instances that don't support live migration\n---------------------------------------------------------------------------------------\n\nDuring host maintenance events, Confidential VM instances that don't support live\nmigration and have default host maintenance policy settings are stopped. They\nare restarted after the maintenance is complete.\n\nThe following table shows the default values for host maintenance policy\nsettings on Confidential VM instances that don't support live migration.\n\nWith planning, you can [minimize the impact of host maintenance events](#minimize-impact)\non your Confidential VM instances.\n\nMinimize the impact of host maintenance events\n----------------------------------------------\n\nTo minimize the impact of host maintenance events on Confidential VM instances\nthat don't support live migration, you can do the following things:\n\n- [Monitor for host maintenance event notices](#monitor)\n\n- [Simulate a host maintenance event](#simulate)\n\n- [Change your workload](#change)\n\n- [Provision your Confidential VM instances on sole-tenancy nodes](#sole-tenancy)\n\n### Monitor for maintenance event notices\n\nTo receive advance notice of host events, monitor the\n`/computeMetadata/v1/instance/maintenance-event` metadata value. To do so,\nrequest an event notice by running the following command on your Confidential VM\ninstance: \n\n curl http://metadata.google.internal/computeMetadata/v1/instance/maintenance-event -H \"Metadata-Flavor: Google\"\n\nIf the request to the metadata server returns `NONE`, then the VM isn't\nscheduled to stop. If the metadata server returns\n`TERMINATE_ON_HOST_MAINTENANCE`, then your VM is scheduled for stopping.\n\nThe following table shows the host maintenance event notification period for\nConfidential VM instances that don't support live migration, organized by\nConfidential Computing technology type. Use these periods to plan around host\nmaintenance events accordingly.\n\n### Simulate a host maintenance event\n\nTo test how your workload behaves when a Confidential VM instance is restarted,\nyou can\n[simulate a host maintenance event](/compute/docs/instances/simulating-host-maintenance).\nAs you work through the simulated event, think about how you can change your\nworkload to be resilient when a real event happens.\n\n### Change your workload\n\nAfter simulating a host maintenance event, you can use the experience to modify\nyour workload to respond to one. For example, you might make use of one of the\nfollowing techniques:\n\n- Adjust your workload to\n [monitor regularly for upcoming host maintenance events](#monitor).\n\n- Before an event happens, temporarily\n [move your work in progress to a Cloud Storage bucket](/storage/docs/uploading-objects).\n After the Confidential VM instance restarts, have the workload retrieve the data\n and resume work.\n\n- Write all data to a\n [secondary Persistent Disk](/compute/docs/disks/add-persistent-disk). After the\n Confidential VM instance restarts, reattach the Persistent Disk so your workload can\n resume work.\n\n### Provision your Confidential VM instances on sole-tenancy nodes\n\nIf it fits your needs, you can provision your Confidential VM instances on a\n[sole-tenant node](/compute/docs/nodes/sole-tenant-nodes). This lets you\ndetermine a 4-hour window in which Google can perform maintenance on your VMs.\nIt also lets you perform a\n[manual live migration](/compute/docs/nodes/about-manual-live-migration),\nwhich moves your VM to a different node or node group you control.\n\nSee [Sole-tenant node pricing](/compute/sole-tenant-pricing).\n\nWhat's next\n-----------\n\nLearn about [designing resilient systems](/compute/docs/tutorials/robustsystems)."]]