Testing fails for me on Xenial - here are my steps: 1) Create a VM in Azure (any size) 2) Update cloud-init to the latest in xenial-proposed 3) Capture VM image 4) Provision a new VM using the following cloud-config:
#cloud-config fs_setup: - special: cmd: mkfs -t %(filesystem)s -L %(label)s %(device)s filesystem: ext4 device: /dev/sdb1 label: repro I see the following logs in cloud-init.log: 2017-06-22 17:18:49,995 - cc_disk_setup.py[DEBUG]: setting up filesystems: [{'cmd': 'mkfs -t %(filesystem)s -L %(label)s %(device)s', 'filesystem': 'ext4', 'special': None, 'device': '/dev/sdb1', 'label': 'repro'}] 2017-06-22 17:18:49,995 - cc_disk_setup.py[DEBUG]: Creating new filesystem. 2017-06-22 17:18:49,996 - util.py[DEBUG]: Running command ['udevadm', 'settle'] with allowed return codes [0] (shell=False, capture=True) 2017-06-22 17:18:50,279 - cc_disk_setup.py[DEBUG]: Checking /dev/sdb1 against default devices 2017-06-22 17:18:50,279 - cc_disk_setup.py[DEBUG]: Identifying device to create repro filesytem on 2017-06-22 17:18:50,280 - util.py[DEBUG]: Running command ['/bin/lsblk', '--pairs', '--output', 'NAME,TYPE,FSTYPE,LABEL', '/dev/sdb1'] with allowed return codes [0] (shell=False, capture=True) 2017-06-22 17:18:50,299 - cc_disk_setup.py[WARNING]: Failed to find device during available device search. 2017-06-22 17:18:50,308 - cc_disk_setup.py[DEBUG]: Automatic device for /dev/sdb1 identified as None 2017-06-22 17:18:50,308 - cc_disk_setup.py[DEBUG]: No device aviable that matches request. Skipping fs creation for {'cmd': 'mkfs -t %(filesystem)s -L %(label)s %(device)s', 'filesystem': 'ext4', 'special': None, 'device': '/dev/sdb1', 'label': 'repro'} 2017-06-22 17:18:50,308 - util.py[DEBUG]: Creating fs for /dev/sdb1 took 0.313 seconds 2017-06-22 17:18:50,309 - handlers.py[DEBUG]: finish: init-network/config-disk_setup: SUCCESS: config-disk_setup ran successfully -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1687712 Title: cc_disk_setup: fs_setup with cmd doesn't work To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1687712/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs