Skip to content

Instantly share code, notes, and snippets.

@DazWorrall
Created March 22, 2016 09:21
Show Gist options
  • Save DazWorrall/bfe376d71967059da57d to your computer and use it in GitHub Desktop.
Save DazWorrall/bfe376d71967059da57d to your computer and use it in GitHub Desktop.
Faking RHEV in qemu under packer so that cloud init takes its user data from a floppy disk
{
"builders":
[
{
"type": "qemu",
"output_directory": "output",
"iso_url": "trusty-server-cloudimg-amd64-disk1.img",
"iso_checksum": "cf12c9878c9fb71c95d8f8c288761a99",
"iso_checksum_type": "md5",
"ssh_wait_timeout": "300s",
"shutdown_command": "sudo halt -p",
"disk_size": 4096,
"format": "qcow2",
"accelerator": "kvm",
"disk_image": true,
"headless": true,
"floppy_files": ["user-data.txt"],
"http_directory": "httpdir",
"ssh_username": "ubuntu",
"ssh_password": "passw0rd",
"net_device": "virtio-net",
"disk_interface": "virtio",
"vnc_port_min": 5947,
"vnc_port_max": 5987,
"qemuargs": [
[ "-smbios", "type=1,product=RHEV" ]
],
"boot_wait": "5s"
}
]
}
#cloud-config
password: passw0rd
chpasswd: {expire: False}
ssh_pwauth: True.
@wallrj
Copy link

wallrj commented Aug 14, 2018

Thanks for this workaround. I just created a Packer issue asking for the ability to choose a floppy filesystem label so that we can use NoCloud datasource instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment