User Guide

Create VM

The following command would create a Virtual Machine (name: meow) with following specs

  • CPU: 1

  • RAM: 1GB

  • OS-SSD: 4GB

  • OS: Alpine Linux

ucloud-cli vm create --vm-name meow --cpu 1 --ram '1gb' --os-ssd '4gb' --image images:alpine

Check VM Status

ucloud-cli vm status --vm-name meow
{
    "hostname": "/v1/host/74c21c332f664972bf5078e8de080eea",
    "image_uuid": "3f75bd20-45d6-4013-89c4-7fceaedc8dda",
    "in_migration": null,
    "log": [
        "2019-11-12T09:11:09.800798 - Started successfully"
    ],
    "metadata": {
        "ssh-keys": []
    },
    "name": "meow",
    "network": [],
    "owner": "admin",
    "owner_realm": "ungleich-admin",
    "specs": {
        "cpu": 1,
        "hdd": [],
        "os-ssd": "4.0 GB",
        "ram": "1.0 GB"
    },
    "status": "RUNNING",
    "vnc_socket": "/tmp/tmpj1k6sdo_"
}

Connect to VM using VNC

We would need socat utility and a remote desktop client e.g Remmina, KRDC etc. We can get the vnc socket path by getting its status, see Check VM Status.

socat TCP-LISTEN:1234,reuseaddr,fork UNIX-CLIENT:/tmp/tmpj1k6sdo_

Then, launch your remote desktop client and connect to vnc://localhost:1234.

Create Network

Layer 2 Network with sample IPv6 range fd00::/64 (without IPAM and routing)

ucloud-cli network create --network-name mynet --network-type vxlan

Layer 2 Network with /64 network with automatic IPAM

ucloud-cli network create --network-name mynet --network-type vxlan --user True

Attach Network to VM

Currently, user can only attach network to his/her VM at the time of creation. A sample command to create VM with a network is as follow

ucloud-cli vm create --vm-name meow2 --cpu 1 --ram '1gb' --os-ssd '4gb' --image images:alpine --network mynet

Get List of Hosts

ucloud-cli host list

Migrate VM

ucloud-cli vm migrate --vm-name meow --destination server1.place10
--destination

The name of destination host. You can find a list of host using Get List of Hosts