diff --git a/ccvm/vm.go b/ccvm/vm.go index 788027b..e3ffee6 100644 --- a/ccvm/vm.go +++ b/ccvm/vm.go @@ -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 { diff --git a/workloads/debian9.yaml b/workloads/debian9.yaml new file mode 100644 index 0000000..1bd17b2 --- /dev/null +++ b/workloads/debian9.yaml @@ -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}} +...