deploy a virtual machine for the model stored in EXSI server via the command line

Hello

Is it possible to deploy a vm from a template stored in exsi server via the command line?

The structure is shown in the attached picture. I want to deploy the model under "Templates" folder to a virtual machine "VM" sub-folder by command line of any machine.

structure.jpg

Hello

PowerCLI can help you achieve this goal. Using PowerCLI, you can deploy remote host model.

Here is an example for the same.

http://www.harryjohn.org/deploy-multiple-VMs-from-template/

Tags: VMware

Similar Questions

  • How can I register a virtual machine in the command line?

    I want to automate the registration of virtual machines in my VMWare Fusion.

    I have the vmx file. I can do this by using the command line?

    If not, how can I do it automatically?

    Thanks in advance.

    There are two main methods you can interact with the Virtual Machines outside user of VMware Fusion, the VIX API and vmrun interface and with the registration of these two commands are not supported with VMware Fusion (or VMware Workstation.* (* Non-exclussive VM)}.)  Recording controls are used primarily with vSphere.  VMware Server also supported recording orders.

    BTW, from a Machine virtual Finder by double-clicking on the file of configuration of Machine virtual package or .vmx if it is already running and is not created through the interface user of VMware Fusion, for example created in VMware Workstation VM and copied on a Mac, created manually or via a script solution.  Although she will then have to be manually recorded.  Registered/not registered in this context the Virtual Machine appears in the library of virtual machines VMware Fusion.

  • A safety class is not found in this JAVA virtual machine for the following reason: sun.security.x509.CertAndKeyGen

    I'm trying to start OUD 11.1.2.2.0 after a new installation on Windows 2008 Server (oud - setup.bat) and I see the following error. Any ideas?

    [18/Apr / 2014:13:34:04-0600] category = gravity CORE = INFORMATION msgID = 132 msg = The Directory Server starts the configuration of the boot process

    [18/Apr / 2014:13:34:05-0600] category = gravity CORE VIEW msgID = 458886 msg = directory = unified Oracle 11.1.2.2.0 (build 20131115153045Z, R1311150604) commissioning

    [18/Apr / 2014:13:34:08-0600] category gravity = RUNTIME_INFORMATION = VIEW msgID = 20381717 msg = installation directory: C:\Oracle\Middleware\Oracle_OUD

    [18/Apr / 2014:13:34:08-0600] category gravity = RUNTIME_INFORMATION = VIEW msgID = 20381719 msg = Instance directory: C:\Oracle\Middleware\asinst_1\OUD

    [18/Apr / 2014:13:34:08-0600] category gravity = RUNTIME_INFORMATION = VIEW msgID = 20381713 msg = Information FMV: 1.8.0_05 - b13 by Oracle Corporation, architecture 32 bits, the size of the heap 652476416 bytes

    [18/Apr / 2014:13:34:08-0600] category gravity = RUNTIME_INFORMATION = VIEW msgID = 20381714 msg = JVM Host: slc00dbh.us.oracle.com, running Windows Server 2008 6.0 x 86, size of 8177541120 bytes of physical memory, the number of available processors 2

    [18/Apr / 2014:13:34:08-0600] category gravity = RUNTIME_INFORMATION = VIEW msgID = 20381715 msg = JVM Arguments: ' - Dorg.opends.server.scriptName = start - ds. "

    Exception in thread "main" java.lang.ExceptionInInitializerError: a safety class is not found in this JAVA virtual machine for the following reason: sun.security.x509.CertAndKeyGen

    to org.opends.server.util.Platform$ PlatformIMPL. < clinit > (Platform.java:132)

    to org.opends.server.util.Platform. < clinit > (Platform.java:85)

    at org.opends.server.util.CertificateManager.generateSelfSignedCertificate(CertificateManager.java:283)

    at org.opends.server.admin.AdministrationConnector.createSelfSignedCertifIfNeeded(AdministrationConnector.java:703)

    at org.opends.server.admin.AdministrationConnector.initializeAdministrationConnector(AdministrationConnector.java:182)

    at org.opends.server.core.ConnectionHandlerConfigManager.initializeAdministrationConnectorConfig(ConnectionHandlerConfigManager.java:356)

    at org.opends.server.core.DirectoryServer.initializeAdministrationConnector(DirectoryServer.java:2872)

    at org.opends.server.core.DirectoryServer.startServer(DirectoryServer.java:1539)

    at org.opends.server.core.DirectoryServer.main(DirectoryServer.java:9930)

    C:\Oracle\Middleware\Oracle_OUD > java-version

    Java version "1.8.0_05".

    Java (TM) SE Runtime Environment (build 1.8.0_05 - b13)

    The Client Java VM (build 25, 5 - b02, mixed mode, sharing)

    I used the following jdk based on the matrix and it worked fine:

    C:\Oracle\Middleware\Oracle_OUD>Java-version

    Java version "1.6.0_24".

    Java (TM) SE Runtime Environment (build 1.6.0_24 - b07)

    The Client Java VM (build 19.1 - b02, mixed mode, sharing)

  • Non supported configuration of virtual machines for the fault tolerance. The operation is not supported on the object. When activating FT

    Hello

    I try to activate FT on a virtual machine that AFAIK ticked all the boxes for FT but I get this message when activating it. No clue as to what might happen or where to connect for extended information? This error message is too generic...

    Thanks in advance mates.

    Did you follow KB1019165-fault tolerant to fails to 42% with the error: not supported configuration of virtual machines for the fault tolerance

    André

  • How to configure the virtual machine for the changes to forget

    Hi, I want to ask if it is possible together in the virtual machine for the changes to forget. For example - user run VM... make some changes in the configuration. Then come a new user has it want to have clear (without changes in the configuration) virtual machine. Is possible together closed the machine after changes lost?

    Sorry for my English.

    Thanks for help.

    Hi Polo939

    First, you will need to take a snapshot of the virtual machine.

    • Select your virtual machine

    • Click on "take a snapshot" on the right-hand side of the web interface

    Then you must configure the virtual machine to go back to the snapshot when it is turned off.

    • Click on "configure the VM.

    • Click the "snapshot".

    • Select "back to overview" under when you feed off option

  • Deploy multiple virtual machines from one model to the help of customization of the OS and a text file for hostname and IP

    Hi all

    Not sure if this has already been answered, I did a search on the forums, but couldn't find an answer to what I'm looking for.

    I want to fully automate the deployment of multiple VMs of a model using a customization file, but also to retrieve the host names and IP addresses from a text file / spreadsheet.

    for example:

    I need to deploy a test environment of 30 virtual machines using the template file and customizing TestVM. I have a spreadsheet with the VM host names and IP addresses. The process now is to manually enter the host name and IP when the customization file invites to do while deploying them in each virtual machine. The customization file takes care of the rest (license key, admin password, add to the domain etc.) can I automate entry of the name of host and IP addresses in reading from a text file?

    Thanks in advance!

    Take a look on the deployment, customization and modification of virtual machines to a csv file

    There are many more examples of this community on the same subject,

  • New virtual machine for the model with the specific name

    Hello

    I'm trying to add some model VM to VAPP using recomposeVApp (...). And it works well except that I can not change the name of the virtual machine while recomposing. It takes the name of the model. But how to add VMS to model with the specific name? I use the v1.0 API.

    This is my code:

    ReferenceType vmTemplateRef = new ReferenceType();
    vmTemplateRef.setName ("MyNewVM"); This name is ignored. The name of the model is taken!
    vmTemplateRef.setHref (vmRef.getHref ()); reference to the model

    CompositionItemParamType vmItem = new CompositionItemParamType();
    vmItem.setSource (vmTemplateRef);

    create the type params VAPP recompose.
    RecomposeVAppParamsType recomposeVAppParamsType = new RecomposeVAppParamsType();
    recomposeVAppParamsType.setName (vAppRef.getName ()); The name of vApp. It is ok.

    added the element of the virtual machine.
    The newItems < CompositionItemParamType > recomposeVAppParamsType = list
    . getItem().
    newItems.add (vmItem);

    Task task = vapp.recomposeVapp (recomposeVAppParamsType);

    Thank you

    Hello

    For after this code fragment:

    vmTemplateRef.setName ("MyNewVM"); This name is ignored. The name of the model is taken!

    The model name is ignored because vmTemplateRef is the only reference to the object that will be used for the operation of recomposition. If changing the name it will be always ignored.

    I think that changing the name of the virtual machine template for recompose cannot be done as follows:

    (1) operation recomposeVApp().

    (2) get the recomposed VAPP

    (3) download the children-> VM you want to change.

    (4) change the name of the virtual computer.

    I hope this helps!

  • Deployment of final application with the command line Question

    OK so I have my finished application.

    on a folder in my office called "CODBOUG".

    So I tried different methods to run the application and complete the test on the Simulator with the command line. But it's just too much. So I need your help community!

    I tried:

    BlackBerry-deploy-installApp-package CallofDutyBlackOpsUltimateG

    uide.bar - device 192.168.18.128

    I'm a little lost with the help of the command line, if someone could guide me on the right lane.

    I'm on windows, btw.

    Thank you.

    When you run a command, Windows will search in a series of directories for this program to run. The list of directories is stored in what is called an environment variable. You must add the path to the bin of the sdk at this variable directory (e.g. C:\Program Files (x 86) \Adobe\Adobe Flash Builder Burrito\sdks\blackberry-tablet-sdk-0.9.3\bin).

    You can access the path variable by right-clicking on my computer > properties. Select the Advanced tab and click on approx. Variables.

    Under System Variables, search PATH and edit it. Add the path to the sdk bin directory (make sure that there is a semicolon, that separates the directories).

    Open a command line window in the directory where your .bar file. When you run the command, Windows will look for blackberry - deploy and can be found in the directory that you have added to your PATH variable so to run it.

  • 'For' the command line in the file Tab does not work in Task Scheduler

    I am able to do my work of script .bat with 'echo' and 'set' command in the file lines beats using raykor suggestion to put the .bat file in program/script and put the path in the field "start in". However, 'for' command line stops all other lines in order to run.  Please see the below script. Please help how to do the command line 'for' to work. I need to add the date and time for the name of the file/folder to keep track of a copy of the file on each day. This script works perfectly when I run a line by line at a time on the CMD command prompt. He copied the files and folders and gave me the date and time and concatenated to the name of the file/folder. The first 2 lines do not work. If I delete the first 2 lines, it works fine.

    for /f "Tokens = 1, 2, 3, 4 * Delims = /" %i IN ('date/t'), set dt = %i %k %%j
    for /f "Tokens = 1, 2 *" %i in (' / time t ") set tm = - %i %j
    Set tm = % tm: =-%
    set the TNT = % dt % % tm
    echo copy backup set: % of DTT.
    ECHO please wait...
    Robocopy s:\data2 d:\testBackup\data2 /e /mir /np /tee /log:"c:\users\myusername\desktop\backup_log.txt.
    echo of finishing.

    Hello

    I apologize for the delay in responding to this post.

    The query is better suited in the following TechNet Forum, asking to view the query to get a solution to this problem.

    http://social.technet.Microsoft.com/forums/en-us/home?Forum=iTCG

  • OsCustomizationSpec and OSCustomizationNicMapping they are a good way to set up the new virtual machine for the model

    I build a script to generate auto magicly VM when I have import information from a csv file. I have the latest PowerCli, I am trying to build servers r2 Sever 2012 model.  I tried several OsCustomizationSpec (OCS) of in the hope of getting something to work, but I had no luck so far.  In VCenter, it shows that it applies the OCS, but is not apear to have an impact on the server.  I have disabled UAC since the last time that I tried it so maybe that will make a difference.  I am under ESXi 5.1 update 2, just to try to give all the necessary information.  Ideally, I'd like Sysprep, the value of intellectual property, change the computer name and join the server to the domain.  That's all! lol I have the book "VMware vSphere PowerCLI Reffernece, automating vSphere Administration, I walked through step by step.  The new version of PowerCli seems not have the x 86 limitation as earlier versions of PowerCli.  I tried so many different things, I'm not sure what to put in place as a starting point.

    # Save the object credentials with permission to join the domain.
    $DomainCredentials = get-Credential "domain\testername."
    # Clone our Spec by adding the domain information.
    $Spec = get-OSCustomizationSpec "Windows Server 2012 R2"
    $Spec += get-OSCustomizationNicMapping - Spec $Spec
    #$Spec | Select *.

    # Get our VM
    # Change network settings
    Get - VM BigServername | Get-NetworkAdapter | Together-NetworkAdapter - NetworkName nic - 172.16.25 - VLAN225 - connected: $true '
    -Confirm: $false | out-null
    # Close the comments to make change.
    Stop-VMGuest - VM $VM - confirm: $false | out-null
    # Wait while feedback stops
    While ($vm. ExtensionData.Runtime.PowerState - not "poweredOff")
    {
    Start-Sleep - seconds 1
    $vm. ExtensionData.UpdateViewData ('Runtime.PowerState')
    }
    # Apply Spec customization to apply the new network settings
    Get - VM "BigServername" |
    Set-VM - OSCustomizationSpec "R2 Windows Server 2012" - confirm: $false |
    Start-VM

    I can rebuild the model, or something else, we must do this work.

    OR - is simply not the best way to configure the VM?  If not, what Sysprep?

    Good news, but first, I would really like to know where the log files are on which server to the OsCustomization process.

    I decided to reverse engineer and create a CSOS within vCeneter and once I got to work, I kept creating new CSO via PowerCli until I could get that to work, create a new virtual machine.  Once I got this to work, I have tryied to apply on a cloned vm, with no parameters. I got it works too.  I tried to go back to my original image, but I couldn't get this to work.  Something's wrong with this picture.  He wrath that the problem was related to the permissions on the local client.

    New OSCustomizationSpec - OrgName company OSType - Windows - ChangeSid-Server "vcenter.dom.com" - name PowerCliOnly4 - persistent administrator-Type FullName - AdminPassword! password123 - zone "Eastern (USA and Canada)" AutoLogonCount - 3 - domain dom dadmin - DomainUsername - DomainPassword! password123 NamingScheme - vm-Description "PowerCli Use only" - confirm: $false

    Get-OSCustomizationNicMapping - OSCustomizationSpec PowerCliOnly4 | Game-OSCustomizationNicMapping - Position 1 - IpMode UseStaticIP - IpAddress 10.10.10.98 - 255.255.255.0 - DefaultGateway 10.10.10.1 Dns subnet - mask "10.10.10.10","10.10.10.11" "-confirm: $false

    This seems to be very picky.  Because the area is one of the parameters, you cannot put it in the DomainUsername, no dom\dadmin. The part that I really want to know how to get more, is what happens if your vm has a different local administrator as the administrator account.  It turns out that FullName - is not the account that it to connect locally with tires. When I created the vCenter Medtronic Chondroitin, I put 'me' in the name and information of the Organization and that's what was settled in the FullName property:

    Name: PowerCliOnlyM
    Type: persistent
    ServerId: /VIServer = dom\[email protected]: 443.
    Server: vcenter.dom.com
    LastUpdate: 24/09/2014 13:33:19
    DomainAdminUsername: dadmin NO dom/dadmin here!
    DomainUsername: dadmin
    Description: PowerCli use only, done manually in vCenter.
    AutoLogonCount: 3
    ChangeSid: true
    DeleteAccounts: false
    DnsServer:
    DnsSuffix:
    Domain: vsi
    Full name: me
    GuiRunOnce:
    NamingPrefix:
    NamingScheme: Vm
    OrgName: CompanyTU
    OSType: Windows
    ProductKey:
    Time zone: (USA and Canada)
    Working Group:
    LicenseMode: NotSpecified
    LicenseMaxConnections:
    EncryptionKey: {-126, 3, 48, 108...}
    ExtensionData: VMware.Vim.CustomizationSpecItem
    ID: PowerCliOnlyM
    UID: /VIServer = vsi\[email protected]: 443/OSCustomizationSpec = PowerCliOnlyM /.
    Client: VMware.VimAutomation.ViCore.Impl.V1.VimClient
    AdminPassword: w
    DomainAdminPassword: N
    DomainPassword: N

    DNS: {10.10.10.10, 10.10.10.11}
    Wins                  :
    SpecId: PowerCliOnlyM
    Spec: PowerCliOnlyM
    SpecType: persistent
    NetworkAdapterMac:
    Position: 1
    IPMode: UseStaticIP
    IP address: 10.10.10.98
    Subnet mask: 255.255.255.0
    DefaultGateway: 10.10.10.1
    AlternateGateway:
    VCApplicationArgument:
    ID: /VIServer = dom\[email protected]: 443/OSCustomizationNicMapping = OSCustomizationNicMappingImpl-PowerCliOnlyM-persistent-1.
    UID: /VIServer = dom\[email protected]: 443/OSCustomizationNicMapping = OSCustomizationNicMappingImpl-PowerCliOnlyM-persistent-1.
    ExtensionData: VMware.Vim.CustomizationAdapterMapping
    Client: VMware.VimAutomation.ViCore.Impl.V1.VimClient
    Version: 1

    I think that it is good to know that the virtual machine reboot 4 or 5 times as it goes through this process.  It breaks is you try and do something for the virtual machine that interrupt the process.  I don't know that I'll think more questions in a second.

    In addition, it cost he had some problems with the put between quotation marks, single or double around the password, but I did not check this again, I just know that once I took them, he began to work.  I ran on other issues while testing as I was using a single IP address, so if I do not disable the test VM, the following would not work because of the conflct network, maybe I shouldn't admit that... lol

  • How to make Virtual Machines for the username or profile?

    We have a laboratory of about 25 computers and a Dell 8925 Blade Server in the back running Esxi 5.0. I installed on each workstation client vSphere and have implemented several usernames for students. Everyone can connect to client vSphere very well of their workstations. The question I have is that if a user creates a virtual, any computer user who connects the vSphere client can see, navigate and edit this VM. I'm looking for a way to make the profile of the specific virtual machine, so that users can only see and access the virtual machines that they have created. Is this possible with the vSphere Hypervisor or should I buy a different package?

    My mistake, I was thinking about a licensed copy of vSphere with vCenter. In your case, the permissions must be set on the individual virtual machines.

    Click a virtual machine > permissions tab > add users

    If you want to use Active Directory authentication rather than accounts of the local host, you can go to

    Click Home > Configuration > Authentication Services

    And establish a relationship with your domain. You can then apply ad users/groups to the VM permissions.

    See you soon

  • I can't create a new virtual machine, for the error "invalid state" of vmware

    Hi, I have an esx server with some production virtual machines vmware;

    Yestarday I made a new VM, suse linux, froma cdrom; but the file system broke down, it has been altered, I don't know why,

    and I had to cancel the machine using the "remove disc";

    After that I could read "a system general error occurred" and when I click on create a new virtual machine (ctrl + n), I can't because the answer is "invalid state".

    When I click on each virtual machine in 'events', I do not see the logs, I see this error "system general error occurred.

    can someone help me? , should I restart the service mgmt-vmware?  (init.d) on the host server?

    Thanks in advance, best regards

    Toscano Max

    If you use Virtual Center, rebbot VC server and try again. If this does not work, you may have to restart the ESX host.

  • Cannot download the files of the virtual machine for the data store

    Hello

    I get an error message "connection to the server timed out" while I'm trying to download the files from the virtual computer from the data store.

    Although the ESX and my laptop are on the same network, I get this error message.

    Please let me know if I need to take care of something.

    Thank you.

    I think that hard & .vsmp be used & locked is why you are unable to download it. Try to download the file, whereas the VMs system is turned off

    vcbMC - 1.0.6 Beta

    Lite vcbMC - 1.0.7

    http://www.no-x.org

  • Need help to remove the files of the United Nations necessary for the command line

    Original title: DELETING FILES

    I have a large amount of support .png files that have been placed on my C:\ drive, by some malicious programs or the system.  Whatever it is, I want to remove them because they take a disproportionate amount of space (about 25 GB to an indicative value).  They are in a sub-sub-sub etc directory and appear to be copies of random images as advertisements for computers, cars, soccer players and goodness knows what else, since every time I try to see, explore stops at halfway through, due to the large amount of files.

    So my question is: is there a way to delete these files without the help of Windows Explorer, for example by using a command line? or is there another utility of file management that I could use?

    I would appreciate help on this.

    Start > type CMD

    Right click on CMD and select run as administrator

    You type the command DEl as written in the link I mentioned earlier.  Just make sure that you type the location of the file and names as you see them on your system.

    This is another article about the MS BACK Del command

    http://www.computerhope.com/delhlp.htm

    Edit: This may be temporary files from Web pages, that you have seen.  Try this before you use the DEL command.

    Tools > Internet Options > general tab

    Click on delete

    Uncheck data Preserve favorite

    Check all the other available options

    Click on delete

    Windows will remove these temporary files

    Click Ok

    Then, go to start > my computer

    Select the C drive

    In search type *.tmp

    This is more temporary files stored on the computer

    Press Ctrl + A to select

    Press DELETE to remove all the

    You may receive a message file is in use, press on ignore

    Empty folder cookies as well - C:\Users\username\cookies

    Do not delete the file; all content

    I forgot to add.  Once you type the command del, press ENTER to execute it.

  • When the shared program files to remote machines using the command line it shows in the 'c' drive volume has no label

    Considered system 2A & b... I need write access to the Program Files directory of computer remote (B) (a)... trying to create a file or folder.
    using command line.

    Hi kesavarajm,

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet forum.

    http://social.technet.Microsoft.com/forums/en/itproxpsp/threads

Maybe you are looking for