3 h 15 (S7.1 : 25 min · S7.2 : 55 min · S7.3 : 70 min · S7.4 : 45 min)
modules 3 (CLI, Bicep) and 4 (hub-spoke, NSG), basic Linux administration
spokes vnet-stNN-spoke-app and -data without firewall or UDR (D2 cleanup), AzureBastionSubnet ready in the hub, rg-stNN-app empty
25 min
VM = Size + Image + Managed disks + Network interface (+ Extensions)| Resource | Role | Arvéo (trainee 07) |
|---|---|---|
| Size (SKU) | vCPU, memory, disk and network throughput | Standard_B2s_v2 |
| Image | Starting operating system | Ubuntu Server 24.04 LTS |
| OS disk + data disks | Persistent (managed) storage | osdisk-st07-web01, disk-st07-web01-data |
| Network interface (NIC) | Private IP in a subnet | nic-st07-web01, 10.7.4.11 |
rg-st07-app / rg-st07-spoke)Standard_D4as_v5 = Tier + Family + vCPU + Options + Version| Element | Example | Meaning |
|---|---|---|
| Family | D |
General purpose |
| vCPU | 4 |
Four virtual processors |
| Options | a, s |
AMD processor, Premium SSD capable |
| Version | v5 |
Hardware generation |
d (local temp disk), l (less memory), m (more memory), p (ARM processor)s: Premium SSD disks NOT supported by the sizeFamily = Workload profile (compute, memory, storage, GPU)| Family | Profile | Typical use |
|---|---|---|
| B | Burstable (CPU credits) | Light web, dev, test |
| D | General purpose (≈ 4 GiB per vCPU) | Application servers |
| E | Memory (≈ 8 GiB per vCPU) | Databases, caches |
| F | Compute (≈ 2 GiB per vCPU) | Batch processing |
| L / M | Local storage / extreme memory | NoSQL / SAP HANA |
| N | GPU | AI, rendering, graphics VDI |
VM storage = OS disk + Temporary disk + Data disks/ or C:), created from the image/mnt or D:), lost on deallocationReadOnly (frequently read data), None (logs), ReadWrite (OS)never store business data on the temporary disk
Disk type = IOPS + Throughput + Latency + VM SLA| Type | Max IOPS | Use |
|---|---|---|
| Standard HDD | 2,000 | Backups, rare access |
| Standard SSD | 6,000 | Web, dev, test (Arvéo labs) |
| Premium SSD | 20,000 | Production, databases |
| Premium SSD v2 | 80,000 | Demanding databases, tunable performance |
| Ultra Disk | 400,000 | SAP HANA, intensive transactions |
[TO VERIFY] on the "Managed disk types" page; the VM size also caps performanceImage = Marketplace | Azure Compute Gallery | Managed imagePublisher:Offer:SKU:Version (e.g. Canonical:ubuntu-24_04-lts:server:latest)Ubuntu2404, Win2022Datacenter, Win2025Datacenter (az vm image list)Before (Lyon): ISO + manual install + golden master per server (1 day)
After (Azure): marketplace or gallery image + cloud-init (5 min)
VM cost = Compute (hourly) + Disks + License + Outbound traffic| Option | Principle | Arvéo case |
|---|---|---|
| Pay-as-you-go | Per second, no commitment | Labs, occasional peaks |
| Reservation (1 or 3 years) | Discount on a size and region | 24/7 ERP servers |
| Savings plan (1 or 3 years) | Hourly spend commitment, any size | Varied, changing fleet |
| Spot | Unused capacity, eviction possible | Interruptible compute |
| Azure Hybrid Benefit | Existing Windows Server / SQL licenses | Lyon licenses with SA |
[TO VERIFY] on the pricing pageaz vm stop: OS stopped, compute STILL billed; az vm deallocate: compute releasedDeployment possible = Size available (region, zone) + Enough vCPU quotaaz vm list-skus -l francecentral --size Standard_B2s_v2 --resource-type virtualMachines \
--query "[].{Size:name, Zones:join(',', locationInfo[0].zones)}" -o table
Q="[?name.value=='cores' || name.value=='standardBSv2Family']"
az vm list-usage -l francecentral -o table \
--query "$Q.{Quota:name.localizedValue, Used:currentValue, Limit:limit}"Expected output (values vary):
Size Zones
------------ -------
Standard_B2s_v2 1,2,3
Quota Used Limit
------------------------ ------ -------
Total Regional vCPUs 12 100
Standard BSv2 Family vCPUs 12 100Exercise 07.1: size four Arvéo workloads (10 min, in pairs)
55 min
Method = Portal (discovery) | CLI / PowerShell (scripts) | Bicep (reproducible)| Method | Strength | Limit |
|---|---|---|
| Portal | Guided wizard, visible options | Not reproducible |
| Azure CLI | Useful defaults | Implicit resources (IP, NSG) |
| Az PowerShell | New-AzVM, rich objects |
Verbose for a full VM |
| Bicep / ARM | Declarative, versioned, what-if |
Learning curve |
az vm create without options: also creates a public IP, an NSG and a VNet if needed--public-ip-address "" and --nsg "" forgotten = VM exposed to the Internet
Explicit egress = NAT gateway | Load Balancer outbound rule | Public IP | Firewallapt, agents, updates)az network public-ip create -g rg-st07-spoke -n pip-st07-natgw --sku Standard -o none
az network nat gateway create -g rg-st07-spoke -n ng-st07-app \
--public-ip-addresses pip-st07-natgw --idle-timeout 4 -o none
az network vnet subnet update -g rg-st07-spoke --vnet-name vnet-st07-spoke-app \
-n snet-web --nat-gateway ng-st07-app -o noneegress through the hub firewall (filtering); NAT gateway when no inspection is required
Variables: $SNET_WEB = snet-web ID; $ADMIN_PW = password from ~/.arveo/web-admin.txt
az network nic create -g rg-st07-app -n nic-st07-web01 --subnet "$SNET_WEB" \
--private-ip-address 10.7.4.11 --tags $TAGS -o none
az vm create -g rg-st07-app -n vm-st07-web01 --zone 1 --nics nic-st07-web01 \
--image Ubuntu2404 --size Standard_B2s_v2 \
--os-disk-name osdisk-st07-web01 --storage-sku StandardSSD_LRS \
--admin-username arveoadmin --authentication-type password \
--admin-password "$ADMIN_PW" \
--custom-data scripts/labs/module-07/cloud-init-web.yaml \
--boot-diagnostics-storage starveost07diag --tags $TAGS \
--query "{State:powerState, IP:privateIpAddress, Zone:zones}" -o tableExpected output (2 to 3 min):
State IP Zone
---------- --------- ------
VM running 10.7.4.11 1cloud-init = Packages + Files + Commands (#cloud-config format)#cloud-config
package_update: true
packages:
- nginx
runcmd:
- systemctl enable --now nginxscripts/labs/module-07/cloud-init-web.yaml (v1 page with name and zone)cloud-init status --wait, log /var/log/cloud-init-output.log--custom-data dropped on the disk, not executed by defaultData disk = az disk create (zone) + az vm disk attach (LUN) + Formatting in the OSaz disk create -g rg-st07-app -n disk-st07-web01-data --zone 1 \
--size-gb 32 --sku StandardSSD_LRS --tags $TAGS -o none
# vmrun: run-command on vm-st07-<name> (function of the lab variable block)
az vm disk attach -g rg-st07-app --vm-name vm-st07-web01 \
--name disk-st07-web01-data --lun 0 --caching ReadOnly -o none
vmrun web01 "$(cat scripts/labs/module-07/init-data-disk.sh)"Expected output (device name varies):
/dev/sdc1 32G /srv/arveoLABEL=arveo-data) with nofail: /dev/sdX names are not stableaz disk update --size-gb (VM deallocated or live depending on the case [TO VERIFY])what-ifresource vm 'Microsoft.Compute/virtualMachines@2024-03-01' = {
name: 'vm-${prefix}-${nomCourt}'
location: location
zones: [ zone ]
properties: {
hardwareProfile: { vmSize: 'Standard_B2s_v2' }
storageProfile: {
imageReference: { publisher: 'Canonical', offer: 'ubuntu-24_04-lts', sku: 'server' }
}
osProfile: { customData: base64(loadTextContent('cloud-init-web.yaml')) }
}
}vm-web-squelette.bicep)customData, admin name, image: cannot be changed after creation (redeployment rejected)Bastion = AzureBastionSubnet (/26) + Public IP + HTTPS 443 → private SSH 22 / RDP 3389flowchart LR ADM[Admin<br/>browser] -->|HTTPS 443| BAS[bas-st07-hub<br/>AzureBastionSubnet] BAS -->|SSH 22<br/>peering| WEB[vm-st07-web01<br/>10.7.4.11] BAS -->|SSH 22| API[Instances<br/>vmss-st07-api]
| SKU | Key features |
|---|---|
| Developer | Free, VMs of the same VNet only, limited regions [TO VERIFY] |
| Basic | Peered VNets, portal (Arvéo: bas-st07-hub) |
| Standard / Premium | Native client (az network bastion ssh), file transfer, recording (Premium) |
Admin access = Bastion | Run Command | P2S VPN | Just-in-time (Defender)arveoadmin + passwordvmrun in the labs)AzureBastionSubnet only (never from the Internet)Bastion Updating for 5 to 10 min after creation: button greyed out, wait for Succeeded
70 min
Availability = Redundancy (≥ 2 VMs) + Spreading (domains or zones) + Load balancing| Deployment | Protects against | Connectivity SLA |
|---|---|---|
| Single VM, Premium SSD or Ultra | Nothing (restart on another host) | 99.9 % |
| Single VM, Standard SSD | Nothing | 99.5 % |
| ≥ 2 VMs in an availability set | Rack failure, maintenance | 99.95 % |
| ≥ 2 VMs in ≥ 2 zones | Loss of a datacenter | 99.99 % |
[TO VERIFY] in the current SLA ("Service Level Agreements for Online Services")Availability set = Fault domains (racks) + Update domains (maintenance)availability set with a single VM = no SLA gain
Zone = Independent power + cooling + network| Resource | Zonal (one zone) | Zone-redundant (1, 2, 3) |
|---|---|---|
| VM, LRS managed disk | Yes | No |
| ZRS managed disk | No | Yes |
| Standard public IP | Possible | Yes (recommended) |
| Standard Load Balancer (frontend) | Possible | Yes (recommended) |
| NAT gateway | Possible | Depends on the version [TO VERIFY] |
vm-st07-web01 in zone 1, vm-st07-web02 in zone 2Load Balancer = Frontend + Rule + Backend pool + Health probeflowchart LR CLI[Internet<br/>clients] --> FE[fe-web<br/>pip-st07-lbe-web] FE -->|rule-http TCP 80| BP[bp-web] BP --> W1[vm-st07-web01<br/>zone 1] BP --> W2[vm-st07-web02<br/>zone 2] HP[Probe hp-http<br/>168.63.129.16] -.-> BP
Load Balancer = Standard SKU + Public | Internal + Rules (inbound, outbound, NAT)| Option | Use | Arvéo |
|---|---|---|
| Public | Frontend on a public IP | lbe-st07-web (portal) |
| Internal | Frontend on a private subnet IP | lbi-st07-api (10.7.5.100) |
| Outbound rule | SNAT of pool VMs to the Internet | No: NAT gateway |
| Inbound NAT rule | Frontend port → port of one VM | No: Bastion |
168.63.129.16 (AzureLoadBalancer tag) to allow in NSGsaz network public-ip create -g rg-st07-app -n pip-st07-lbe-web --sku Standard \
--zone 1 2 3 --tags $TAGS -o none
az network lb create -g rg-st07-app -n lbe-st07-web --sku Standard \
--public-ip-address pip-st07-lbe-web --frontend-ip-name fe-web \
--backend-pool-name bp-web --tags $TAGS -o none
az network lb probe create -g rg-st07-app --lb-name lbe-st07-web -n hp-http \
--protocol Http --port 80 --path / -o none
az network lb rule create -g rg-st07-app --lb-name lbe-st07-web -n rule-http \
--protocol Tcp --frontend-port 80 --backend-port 80 --frontend-ip-name fe-web \
--backend-pool-name bp-web --probe-name hp-http --disable-outbound-snat true -o noneaz network nic ip-config address-pool add (NIC)VMSS = VM model + Instance count + Spreading (zones, domains) + Scaling| Criterion | Flexible | Uniform |
|---|---|---|
| Instances | Standard VMs (az vm) |
Model instances (az vmss) |
| Sizes and configurations | Can be mixed | Identical |
| Spreading | Zones + fault domains | Zones or fault domains |
| Recommendation | New deployments | Very large scale, existing |
vmss-st07-api Flexible, zones 1 2 3, 2 instances, pool of lbi-st07-apiaz vmss create: Flexible [TO VERIFY] depending on the CLI versioncloud-init-api.yaml) or model extensionsAutoscale = Profile (min, max, default) + Rules (metric, threshold, duration) + CooldownVMSS_ID=$(az vmss show -g rg-st07-app -n vmss-st07-api --query id -o tsv)
az monitor autoscale create -g rg-st07-app -n as-st07-api --resource "$VMSS_ID" \
--min-count 2 --max-count 4 --count 2 -o none
az monitor autoscale rule create -g rg-st07-app --autoscale-name as-st07-api \
--condition "Percentage CPU > 70 avg 5m" --scale out 1 -o none
az monitor autoscale rule create -g rg-st07-app --autoscale-name as-st07-api \
--condition "Percentage CPU < 25 avg 10m" --scale in 1 -o nonescale-in threshold far from the scale-out threshold (avoid flapping)
45 min
Extension = Publisher + Type + Version + Settings (public | protected)walinuxagent (Linux) or Windows guest agent, present in Azure imagesaz vm extension set, Bicep, VMSS modelSucceeded / Failed state per extension| Extension | Use |
|---|---|
CustomScript |
Run a script after deployment |
AzureMonitorLinuxAgent (or ...WindowsAgent) |
Logs and metrics |
AADSSHLoginForLinux |
SSH sign-in with an Entra ID account |
fileUris)Variables: 7 = trainee octet (replaces __OCT__ in the script)
SCRIPT_B64=$(sed "s/__OCT__/7/g" scripts/labs/module-07/portail-v2.sh | base64 -w0)
az vm extension set -g rg-st07-app --vm-name vm-st07-web01 \
--publisher Microsoft.Azure.Extensions --name CustomScript --version 2.1 \
--protected-settings "{\"script\": \"${SCRIPT_B64}\"}" -o none
az vm extension list -g rg-st07-app --vm-name vm-st07-web01 \
--query "[].{Name:name, Version:typeHandlerVersion, State:provisioningState}" -o tableExpected output:
Name Version State
------------ --------- ---------
CustomScript 2.1 SucceededExecution = Once per configuration (changed settings or --force-update)--force-update to replayFailed stateportail-v2.sh)/var/log/azure/custom-script/handler.log and /var/lib/waagent/custom-script/download/0/fileUris: storage account (SAS or managed identity) or repository reachable from the VMscript waiting for input or rebooting the VM = extension stuck or Failed
Collection = Agent (AMA) + Data collection rule (DCR) + VM ↔ DCR associationflowchart LR VM1[vm-st07-web01<br/>AMA] --> DCR[dcr-st07-linux<br/>Syslog + Perf] VM2[vm-st07-web02<br/>AMA] --> DCR DCR --> LA[log-st07-shared<br/>Log Analytics]
log-st07-shared: created in module 3, shared by every workloadaz vm identity assign -g rg-st07-app -n vm-st07-web01 -o none
az vm extension set -g rg-st07-app --vm-name vm-st07-web01 \
--publisher Microsoft.Azure.Monitor --name AzureMonitorLinuxAgent \
--enable-auto-upgrade true -o none
az deployment group create -g rg-st07-app -n dcr-arveo \
--template-file scripts/labs/module-07/dcr-arveo-linux.bicep \
--parameters numero=07 -o noneCheck (5 to 10 min after installation):
Heartbeat | where TimeGenerated > ago(15m)
| summarize Last = max(TimeGenerated) by Computer--enable-auto-upgrade): minor versions applied by AzureConfiguration = cloud-init (boot) | Run Command | Extensions | Machine Configuration| Tool | When | Arvéo |
|---|---|---|
| cloud-init / custom data | First boot only | nginx + v1 page |
| Run Command | One-off admin command | vmrun in the labs |
| Custom Script | After deployment, replayable | Portal v2 |
| Machine Configuration (Azure Policy) | Continuous compliance, audit and remediation | Module 2 (overview) |
golden image (gallery) + minimal cloud-init + configuration management (Ansible, DSC)
s mean in Standard_D4as_v5?az vm stopaz vm deallocateaz vm restartaz vm disk detachaz vm update --availability-set--disable-outbound-snat true on rule rule-http?--force-update is used