New virtual machine creation error

Hi guys

Here's the script (part of)

$myhost = get-VMHost-$indicated-$indicated is an internal thing where two hosts, each with a local data store

$Myhost1 = $myhost [0]

$Myhost2 = $myhost [1]

$myds = $myhost1 | Get-Datastore

$h1ds1 = $myds [0]

$h1ds2 = $myds [1]

$myds2 = $myhost2 | Get-Datastore

$h2ds1 = $myds2 [0]

$h2ds2 = $myds2 [1]

New-OSCustomizationSpec-name $OSCostumSpec_SQL - Windows - $VMPassword AdminPassword OSType - zone ProductKey - $WinProductKey_SQL - ChangeSid - OrgName $OrgName - NamingScheme $TimeZone fixed NamingPrefix - $SQLVM.split(".") [0] - fullname administrator - workgroup WORKGROUP

New-OSCustomizationNicMapping - OSCustomizationSpec $OSCostumSpec_SQL - IpMode UseStaticIP - IPAddress SubnetMask - $VMSubnet - passerelle_par_defaut $VMGefaultGateway $SQLVMIP - Dns $DNS, $DNSVCE - 1 post

New-VM - VMHost $Esxihost - name $SQLVM - data store $h1ds2-model $SQL2008RTemplate - OSCustomizationSpec $OSCostumSpec_SQL

Get-VM-name $SQLVM | Set-VM-Version $VMVER - confirm: $false

Get-NetworkAdapter - VM $SQLVM | where {$_.} Name - eq 'Network adapter 2'} | Remove-NetworkAdapter-confirm: $false

Get-NetworkAdapter - VM $SQLVM | where {$_.} Name - eq "Network adapter 1"} | Together-NetworkAdapter - NetworkName $MGMT - confirm: $false - StartConnected: $true

Delete-OSCustomizationSpec $OSCostumSpec_SQL-confirm: $false

Set-VM - VM $SQLVM MemoryMB - 8192 - NumCpu 4 - Description "vCenter Server database" - confirm: $false

$SQLVM. ExtensionData.ReconfigVM_Task ($CPU2)

New vm creation fails with this error

New-VM cannot validate the argument on the parameter data store. The argument is null or empty, offer an argument that is not null or empty and try again.

Any idease?

Have you checked there is nothing in the variables $MyHost1, $MyHost2, $h1ds1, $h1ds2, $h2ds1, $h2ds2?

Seems that the variable data store are empty (judging by the error message)

Tags: VMware

Similar Questions

  • Failed to create new virtual machines on ESXi4.1 due to the error of slot

    Hi people,
    I am unable to create new virtual machines more on ESXi4.1 host due to the error of the slot. Its shows error "number of devices virtual exceeeds the maximum controller. In a cluster, we have 3 host ESXi 4.1.
    Each ESXi is IBM 3850 M2 / x 3950 M2, CPU Cores 24 CPUsx2.665 GHz.Processor Intel Xeon x 7460 @ 2 .66GHz CPU Type

    Please find the attached screenshot. Any help will be much appreciated.

    Thank you
    vmguys

    See http://kb.vmware.com/kb/1016221

  • Error during communication with the remote host when you create the new virtual machine

    I'm under 7 ESX servers on IBM Blade H22 there is a mistake to invite while I create a new virtual machine

    on the vcenter Server

    At the end of 30-35 minutes, it gives an error

    "Error during communication with the remote host"

    The existing machines are working well... I tried to create virtual machines to other ESX servers as well

    but the same question. I also tried to make the clone of existing machines, but without success

    Can anyone help?

    You rescan the LUNS once?

    You've restarted the management agent?

    You've restarted the vpxa?

    If this isn't the case, please perform the step above and check out them.

  • 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.

  • 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

  • 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.

  • Cannot turn on new virtual machines

    Hello world

    I am running ESXi 5.1.0 (1483097) on a server Dell PowerEdge T300 with 24 GB of RAM and a couple of terabytes of HARD disk space. I have a 64 GB SSD as my default swap file location. I'm unable to turn any VMs created on this server (has only one handful of other virtual machines running on it currently, not more than 4-8GB RAM each). When I try to turn on a new virtual machine, I get the following error:

    An error was received from the ESX host turning on VM <vmname>.

    Has no power on the virtual machine.

    Could not power on VM: insufficient resources.

    Cannot extend the pagefile to 32768 k k 93504.

    Cannot extend the pagefile to 32768 KB 94208 KB.

    There are lots of free RAM available, and I don't have in my pool only resource that all virtual machines live subject. I tried to set the location of the swap file VM to store data of the VM, but that has no effect. Any ideas?

    Hello

    you are indeed running out of space on your destination of swap - you have only 56 MB of free space on your SSD. You're also out of space for swap on datastore1 and 4. I suggest check it and delete all unnecessary data. Please note that by default without reservation, the VM creates a swap file that is equal to the size of RAM allocated to it. If the startup fails with swap on the hard drive, try quick vMotioning or cold - migrate the virtual computer to another storage. Also you could do a lot better with the free space by consolidating all your storage to a single VMFS volume.

  • How to build a new virtual machine based on cluster with powercli?

    When you create a new virtual machine on cluster in the user interface, you cannot select the host, it is decided by the cluster.

    Now, I want to create a new vm on cluster by powerCli. I have not found any parameter to specify the cluster.

    Only the "$vmhost" to specify the host.

    Why are they so different?

    Can someone help me understand it and how to create a new VM on cluster?

    Thank you in advance!

    Hello, bob1118-

    While, as you said, it has non - Cluster parameter to the cmdlet New - VM, you _can_ effectively specify the cluster at new time of creation of VM via PowerCLI: you specify the list of resources within the desired cluster.  So a partial New - VM call would look like:

    New-VM -Name myNewVM0 -ResourcePool (Get-Cluster myDestinationCluster | Get-ResourcePool -Name "Resources") -Template ...
    

    Who uses the resource pool default "Resources" that exists in a cluster.  And, you could fill in the rest of the parameters relevant to the new virtual machine of your desires.  How do I?

  • VMware workstation, crashes when I try to create a new virtual machine

    Hello

    I never had this problem before, but I didn't create a new virtual machine in a very long time. Last time I created one was making Workstation 9 I think. Some time after the upgrade to Workstation 10 or 8.1 of Windows Update 1 it has started.

    In 10 Workstation running on Windows 8.1, I select the file > new Virtual Machine dialog coming upwards and in a few seconds crashes of VMware workstation and closes.

    So I checked the Windows event logs and find

    Warning "VMware Workstation to function properly, must be reinstalled after the upgrade to Windows."

    So, I upgraded from 10.0.2 to 10.0.3 and it uninstalled and reinstalled but I still get this warning.

    Followed by an error

    ***

    Journal name:Application
    Source:Application error
    Date:15/08/2014 23:33:53
    Event ID:1000

    Task category: (100)

    Level:Error
    Keywords:Classic
    User:N/A
    Computer:P7Win8MC

    Description:

    Name of the failing application: vmware.exe, version: 10.0.3.48389, time stamp: 0x539a4fb0

    Name of the failed module: MSVCR90.dll, version: 9.0.30729.8387, time stamp: 0x51ea24a5

    Exception code: 0xc0000005

    Offset: 0x0003bece

    ID of the process failed: 0 x 1788

    Start time of application vulnerabilities: 0x01cfb902de541c11

    The failing application path: C:\Program Files (x 86) \VMware\VMware Workstation\vmware.exe

    Path of the failing module: C:\WINDOWS\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_5094ca96bcb6b2bb\MSVCR90.dll

    Report ID: 24d5effb-24f6-11e4-bedd-20cf30780548

    ***

    So I need help to track down what I am not sure what VMware paper to look to maybe see what is happening.

    Thank you

    Rainey

    Well, I found the problem.

    I looked in the UNK file and found a few ISO files wrongs tracks.

    I had mounted some ISO in the past and they have made the entry in this file of preferences such as "isoLocationMRUx".

    I'd change the leter this ISO file player so they could not be found as input, once I corrected the paths I can now create a new virtual machine.

    He is responsible for ion BONE the new virtual machine now.

  • PowerCLI script - new virtual machine of the model

    Hi all

    I am very new to power CLI scripting, and these days, that I read a lot of help to automate the creation of a new virtual machine based on the model of the virtual machine.  Script that is not that hard, even location new virtual machine on a particular data and in a particular resource pool store is not difficult.  For this I came up with this very basic script/command:

    "New-VM - ResourcePool < resource_pool > - < folder_name > location - Datastore < datastore_name > - name < VM_name > - < template_name >"model

    However, I came across some problems that I can't find information in help or in the forums.  Problem with the above command is VM will be created in the pool of appropriate resources and file as long as they are unique, but if there are multiple instances of resource pool or a folder with the same name as the script spits out a mannequin.

    So for example if I want to create a new virtual machine to the location following Data_Centre = > RootFolder1 = > SubFolder1 = > SubFolder2 and SubFolder2 name is unique that no problem, the virtual machine is created at this location.  However, if the SubFolder2 exists in Data_Centre = > RootFolder2 = > SubFolder1 as well as the virtual machine is created in the folder root of the location of the model.  For example, if the model is in "DC = > Folder1 = > Subfolder1 = > Subfolder2 ' the virtual machine will be created in the folder Folder1

    Any suggestions on how to ensure that the virtual machine is created in the desired folder/location as well as a list of resources?  In my view, there are really smart guys here and I suspect that this issue would not be a problem at all.  Any help would be appreciated.

    See you soon

    It is not a matter of following the right path.

    You can use the location setting to get the exact folder you want. For example

    $dc = get-data center-name DC1

    $folder = get-file-name Folder1-location $dc

    $subfolder = get-file-name Folder2-location $Folder1

    or

    $dc = get-data center-name DC1

    $subfolder = get-file-name Folder2-location $dc

    You will need to find a "place" in the path to your destination folder where it will be unique.

  • create a new virtual machine with the default settings?

    I was wondering if there was a way to create a new virtual machine with the default settings.

    For example, let's say I want all new Lion VM to have 2 CPU cores. Is there a way to set this automatically? There are other parameters I want a new machine to inherit automatically, I was wondering if there is an automatic way to do this, or is it a feature request...

    Thanks in advance

    lerker wrote:

    Just for my clarification, when you say a vm model, basically I would execute a finder copy then drag back to the VM library, right?

    Yes.

    On the orders of spcirpting, it would be unix commands or are there specific vmware controls that make your job easier (in Applications/VMware\ Fusion/content or elsewhere)...

    IIRC, VMware Fusion 3 and later versions has an AppleScript dictionary, but it is not yet officially supported and may not be able to do what you want so, basically, only Unix Shell scripts, that's what I was referring to.  For an example, see my script attached to the following response: Re: vmware - script of the creation of the vm and the operating system installation process

  • Deploy a new virtual machine from a template

    Is there a workflow avaiable to deploy a new virtual machine from a template?  I tried using the Clone Virtual Machine, no workflow customization but receive an error saying, "task"CloneVM_Task"error: a specified parameter was not correct."
    "Spec.Location.pool (name of the dynamic Script Module: vim3WaitTaskEnd #20).

    When I use a template as a source of VM.

    I can't find any documents pointing to the deployment of the model.

    Hello

    It's the right workflow, but you must provide a pool of valuable resources for this workflow. If you do not resource pools, it can be shown in a vCO to root in the inventory (vCenter does not work).

    Christophe.

  • New virtual machine cannot reach gateway all-in-olders Yes

    Hi, I'm using ESXi for a year with no problems, but now I'm having a very strange situation. New virtual machine cannot reach the front door, while the 'old'. New virtual machine can ping olders VM and vice versa, but new looks as private. I tried different OS and still have the same question.

    That's what I have:

    Reference DELL R610 with RAID - 1 and RAID-5

    ESXi free 348481 4.1.0

    1 card NETWORK connected

    IPs public 16

    4 VM (W 2008 32bits, W 2008R2 64, 32 2008 W, W 2008 64) works perfectly

    All VM are stored on the local Datastore2 (raid-5)

    Last week, I installed:

    1 Openfiler ESA (gateway problem)

    1 W 2008 R2 (gateway problem)

    1 W XP 32 (gateway problem)

    1 W 2008 32 (gateway problem)

    Older VM never lose connection with gateway and beyond

    New never manage to bridge

    I can't manually add gateway IP/mac address (error 5) in the new.

    Anyone can figure it out and how to solve? I'm really lost.

    Thank you

    New virtual machine can ping olders VM and vice versa...

    This excludes actually questions 'virtual '. The vSwitch has no restrictions.

    What kind of physical switch are you using? If this is a CISCO switch to ensure that the port is configured as a port of access (or trunk port) and spans tree portfast is. Some CISCO switches have a "macro"set desktop on their ports which limits the number of MAC addresses that are allowed on the port.

    André

    PS: Please don't ask me. Did you check the address of the gateway AND subnet mask are correct for the new virtual machines?

  • Could not start the new virtual machine or VM remove a data store

    Hi guys,.

    I'm not new with ESXi, but my knowledge with vCenter and Clustering must be improved, so here's my problem.

    We have a Cluster of 2 ESXi 4.1 hosts on a San with 2 VMFS.

    My first problem is when I created a new virtual machine and try to start it, I got an error message similar to the one included with this post.

    My Second problem is more picky. Since I am unable to start my new virtual machine, I had removed from drive and I had created a new. But when I took a peek in the data store where was deleted VM, the directory with all the files are still there. When I try to delete it, I got an error message telling me that it is impossible to proceed.

    Q please?

    Best regards

    Stéphane

    82% of failure can be other issues.  The article below

    http://KB.VMware.com/kb/1006052

    Also, I saw, where bad records DB for your ESXi hosts can cause weird problems as well.  The host with the problematic guest, can you do a right click on it and "disconnect"?  Try to get out of the bunch at the data center level.  If you get an error vCenter, that means return folder DB.  From there, while the host is in a disconnected state, remove the host to vCenter, then "add host". This will update the DB record.  Maybe worth it?

Maybe you are looking for