יצירת מכונות וירטואלית של Linux ב-Compute Engine

איך יוצרים מכונה וירטואלית (VM) של Linux ב-Compute Engine באמצעות Cloud de Confiance המסוף

לפני שמתחילים

  1. In the Cloud de Confiance console, on the project selector page, select or create a Cloud de Confiance project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  2. Verify that billing is enabled for your Cloud de Confiance project.

  3. 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

    1. In the Cloud de Confiance console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. 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.

    4. 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

    1. In the Cloud de Confiance console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. Click Grant access.
    4. In the New principals field, enter your user identifier. This is typically the identifier for a user in a workforce identity pool. For details, see Represent workforce pool users in IAM policies, or contact your administrator.

    5. Click Select a role, then search for the role.
    6. To grant additional roles, click Add another role and add each additional role.
    7. Click Save.
  4. מפעילים את Compute Engine API.

    הפעלת Compute Engine API

יצירת מכונה וירטואלית של Linux

  1. נכנסים לדף Create an instance במסוף Cloud de Confiance .

    כניסה לדף Create an instance

  2. בקטע OS and Storage לוחצים על Change כדי להתחיל בהגדרת דיסק האתחול.
  3. בכרטיסייה Public images, בוחרים באפשרות Ubuntu מהרשימה Operating system.
  4. בוחרים באפשרות Ubuntu 24.04 LTS מהרשימה Version.
  5. לוחצים על בחירה.
  6. בקטע Firewall בוחרים באפשרות Allow HTTP traffic.
  7. כדי ליצור את המכונה הווירטואלית (VM), לוחצים על האפשרות Create.

צריך להמתין זמן קצר עד שהמכונה הווירטואלית תופעל. אחרי שהמכונה הווירטואלית מוכנה, היא מופיעה בדף VM instances עם סמל סטטוס ירוק.

מערכת Compute Engine מעניקה למשתמש שיצר את המכונה הווירטואלית את התפקיד roles/compute.instanceAdmin. ‫Compute Engine גם מוסיף את המשתמש לקבוצה sudo.

התחברות למכונת ה-VM

כדי להתחבר למופע של מכונה וירטואלית באמצעות מסוף Cloud de Confiance , מבצעים את השלבים הבאים. אתם מחוברים למכונת ה-VM בתור המשתמש שדרכו ניגשתם לדף של מכונות ה-VM.

  1. נכנסים לדף VM instances במסוף Cloud de Confiance .

    כניסה לדף VM instances

  2. ברשימת המכונות הווירטואליות, לוחצים על SSH בשורה של המכונה שרוצים להתחבר אליה.

    הלחצן SSH ליד שם המכונה.

הסרת המשאבים

כדי לא לצבור חיובים לחשבון Cloud de Confiance על המשאבים שבהם השתמשתם בדף הזה, פועלים לפי השלבים הבאים:

  1. נכנסים לדף VM instances במסוף Cloud de Confiance .

    כניסה לדף VM instances

  2. בוחרים את השורה שמכילה את מופע מכונת ה-VM שיצרתם במדריך הזה.

  3. לוחצים על מחיקה ואז על מחיקה כדי לאשר.

המאמרים הבאים