canonical / canonical/cloud-init
Azure: cloud-init skips formatting the resource disk (ephemeral0) when there is additional data disks' configuration in user-data
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
This bug was originally filed in Launchpad as [LP: #1879552](https://bugs.launchpad.net/cloud-init/+bug/1879552)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2020-05-19T19:14:22.237422+00:00
date_fix_committed = None
date_fix_released = None
id = 1879552
importance = undecided
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1879552
milestone = None
owner = vtqanh
owner_name = Anh Vo (MSFT)
private = False
status = confirmed
submitter = vtqanh
submitter_name = Anh Vo (MSFT)
tags = ['azure']
duplicates = []
_Launchpad user **Anh Vo (MSFT)(vtqanh)** wrote on 2020-05-19T19:14:22.237422+00:00_
Deploying a bionic VM on Azure (Canonical:UbuntunServer:18.04-LTS:latest) with VM Size Standard_DS1_V2 and an additional datadisk with the following config
#cloud-config
disk_setup:
/dev/disk/azure/scsi1/lun0:
table_type: gpt
layout: True
overwrite: True
fs_setup:
- device: /dev/disk/azure/scsi1/lun0
partition: 1
filesystem: ext4
mounts:
- [ /dev/disk/azure/scsi1/lun0, /datadisk1, "ext4", "defaults,nofail,discard", "0", "0" ]
Expected Result:
+ Resource disk (ephemeral0) is formatted as ext4 and mounted to /mnt (which is what happens without attaching the data disk)
Actual Result:
+ Resource disk is partitioned but not formatted, got mounted to /mnt as ntfs
I used this command to create a VM with datadisk and passing in custom data
az vm create -g -n vmname --image Canonical:UbuntuServer:18.04-LTS:latest --admin-username adminuser --ssh-key-value @/home/user/.ssh/key.pub --boot-diagnostics-storage storage_account --size Standard_DS1_V2 --custom-data ./customdata.yml --data-disk-sizes-gb 32
I have attached the cloud-init log and the custom data
Contributor guide
Assessment
This issue has not been assessed yet.