Help for a demo: create multiple virtual machines

Hello

I am a beginner in vCO, I completed the installation and configuration with success and I started to create workflows, but I guess that I need help with an example that I started yesterday:

I am creating several virtual machines at the same time, I mean all the user have to do is say how VMs, he wants to be created and the workflow must do the rest, but I don't know what is the best way to do so, in the present workflow in the library , find us only 'create simple VM' so I added a few scriptable tasks to this workflow, but still can't do what I want.

Any solution plese? or a few best practices to perform this type of workflow? Maybe I missed a workflow can create multiple virtual machines with different names but the same configuration.

Thanks in advance,

This can help out you.

Tags: VMware

Similar Questions

  • Script to create multiple virtual machines model works is not for the network adapter variable

    We are working on a script to create multiple virtual machines from a template. The script works fine, but when we try to include commands to set the NIC to a group of specific ports on a dvswitch script errors on. Here's what we have so far. This script (less network variables) works, but we would like to include the network configs in the script as well.

    -------------------

    This is the part of the script that configures the network/dvswitch adapter... but does not work properly.

    $myResourcePool = get-ResourcePool-name DQOL

    $dsName = get-Datastore-name "DQOL-DS01.

    $myTemplate = get-Template-name "DQVTemplate".

    $distributedSwitchPortGroup = get-VirtualSwitch-distributed - name "CVE-dvS04-Nexus - k 5 | Get-VirtualPortGroup-name '979-DQ-SHARED '.

    New-VM-name MyVM1-model $myTemplate - Networkname ResourcePool - $myResourcePool - OSCustomizationSpec $mySpecification $distributedSwitchPortGroup - Datastore

    (Get-$dsName data store)

    New-VM-name MyVM2-model $myTemplate - ResourcePool $myResourcePool - OSCustomizationSpec $mySpecification - Datastore (Get-$dsName data store)

    _____________________

    !!!!!!!  This part works, but without specifying a network/dvswitch... card!

    $myResourcePool = get-ResourcePool-name DQOL

    $dsName = get-Datastore-name "CVE-SAN-ISG-DS02-02ef.

    $myTemplate = get-Template-name "DQVTemplate".

    New-VM-name MyVM3-model $myTemplate - ResourcePool $myResourcePool - OSCustomizationSpec $mySpecification - Datastore (Get-$dsName data store)

    New-VM-name MyVM4-model $myTemplate - ResourcePool $myResourcePool - OSCustomizationSpec $mySpecification - Datastore (Get-$dsName data store)

    Here is the error we get:

    New-VM: all parameters can be resolved by using the specified named parameters.

    C:\Users\capuanoj\Desktop\Create-multiplevms-fromtemplate.ps1:6 char: 7

    + New-VM < < < <-name MyVM1-model $myTemplate - Networkname $distributedSwitchPortGroup - ResourcePool

    ePool - OSCustomizationSpec $mySpecification - Datastore (Get-$dsName data store)

    + CategoryInfo: InvalidArgument: (:)) [new-VM], ParameterBindingException)

    + FullyQualifiedErrorId: AmbiguousParameterSet, VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM

    You cannot use the - model and Networkname - parameters of the cmdlet New - VM in a single order, because both are in different parameter sets. You must first create the virtual machine and then use the cmdlet Set-NetworkAdapter to change the portgroup of the virtual machine. As in example 4, assistance from cmdlet Set-NIC:

    --------------  Example 4 --------------

    C:\PS>$myNetworkAdapters = Get - VM | Get-NetworkAdapter-name "NIC 1.
    $myVDPortGroup = get-VDPortgroup-name MyVDPortGroup
    Together-NetworkAdapter NetworkAdapter - $myNetworkAdapters - $myVDPortGroup Portgroup

    Retrieves all network named "NIC 1" cards of all virtual machines and connects to the specified distributed port group.

  • Create multiple virtual machines with 2 network cards

    Hey guys -.

    Been researching some scripts of difference but did not find one who will help me in my situation.

    I'm looking for a script that will allow me to clone model and apply network settings to 2 network cards.

    1 clone Vms + 20 model

    2 Let me send it to a particular lun (using a few LUNS to available)

    3. choose a custom unique specification

    4. apply intellectual property on 2 NICs (primary and backup).

    Any help would be sincerely appreciated.

    Thank you

    Sorry to lose this thread out of my sight.

    What follows is an attempt to meet all the conditions you listed.

    $numberOfVM = 20$baseVMName = "VM"$templateName = "Template"$osCustName = "MyCust"$IPBase1 = "192.168.1."$IPBase2 = "192.168.2."$IPMask = "255.255.255.0"$IPGate1 = "192.168.1.254"$IPGate2 = "192.168.2.254"$IPDns1 = "192.168.1.100"$IPDns2 = "192.168.2.100"
    
    # Target resourcepool$resPool = Get-ResourcePool -Name Resources
    
    # Get the template$template = Get-Template -Name $templateName
    
    # Create a copy of the OS Customisation SpecTry {    Get-OSCustomizationSpec -Name tempOSCust |    Remove-OSCustomizationSpec -Confirm:$false -ErrorAction Stop}Catch {}
    
    $osCust = Get-OSCustomizationSpec -Name $osCustName |     New-OSCustomizationSpec -Name tempOSCust -Type NonPersistent
    
    # Clone the number of requested VM1..$numberOfVm | %{    # Find the datastore with the most free space    $ds = Get-Datastore | Sort-Object -Property FreeSpaceGB -Descending |        Select -First 1
    
        # Update the OS Customisation Spec NIC parts with the IP addresses    Get-OSCustomizationNicMapping -OSCustomizationSpec $osCust |    Set-OSCustomizationNicMapping -Position 1 -IpMode UseStaticIP -IpAddress "$IPBase1$_" `        -SubnetMask $IPMask -DefaultGateway $IPGate1 -Dns $IPDns1 -ErrorAction SilentlyContinue | Out-Null
    
        Get-OSCustomizationNicMapping -OSCustomizationSpec $osCust |    Set-OSCustomizationNicMapping -Position 2 -IpMode UseStaticIP -IpAddress "$IPBase2$_" `        -SubnetMask $IPMask -DefaultGateway $IPGate2 -Dns $IPDns2 -ErrorAction SilentlyContinue | Out-Null
    
        # Create the new VM    New-VM -Name "$baseVMName$_" -Template $template -OSCustomizationSpec $osCust `        -Datastore $ds -ResourcePool $resPool  | Out-Null}
    

    The script will create clones of $numberOfVM of the model. The virtual machines will be created at the root of the bunch, and they will be called VM1, VM2...

    The OSCustomizationSpec needs to exist and must have 2 network cards.

    The script finds the data store with more free space to create each virtual computer.

    Addresses IP of NIC are consecutive, for example on NIC1 you get 192.168.1.1, 192.168.1.2... and so on.

    Let me know if you have any questions.

  • vCO workflow: create a virtual machine from a model and then ask the user about the CPU, memory size...

    Hi guys,.

    I am trying to create a workflow with vCO that can do the job for me:

    -Create a virtual machine (or maybe a several virtual machines) from a model (the model is in vCenter, of course)

    -L' user who is running the workflow has the thr right to say what he wants for the CPU, the memorysize, the disksize

    Any help?

    I found some workflows in the library can seem to do something similar to what I want, but since I'm a beginner I'd rather have your advice

    Hello there and welcome to vCenter Orchestrator

    Take a look at this series of tutorials to get an idea of how start:

    Create a vCO simple self-service VM Provisioning Portal - part 1

    Create a vCO simple self-service VM Provisioning Portal - part 2

    Create a Simple Self Service VM Provisioning Portal vCO - part 3

    The general approach to take would be to determine which of the clone (or clone and customize) workflows adapts to your nearest need (see your customer vCO: workflows\Library\vCenter\Virtual Machine management\Clone\)

    Then, create a NEW WORKFLOW that calls this one... after that your clone operation is complete, keep the computer turned off virtual and add feeds of extra work from the library to your new workflow that do things like change the amount of Ram, adds disks, change CPU, etc...

    Be sure to watch the videos on http://www.vmwarelearning.com/orchestrator to get a basic understanding of the use of vCO.

  • Create several virtual machines from a

    Is it possible to create multiple virtual machines a build? I have a 2008 R2 vm. instead of having to rebuild the whole system from scratch is there a way to make a template or something to create several virtual machines a build? I am using vcenter 5 and I have 2 servers esxi 5.

    You can create a template by right-clicking the virtual machine and choose Clone to the model and give the datstore where you want to save after that you will have a model using this model to deploy the virtual machine using Customization Wizard.

  • Stop/start multiple virtual machines with names created automatically

    Hi all

    in my test environment, I want to stop or start multiple virtual machines via the script.

    Their name is always like this:

    'vm-100-qa', 'vm-101-qa","vm-100-qa","vm-102-qa '...

    Now I would like to just stop every VM 'vm-140-QA' to 'vm-160-qa.

    I created a table "$a = 140.160", but I don't know how to implement this in a script 'Shutdown-VMGuest-comments '.... »

    Sorry for this stupid question. I am a beginner absolute powershell.

    Thank you very much in advance,

    Petrie

    You can do something like this

    140..160 | %{   Shutdown-VMGuest -VM "vm-$_-qa"}
    
  • Creating a virtual machine for Linux guest in another HARD drive

    Hi all

    I have Vmware Workstation 8.0 on windows 7 x 64. This window is installed in the primary SSD (Sata port 0), also its mbr. I also have a Linux Ubuntu Natty x 64 in my HDD (Sata port 1) with Grub installed on the HARD drive. So when I go to start my SDD just windows when I want linux, simply go to the HARD drive.

    I tried to create a virtual machine to access the linux (using the physical disk, persistent writing) as a guest during the use of windows as a host, but so far had no success. Just to easy access to linux.

    I get the message of follow-up:

    Untitled.jpg

    The configuration for this virtual machine as follows:

    Untitled.jpg

    Intel Virtualization is enabled in my BIOS.

    My specs are:

    ProcessorProcessor Intel® Core™ i7 2630QM
    ChipsetIntel® HM65 Express Chipset

    8 GB DDR3 1333 MHz SDRAM

    NVIDIA® GeForce® GTX 460M 1.5 GB GDDR5 VRAM

    OCZ Vertex 3 128 GB SDD

    Western Digital 640 GB HARD drive

    Could someone help me?

    try to use "fullDevice" instead of "partitionedDevice" when you add the physical disk.

    It may also be necessary to put the disk status 'offline '.

    This worked in WS before 7?

    You can reach the vmware.log?

  • Single VMDK for multiple virtual machines in esx3.5?

    Hello

    Is it possible to use a single VMDK to host several VM in ESX3.5 or is this feature on the way?  I think the vmware view tech that allows you to host multiple virtual machines to a single image and store only the deltas for VMS replca.

    We organize several ts who are about 12 GB per image, and each server is essentially the same.  It would reduce the space if these could be consolidated at the level of vmware.

    Thank you very much.

    What you are referring to the notion of linked Clones, it's something completely different to share a single VMDK.  with linked clones, you actually run mulitple copies of a single Machine.  This fuinctionality is not available in ESX Raw but is a characteristic of Lab Manager and VMware View Premium.

    If you have found this device or any other answer useful please consider useful or correct buttons using attribute points

    Tom Howarth

    VMware communities user moderator

    Blog: www.planetvm.net

  • I need help to create a virtual machine - I am new to virtualization.

    Hello

    I am new to virtualization and I chose the merger.  I have a hard drive from a Dell died in a USB enclosure.  I have also the XP restore disks.  Can I create a virtual machine from this? Converter?

    Hello

    No, you can't legally. Your Windows XP has an OEM license that connects the OS for the DELL died. If you ask MS then the Windows operating system died with the DELL...

    Is this fair? Not IF you ask me. Can you work around it? Maybe... but its going to be a long and painful process.

    Restore XP disks have the same problem... basically... you can always try it, but I fear that you will not be able to activate the operating system because it is related to DELL hardware.

    You will need a version of windows not OEM to install on the merger (or any other virtualization product, this is a Microsoft limitation, not a virtualization)

    --

    Wil

    _____________________________________________________

    Visit the new VMware developers at http://www.vi-toolkit.com wiki

  • can not clone or create a virtual machine for vsandatastore

    Hi all

    I try to clone a virtual machine to vsandatastore. But I get the follow error:

    -> policy requires 2 replicas with discs 1 each with 0 bytes free each. Only found 0 these records.

    -> failed to create the object:

    The hardware configuration is:

    I/o Controller: LSI SAS9271-8i

    HARD DRIVE: ST91000640SS

    SSD:Intel SSSDSC2BA400G3

    10GE: Intel 82599

    When I create a virtual machine or create a file vsandatestore on the web client. I also see the same error.

    Could someone give me some suggestions? I do not know how to solve this problem.


    Thank you!

    > Policy requires 2 replicas with discs 1 each with 0 bytes free each. Only found 0 these records

    This means that all three nodes in the cluster is not participating in the storage. Check if all 3 nodes have at least 1 diskgroup and contributing to the storage

    default vsan strategy is 1 failure to tolerate what creates two replicas. so that you can either ensure that all 3 nodes have at least 1 diskgroup or create a vm storage policy replacing the default values

    Thank you

  • Virtual PC - create new virtual machine snap into button appears not

    I installed virtual PC and having the image in XP mode works on Win 7 64 bit on a Dell Optiplex 990 i5 processor.  However when I choose the Manager of Windows Virtual PC and the Windows Explorer window opens, I see not the option create a virtual machine, just 'burn' where it should be.

    I tried to activate windows 7 aero UI think the classic look of windows blocked somehow but that has no effect.

    I tried to reinstall the configuration of virtual machine directly on the site but it gives me the message that there is not suitable for use.  I tried uninstalled and re - install, but get the same when the Explorer window is missing the snap.

    How can I get the snap in option seem to create a virtual drive?  The window appears with the title of Virtual Machines.

    Once again, the image in XP mode work properly and starts and stops without any problem.

    Hi NSmith,

    It is better suited for the IT Pro TechNet public. Please post your question in theTechNet Support Forum. You can follow the link to your question:
    http://social.technet.Microsoft.com/forums/en/w7itprovirt/threads

    I hope it helps. If you have problems in the future, please let us know. We will be happy to help you.

  • Is it Possible to access only bypassed FC HBA to multiple virtual machines

    Hello

    I have a FC HBA on my 5.5 ESX. Server. It does not support the function of SR - IOV. Is it possible to access this FC HBA across multiple virtual machines?

    If possible, please provide as follows to go further.

    Kind regards

    Aashish

    It is not possible. The basic material underlying PCI specification does not have a single shared between several independent operating systems PCI device.

    SR - IOV solves by creating the virtual function peripheral PCI, but as you mentioned, that he can't stand not and first of all, ESXi supports that SR - IOV for Ethernet network devices and not for native FC HBA (excluded FCoE) functions.

  • Cannot create a Virtual Machine

    Hello

    I'm using VMware Workstation 10 and there seems to be a huge issue here. I can't create a Virtual Machine. After completing the Wizard "create a new virtual machine", it seems to be to do nothing. I even tried to open the .vmx file in the Documents folder itself. No matter what I do, don't open the virtual machine. I think that its not to be created in the first place.

    I am all the normal stages and have hardware virtualization enabled in BIOS. Oh, and I checked to see if Virtual Box is running, and it works well. The problem seems to be that in VMware Workstation. Can someone please help me on this? I posted pictures of the screenshot of what records looks like at the end of the wizard.

    vm folder.jpg

    windows 7 vm folder.jpg

    I solved it. It turns out that I was using incompatible software - Windows7FirewallControl by Sphinx-Soft. He created trouble for VMWare even after allowing it through the firewall.

  • Deploy multiple virtual machines simultaneously

    Hello

    I'm trying to deploy multiple virtual machines at the same time using powercli.  I think I have has the switch - RunAsynch, howerver, this doesn't seem to work, instead of that virtual machines are deployed one at a time.  Here is my code:

    SE connect-VIServer-Server vc1. MYDOMAIN.local - user MYDOMAIN\MYACCOUNT-password MYPASSWORD

    New-vm - vmhost prodh1. MYDOMAIN.local - name of TEST - SVR01 - model W2K8R2SP1 - IOMEGA data store - OSCustomizationspec-W2K8R2SP1-_Tobedeleted location | Start-VM - RunAsync

    New-vm - vmhost prodh1. MYDOMAIN.local - name of TEST - SVR02 - W2K8R2SP1 - IOMEGA data store model - OSCustomizationspec-W2K8R2SP1-_Tobedeleted location | Start-VM - RunAsync

    New-vm - vmhost prodh1. MYDOMAIN.local - name of TEST - SVR03 - W2K8R2SP1 - IOMEGA data store model - OSCustomizationspec-W2K8R2SP1-_Tobedeleted location | Start-VM - RunAsync

    New-vm - vmhost prodh1. MYDOMAIN.local - name of TEST - SVR04 - W2K8R2SP1 - IOMEGA data store model - OSCustomizationspec-W2K8R2SP1-_Tobedeleted location | Start-VM - RunAsync

    Start-Sleep - seconds 300

    Get - vm "TEST-SVR01 | Get-VMGuestNetworkInterface Guestuser - administrator - GuestPassword "MYPASSWORD" |? {$_.name - eq "Connect to network Local 3"} | Game-vmguestnetworkinterface administrator - Guestuser - GuestPassword "MYPASSWORD" - IPPolicy - 192.168.1.25 static IP - Netmask 255.255.255.0 - Gateway 192.168.1.1 DNS - 192.168.1.2,192.168.1.3 - RunAsync

    Get - vm "TEST-SVR02 | Get-VMGuestNetworkInterface Guestuser - administrator - GuestPassword "MYPASSWORD" |? {$_.name - eq "Connect to network Local 3"} | Game-vmguestnetworkinterface administrator - Guestuser - GuestPassword "MYPASSWORD" - IPPolicy - 192.168.1.25 static IP - Netmask 255.255.255.0 - Gateway 192.168.1.1 DNS - 192.168.1.2,192.168.1.3 - RunAsync

    Get - vm "TEST-SVR03 | Get-VMGuestNetworkInterface Guestuser - administrator - GuestPassword "MYPASSWORD" |? {$_.name - eq "Connect to network Local 3"} | Game-vmguestnetworkinterface administrator - Guestuser - GuestPassword "MYPASSWORD" - IPPolicy - 192.168.1.25 static IP - Netmask 255.255.255.0 - Gateway 192.168.1.1 DNS - 192.168.1.2,192.168.1.3 - RunAsync

    Get - vm "TEST-SVR04 | Get-VMGuestNetworkInterface Guestuser - administrator - GuestPassword "MYPASSWORD" |? {$_.name - eq "Connect to network Local 3"} | Game-vmguestnetworkinterface administrator - Guestuser - GuestPassword "MYPASSWORD" - IPPolicy - 192.168.1.25 static IP - Netmask 255.255.255.0 - Gateway 192.168.1.1 DNS - 192.168.1.2,192.168.1.3 - RunAsync

    Get-NetworkAdapter "TEST-SVR01 | Together-NetworkAdapter - NetworkName VM1-confirm: $false

    Get-NetworkAdapter "TEST-SVR02 | Together-NetworkAdapter - NetworkName VM1-confirm: $false

    Get-NetworkAdapter "TEST-SVR03 | Together-NetworkAdapter - NetworkName VM1-confirm: $false

    Get-NetworkAdapter "TEST-SVR04 | Together-NetworkAdapter - NetworkName VM1-confirm: $false

    If anyone can help?

    Thank you

    Duncan.

    Yes, you are right.

    By specifying the param -VM (Get - VM $modelVM) , you create the new virtual machine from an existing one.

    Just change the cmdlet New - VM settings according to your needs and let the VM - far.

    It creates your virtual machines based on a template and specification of customization.

    $esxName = "prodh1.MYDOMAIN.local"
    $template = "W2K8R2SP1"
    $datastore = "IOMEGA"
    $newVmList = "TEST-SRV01", "TEST-SRV02", "TEST-SRV03", "TEST-SRV04"
    $custSpec = "W2K8R2SP1"
    $location = "_Tobedeleted"
    $taskTab = @{}
    
    # Create all the VMs specified in $newVmList
    foreach($Name in $newVmList) {
         $taskTab[(New-VM -Name $Name -VMHost (Get-VMHost -Name $esxName) -Template $template -Datastore $datastore -OSCustomizationSpec $custSpec -Location $location -RunAsync).Id] = $Name
    }
    

    Of course, you can write it as before. You will need to only change the $newVmList variable in the original script.

    foreach($Name in $newVmList) {
         $taskTab[(New-VM -Name $Name -VMHost "prodh1.MYDOMAIN.local" -Template" W2K8R2SP1" -Datastore" IOMEGA" -OSCustomizationSpec "W2K8R2SP1" -Location "_Tobedeleted" -RunAsync).Id] = $Name
    }
    

    You will also need to insert the remaining part with the while loop and the customizations in your network!

    http://www.lucd.info/2010/02/21/about-async-tasks-the-get-task-cmdlet-and-a-hash-table/

    Concerning

    Emanuel

  • What is the advantage to affect multiple virtual machines in a data store?

    Hello

    Quite a question stupid and basic, but I can't answer . What is the advantage of having multiple virtual machines in a store of VMFS data instead of having each VM in another VMFS data store? (eg. 3 VMs in 1 data store or 3 data warehouses and each virtual machine in one of them). I can only think about the ease of management for storage administrator because it creates only a single large LUN.

    Thank you

    By allowing multiple virtual machines in a data store, you can run more than 256 virtual machines in a DRS cluster.

    As a host has a limit of 256 scsi identification numbers, which means that it accesses no more than 255 LUNS shared. 1 scsi ID is used for local storage.

    In a DRS cluster as each host must be mapped to the same data warehouses to ensure that virtual machines can be moved on the cluster and run on any of the hosts.

    Now in my life as an architect VMware PSO I saw that a lot of virtual machines that require a single data store. The main reason to isolate a virtual machine on a data store must provide sufficient i/o performance. This can be achieved with other solutions than to isolate a virtual machine on a data store. Having a properly architected storage subsystem is crucial, vSphere can get out of a very large number of the IOPS / s. With technologies such as SIOC and DRS for storage, you can check that the virtual machines receive IO performance according to the needs.

Maybe you are looking for