Creating a VM Scale Set with an image created from a marketplace image

Taishi Kasai 96 Reputation points
2023-03-08T15:48:50.73+00:00

Hello all, I have been trying to create a VM scale set using a custom image created from a market place image. A few years ago I provisioned a webserver using a Cognosys Centos 7.6 Wordpress marketplace image. Since that time a website has been configured and various other applications were installed on this webserver to keep up with requirements along with updates. I now need to expand the load capabilities since our site has been getting more traffic then one server can handle and decided to go to a VMSS set up. I create a generalized image of our current webserver and all was going well until the actual provisioning stage came up. When I try to use the image to provision VMSS, I get the below error. I have tracked down where to input this "plan detail" in the image version but I still continue to receive the error. I tried provisioning in Azure CLI and still receive message.

Error message

"status": "Failed",
    "error": {
        "code": "VMMarketplaceInvalidInput",
        "target": "0",
        "message": "Creating a virtual machine from Marketplace image or a custom image sourced from a Marketplace image requires Plan information in the request. VM: '/subscriptions/f9da22af-06f1-49ae-be47-13f533267985/resourceGroups/Server_Images/providers/Microsoft.Compute/virtualMachineScaleSets/ProdWSA06/virtualMachines/ProdWSA06_0'."
    }
}

Here is a screenshot of the error in portal

User's image

Azure CLI code I was using, I read in various articles to use Set-AzVMPlan which I piped in to the provisioning command however it's still not working

az vmss create -n *MY SERVER NAME -g *OMIT --load-balancer *My Load Balancer Name --vnet-name *OMIT --subnet OMIT --image MY IMAGE --admin-username ***** --admin-password ******* | Set-AzVMPlan -Publisher cognosys -Product secured-wordpress-on-centos-7-3 -Name new-secured-wordpress-on-centos-7-3

Does anyone have any ideas on how I can include the "plan information" when I provision?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,978 questions
Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
339 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,962 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Taishi Kasai 96 Reputation points
    2023-03-08T23:12:01.81+00:00

    This problem is resolved. I was using the wrong parameters. This part ----> | Set-AzVMPlan -Publisher cognosys -Product secured-wordpress-on-centos-7-3 -Name new-secured-wordpress-on-centos-7-3

    The plan details should be injected in the same line as the azvmss create code as below and I was able to provision the scale set.

    User's image