Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Support debian 9 #107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ccvm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func bootVM(ctx context.Context, ws *workspace, name string, in *types.VMSpec) e
"-device", "isa-serial,chardev=ccld0")
}

args = append(args, "-display", "none", "-vga", "none")
args = append(args, "-display", "none", "-vga", "virtio")

output, err := qemu.LaunchCustomQemu(ctx, "", args, nil, nil, nil)
if err != nil {
Expand Down
57 changes: 57 additions & 0 deletions workloads/debian9.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
base_image_url: https://cdimage.debian.org/cdimage/cloud/OpenStack/9.7.0/debian-9.7.0-openstack-amd64.qcow2
base_image_name: Debian 9
vm:
disk_gib: 16
...
---
{{- define "ENV" -}}
{{proxyVars .}}
{{- print " DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true " -}}
{{end}}

#cloud-config
write_files:
{{with proxyEnv . 5}}
- content: |
{{.}}
path: /etc/environment
{{end}}

apt:
{{- if len $.HTTPProxy }}
proxy: "{{$.HTTPProxy}}"
{{- end}}
{{- if len $.HTTPSProxy }}
https_proxy: "{{$.HTTPSProxy}}"
{{- end}}
package_upgrade: {{with .PackageUpgrade}}{{.}}{{else}}false{{end}}
packages:
- curl
runcmd:
- {{beginTask . "Booting VM"}}
- {{endTaskOk . }}
- {{beginTask . (printf "Adding %s to /etc/hosts" .Hostname) }}
- echo "127.0.0.1 {{.Hostname}}" >> /etc/hosts
- {{endTaskCheck .}}
- userdel -rf debian

{{range .Mounts}}
- mkdir -p {{.Path}}
- sudo chown {{$.User}}:{{$.User}} {{.Tag}}
- echo "{{.Tag}} {{.Path}} 9p x-systemd.automount,x-systemd.device-timeout=10,nofail,trans=virtio,version=9p2000.L 0 0" >> /etc/fstab
{{end}}
{{range .Mounts}}
- {{beginTask $ (printf "Mounting %s" .Path) }}
- mount {{.Path}}
- {{endTaskCheck $}}
{{end}}

users:
- name: {{.User}}
lock-passwd: true
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
ssh-authorized-keys:
- {{.PublicKey}}
...