Giter Club home page Giter Club logo

Comments (3)

BourneNeo avatar BourneNeo commented on May 18, 2024

through code: 1, how can i check whether or not a vm has been installed OS? 2, when i am creating a vm, can i assign a ip address to it so when i finished OS installing i can use network service without login and configure it by hand? can someone help? thanks 🙂

from vsphere-automation-sdk-python.

BourneNeo avatar BourneNeo commented on May 18, 2024

天浩老师,我有两个问题想请教您,1是我怎么用代码查看一个虚拟机是否已经装过操作系统?2是我能否在用python自动化创建虚拟机的时候就对该虚拟机进行网络设置,分配一个IP,这样我在创建好虚拟机,然后装好系统之后,不用手动登录进去配置IP 就可以使用网络服务了? 希望您方便的时候能回复我一下,谢谢。🙂

from vsphere-automation-sdk-python.

tianhao64 avatar tianhao64 commented on May 18, 2024

@BourneNeo You should be able to access the guest information using following API:
https://code.vmware.com/doc/preview?id=4206#/doc/vim.vm.GuestInfo.html
This API is not available automation SDK yet so you have to use pyVmomi.
You can't assign IP address without an OS installed. Here is an example about how to assign an IP address using pyVmomi: https://github.com/rreubenur/vmware-pyvmomi-examples/blob/master/network_configure.py

from vsphere-automation-sdk-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.