Register the virtual machine does not properly

I run the following script, but it does not work as expected.

$ESXHost = 'test - 01.Test.com '.

$ResourcePool = get-VMHost $ESXHost | Get-ResourcePool | Get-View
$vmFolder = get-View (Get-data center-name $Datacenter |) Get - Folder - name "vm") user.user
$vmFolder.RegisterVM_Task ("[TIER2_VMSHARED_LASCX02_LUN2017]" + $VMName + "/" + $VMName + ".vmx", $VMName, $false, $ResourcePool.MoRef, $null ")

When the script is run, it saves the VM on Test-04?  Any suggestions?

E4F

The last parameter to RegisterVM_Task is the host where you want the guest to save.

You pass $null, so DRS will decide for you.

If you want a specific host, you can do

$ESXHost = "Test-01.Test.com"
$esx = Get-VMHost -Name $ESXHost $ResourcePool = $esx | Get-ResourcePool | Get-View $vmFolder = Get-View (Get-Datacenter -Name $Datacenter | Get-Folder -Name "vm").id
$vmFolder.RegisterVM_Task("[TIER2_VMSHARED_LASCX02_LUN2017] " +  $VMName + "/" + $VMName + ".vmx", $VMName, $false, $ResourcePool.MoRef, $esx.Extensiondata.MoRef)

Tags: VMware

Similar Questions

  • ESXi host goes to the State and the virtual machine does not restart on other host does not

    Hi all

    I'm looking for a solution, in which case the host goes to the State and the virtual machine on it does not restart on a different host (they'll just gray) does not not what could be the problem here and how to fix it

    later when the failed host returns upward machines either go to motor off the coast of the State, or they show that under tension

    While the host is down or not responding do not I am able to ping the host ESXi (5.5) and able to ping the default gateway and the DNS servers of the host itself

    Yes AF, the answer to all these questions is Yes, it is a HA and DRS cluster active, I tried restarting mgmt service, we use a shared storage (storage iSCSI HP 3PAR and left hand)

  • Windows Server 2003 physical to the virtual machine does not start

    I have converted a windows server machine 2003 virtual machine image.  Conversion completed successfully but the machine image custom virtual boot I get the blue screen of death which is probably do the scsi driver being changed during the conversion of my question is: how to install these drivers once the pc has been converted? I try to avoid to do from scratch with constraints of time it takes to get this virtual image starts, please help

    Semper Fi

    You must use SCSI.  Replace your SCSI controller during the conversion.

    ... also, I'm under the assumption that the destination ESX (i)?

  • Virtual machine does not start the Server Windows 2003 Std ISO file?

    Hello

    I am trying to create a virtual Windows 2003 machine, I created the ISO file, downloaded on my ISO library and connected the CDROM drive for the ISO file.

    When I boot the maching, I select the start menu and select the CDROM drive the virtual machine starts the ISO?

    The continuous boot just on the network card boot.

    It's as if the virtual machine does not see the CDROM drive?

    I use folder2iso

    To me, it sounds as if the ISO created may not be bootable! How did you create the ISO file?

    André

  • Virtual machine does not start after restoring from Time Machine to the new Imac

    I got my IMac replaced by Apple, after that they could not fix the old one.  They did a full restore from a Time Machine backup.  The virtual machine does not open now.   When I navigate to the file to try to open the virtual machine at the VMware logo in the bottom right of the icon displayed with large yellow exclamation appears on the icon?  Anyone encountered this problem before.  I'll take the Imac in Saturday if I can not solve.  The machine has the same size as before.  There are a few aspects of sharing with the Mac application miss me?

    According to the MacVirt.vmdk folder, you have the right number of segments of shared disk so you should be able to create a new VM by pointing to the disc in the new VM Wizard by pointing to the MacVirt.vmdk file.

    Note: After you create the new Virtual Machine, I would not suggest the Virtual Machine to stop, pause and close merge and then move all *.vmdk files in the package of the virtual machine, and then manually change the computer configuration files virtual .vmx and change the path to a little to view the MacVirt.vmdk file.  In this way, everything is in one package and is easier to maintain.

  • Virtual machine does not respond on esxi 5.0 using Vsphere 5 customer

    Hello

    One of my virtual machine does not respond when I am trying to connect through the console on my vsphere client. I use esxi 5.0.

    The thing is that I have several virtual machine works very well and I do not understand why it doesn't work anymore.

    When I try to restart the vSphere client, nothing happen or when I try to stop it.

    Does anyone have an idea of what I need to do?

    Welcome to this community!

    in some special cases the virtual machines enter State does not. In this case, we have to kill the VM process to bring the virtual machine online.

    the following KB explains different methods to do the same thing.

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

    Follow the steps under "using the ESXi 5.0 esxcli command to turn off a virtual machine.

    I would recommend contact VMware support, given that the steps above are a little off destructive.

  • Virtual machine does not start

    Hello, I had a VM VirtualBox but VB don't sharing not the graphics so I was told to use the workstation. I tried from news on workstation Virtual Machines, but also to transfer to the other virtual machine, but it sits right on the screen for hours. I have a pretty crappy laptop so I understand the Virtual Machines may not work correctly, but this would make won't start do not at all?

    21eac9c281caf8a17af8b1c74bc1cd16.png

    When I try to get out, it gives me this error message.

    Please try * .vm (including the asterisks).

    André

  • Resumption of the Suspended virtual machine does not work, "the specified file is not a virtual disk.

    Resume a Suspended computer virtual fails with the message "the specified file is not a virtual disk. Tried to go back to the last snapshot fails with the same message "error restoring snapshot: the specified file is not a virtual disk '. '"

    The virtual machine has worked without delivers up to 21/12/2015 while she was snecessary. I often suspend > resume this machine virtual, but for some reason, I am now getting this error. Please help!

    The file unfortunately doesn't look very promising. It seems that the contents were crushed,

    Unless you have a backup, you can try to replace this file with a file 'empty' hard (e.g. copy Windows 7 x 64-000002-s100. ) ( vmdk) that contains only metadata (size = 327 680), to see if this allows you to use the virtual machine again. Note that you will lose all the data stored in the (corrupt) original hard file, and that the virtual machine will probably suffer file system errors. So make sure that you run chkdsk for all partitions in the guest OS.

    In any case, before doing so, I strongly recommend that you back up the existing files of the virtual machine! Once done, it could also be a good idea to run chkdsk for physical training.

    BTW. do you need all the snapshots? With all these clichés and the size of the virtual disk of the virtual machine, the virtual disk consists of files hard ~ 400.

    André

  • Windows XP mode virtual machine does not start after the upgrade to Windows 10

    Hello

    After the upgrade to Windows 7 Pro for Windows 10 Pro, my virtual Windows XP machine (which was created from the "XP" mode in Windows 7) no longer starts.

    It shows:

    This system is not allowed to run "Windows XP Mode". Now, the virtual machine will be turned off.

    How can I activate the Windows XP Mode in Windows 10 Pro? I mean, I have not lost my right to run Windows XP Mode, just because I've upgraded to Windows 10, right?

    VMware Workstation 12.1

    Hello

    How can I activate the Windows XP Mode in Windows 10 Pro? I mean, I have not lost my right to run Windows XP Mode, just because I've upgraded to Windows 10, right?

    I fear that the statement is pretty much on the mark.

    Microsoft caught only supported XP Mode in Windows 7, it has been since Windows 8.

    See also:

    https://support.Microsoft.com/en-us/KB/2724115

    You might be able to extract the folder integer vhd it and import it in VMware Workstation as a separate virtual machine. In the end, 'XP Mode' just was running a virtual machine in your Windows 7 after all.

    --

    Wil

  • Help please... Replaced the hard drive of MBP, restored from TM, but the Windows XP virtual machine does not start

    I replaced the 250 GB hard drive in my MacBook Pro early 2009 with a 500 GB drive, it the Mac OS extended (journaled) format and restored from my Time Machine backup.

    Now when I try to start my Windows XP virtual machine (using Fusion 2.0.6... planning upgrade to 3.1.2 but wanted to validate all was well first), I get BSOD, even in safe mode.

    I have my vm separately saved on a network drive data files based on things that I had read before, I do not think that TM backup of virtual machines. However, a friend with a similar setup with more knowledge I think because I could see my Windows XP vm VMWare listed under 'Documents' in Time Machine showing its full size, it has actually saved and there restore it. Apparently he has done this successfully before.

    Should I have partitioned the hard drive? I don't think that my previous drive has been partitioned. Don't know what to do now.

    TIA!

    Katie

    To be clear: you have restored VMs from the disk or network time Machine?  And if the network drive, what backup method you use?  (i.e.: have you just copied engine off the computer virtual package or not?)  Can you copy/restore the virtual machine to the network again drive?  What is a virtual machine that has the error, or other virtual machines have problems?

    Time Machine backup correctly a virtual power off machine. But since Time Machine works automatically, you often will get not a consistent backup unless you do some tricks to make sure Time Machine backup only when you use a virtual machine.  (i.e.: turn on Time Machine only when you're done with the virtual machine.)  Thus, it is normally recommended to exclude the virtual machines from Time Machine and use another method to back up virtual machines.  Your friend is lucky or is only backup virtual machines powered off.

    Should I have partitioned the hard drive? I don't think that my previous drive has been partitioned. Don't know what to do now.

    The Mac player Paritioning is unnecessary unless you use Boot Camp or have required another for the partition.

  • Unregister a virtual machine does not remove it from the inventory?

    Hello

    When I cancel the registration of a machine virtual or even destroy with VirtualMachine.Unregister or VirtualMachine.Destroy, it doesn't go away inventory, instead, it becomes grey and straight with (orphans). How can I remove it completely?

    Thank you

    Shawn

    I've seen this happen when you have an ESX server managed by VC and connect directly to ESX to delete the virtual machine. VC is a bit special in that way.

    If this applies to you, you can directly remove from VC or maybe write a script that will clean up orphaned VMs from time to time.

  • In opening the virtual machine: "could not find a peer valid to connect to" or "error of Transport (VMDB) - 32" / "-14" ""»

    Hello

    Since yesterday after a reboot of my host (DELL E6410, W7 SP1 64-bit, 8 GB RAM, 2x750GB SATA3 running WorkStation 9.0.2 Update Windows Update), I can't open my existing VM.

    I often get "can not find a valid peer to connect to" and sometime before: "Transport (VMDB) - 32 error: Pipe: reading is not'or'error of Transport (VMDB)"-14: fitting broke

    I worked for 2 years on this machine without a hitch, WS7 reclassification in WS9 without any problem.

    FYI: we have changed the domain 3 months ago, but it has never be a problem.

    I have google and search several Forum. So far, I tried to:

    -restart the service vmware-auth as an administrator

    -launch vmware.exe administrator

    stop/start the vmx86 service

    -uninstall / reboot / install Workstation.  3 times. First using uninstall from the Control Panel, then doing a / clean before installation and finally track down any file/reg entry.

    -HE asked if any group policy changes were made recently (like not allowing to run vmware.exe?)

    -Rename vmware.exe (logs I look similar to what is in this post: http://communities.vmware.com/thread/331099?start=0 & tstart = 0 ... but no luck)

    -excluded vmware.exe in my AV (Microsoft ForeFront). Unfortunately, in that I'm not allowed disabled...

    -Open the virtual machine using the drive == > does not work either.

    This isn't a file corrupted in a virtual machine (even backup - 7zipped - don't work on my laptop... but the launch on the other).

    Even a newly created WM (boneless), unbootable! :-(

    *, BUT to BE NOTE *: if a virtual machine is created as a shared virtual machine, I can start the application locally remotely! And this same VM, if started (via the.vmx) does not work using Workstation GUI!

    I have attached 2 newspapers. Work a (vmware.log remotely) and the inactive (vmware-vmx - 4072.log thru WS GUI).

    Of after what I saw (and what little I understand), it's as if the CPU is not detected?

    The two newspapers have this line:

    FeatureCompat: EVC masks:

    but the non-working goes - we with

    Module CPUID initialization failed.

    While working it display information on CPU (hostCPUID name / family / type... etc...)

    Any idea is welcome.

    I'll answer me to my problem!

    A lot of research to this knowledge.

    In summary: don't mess with the processor affinity... or keep it in mind!

    Response to distinguish:

    I installed 6 months ago a small utility named prio (search for "PRI prnwatch"), because it can save the priority of a given process. What I did notice, is that it also save the processor affinity ! What happened: I probably changed the affinity once for a VM running to give greater priority to a 7zip archive process to complete more quickly (setting HT no core to 7zip and one - or 2? - HT core to VM). Everything works until the next reboot, where the CPU detection during * start EVERY * VM has been somewhat "damaged" leading to the wrong log message: failed initialization Module CPUID.

    This is the reason of *my* question. Perhaps it might help someone else?

    TIPS:

    For advanced people who do not want to check the processor affinity of each process in the Task Manager, you can try this Windows Powershell command (remember to launch PowerShell as an administrator):

    Get-Process | Format-Table-PriorityClass name, ProcessorAffinity property

    ProcessorAffinity column gives the number of representation of the authorized core, 1-bit by heart.

    15 = 1111 is all possible core (for a logical processor 4). Mine is 1 CPU with 2 core HT <=>4.

    LSB is the core lowest. So if you allow only core0 and core3 (1001) on a process, the number of ProcessorAffinity will be 9...

    Post edited by: cbiero (LSB and MSB...)

  • Can I register the Virtual Machine of VMware player esxi 4 4.1?

    Hi all

    There are a few virtual machines running in VMware player version 4, now I need to migrate on ESXi 4.1...

    It's Possible he just copy and past the files of virtual machines running in vmware player in the data store then register the same in the esxi server and power on... This will not work?

    because I do not V2V method...

    With respect,

    Pascale Vimal

    You run the virtual machine on HW 8, that you will not be able to simply move the ESXi machine.

    The only supported option is to do a conversion on reviews of downgrade the material relating to immigration to vSphere

  • Virtual machine does not start and...

    Dear vmware forums community,

    I have a problem, I use VMware Workstation 7.0.0 build-203739

    However, I have some problems using it.

    First of all, VMware does not allow me to start one of my Virtual Machines, when I click on 'Open' Options tab still does not open.

    Secondly, I can't install Virtual Machines since yesterday. These two problems came today when I turned on my host PC.

    I tried to do the two things by using VMplayer, it does the same thing as VMware Workstation.

    I also tried to uninstall VMware and install again and also I tried to delete the .lck files and it does not work.

    Yesterday, when it was all working well, I turned off the virtual machines by the following method, ' turn off this machine "or something like that (I clicked on the cross in the name of the machine)

    I would really appreciate if someone could help me.

    In this case - even if you have already uninstalled/installed VMware Workstation - I would recommend that do you it again. This time, clean install and reboot the system before you re-install. How to clean and a script, see http://kb.vmware.com/kb/1308

    André

  • Windows on VM - says my copy of Windows 7 on the virtual machine is not authentic

    I have the Virtual Machine on a Mac and am running Windows 7 on the virtual machine.  I get a message that my copy of windows is not genuine, so, how do I get a product key.
    I get a message from Microsoft that this copy of Windows is not supported.  If I need to buy Windows overall, how can I download it to VM?

    You can purchase a license for the edition you installed and change the key and activate it on the Internet.

    http://www.Microsoft.com/Windows/buy/default.aspx

    http://Windows.Microsoft.com/en-us/Windows7/get-a-new-Windows-product-key

    Click Start, right click on computer

    Click on properties

    Scroll down to the Windows Activation

    Click on the link "change product key".

    Enter the product key and click next to activate via the Internet.

Maybe you are looking for