Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error updating virtual machine: Required parameter 'osProfile' is missing #378

Closed
planetmarshall opened this issue Dec 23, 2020 · 3 comments

Comments

@planetmarshall
Copy link

planetmarshall commented Dec 23, 2020

SUMMARY

Receiving the following error when updating a virtual machine scale set:

Error creating or updating virtual machine vmsslinuxspool - Azure Error: InvalidParameter\nMessage: Required parameter 'osProfile' is missing (null).\nTarget: osProfile
ISSUE TYPE
  • Bug Report
COMPONENT NAME

azure_rm_virtualmachinescaleset

ANSIBLE VERSION
ansible 2.10.4
  config file = None
  configured module search path = ['/home/andrew/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/andrew/projects/fuel3d/build-environment/ansible/.venv/lib/python3.8/site-packages/ansible
  executable location = /home/andrew/projects/fuel3d/build-environment/ansible/.venv/bin/ansible
  python version = 3.8.3 (default, Jul  8 2020, 20:42:45) [Clang 9.0.0 (tags/RELEASE_900/final)]

OS / ENVIRONMENT

Ubuntu 20.04 LTS

STEPS TO REPRODUCE
- name: Update scale set image reference
  hosts: localhost
  collections:
  - azure.azcollection
  connection: local
  vars:
    vmss_name: "{{ lookup('env', 'VMSS_NAME') }}"
    image_name: "{{ lookup('env', 'IMAGE_NAME') }}"
    vm_size: "{{ lookup('env', 'VM_SIZE') }}"
    resource_group: corelibraries-ci-rg
  tasks:

  - name: Update scale set
    azure_rm_virtualmachinescaleset:
      resource_group: "{{ resource_group }}"
      name: "{{ vmss_name }}"
      ssh_password_enabled: true
      capacity: 1
      upgrade_policy: Manual
      tier: Standard
      overprovision: false
      single_placement_group: false
      vm_size: "{{ vm_size }}"
      virtual_network_name: corelibs-linux-agentsVNET
      subnet_name: corelibs-linux-agentsSubnet
      image:
        name: "{{ image_name }}"
        resource_group: "{{ resource_group }}"

  - name: List all of the instances
    azure_rm_virtualmachinescalesetinstance_facts:
      resource_group: "{{ resource_group }}"
      vmss_name: "{{ vmss_name }}"
    register: instances

  - debug:
      var: instances

  - name: manually upgrade all the instances 
    azure_rm_virtualmachinescalesetinstance:
      resource_group: "{{ resource_group }}"
      vmss_name: "{{ vmss_name }}"
      instance_id: "{{ item.instance_id }}"
      latest_model: yes
    with_items: "{{ instances.instances }}"
EXPECTED RESULTS

The scale set is successfully updates

ACTUAL RESULTS

The above error is recieved. See attached text

https://paste.ubuntu.com/p/QGPpQDpjNS/

@planetmarshall
Copy link
Author

Repoening as I am still seeing this after following the installation instructions for the requisite azure modules.

@planetmarshall planetmarshall reopened this Jan 9, 2021
@planetmarshall
Copy link
Author

Possibly related to #197 ?

@Fred-sun
Copy link
Collaborator

Fred-sun commented Jul 1, 2021

@planetmarshall Fixed by #197, will close. Thank you very much!

@Fred-sun Fred-sun closed this as completed Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants