[[["易于理解","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-19。"],[[["\u003cp\u003eThis document outlines how to fix issues when virtual machine (VM) licenses are incorrectly imported or migrated to Compute Engine.\u003c/p\u003e\n"],["\u003cp\u003eIf a VM was imported or migrated with an on-demand license instead of a bring your own license (BYOL), the license was not applied properly.\u003c/p\u003e\n"],["\u003cp\u003eTo resolve this, re-import the VM using the correct \u003ccode\u003egcloud\u003c/code\u003e command and include the appropriate \u003ccode\u003e--os\u003c/code\u003e or \u003ccode\u003e--byol\u003c/code\u003e flag to signify the BYOL OS.\u003c/p\u003e\n"],["\u003cp\u003eFor VMs migrated using Migrate to Virtual Machines, you should contact Cloud Customer Care to resolve the licensing issue.\u003c/p\u003e\n"]]],[],null,["# Troubleshooting licenses\n\nLinux Windows\n\n*** ** * ** ***\n\nThis document shows you how to resolve issues related to importing and migrating\nvirtual machine (VM) instances to Compute Engine that have a misapplied\nlicense.\n\nFor example, learn how to resolve issues with a VM that has an on-demand license\ninstead of a bring your own license (BYOL). For information about the different\ntypes of licenses, see [About licenses](/compute/docs/licenses/about).\n\nMitigate incorrect license imports or migrations\n------------------------------------------------\n\nIf you tried to import or migrate a VM into Compute Engine with a BYOL or BYOS\nlicense, but the VM's [license string](/compute/docs/images/os-details#license-strings)\nis not appended with `byol` or `byos`, then your license was not successfully\nimported or migrated with the VM.\n\nTo resolve this issue, do one of the following depending on how you imported or\nmigrated the VM:\n\n- If you imported the VM using the\n [`gcloud compute instances import` command](/sdk/gcloud/reference/compute/instances/import)\n or the Cloud Build API, import the VM again, and specify the\n [`--os` flag](/sdk/gcloud/reference/compute/instances/import#--os) with the\n `byol` version of the OS.\n\n- If you imported the VM using the\n [`gcloud beta compute machine-images import` command](/sdk/gcloud/reference/beta/compute/machine-images/import),\n import the VM again, and specify the\n [`--byol` flag](/sdk/gcloud/reference/beta/compute/machine-images/import#--byol).\n\n- If you imported the VM using the\n [`gcloud beta compute images import` command](/sdk/gcloud/reference/beta/compute/images/import),\n import the VM again, and specify the\n [`--byol` flag](/sdk/gcloud/reference/beta/compute/images/import#--byol).\n\n- If you migrated the VM using Migrate to Virtual Machines, contact\n Cloud Customer Care to help you resolve the issue. For more information, see\n [Getting support with Cloud Customer Care](/support/docs).\n\nWhat's next\n-----------\n\n- [Learn how to view and append license strings](/compute/docs/licenses/view-append)"]]