Badgerati / Fogg

PowerShell tool to aide and simplify the creation, deployment and provisioning of infrastructure in Azure
MIT License
7 stars 2 forks source link

Ability to create/update a VM with an additional data drive(s) #63

Closed Badgerati closed 7 years ago

Badgerati commented 7 years ago

This issue is to implement a new feature for VMs, which is to allow the template to define multiple additional data drives that can be attached to a VM.

Note: this will only create or update a VM to have these drives. It will not delete them

example:

"template": [
    {
        "type": "vm",
        "drives": [
            {
                "type": "data",
                "name": "Logs",
                "letter": "F",
                "size": 512
            }
        ]
    }
]

The "size" is in GB, and the "letter" can only be between F and Y. If the drive letter already exists on the VM, deployment will fail.

The "name" will be the name of the drive on the VM. (ie: Logs (F:))

Badgerati commented 7 years ago

Things left to do:

Badgerati commented 7 years ago

It's possible to update an existing drive's letter, and technically name but when done by name a new disk is created in the storage account --> need to find a way of stopping this.

Badgerati commented 7 years ago

The final design for the template of drives looks as following:

"template": [
    {
        "type": "vm",
        "drives": [
            {
                "lun": 1,
                "name": "Logs",
                "letter": "K",
                "size": 256,
                "caching": "ReadOnly"
            }
        ]
    }
]

Once a disk/drive has been created, Fogg will not remove them later on if they are removed from the template (to protect against accidents of removing whole drives of important data)