Soru

Zorluk: OrtaDeploying and Managing Compute Engine Virtual Machines

A cloud architecture team requires a newly deployed Compute Engine virtual machine instance named analytics-node in zone us-central1-a to connect directly to two isolated Virtual Private Cloud (VPC) subnets: subnet-analytics and subnet-management. Which gcloud command correctly provisions the virtual machine with multiple network interfaces?

  1. gcloud compute instances create analytics-node --zone=us-central1-a --network-interface=subnet=subnet-analytics --network-interface=subnet=subnet-managementCevap
  2. B
    gcloud compute instances create analytics-node --zone=us-central1-a --network=vpc-analytics --subnet=subnet-analytics,subnet-management
  3. C
    gcloud compute instances create analytics-node --zone=us-central1-a --network=vpc-analytics --secondary-network=vpc-mgmt
  4. D
    gcloud compute instances create analytics-node --zone=us-central1-a --network-interface=network=vpc-analytics,subnet=subnet-analytics;network=vpc-mgmt,subnet=subnet-management

Cevap

The command that repeats the `--network-interface` flag once for `subnet=subnet-analytics` and once for `subnet=subnet-management` correctly provisions the instance with dual network interfaces.
In Google Cloud Compute Engine, creating a virtual machine with multiple network interfaces requires repeating the `--network-interface` flag for each connection. The command passing `--network-interface=subnet=subnet-analytics` followed by `--network-interface=subnet=subnet-management` properly creates nic0 and nic1 on the instance.

Adım Adım Çözüm

1
Identify the requirement for multi-homed VM network provisioning in Compute Engine.
Each network connection requires its own Virtual Network Interface (nic0, nic1, etc.).
Compute Engine instances cannot share a single network interface across multiple subnets.
2
Review the gcloud CLI flag structure for attaching multiple network interfaces.
The `--network-interface` flag must be repeated for each interface to be attached.
The gcloud CLI parses each occurrence of `--network-interface` as a distinct interface configuration object.
3
Select the option that correctly repeats `--network-interface=subnet=...` for both subnets.
The command specifying two `--network-interface` parameters provisions the VM with nic0 connected to subnet-analytics and nic1 connected to subnet-management.
This matches Google Cloud's syntax rules for multi-network VM creation.

Anahtar Kavram

Deploying Compute Engine instances with multiple network interfaces using repeated gcloud CLI flags.
Tahmini Süre:1m 30s
Bu soruyu puanla