Skip to main content
Version: 3.0.0-alpha (Diátaxis)

FAQ — Virtual Machines

What is the difference between PortList and WholeIP?

FeaturePortListWholeIP
BehaviorOnly ports listed in externalPorts are exposedAll VM ports are exposed
SecurityFine-grained control, reduced attack surfaceRequires OS-level firewall
Use caseProduction, targeted servicesDevelopment, quick testing
warning

With WholeIP, you must configure a firewall inside the VM (iptables, nftables, ufw) to protect unexposed services.

vm-portlist.yaml
spec:
external: true
externalMethod: PortList
externalPorts:
- 22
- 443

What images are available?

Hikube provides pre-configured Golden Images:

Operating SystemAvailable versions
Ubuntu22.04, 24.04
Debian11, 12, 13
CentOS Stream9, 10
Rocky Linux8, 9, 10
AlmaLinux8, 9, 10

Images are specified in the source.image.name field of the VMDisk resource, using the {os}-{version} format. For example: ubuntu-2404, debian-12, rocky-9.


How do I choose my instanceType?

Instances follow three families with different vCPU:RAM ratios:

FamilyPrefixRatioExample use
Standards11:2Web servers, lightweight apps
Universalu11:4Business apps, databases
Memorym11:8Cache, in-memory processing

Available sizes range from small to 8xlarge. For example: u1.xlarge provides 4 vCPU and 16 GB RAM.


How do I add an extra disk?

First create a VMDisk resource, then reference it in your VMInstance:

data-disk.yaml
apiVersion: apps.cozystack.io/v1alpha1
kind: VMDisk
metadata:
name: data-volume
spec:
size: 100Gi
storageClass: replicated
vm.yaml
apiVersion: apps.cozystack.io/v1alpha1
kind: VMInstance
metadata:
name: my-vm
spec:
instanceType: u1.large
instanceProfile: ubuntu
disks:
- data-volume

How do I access my VM via SSH?

  1. Inject your SSH public key in the VM manifest:

    vm-ssh.yaml
    spec:
    sshKeys:
    - "ssh-ed25519 AAAAC3... user@laptop"
  2. Expose port 22 via PortList:

    vm-ssh.yaml
    spec:
    external: true
    externalMethod: PortList
    externalPorts:
    - 22
  3. Retrieve the external IP address:

    kubectl get svc
  4. Connect:

    ssh user@<external-ip>
note

The default username depends on the image: ubuntu for Ubuntu, debian for Debian, cloud-user for CentOS/Rocky/AlmaLinux.


How do I customize the VM at boot?

Use the cloudInit field to inject a cloud-init configuration in YAML format:

vm-cloudinit.yaml
spec:
cloudInit: |
#cloud-config
packages:
- nginx
- htop
users:
- name: admin
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ssh-ed25519 AAAAC3... admin@company
runcmd:
- systemctl enable nginx
- systemctl start nginx

Cloud-init runs at the first boot of the VM and allows installing packages, creating users, running commands, and more.


What is the difference between instanceProfile and instanceType?

ParameterRoleExamples
instanceProfileLoads the drivers and kernels adapted to the OSubuntu, centos, windows.2k25.virtio
instanceTypeDefines the VM size (CPU/RAM)s1.small, u1.large, m1.2xlarge

instanceProfile does not determine the OS image — that is defined in the VMDisk resource via source.image.name. The profile loads optimized drivers and kernels for the operating system. It is mainly useful for Windows (virtio drivers). instanceType sizes the CPU and memory resources allocated to the VM.