Azure Devops Packer 构建代理(为打包程序创建的临时资源组定义 Vnet IP 范围以拍摄快照))
Azure Devops Packer Build Agent (Define Vnet IP Range for the temporary Resource group which packer creates to take snapshot))
我正在尝试在 azure 上构建打包程序映像。我如何为临时打包程序资源组定义 Vnet 和 VM IP 范围(哪个打包程序临时创建和销毁(Vnet,vm))以拍摄虚拟机的快照?我想确保打包程序使用的默认 IP 不会与我在 azure 订阅中的现有 IP 重叠
您可以在打包程序模板中指定选项以使用现有资源组和虚拟网络。请参阅下面的示例
{
"builders": [{
"type": "azure-arm",
"client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
"client_secret": "ppppppp-pppp-pppp-pppp-ppppppppppp",
"tenant_id": "zzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz",
"subscription_id": "yyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyy",
// These will allow you to select existing resources
"build_resource_group_name": "my-existing-rg" // name of existing resource group
"virtual_network_name": "my-existing-vnet" // name of existing vnet
"virtual_network_subnet_name": "mySubnetName" // name of subnet inside vnet
"private_virtual_network_with_public_ip": true // apply public IP to VM (optional)
// Continue with rest of configuration
}
我正在尝试在 azure 上构建打包程序映像。我如何为临时打包程序资源组定义 Vnet 和 VM IP 范围(哪个打包程序临时创建和销毁(Vnet,vm))以拍摄虚拟机的快照?我想确保打包程序使用的默认 IP 不会与我在 azure 订阅中的现有 IP 重叠
您可以在打包程序模板中指定选项以使用现有资源组和虚拟网络。请参阅下面的示例
{
"builders": [{
"type": "azure-arm",
"client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
"client_secret": "ppppppp-pppp-pppp-pppp-ppppppppppp",
"tenant_id": "zzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz",
"subscription_id": "yyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyy",
// These will allow you to select existing resources
"build_resource_group_name": "my-existing-rg" // name of existing resource group
"virtual_network_name": "my-existing-vnet" // name of existing vnet
"virtual_network_subnet_name": "mySubnetName" // name of subnet inside vnet
"private_virtual_network_with_public_ip": true // apply public IP to VM (optional)
// Continue with rest of configuration
}