Skip to main content

Virtual Machine · Cloud Installation

This document summarizes the differences when installing the gateway in a VM environment (VMware / Hyper-V / KVM / Proxmox) rather than physical hardware, or in a public cloud (AWS EC2 / Azure VM / GCP). The basic procedure is covered in One-line Installation.

Using Docker in a VM

From version 2026.05+, container mode works normally inside a VM — Docker is based on cgroup/namespace, not nested virtualization, so performance is the same as native even on top of a VM. If the cgroup MemoryMax=12G exceeds the VM's memory limit, an adjustment is required (via systemd drop-in as MemoryMax=6G, etc.).


1. Specification Requirements​

GradevCPURAMDiskNotes
Small (≤ 1k tags)4 vCPU8 GB100 GB SSDDevelopment/Testing
Medium (1k–10k tags)8 vCPU16 GB256 GB SSD + 1 TBProduction standard
Large (10k+ tags)16 vCPU32 GB512 GB NVMe + 2 TBLarge-scale

Be aware of CPU overcommitment — If the host overcommits the CPU at a ratio of 1:4 or more, Cassandra commitlog flush is delayed and appears in the form of alarms. A dedicated CPU is recommended.


Separating /opt and /data1 onto separate disks (or separate LVM volumes) provides:

  • Preservation of /data1/pp-data (user flows / Cassandra / backups) even when swapping out /opt/kopens during upgrades
  • Disk I/O load separation (Cassandra commitlog vs. sstable)
/dev/sda → / (OS) ~ 50 GB
/dev/sdb → /opt ~ 100 GB SSD (게이트웨이 코드)
/dev/sdc → /data1 ~ 1 TB+ (시계열 데이터)

3. VMware vSphere​

Recommended
Virtual hardware version ≥ 14 (ESXi 6.7+)
VMXNET3 NIC (faster than Intel E1000)
Paravirtual SCSI (higher throughput than LSI Logic)
CPU reservation enabled (for Cassandra stability)
Memory reservation enabled — full size (ballooning disabled)
Add tools.guestlib.enableHostInfo = TRUE — host time sync

4. KVM / Proxmox​

Recommended
cpu host mode (passthrough)
virtio NIC + virtio-blk / virtio-scsi
Install qemu-guest-agent (guest health checks)
Memory ballooning disabled (for Cassandra heap stability)
Disk cache mode = none (lower latency) or writeback (higher throughput)

5. Hyper-V​

Recommended
Generation 2 (UEFI)
Dynamic Memory disabled (variable Cassandra heap causes swapping)
Latest Integration Services (time sync)
Virtual NIC's Adapter Type = Synthetic (not Legacy)

6. Public Cloud​

6.1 AWS EC2​

ItemRecommended
Instancem5.xlarge (4 vCPU / 16 GB) — Small/Medium / m5.2xlarge (8/32) — Production
AMIAmazon Linux 2 (default image is Fedora-based but compatible with RHEL-based)
Diskgp3 (/opt 100 GB), gp3 (/data1 1 TB+) — io1/io2 for Cassandra commitlog
Security Groupinbound 80 / 443 / 22 (admin IP only), MQTT 1883 / OPC-UA 12000 (if needed — usually within VPC)
EFA / Enhanced Networkingenabled (reduces latency)
PlacementCluster placement group (for large-scale)

Connect to on-prem PLC networks via AWS PrivateLink / VPC Peering.

6.2 Azure VM​

ItemRecommended
SizeD4s_v5 (4 vCPU / 16 GB) — Small/Medium / D8s_v5 — Production
DiskPremium SSD (P30 / P40) for /data1
Accelerated Networkingenabled
ExpressRoute / VPNConnect to on-prem PLC

6.3 GCP​

ItemRecommended
Machine Typee2-standard-4 — Small/Medium / n2-standard-8 — Production
Diskpd-ssd (guarantees 1k IOPS for Cassandra commitlog)
Cloud Interconnect / VPNOn-prem connection

7. Cloud-On-Prem PLC Network Connection​

PLCs are typically on-prem (within the factory), and if the gateway is in the cloud, direct communication is impossible. Two patterns are available:

Pattern A — Cloud Gateway + On-Prem Gateway​

[PLC] ─── [온프레 게이트웨이] ─── (Sparkplug B / MQTT) ─── [클라우드 게이트웨이] ─── [상위 플랫폼]

The on-prem gateway handles PLC data collection and Sparkplug publishing, while the cloud gateway handles reception/integration. This is the recommended pattern.

Pattern B — Direct Reach to PLC Network via VPN / SD-WAN​

[PLC] ─── [VPN 게이트웨이] ──VPN── [클라우드 게이트웨이] ─── [상위 플랫폼]

This adds latency and line costs. Recommended only for 1–2 small sites.


8. Boot Automation (cloud-init)​

Automated installation when instances boot in VMs / the cloud — cloud-init user-data example:

#cloud-config
package_update: true
write_files:
- path: /root/pp-edge-install.env
owner: root:root
permissions: '0600'
content: |
export EDGE_ID=EDGE_VM_001
export SITE_ID=SITE_00001
export SERVER_HOST=192.168.0.41
export SERVER_API_KEY=<platform-api-key>
runcmd:
- mkdir -p /data1 /opt/kopens
- . /root/pp-edge-install.env && bash < <(curl -fsSL https://product.kopens.io/plantpulse-edge/install.sh)
- bash /opt/kopens/install/bin/health.sh

In production environments, explicitly specify a fixed edge.id / fixed site.id in cloud-init.


9. Common Pitfalls (VM / Cloud Specific)​

SymptomCause / Solution
Cassandra frequently crashesMemory ballooning is enabled. Change to fixed memory
Frequent MQTT keepalive timeoutsCloud NAT idle timeout is short. Change app.properties keepalive from 60 to 30 seconds
Time is 1970 after bootVirtual time sync is disabled. Install VMware tools / qemu-guest-agent
Disk I/O is slowgp2 / standard HDD. Use gp3 or SSD
OPC-UA certificate is always invalidVirtual hostname changes (DHCP). Include all possible IPs/hostnames in the certificate SAN
Insufficient network throughputvirtio / VMXNET3 / Accelerated Networking is not enabled

10. Further Reading​