kubernetes/kops · error

waiting for VMSS create/update

Error message

waiting for VMSS create/update: %w

What it means

Wrapped when the long-running VMSS create/update fails during future.PollUntilDone — BeginCreateOrUpdate succeeded but the operation later entered a Failed/Cancelled state or the context ended. Azure-side provisioning problems (capacity, image, extensions) surface here rather than at Begin time.

Solutions

  1. Check the VMSS provisioning state and the Azure Activity Log for the failed operation's error detail
  2. Retry the kops command — long-running operations can be safely re-issued
  3. If quota/capacity-related, choose a different vmSize/region or request a quota increase
  4. Avoid cancelling kops mid-roll; increase timeouts for large scale sets
Defensive patterns

Strategy: retry

Validate before calling

// Go: verify VM size quota/capacity in the target region before the long-running operation
sku, err := skuClient.List(ctx, rg, "location eq 'eastus'", nil)
if err == nil {
    for _, s := range sku.Value {
        if *s.Name == vmSize && len(s.Restrictions) > 0 {
            return fmt.Errorf("vmSize %s restricted in region", vmSize)
        }
    }
}

Try / catch

vmss, err := vmssClient.CreateOrUpdate(ctx, rg, name, parameters)
if err != nil {
    if ctx.Err() != nil {
        return fmt.Errorf("VMSS update interrupted; re-run kops to resume rolling update")
    }
    return fmt.Errorf("VMSS provisioning failed (quota/capacity/image?) — see Activity Log: %w", err)
}

Prevention

When it happens

Trigger: CreateOrUpdate's future.PollUntilDone(ctx, nil) returns an error: VMSS provisioning failed (capacity constraints, quota exceeded, invalid image rollout), the context was cancelled/timed out, or ARM throttling exhausted retries.

Common situations: Regional capacity restrictions for the chosen VM size; subscription vCPU quota exhausted; rolling-update of an existing VMSS interrupted by Ctrl-C; image download failures during provisioning.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/78b5cf483abf8cc6. Report an issue: GitHub.

Appendix: source

Thrown at upup/pkg/fi/cloudup/azure/vmscaleset.go:51

	List(ctx context.Context, resourceGroupName string) ([]*compute.VirtualMachineScaleSet, error)
	Get(ctx context.Context, resourceGroupName string, vmssName string) (*compute.VirtualMachineScaleSet, error)
	Delete(ctx context.Context, resourceGroupName, vmssName string) error
}

type vmScaleSetsClientImpl struct {
	c *compute.VirtualMachineScaleSetsClient
}

var _ VMScaleSetsClient = (*vmScaleSetsClientImpl)(nil)

func (c *vmScaleSetsClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName, vmScaleSetName string, parameters compute.VirtualMachineScaleSet) (*compute.VirtualMachineScaleSet, error) {
	future, err := c.c.BeginCreateOrUpdate(ctx, resourceGroupName, vmScaleSetName, parameters, nil)
	if err != nil {
		return nil, fmt.Errorf("creating/updating VMSS: %w", err)
	}
	resp, err := future.PollUntilDone(ctx, nil)
	if err != nil {
		return nil, fmt.Errorf("waiting for VMSS create/update: %w", err)
	}
	return &resp.VirtualMachineScaleSet, nil
}

func (c *vmScaleSetsClientImpl) List(ctx context.Context, resourceGroupName string) ([]*compute.VirtualMachineScaleSet, error) {
	if resourceGroupName == "" {
		return nil, nil
	}

	var l []*compute.VirtualMachineScaleSet
	pager := c.c.NewListPager(resourceGroupName, nil)
	for pager.More() {
		resp, err := pager.NextPage(ctx)
		if err != nil {
			var respErr *azcore.ResponseError
			if errors.As(err, &respErr) && respErr.ErrorCode == "ResourceGroupNotFound" {
				return nil, nil
			}

View on GitHub (pinned to 4c8573c808)