Switch ubuntu16-qemu to use qcow2 cloud disk
* Remove long and usless step with installing system from iso
* Misc refactor changes
* requirement: cloud-localds
Change-Id: If5fe43104d71c53ab5f510d3efa529ed40c4e9c3
diff --git a/ubuntu-16.04/template.json b/ubuntu-16.04/template.json
index 1d1a6d1..6b84cc0 100644
--- a/ubuntu-16.04/template.json
+++ b/ubuntu-16.04/template.json
@@ -63,12 +63,12 @@
},
{
"type": "file",
- "source": "configs/cloud/cloud.cfg.d/99_tcp.cfg",
+ "source": "files/etc/cloud/cloud.cfg.d/99_tcp.cfg",
"destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
},
{
"type": "file",
- "source": "configs/cloud/cloud.cfg",
+ "source": "files/etc/cloud/cloud.cfg",
"destination": "/etc/cloud/cloud.cfg"
}
],
@@ -226,60 +226,24 @@
{
"type": "qemu",
"qemuargs": [
- [
- "-m",
- "1024M"
- ]
+ [ "-m", "1024M" ],
+ [ "-fda", "config-drive/cloudata.iso" ]
],
"vm_name": "{{ user `distro` }}-{{ isotime \"200601021504\" }}",
"output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\" }}",
"format": "qcow2",
+ "iso_checksum": "1ba74ef0acade70d8c394308fab8913c",
+ "iso_checksum_type": "md5",
+ "iso_url": "https://cloud-images.ubuntu.com/xenial/20180213.2/xenial-server-cloudimg-amd64-disk1.img",
+ "disk_image": true,
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
- "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso",
- "iso_checksum_type": "md5",
- "iso_checksum": "10fcd20619dce11fe094e960c85ba4a9",
- "http_directory": "http",
"headless": true,
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `password`}}",
"shutdown_command": "shutdown -P now",
"boot_wait": "2s",
- "ssh_wait_timeout": "10000s",
- "boot_command": [
- "<enter><wait>",
- "<f6><esc>",
- "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
- "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
- "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
- "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
- "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
- "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
- "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
- "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
- "<bs><bs><bs>",
- "/install/vmlinuz<wait>",
- " auto<wait>",
- " console-setup/ask_detect=false<wait>",
- " console-setup/layoutcode=us<wait>",
- " console-setup/modelcode=pc105<wait>",
- " debconf/frontend=noninteractive<wait>",
- " debian-installer=en_US<wait>",
- " fb=false<wait>",
- " initrd=/install/initrd.gz<wait>",
- " kbd-chooser/method=us<wait>",
- " keyboard-configuration/layout=USA<wait>",
- " keyboard-configuration/variant=USA<wait>",
- " passwd/root-password={{user `password`}} ",
- " passwd/root-password-again={{user `password`}} ",
- " locale=en_US<wait>",
- " netcfg/get_hostname=ubuntu-1604<wait>",
- " netcfg/get_domain=changeme<wait>",
- " noapic<wait>",
- " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
- " -- <wait>",
- "<enter><wait>"
- ]
+ "ssh_wait_timeout": "360s"
},
{
"type": "docker",
@@ -295,4 +259,4 @@
"size": "1gb"
}
]
-}
\ No newline at end of file
+}