Comment 3 for bug 1374166

Revision history for this message
Dan Watkins (oddbloke) wrote :

OK, so passing a file containing the following as custom-data gives us a swap partition and a mounted disk at /mnt:

#cloud-config
disk_setup:
    ephemeral0:
        table_type: mbr
        layout: [[66, 82], 33]
        overwrite: True
fs_setup:
    - device: ephemeral0.1
      filesystem: swap
    - device: ephemeral0.2
      filesystem: ext4
mounts:
    - ["ephemeral0.1", "none", "swap", "sw", "0", "0"]
    - ["ephemeral0.2", "/mnt"]

Like so:

$ mount
...
/dev/sdb2 on /mnt type ext4 (rw,_netdev)

$ swapon -s
Filename Type Size Used Priority
/dev/sdb1 partition 418696184 0 -1