diff --git a/jobs/user-vms/distro.hcl b/jobs/user-vms/distro.hcl index 0185827..013aff9 100644 --- a/jobs/user-vms/distro.hcl +++ b/jobs/user-vms/distro.hcl @@ -24,14 +24,14 @@ job "distro-vm" { artifact { source = "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-amd64.qcow2" - destination = "local/debian.qcow2" + destination = "local/distro-vm.qcow2" mode = "file" } driver = "qemu" config { - image_path = "local/debian.qcow2" + image_path = "local/distro-vm.qcow2" accelerator = "kvm" @@ -43,7 +43,7 @@ job "distro-vm" { "-device", "virtio-net-pci,netdev=hn0,id=nic1", "-smbios", - "type=1,serial=ds=nocloud-net;s=http://136.206.16.5:8000/", + "type=1,serial=ds=nocloud-net;s=http://136.206.16.5:8000/distro-vm/", ] } } diff --git a/jobs/user-vms/mojito.hcl b/jobs/user-vms/mojito.hcl new file mode 100644 index 0000000..2d320a8 --- /dev/null +++ b/jobs/user-vms/mojito.hcl @@ -0,0 +1,52 @@ +job "mojito-vm" { + datacenters = ["aperture"] + + group "mojito-vm" { + + network { + mode = "host" + } + + service { + name = "mojito-vm" + } + + task "mojito-vm" { + constraint { + attribute = "${attr.unique.hostname}" + value = "wheatley" + } + + resources { + cpu = 1000 + memory = 1024 + } + + artifact { + source = "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-amd64.qcow2" + destination = "local/mojito-vm.qcow2" + mode = "file" + } + + driver = "qemu" + + config { + image_path = "local/mojito-vm.qcow2" + + accelerator = "kvm" + + drive_interface = "virtio" + + args = [ + "-netdev", + "bridge,id=hn0", + "-device", + "virtio-net-pci,netdev=hn0,id=nic1", + "-smbios", + "type=1,serial=ds=nocloud-net;s=http://136.206.16.5:8000/mojito-vm/", + ] + } + } + } +} +