Skip to content

vServer Commands

VNG Virtual Server (vServer) commands for managing cloud virtual machines and related infrastructure.

grn vserver <resource> <command> [options]

Available resources

Resource Description
server Create and manage vServer instances
volume Manage block storage volumes
vpc Manage VPC networks
subnet Manage subnets within a VPC
secgroup Manage security groups and their rules
sshkey Manage SSH key pairs
floating-ip Manage floating (public) IPs
network-interface Manage elastic network interfaces
placement-group Manage server placement groups
dhcp Manage DHCP option sets
user-image Manage user-created images
flavor Browse available instance flavors
image Browse available OS/GPU images
volume-type Browse available volume types for a zone

Quick start workflow

Creating a server requires several prerequisites. Run these commands in order:

# 1. Create a VPC
grn vserver vpc create --name my-vpc --cidr 10.0.0.0/16

# 2. Create a subnet inside the VPC
grn vserver subnet create --vpc-id <vpc-id> --cidr 10.0.1.0/24 --zone-id <zone-id>

# 3. Find an available zone (omit --zone-id to see the list)
#    Zone IDs are shown when you run any command that requires --zone-id

# 4. Find a flavor
grn vserver flavor list-families
grn vserver flavor list-codes
grn vserver flavor list --family <family> --code <code>

# 5. Find an image
grn vserver image list --type os

# 6. Find a volume type for the zone
grn vserver volume-type list --zone-id <zone-id> --type SSD

# 7. Create the server
grn vserver server create \
  --name my-server \
  --flavor-id <flavor-id> \
  --image-id <image-id> \
  --network-id <vpc-id> \
  --subnet-id <subnet-id> \
  --root-disk-type-id <volume-type-id> \
  --zone-id <zone-id>

Common global options

All vserver commands accept these global flags:

Flag Description
--region Override the configured region
--output Output format: json (default), table, text
--query JMESPath query to filter output
--profile Use a specific credentials profile
--endpoint-url Override the vServer API endpoint
--debug Print raw HTTP requests and responses