Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Instance VM dapat bertransisi melalui banyak status selama siklus prosesnya. Saat
Anda membuat VM, penyediaan air-gapped Google Distributed Cloud (GDC) akan menyediakan resource untuk memulai VM. Selanjutnya, VM beralih ke status mulai, di mana VM
bersiap untuk booting pertama. Selama dan setelah proses memulai, VM dianggap
berjalan. Selama masa aktifnya, VM yang berjalan dapat dihentikan dan
dimulai ulang, atau ditangguhkan dan dilanjutkan berulang kali.
Definisi status VM
Negara bagian/Provinsi
Definisi
Pending
VM diterima oleh sistem dan menunggu alokasi.
Provisioning
Resource yang terkait dengan VM, seperti
VirtualMachineDisk, sedang disediakan dan disiapkan.
Starting
VM sedang disiapkan untuk dijalankan.
Running
VM sedang berjalan.
Stopping
VM sedang dalam proses berhenti.
Stopped
VM dihentikan dan tidak diharapkan untuk dimulai.
Paused
VM dijeda dan dalam status dibekukan, yang
dipertahankan. VM tidak dapat diakses.
Terminating
VM dan resource terkaitnya sedang menjalani
proses penghapusan.
ErrorConfiguration
VM mengalami error konfigurasi. Status konfigurasi yang tidak valid dapat disebabkan oleh hal berikut:
MachineTypeNotFound - Jenis VM yang dirujuk VM tidak ditemukan atau sedang dihapus.
MachineDiskMisconfig - Disk VM salah dikonfigurasi.
InterfaceCreationFailed - Pembuatan antarmuka jaringan gagal.
CrashLoopBackOff
VM berada dalam loop error dan menunggu untuk dicoba lagi.
PendingIPAllocation
VM sedang menunggu sistem menetapkan alamat IP untuknya.
Unknown
Status VM tidak dapat diperoleh, biasanya karena error dalam berkomunikasi dengan host tempat VM berjalan.
ErrorUnschedulable
Terjadi error saat menjadwalkan VM, misalnya,
karena permintaan resource atau batasan penjadwalan yang tidak dapat dipenuhi
atau didukung.
DiskError
VM mengalami error pada satu atau beberapa disk terpasang.
WaitingForDisk
VM sedang menunggu satu atau beberapa VirtualMachineDisk terlampir siap.
CrashLoopBackoff
VM terus mengalami error karena beberapa alasan.
Sebelum memulai
Untuk menggunakan perintah antarmuka command line (CLI) gdcloud, pastikan Anda telah mendownload, menginstal,
dan mengonfigurasi CLI gdcloud.
Semua perintah untuk Distributed Cloud menggunakan CLI gdcloud atau
kubectl, dan memerlukan lingkungan sistem operasi (OS).
Mendapatkan jalur file kubeconfig
Untuk menjalankan perintah terhadap server Management API, pastikan Anda memiliki resource berikut:
Login dan buat file kubeconfig untuk server Management API jika Anda belum memilikinya.
Gunakan jalur ke file kubeconfig server Management API untuk menggantikan
MANAGEMENT_API_SERVER dalam petunjuk ini.
Meminta izin dan akses
Untuk melakukan tugas yang tercantum di halaman ini, Anda harus memiliki peran Project VirtualMachine Admin. Ikuti langkah-langkah untuk
memverifikasi
bahwa Anda memiliki peran Project VirtualMachine Admin (project-vm-admin) di namespace
project tempat VM berada.
Untuk operasi VM menggunakan konsol GDC atau gdcloud CLI, minta Admin IAM Project Anda untuk memberi Anda peran Project VirtualMachine Admin dan peran Project Viewer (project-viewer).
Memeriksa status VM
Setiap VM melaporkan statusnya sebagai bagian dari properti VM. Periksa status VM
karena salah satu alasan berikut:
Jika ada masalah dengan VM.
Untuk mengonfirmasi bahwa VM berjalan setelah dimulai.
Untuk memverifikasi bahwa VM berada dalam status Paused atau Stopped.
Mencantumkan VM untuk memeriksa status
Prosedur berikut menunjukkan cara membuat daftar VM, melihat statusnya, dan mendapatkan
informasi status tambahan.
Mencantumkan semua VM dan melihat status masing-masing:
MANAGEMENT_API_SERVER dengan file kubeconfig untuk
server Management API yang Anda dapatkan dari perintah gdcloud auth login.
VM_NAME dengan nama VM baru.
PROJECT dengan project GDC
tempat VM berada.
Contoh output yang menampilkan nilai Reason dan Message:
State: ErrorConfiguration
Reason: MachineDiskNotFound
Message: VirtualMachineDisk disk-1 in namespace project-1 does not exist.
Anda juga mungkin mendapatkan kolom kosong untuk Reason dan Message. Hal ini menunjukkan bahwa tidak ada yang dapat dilaporkan oleh sistem terkait pengguna tersebut.
Contoh output dengan Reason dan Message kosong:
State: Running
Reason:
Message:
Menghentikan atau memulai ulang VM
Selama siklus proses VM, Anda mungkin perlu menghentikan dan memulai ulang VM, atau menghapus VM untuk merespons perubahan status atau mengelola VM secara umum. Lihat halaman ini untuk menghentikan, mereset, atau menghapus VM:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\u003cp\u003eVM instances in Google Distributed Cloud (GDC) air-gapped environments transition through various states, including \u003ccode\u003ePending\u003c/code\u003e, \u003ccode\u003eProvisioning\u003c/code\u003e, \u003ccode\u003eStarting\u003c/code\u003e, \u003ccode\u003eRunning\u003c/code\u003e, \u003ccode\u003eStopping\u003c/code\u003e, \u003ccode\u003eStopped\u003c/code\u003e, and more, reflecting their current operational status.\u003c/p\u003e\n"],["\u003cp\u003eThe status of a VM can be checked using \u003ccode\u003ekubectl\u003c/code\u003e commands, providing details on the VM's current state, as well as the \u003ccode\u003eReason\u003c/code\u003e and \u003ccode\u003eMessage\u003c/code\u003e fields for troubleshooting configuration errors or other issues.\u003c/p\u003e\n"],["\u003cp\u003eDuring their lifecycle, VMs can be stopped, restarted, or deleted to manage their operational status or to respond to changes, allowing for proper management of resources.\u003c/p\u003e\n"],["\u003cp\u003eTo perform VM operations, users need to have both the Project VirtualMachine Admin and Project Viewer roles assigned to them by the Project IAM Admin.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egdcloud\u003c/code\u003e CLI and \u003ccode\u003ekubectl\u003c/code\u003e are the primary command-line tools used for interacting with and managing VMs, and requires a valid kubeconfig file from the Management API server.\u003c/p\u003e\n"]]],[],null,["# Manage the VM instance lifecycle\n\nA VM instance can transition through many states throughout its lifecycle. When\nyou create a VM, Google Distributed Cloud (GDC) air-gapped provisions\nresources to start the VM. Next, the VM moves into the start state, where it\nprepares for a first boot. During and after start-up, a VM is considered\nto be running. During its lifetime, a running VM can be repeatedly stopped and\nrestarted, or suspended and resumed.\n\nVM status definitions\n---------------------\n\nBefore you begin\n----------------\n\nTo use `gdcloud` command-line interface (CLI) commands, ensure that you have downloaded, installed,\nand configured the [`gdcloud` CLI](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-overview).\nAll commands for Distributed Cloud use the `gdcloud` or\n`kubectl` CLI, and require an operating system (OS) environment.\n\n### Get the kubeconfig file path\n\nTo run commands against the Management API server, ensure you have the following\nresources:\n\n1. [Sign in and generate](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/iam/sign-in#cli) the\n kubeconfig file for the Management API server if you don't have one.\n\n2. Use the path to the kubeconfig file of the Management API server to replace\n \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e in these instructions.\n\n### Request permissions and access\n\nTo perform the tasks listed in this page, you must have the Project\nVirtualMachine Admin role. Follow the steps to\n[verify](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vms/preparation#verify-user-access)\nthat you have the Project VirtualMachine Admin (`project-vm-admin`) role in the namespace\nof the project where the VM resides.\n\nFor VM operations using the GDC console or the gdcloud CLI,\nrequest your Project IAM Admin to assign you both the\nProject VirtualMachine Admin role and the Project Viewer (`project-viewer`)\nrole.\n\nCheck VM status\n---------------\n\nEvery VM reports its status as part of the VM's properties. Check a VM's status\nfor any of the following reasons:\n\n- If there are issues with the VM.\n- To confirm the VM is running after it has started.\n- To verify the VM is in the `Paused` or `Stopped` state.\n\n### List VMs to check status\n\nThe following procedure shows how to list VMs, view their status, and get\nadditional status information.\n\n1. List all VMs and view the status of each:\n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e \\\n get virtualmachines.virtualmachine.gdc.goog -n \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e\n\n Replace the variables in the code examples with your own values\n according to the following table.\n\n Example output: \n\n NAME STATUS AGE\n vm-1 Running 1d\n vm-2 Stopped 8d\n vm-3 ErrorConfiguration 1d\n\n2. Get additional details about a particular VM's status:\n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e \\\n get virtualmachines.virtualmachine.gdc.goog \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e -n \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e -o \\\n jsonpath='{\"State:\"}{.status.state}{\"\\n\"}{\"Reason:\"}{.status.reason}{\"\\n\"}{\"Message:\"}{.status.message}{\"\\n\"}'\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e with the kubeconfig file for the Management API server you obtained from the `gdcloud auth login` command.\n - \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e with the name of the new VM.\n - \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e with the GDC project in which the VM resides.\n\n Example output showing `Reason` and `Message` values: \n\n State: ErrorConfiguration\n Reason: MachineDiskNotFound\n Message: VirtualMachineDisk disk-1 in namespace project-1 does not exist.\n\n You might also get empty fields for `Reason` and `Message`. This indicates\n there was nothing for the system to report regarding them.\n\n Example output with `Reason` and `Message` empty: \n\n State: Running\n Reason:\n Message:\n\nStop, or restart a VM\n---------------------\n\nDuring the VM lifecycle you might need to stop and restart a VM,\nor delete a VM to respond to a status change or generally manage the VM. See\nthese pages to stop, reset, or delete a VM:\n\n- [Stop a VM](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vms/manage-vms/operations-and-lifecycle/start-and-stop-vm#stop-a-vm)\n- [Restart a VM](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vms/manage-vms/operations-and-lifecycle/start-and-stop-vm#restart-a-vm)\n- [Delete a VM](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vms/manage-vms/operations-and-lifecycle/delete-vms)"]]