mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 20:08:09 +00:00
enable using ephemeral disks by default (#461)
This commit is contained in:
@ -208,6 +208,7 @@ def create_vmss(
|
||||
image: str,
|
||||
network_id: str,
|
||||
spot_instances: bool,
|
||||
ephemeral_os_disks: bool,
|
||||
extensions: List[Any],
|
||||
password: str,
|
||||
ssh_public_key: str,
|
||||
@ -259,7 +260,9 @@ def create_vmss(
|
||||
},
|
||||
"virtual_machine_profile": {
|
||||
"priority": "Regular",
|
||||
"storage_profile": {"image_reference": image_ref},
|
||||
"storage_profile": {
|
||||
"image_reference": image_ref,
|
||||
},
|
||||
"os_profile": {
|
||||
"computer_name_prefix": "node",
|
||||
"admin_username": "onefuzz",
|
||||
@ -300,6 +303,13 @@ def create_vmss(
|
||||
},
|
||||
}
|
||||
|
||||
if ephemeral_os_disks:
|
||||
params["virtual_machine_profile"]["storage_profile"]["os_disk"] = {
|
||||
"diffDiskSettings": {"option": "Local"},
|
||||
"caching": "ReadOnly",
|
||||
"createOption": "FromImage",
|
||||
}
|
||||
|
||||
if spot_instances:
|
||||
# Setting max price to -1 means it won't be evicted because of
|
||||
# price.
|
||||
|
Reference in New Issue
Block a user