Crea un'istanza VM Linux in Compute Engine
Scopri come creare un'istanza di macchina virtuale (VM) Linux in Compute Engine utilizzando la console Google Cloud .
Per seguire le indicazioni dettagliate per questa attività direttamente nella Google Cloud console, fai clic su Procedura guidata:
Prima di iniziare
- 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.
Vai a IAM - Seleziona il progetto.
- Fai clic su Concedi l'accesso.
-
Nel campo Nuove entità, inserisci il tuo identificatore utente. In genere si tratta dell'indirizzo email di un Account Google.
- Nell'elenco Seleziona un ruolo, seleziona un ruolo.
- Per concedere altri ruoli, fai clic su Aggiungi un altro ruolo e aggiungi ogni ruolo aggiuntivo.
- Fai clic su Salva.
-
-
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.
Vai a IAM - Seleziona il progetto.
- Fai clic su Concedi l'accesso.
-
Nel campo Nuove entità, inserisci il tuo identificatore utente. In genere si tratta dell'indirizzo email di un Account Google.
- Nell'elenco Seleziona un ruolo, seleziona un ruolo.
- Per concedere altri ruoli, fai clic su Aggiungi un altro ruolo e aggiungi ogni ruolo aggiuntivo.
- Fai clic su Salva.
-
- Abilita l'API Compute Engine
Crea un'istanza 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.
- Nella scheda Public images, scegli Ubuntu dall'elenco Sistema operativo.
- Scegli Ubuntu 24.04 LTS dall'elenco Versione.
- Fai clic su Seleziona.
- Nella sezione Firewall, seleziona Consenti traffico HTTP.
- Per creare la VM, fai clic su Crea.
Attendi un breve periodo di tempo per l'avvio dell'istanza VM. Quando l'istanza VM è pronta, viene elencata nella pagina Istanze VM con un'icona di stato verde.
Compute Engine concede all'utente che crea l'istanza VM il ruolo
roles/compute.instanceAdmin
. Compute Engine aggiunge anche
l'utente al gruppo sudo
.
Connettiti all'istanza VM
Connettiti a un'istanza VM utilizzando la console Google Cloud e completando i seguenti passaggi. Ti connetti all'istanza VM come utente che hai utilizzato per accedere alla pagina delle istanze 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.
Esegui la pulizia
Per evitare che al tuo account Google Cloud vengano addebitati costi relativi alle risorse utilizzate in questa pagina, segui questi passaggi.
Nella console Google Cloud , vai alla pagina Istanze VM.
Seleziona la riga contenente l'istanza VM che hai creato in questo tutorial.
Fai clic su
Elimina, quindi fai clic su Elimina per confermare.
Passaggi successivi
- Segui un tutorial per configurare un server web di base sulla nuova istanza.
- Segui un tutorial introduttivo nella console Google Cloud .
- Scopri come creare e gestire istanze di macchine virtuali utilizzando lo strumento a riga di comando e l'API gcloud CLI.
- Scopri di più sulle immagini Linux disponibili su Compute Engine.
- Scopri come trasferire i file all'istanza.