-
Notifications
You must be signed in to change notification settings - Fork 0
/
fuckb1s3.py
35 lines (31 loc) · 1.33 KB
/
fuckb1s3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import io
import json
import time
import random
from contextlib import redirect_stdout
from azure.cli.core import get_default_cli
locations = ['australiasoutheast', 'japanwest', 'southindia', 'canadaeast', 'ukwest',
'centralus', 'southafricanorth', 'centralindia', 'eastasia', 'japaneast']
vm_size = "Standard_B1s"
size_count = 1
fuck = random.randint(0,9999999999)
get_default_cli().invoke(['group', 'create', '--name', 'ResourceGroup',
'--location', 'eastasia'])
print("Resource Group Created Successfully")
for location in locations:
count = 0
for a in range(0, size_count):
count += 1
print(str(count) + " of " + str(size_count) + " " + str(vm_size) + " VM in " + str(location) + " is being Created")
get_default_cli().invoke(
['vm', 'create', '--resource-group', 'ResourceGroup', '--name',
f'{location}-{vm_size}-{count}-{fuck}', '--image', 'UbuntuLTS',
'--size', f'{vm_size}', '--location', f'{location}', '--admin-username',
'axuan', '--admin-password', '320Hanyue1827...', '--custom-data',
'/.XX/cloud-init.txt', "--no-wait", '--public-ip-sku', 'Standard'])
print("\n")
print("VM Created Successfully")
print("\n")
print("VM List: ")
get_default_cli().invoke(['vm', 'list', '--query', '[*].name'])
print("\n")