Created
March 22, 2016 09:21
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
password: passw0rd | |
chpasswd: {expire: False} | |
ssh_pwauth: True. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.