Coder Social home page Coder Social logo

Comments (10)

github-actions avatar github-actions commented on June 2, 2024

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @amjads1 @avirishuv @Drewm3 @Vaibhav-Agar.

from azure-sdk-for-python.

swathipil avatar swathipil commented on June 2, 2024

Hi @mehulrjangale - It looks like the parameters parameter of begin_create_or_update takes either an IO[bytes] or VirtualMachine.

VirtualMachine takes location as a required keyword argument.

The argument update_vm passed in to parameters should include location. Example.

Thanks!

from azure-sdk-for-python.

github-actions avatar github-actions commented on June 2, 2024

Hi @mehulrjangale. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

from azure-sdk-for-python.

mehulrjangale avatar mehulrjangale commented on June 2, 2024

Hi @swathipil,

I've the following code:

vm.os_profile.admin_password = new_password
**update_vm** = **VirtualMachineUpdate**(os_profile=vm.os_profile)
compute_client.virtual_machines.begin_create_or_update(resource_group_name, vm_name, update_vm)

The problem is I think VirtualMachineUpdate does not have location parameter.
[https://learn.microsoft.com/en-us/python/api/azure-mgmt-compute/azure.mgmt.compute.v2024_03_01.models.virtualmachineupdate?view=azure-python]

from azure-sdk-for-python.

ChenxiJiang333 avatar ChenxiJiang333 commented on June 2, 2024

Hi @swathipil,

I've the following code:

vm.os_profile.admin_password = new_password
**update_vm** = **VirtualMachineUpdate**(os_profile=vm.os_profile)
compute_client.virtual_machines.begin_create_or_update(resource_group_name, vm_name, update_vm)

The problem is I think VirtualMachineUpdate does not have location parameter. [https://learn.microsoft.com/en-us/python/api/azure-mgmt-compute/azure.mgmt.compute.v2024_03_01.models.virtualmachineupdate?view=azure-python]

Hi, please use the model VirtualMachine instead of VirtualMachineUpdate

from azure.mgmt.compute.models import VirtualMachine
update_vm = VirtualMachine(location="eastus", tags={'1':'2'})

from azure-sdk-for-python.

mehulrjangale avatar mehulrjangale commented on June 2, 2024

@ChenxiJiang333 @swathipil Will it work if I want to update the VM ?

from azure-sdk-for-python.

ChenxiJiang333 avatar ChenxiJiang333 commented on June 2, 2024

@ChenxiJiang333 @swathipil Will it work if I want to update the VM ?

It works for both to create or update the VM.

from azure-sdk-for-python.

mehulrjangale avatar mehulrjangale commented on June 2, 2024

It worked, thanks!

from azure-sdk-for-python.

github-actions avatar github-actions commented on June 2, 2024

Hi @mehulrjangale. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

from azure-sdk-for-python.

github-actions avatar github-actions commented on June 2, 2024

Hi @mehulrjangale, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.

from azure-sdk-for-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.