Creation of the virtual machine on a cluster using the vmcreate.pl script

Hello

I checked a few posts on this forum on how to create the virtual machine through vmcreate.pl, but responses was not so clear to me...

These are the topics I've read:

Create a VM on the Cluster instance

How to configure the managed object HostSystem

So, I would like to create a virtual machine on a Cluster, and not on a specific host. The vmcreate.pl script would have done the job? Or should I change it?

In the topic = > VM create instance on Cluster I did not quite get, what I need to change...

That's what I do:

vmcreate.pl - server 'ESX NAME' - username "LOGIN" - password 'PASS' filename - vmcreate.xml - schema vmcreate.xsd


Result:

Creation of the 'myTestMachine ': VM error

SOAP fault:

-----------

Error string: InvalidArgument

The fault detail: InvalidArgument

Here are the values of the XML file:

< name > myTestMachine < / name >

blah < Home > < / Host >

blah < Center > < / Center >

> Guest Id < Linioch < / comment-Id >

blah < Datastore > < / Datastore >

< > 2048 Disksize < / Disksize >

> 256 MB memory < < / memory >

< processor number > 1 < / number processor >

< Nic-network > < / Nic-network >

< Nic-Poweron > 1 < / Nic-Poweron >

The values are correct the cause I checked the other perl scripts.

Thanks in advance for your help

Michal

Thanks to xyz222 for the user and post Re: instance of VM to create the Cluster

I was able at the end of the problem. So simple... The value of the in the xml file should be for example "rhel6_64Guest" and not a random word... that's all!

sudo./vmcreate.pl--serveur SERVER - LOGIN - password PASS - filename... username/SampleData/vmcreate.xml - schema... /Schema/vmcreate.xsd

Successfully created the virtual machine: 'teeest2' under host HOST_NAME

Tags: VMware

Similar Questions

  • Get use of the resources of all virtual machines in a cluster

    Hello

    I have developed a measure of capacity management report that collects all the use of the resources of the virtual machines in a datacenter. The function that collects it looks like this:

    def hostMemoryConsumed =]

    def memoryConsumed = 0.0f

    def memoryGranted = 0.0f

    VMs. each() {}

    VM->

    try {}

    memoryConsumed += vm.host.memory.consumed.current.average / 1024.0f<----- how="" to="" do="" this="" to="" get="" from="">

    memoryGranted += vm.host.memory.capacity.current.average / 1024.0f

    }

    {} catch (NullPointerException e)

    }

    VMS is a function of type parameter VMS VMW

    The works above for virtual machines in the data center, but I need it to be after cluster. I can find a cluster of virtual machines, but I'm having trouble with referring to specific values for example consumed memory and capacity.

    If I change the type parameter: VMW Cluster how the metric reference would look like (see the try {})?

    I don't think that a query will help me.

    Thanks in advance

    Erik Alm

    If you want to do for a cluster, you can just get the list of virtual machines in a cluster of first and passing in your script.  If you have a function for a VMWCluster you can add a parameter for "vmwCluster" that is underneath and it should give you a table (topologyObjects) that has all the virtual machines in the cluster.

    QS = server.get ("QueryService") / / query Service

    tquery = qs.createStatement("!) (' VMWVirtualMachine where esxServer.parent.name = "+" ' "+ vmwCluster +" "" ") .setQueryTopologyObjects (true);

    topologyObjects = qs.executeStatement (tquery) .getTopologyObjects)

  • Script of PowerCLI to measure the number of host and its virtual machine in each cluster

    Hello

    I'm trying to create a script on regular which gives an output of the host and virtual machine into a cluster of vcenter as below counties.

    Cluster:                                                      VMHost                         VM's

    Cluster01                                                     04                                  15

    cluster02                                                      02                                  35

    Simply using a sample onliner

    Get-VMHost | Select @{N = "Cl"; {E = {Get-Cluster - VMHost $_}} name, @{N = "NumVM"; E={($_ | Get - VM). County}} | Cluster of kind, name

    any ideas? Thanks in advance

    Kind regards

    Subash.

    Try this:

    Get-Cluster | Select Name, @{N="Host Count"; E={($_ | Get-VMHost).Count}},  @{N="VM Count"; E={($_ | Get-VM).Count}}
    
  • How to move the virtual machine from one cluster to another cluster

    How to move the virtual machine from one cluster to another cluster

    If two Clusters are in the same data center, you could do a 'live' migration or vMotion, if that's the case.   If the virtual machine is turned off, it may be migrated regardless of the data center.

  • Is it possible to recover all the virtual machines in a cluster in a single web service call?

    I tried to retrieve the list of all virtual machines in a cluster to a single web service call, but to no avail. It seems that there is no direct web service API to achieve this goal. Alternative options must first recover the hosts or data warehouses in the cluster and then recover virtual machines from there. But still, if anyone has an idea how we can do this please let me know. All help information will be greatly appreciated.

    It is possible, if you use the PropertyCollector.

    (It is usually the answer to questions of the form "Is it possible to retrieve the X in a single web service call").

    Call"propertycollector.retrievecontents:

    http://www.VMware.com/support/developer/VC-SDK/visdk41pubs/ApiReference/vmodl.query.PropertyCollector.html#retrieveContents

    allows you to retrieve a whole bunch of stuff in a single call, which you then have to go through and interpret.

    A snippet of code Java VI is not-really-tested to find virtual machines in a ComputeResource (cluster) is attached.

  • You can edit vmx files on multiple virtual machines in a cluster to allow changes of setting delay start via RCLI or Toolkit VI?

    You can edit vmx files on multiple virtual machines in a cluster to allow changes of setting delay start via RCLI or Toolkit VI? How?

    SAs desire a lead time of 10 seconds through the virtual company composed of several VCs with multiple data centers and clusters.

    Known: we can edit the .vmx file and add: bios.bootDelay = "10000" this adds stunted ms 10000 (10 seconds) when starting

    Known: we may have to re-register or some other mechanism to apply the changes to the start on the VMS settings

    Has anyone tried to make a change of large company to bootDelay on VMS? Any help?

    The script below will do what you want. Have fun.

    -

  • One of the disks of rhe in this virtual machine is already in use by a virtual machine or a snapshot

    Hi all.

    An apologize for my bad English.

    I have 10 VmWare installed on Linux Centos 5.

    I worked with the Windows 7 virtual machine and hang on it.

    Now when I try to run this VM, I get this message:

    "One of rhe in this virtual machine disk is already used by a virtual machine or a snapshot.

    I try to fix it in this way:

    Re: Could not open the hard file. One of the disks in this virtual machine is already in use by a virtual machine or a s...

    mkdir ./clone
    vmware-vdiskmanager -r "Windows 7 x64-000008.vmdk" -t 0 "Windows 7 x64.vmdk"  
    mkdir /backup
    mv *.* ./backup/
    cp ./backup/*vmx ./
    cp ./backup/*vmxf ./
    
    

    But after that, I got the error: "cannot change the power state of VM: can't open ' / * /Windows 7 x 64 - 000008.vmdk.»» The system cannot find the specified file.

    Please, help me to solve the problem.

    Once again apologize for my English :)





    I really don't see what could be causing the problem, except that there are some .lck files in the subdirectory "lock"!

    Anyway, if worry ends snapshots and the current state is what you need, you can follow these steps (which are close to what you have already done) to merge snapshots of virtual disk in and use this virtual disk to the virtual machine:

    • Close VMware Workstation
    • Create a new subdirectory and move the VM files and folders to backup purposes
    • "" since this subdirectory run: vmware-vdiskmanager-r "Windows 7 x 64 - 000008.vmdk" t 1 '... / X64.vmdk of Windows 7 '
    • Copy the .vmx file to the parent directory and edit it as follows:
      scsi0:0.fileName = "Windows 7 x 64 - 000008.vmdk" --> scsi0:0.fileName = "Windows 7 x64.vmdk"

    Now you should be able to start the virtual machine with the cloned virtual disk.

    André

  • Change the host for a virtual machine on a cluster and the host is not in accordance with the attached profile

    Hi all

    I have 02 questions.

    1. we have a cluster which has 02 physical hosts (Host1 and Host2). We have 02 virtual machines on the Cluster. Active DRS on the cluster.

    But the problem is that my 02 VMS are always stays on a Host2. A few weeks ago, each virtual machine carried out on each host. How can I place each virtual machine on each host to perform better.

    How to do this?

    2. I connect to the cluster using vSphere client 5.1, under summer host, I get the following message

    "Configuration problems: host is not in accordance with the attached profile.

    I suspect that this is the case for my question 1?

    Thank you very much

    Hello

    I think I found the answer for the problem of home profile. I changed the following values to 1 for each host to > settings > under software > advanced settings >

    Under Data Mover

    HardwareAcceleratedInit

    HardwareAcceleratedMove


    Under VMFS3

    HardwareAcceleratedLocking

    Compliance status is returned to the green.

    Thanks for the advice guys!

    Thank you

  • How to obtain the list of virtual machines in a cluster with the specific name

    Get-Cluster "Group 1" | Get - VM | where {$_.name - eq "owp *"} | Select name

    I've tried to filter the virtual machines with a specific name of a cluster by using a single command line but I am not going do anything...?

    I get results if I just Get-Cluster "Cluster 1' | Get - VM, but I want excluded other virtual machines to help to be enjoyed.

    Use - as instead of-eq

    Get-Cluster 'Cluster 1' | Get-VM | where {$_.name -like "owp*"} | select name
    
  • Are there problems in the creation of a virtual machine in VMware Workstation or Server and then move it to ESXi?

    Hello

    I intend to pass our mailserver's current installation of Windows Server 2003 running on native hardware in a Windows Server 2008 running in a virtual machine on ESXi.

    This is the same machine as we will reuse so I would prefer to be able to create the virtual machine on a different computer and test it before wiping Windows and install ESXi. Are there problems with the creation of the virtual machine in VMware Server and then migrate to ESXi using VMware Converter? I won't if the result is not a 'perfect' virtual machine that performs as well as if it had been created on ESXi from the beginning.

    All our other VMs were created on ESXi from the beginning.

    Kind regards

    René Frej Nielsen

    If you are not sure, you can load VMware Server 2 and then install ESXi in it and test your configuration.  Do all this from your desktop (as it is decent).  You can also do in my computer.  A quick google search should give you all the information you need to get something like this configuration.

  • Virtual Center stops all the virtual machines in a cluster HA

    Hello.

    I have a question about vCenter machine. We have deployed

    VMware ESX 4.0 HA cluster on Server Blade IBM 3. VCenter machine resides

    on a virtual machine on the same cluster. When we tried to recharge a physical switch (in the)

    IBM Blade Center), all our virtual machines on the cluster have been turned off automatically.

    If the vCenter VM is turned off, then everything is fine - the reloading of the

    Switch is not turning off the virtual machines (and the net is ok - start machines

    work through another switch in IBM bladecenter). If the machine vCenter

    powers (manually), all the other machines, which have been put off, are powered

    on too (automatically, of course, with the help of the machine of vCenter). How

    is that what I can adjust the machine vCenter, so it could not power power machines by

    itself automatically?

    ESX 4.0 (162856)

    Hello

    Right-click in your cluster, change the settings. Select 'Virtual Machine Options' under 'Vmware HA' and choose the host response of insulation desired for the entire cluster or individual VM. If you do not have network connections redundant between your ESX machines, you probably want the virtual machine for when you need to do maintenance or your network switch died. You should probably also disable HA while doing maintenance. You should consider to build network redundancy in the case of a production environment.

    I hope that helps!

  • URGENT! After installing 6 Fusion and creation of new virtual machine with Windows 7, I get a message "VMware Fusion cannot enter the unit". WHAT SHOULD DO?

    After purchase, installation and activation Fusion 6 with the license key, I had a library of VMS showing 2 Boot Camp partitions. It's strange that I only have 1.
    I tried to activate them but received a message that it is out of date in 2 cases. (see annex 1)

    I started a new virtual machine with a Windows 7 installation disc directly on my HD. I have provided a way to do this and followed the instructions of Fusion to the screen.

    Apparently, everything went well and after several restarts, the installation appears to be over (see annex 2) I tried to open and run the installed Windows 7. I had however a window with the following message:

    "Pending the unit.

    "VMware Fusion cannot enter the unit. Please wait until the unit starts automatically, or interact with the virtual machine below. ' (see annex 3)

    Here Windows 7 seems to start but after a while with the home screen and of the Øresund finishing this window closed and open a new window called library Virtual Machine on the left showing the partitions of Bootcamp and the Virtual Machine Windows 7 x 64 and in the middle gray a representation of what is supposed to be the Windows 7 desktop. (see Exhibit 4). When I opened the settings button a window with different setting options pops up. This mark means to me that Windows is installed but the final opening isn't the case

    When you quit Vmware Fusion indeed Windows seems to be close (see part 5)

    What is going on? What has gone wrong? What should I do? I don't know how to solve the problem.

    I should f.i. remove the virtual machine from Windows 7 and is free automatically made partition on my HD as the reboot with the Windows installation disc? or y at - it another way to enter the UNIT?

    Help, please!

    Thanks in advance

    Your virtual machine is running. It is in the unit - which each windows gets its own window of Mac - and you have no application Windows running, there is no visible windows. You can start a Windows application in the start of Fusion menu in the menu bar at the top right, or turn on the Windows task bar on the view menu and start applications from there. Or use the view menu to switch to the Single mode or full-screen, which puts all of your Windows desktop in a window separate from Mac.

    You do not have two partitions to Boot Camp on your Mac, you have two virtual machines named "Boot Camp partition".

    The message about it being unable to enter the unit arrives while the merger is pending for the tools begin to run, because the tool is necessary for the unit.

  • VMware Fusion 6 Professional - where is the possibility of locking VMware using a single virtual machine and do not allow the creation of new virtual machines?

    This is a quote from the VMware Fusion Professional 6 product page:

    VMware Fusion 6 Professional comes with IT administration tools to help you deploy VMware Fusion using Apple or a management solution third Mac as of JAMF's Casper Suite. Further reduce the cost of support of Windows desktop using the mode of single virtual machine that limits user access to the library of the Virtual Machine, the ability to create virtual machines or migrate PCs and reduces the options of the menu.

    Where can I find these IT administration tools?  I want to block my VMware users to a single virtual machine so that they can not blow by creating new virtual machines, etc.

    How can I do this?

    Thank you!

    Glitch004,

    You could follow the steps to activate the single mode of VM:

    1. turn power off all running VMS and out the merger.

    2. Add the following line to/Library/Preferences/VMware Fusion / config

    installerDefaults.simplifiedUI = 'TRUE '.

    3 restart merger and you will find:

    . VM library is hide in the VM menu.

    . only one virtual machine can be used, while click second VM Fusion of the reports ' Unable to open document. "

    Best regards

    Shanghai

  • Plan for the creation of new virtual machine with 3 TB data drive

    We have an old server, we need to virtualize, and one thing that we need is a lot more storage. We have approximately 3.25 TB of available for this machine (250 GB for the OS and 3 to for the data drives), but I'm going in circles trying to find the best approach for this server. It is not possible to separate the data between several players because of the way the files are indexed. I have created a virtual machine with 2 TB of disk space (for the readers of OS and data) and added 1.25 TB of disk space I want to add on the data reader, but it does not seem possible to add 1.25 TB without destroying the data on the first disk of 2 TB. What is the best approach? Create a single disc for my virtual machine that is 250 GB and then add in two separate disks of 1.5 TB for storage and combine them within Windows?

    Thanks for your suggestions.

    Hello

    Unfortunately, the maximum size of virtual disk to a virtual computer is 2 TB - 512 bytes. In you case it should create two or three separate virtual disks and combine them (disks RAID 0 or concatenate). Another way (IMHO besser way) is to create several virtual drives and mount using NTFS mount points.

    An example:

    C:\Data is a folder on one of the virtual disks. Create a second virtual disks and create the C:\Data\Data2 folder. Rather than assign a drive letter for the newly created disk, you can mount it in the Database2 folder. This gives you the ability to move the largest files on separate virtual drives without lose you the structure of folders.

    Kind regards

    Patrick

  • Default directory for the creation of new virtual machines

    Is it possible to change the default folder for new virtual machines in the data store? Then, instead of esxi always create virtual machines directory under / you can have create the folder in a subfolder.

    Must be removed. I just watched ghetto HA script a lamw to see if she could be easily adapted to do. I don't think it would take a lot. It would automate the task of the cancellation of registration, travel and re-entry.

Maybe you are looking for