Comment 12 for bug 1626243

Revision history for this message
Scott Moser (smoser) wrote :

I've verified this xenial with the following. The net is that when a new instance came across an empty ephemeral disk, it put a gpt partition table on it, with one partition, and formatted it ext4.

## Launch an azure instance and ssh in
$ azure-ubuntu xenial . --user-data-file=none Standard_D1_v2
flavor=Basic_A0 image=xenial-daily location=us-east-1
azure vm create --vm-size=Standard_D1_v2 --vm-name=smoser1121x "--location=East US" --<email address hidden> --no-ssh-password --ssh=22 smoser1121x b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu_DAILY_BUILD-xenial-16_04-LTS-amd64-server-20161119-en-us-30GB smoser

$ ssh <email address hidden>

## these are useful for collecting logs and such.
% git clone https://gist.github.com/29ea35a797c0df1fcb6ac875a024efa9.git htools
% sudo ./htools/save-old-data first-boot
new instance local: not found
new instance net : true
reformattable: not found
disk_setup ran: true
mounts ran: true
proc-mounts: /dev/sdb1 /mnt ext4
/etc/fstab: /dev/disk/cloud/azure_resource-part1 /mnt defaults,nofail,comment=cloudconfig

% sudo ./htools/enable-proposed
deb http://azure.archive.ubuntu.com/ubuntu/ xenial-proposed main universe
% sudo eatmydata apt-get update -q && sudo eatmydata apt-get -qy install cloud-init
% dpkg-query --show cloud-init
cloud-init 0.7.8-49-g9e904bb-0ubuntu1~16.04.1

## Wipe the disk, taking off partition table and filesystem on part1
% sudo umount /mnt
% sudo dd if=/dev/zero of=/dev/disk/cloud/azure_resource bs=1M count=10

## reboot clearing /var/lib/cloud so instance believes it is new.
% sudo ./htools/do-reboot clean
cleared /var/lib/cloud
cleared logs
rebooting

## now go back in (note, a Basic_A0 may take like 20 minutes to come back up
## due to the IO of mkfs) more reasonably sized instance will take ~ 2 seconds.
% sudo ./htools/save-old-data
new instance local: not found
new instance net : true
reformattable: true
disk_setup ran: true
mounts ran: true
proc-mounts: /dev/sdb1 /mnt ext4
/etc/fstab: /dev/disk/cloud/azure_resource-part1 /mnt defaults,nofail,x-systemd.requires=cloud-init.service,comment=cloudconfig

% sudo blkid /dev/sdb
/dev/sdb: PTUUID="fd0861f4-305c-40e8-96f1-f6203fa66d39" PTTYPE="gpt"