VMware Cloud Community
carl1
Expert
Expert

cloudbase-init format drive example

Does anyone have an example of doing a cloudbase-init (windows of course) format of a disk drive?  I can't see any way of doing it but I must be wrong.

Thanks all,
Carl L.

0 Kudos
1 Reply
jimmyvandermast
Hot Shot
Hot Shot

I expect something like this to work:

 

 

cloudConfig: |
  #ps1_sysnative
    Get-Disk | Where-Object PartitionStyle -Eq "RAW" | Initialize-Disk -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume

 

0 Kudos