Since it is not possible to connect to qemu with ssh (port mapping is not working) I’m trying to connect with sidecar container with VNC. Here is full job:
job "github-runner" {
datacenters = [
"syria"
]
update {
max_parallel = 1
healthy_deadline = "15m"
progress_deadline = "20m"
}
group "qemu" {
ephemeral_disk {
migrate = true
sticky = true
size = 1000
}
network {
mode = "bridge"
port "novnc" {}
}
task "qemu" {
driver = "qemu"
resources {
cpu_cores = 2
memory = 2048
memory_max = 2100
}
config {
/* image_path = "alloc/data/github-runner.img" */
image_path = "alloc/data/focal-minimal-cloudimg-amd64.img"
accelerator = "kvm"
graceful_shutdown = true
args = [
"-vga", "std",
"-display", "vnc=127.0.0.1:1",
]
}
artifact {
/* source = "https://boxes:boxes@sftpgo.service.consul/dav/local/github-runner/github-runner.img" */
source = "https://cloud-images.ubuntu.com/minimal/daily/focal/current/focal-minimal-cloudimg-amd64.img"
destination = "alloc/data/"
}
}
task "novnc" {
driver = "docker"
user = "999"
lifecycle {
hook = "poststart"
sidecar = true
}
resources {
cpu = 10
memory = 32
}
env {
novnc_port = "${nomad_port_novnc}"
novnc_target = "127.0.0.1:5901"
}
config {
image = "nahsihub/novnc"
ports = ["novnc"]
}
}
}
}
But since -nograpic
is hardcoded the only thing I get when connecting with VNC is bios message.
Am I doing something wrong? I want to be able to connect to VM time to time to tryout things before writing any automation.