Membuat instance VM Linux di Compute Engine
Pelajari cara membuat instance virtual machine (VM) Linux di Compute Engine menggunakan konsol Google Cloud .
Untuk mengikuti panduan langkah demi langkah tugas ini langsung di Google Cloud konsol, klik Pandu saya:
Sebelum memulai
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Make sure that you have the following role or roles on the project: Compute Instance Admin (v1), Compute Security Admin, OSPolicyAssignment Admin, Service Account User, Service Usage Admin
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
Buka IAM - Pilih project.
- Klik Berikan akses.
-
Di kolom Akun utama baru, masukkan ID pengguna Anda. Biasanya berupa alamat email untuk Akun Google.
- Di daftar Pilih peran, pilih peran.
- Untuk memberikan peran tambahan, klik Tambahkan peran lain, lalu tambahkan setiap peran tambahan.
- Klik Simpan.
-
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Make sure that you have the following role or roles on the project: Compute Instance Admin (v1), Compute Security Admin, OSPolicyAssignment Admin, Service Account User, Service Usage Admin
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
Buka IAM - Pilih project.
- Klik Berikan akses.
-
Di kolom Akun utama baru, masukkan ID pengguna Anda. Biasanya berupa alamat email untuk Akun Google.
- Di daftar Pilih peran, pilih peran.
- Untuk memberikan peran tambahan, klik Tambahkan peran lain, lalu tambahkan setiap peran tambahan.
- Klik Simpan.
-
- Aktifkan Compute Engine API.
Membuat Instance VM Linux
- In the Google Cloud console, go to the Create an instance page.
- In the Boot disk section, click Change to begin configuring your boot disk.
- Di tab Public images, pilih Ubuntu dari daftar Sistem operasi.
- Pilih Ubuntu 24.04 LTS dari daftar Versi.
- Klik Pilih.
- Di bagian Firewall, pilih Izinkan traffic HTTP.
- Untuk membuat VM, klik Create.
Tunggu beberapa saat hingga instance VM dimulai. Setelah instance VM siap, instance akan tercantum di halaman VM instances dengan ikon status hijau.
Compute Engine memberikan peran roles/compute.instanceAdmin
kepada pengguna yang membuat instance VM. Compute Engine juga menambahkan pengguna tersebut ke grup sudo
.
Terhubung ke instance VM
Hubungkan ke instance VM menggunakan konsol Google Cloud dan selesaikan langkah-langkah berikut. Anda terhubung ke instance VM sebagai pengguna yang Anda gunakan untuk mengakses halaman instance VM.
- In the Google Cloud console, go to the VM instances page.
-
In the list of virtual machine instances, click SSH in the row of
the instance that you want to connect to.
Pembersihan
Agar akun Google Cloud Anda tidak dikenai biaya untuk resource yang digunakan pada halaman ini, ikuti langkah-langkah berikut.
Di konsol Google Cloud , buka halaman VM instances.
Pilih baris yang berisi instance VM yang telah Anda buat dalam tutorial ini.
Klik
Hapus, lalu klik Hapus untuk mengonfirmasi.
Langkah berikutnya
- Ikuti tutorial untuk menyiapkan server web dasar pada instance baru Anda.
- Pelajari tutorial untuk memulai di konsol Google Cloud .
- Pelajari cara membuat dan mengelola instance mesin virtual menggunakan API dan alat command line gcloud CLI.
- Pelajari image Linux yang tersedia di Compute Engine lebih lanjut.
- Pelajari cara mentransfer file ke instance Anda.