Deletes a virtual machine of vCenter possible?

Hi all.

We used to be a Horizon view manual pool composed of virtual machines
from vCenter server. In a single operation for removal of VM in view, we

wrong selected pool and confirmed the deletion. The

operation put merrily and when we realized the error, we

find vsphere client that all VMs funds (a lot of them

were running) in the manual pool view both were removed from the inventory

and from the disc in vCenter server.

This offends and confuses us. It is commonly accepted that it is
Cannot delete a virtual machine running of vCenter: vSphere client no
won't give you a possibility to do so, and doing so in a CROWD ends by default.
But the view above disaster might suggest otherwise.

I have two questions:
1. is it possible to delete a virtual machine running of vCenter?
2. If so, how to prevent in vCenter?
3. (somewhat off topic) is it possible to come up with any hacking or

This makes it impossible to remove vm disk Office while being

able to manipulate the view of the pool? We prefer to rather in vCenter.

=====================================
The mistake that we made to remove all the Horizon view desktop VMs:
1. login to VMware view Horizon administrator.
2. based on the inventory, select the pool.
3. in the view of the pool, select the tab "inventory."
4. Select and right click on a desktop PC, select 'delete pool... '. »
5. confirm the deletion.

Software used:
vCenter Server: 5.5.0, 1945274
View of the horizon: 5.3.1 generation-1634134

Kind regards
Nathalie Sun

Post edited by: sunrenjie6

Hello Sun Nathalie,

Finally, I was able to create your question on my test bench, but as I said earlier, it is not possible to remove a power on the virtual machine, which was true. When I deleted the pool which consists of power on VM, I saw in the VC that VM were power off first and delete.

I also talk to the team from the horizon and they said that this device is designed this way to support several other features. To save accidental deletion of the s VM that they introduced the warning message.

Sorry for your loss.

Thank you

DJ

Tags: VMware

Similar Questions

  • Is it possible to migrate a virtual machine between vcenter servers programmatically?

    Hi all

    My question is quite simple:

    -Is it possible to migrate a virtual machine between vcenter servers programmatically?

    Let's say we have two data centers:

    vcenter1

    -vm1

    -vm2

    vcenter2

    -vm3

    Is it possible to migrate vms between vcenter2 and vcenter1 programmatically? (or vice versa)?

    Also, I'm assuming that the appropriate VLAN and data warehouses across the different vcenters!

    Thank you

    Luis

    It is not possible, vMotion or migration live is in an instance of vCenter, it cannot be covered through two even if you have the data store accessible both vCenters and sets of the host. At best, you can unregister the virtual machine of vCenter 1 host and re-save as on vCenter 2 host, but once again, it is while the virtual machine is turned off.

    =========================================================================

    William Lam

    VMware vExpert 2009,2010

    VMware scripts and resources at: http://www.virtuallyghetto.com/

    Twitter: @lamw

    repository scripts vGhetto

    Introduction to the vMA (tips/tricks)

    Getting started with vSphere SDK for Perl

    VMware Code Central - Scripts/code samples for developers and administrators

    VMware developer community

    If you find this information useful, please give points to "correct" or "useful".

  • Import virtual machines from vCenter to vCAC 6.0.1 failed

    Hello everyone.

    I'm trying to import existing virtual machines to vCenter 5.5 vCAC 6.0.1 with the organizing Infrastructure option but I got an error that says: Source VRM Agent. Instance name: Server IaaS. Username: vCAC user admin. Message: error while processing [RegisterVM], details of the error: value cannot be null. Parameter name: the name of the virtual machine has not been specified.

    And verification of the server log, all parameters have the correct data, except name = "VirtualMachine.Admin.Name". This one is empty. And the following line in the newspaper wrote:

    Message = [value cannot be null. [Name of the parameter: the name of the virtual machine has not been specified.]

    Everyone?. The solution works fine, I can deploy machines, their administration, destroy, etc..  I have only two users now, vcacserv (vCAC tenant admin, admin of fabric, all admin) and mrocebal (my user, user role only). The same error if I select any user as the owner of the machine.

    I have a user called vmadmin, who is admin vCenter.

    Thank you in advance.

    Hello everyone.

    Updated this thread and close it, let me tell you what happened.

    I opened a ticket with support Services and they told me that there is a problem with the development of the application. They increased the ticket with the Department of development in India. It has been 2 weeks later. We decided internally to install the 6.1.1 version and that solved our problem.

    Hope help you all.

    Miguel Romero.

    Mexico.

  • How to delete a virtual machine in a script


    Hello

    I want to delete a virtual machine with a VCO script, I wouldn't use the action item named destroyVM. I explain why I wouldn't use, because in my script, I do this action:

    1. I list all VM in a specific folder name is different date servername-today ' today and powered OFF.

    2. I would destroy each VM in the list.

    But when I would simply test the following command:

    System.getModule("com.vmware.library.vc.vm").destroyVm ("VMName");

    I get the following error message:

    TypeError: Cannot read property "runtime" undefined (name of the dynamic Script Module: destroyVm #52993)

    I search on google and VMware blog, I can't find anything to help me!

    If someone has an idea, you are welcomed to answer me.

    Thank you in advance

    Good day

    Best regards

    Christophe

    Hello

    If you have access to vm.name or vm.runtime, you can access the vmobject.

    Therefore, you don't have to search again. I'm confused...

    (1.) what is folderObject?

    2.) check your if condition. It is not '&' what you want, but «&»

    (3.) getAllVMsMatchingRegexp() returns an array of vmobjects, not a single vmobject. VM names are NOT unique.

    Maybe a small example can help:

    var vmArray = VcPlugin.getAllVirtualMachines();
    for (var vmIndex in vmArray)
    {
        if ((vmArray[vmIndex].runtime.powerState == VcVirtualMachinePowerState.poweredOff) && (vmArray[vmIndex].name == "SCT-Test-01_12_2013"))
        {
            System.getModule("com.vmware.library.vc.vm").destroyVm(vmArray[vmIndex]);
        }
    }
    
  • Is it possible to delete a virtual machine by UUID

    I'm trying to script for power down and remove a virtual machine by UUID, is it possible?

    Hi skyjacker99,

    This should work:

    Get-VM | where {(Get-View $_.Id).config.uuid -eq ""} | Remove-VM
    

    Kind regards

    Markus

  • Change the amount of vCPU in vCD deletes the virtual machine network connection in vCenter


    It is a problem of crazy that we discovered, and I wanted to know if anyone had seen him.

    First of all, we miss the following software versions:

    vCD: 5.1.1.867405

    vCenter: 5.0.0 Build 913577

    ESXi: 5.0.0 build 1024429

    If you go to vCloud Director and change the material properties of an existing virtual machine (Powered off) any change in the amount of vCPU (to something new), inside of vCenter status of the network will change to the port group Standard (inactive) none.


    Even if, before making the change, the virtual machine is connected to a distributed port group, and works well.

    We now display an SR to VMware, but sometimes it is worth running this by the community to see if other people have already seen or indeed want to test on their deployment.


    Thanks in advance

    We have solved the problem now.

    The reason why that we faced this problem is because we used the wrong order in the API.

    You must ensure that you use the undeploy command when you work with the vCD API otherwise you end up with a disconnected network card.

  • Check if all tasks are running against a virtual machine in vCenter?

    I need to write some powercli to see if a virtual machine is being switched, vmotioned or possibly another operation.  How can I check if a task is running on the VM specified in vCenter?

    I know how to get the tasks running in vCenter:

    $task = get-task-status Running

    But how to determine what the target is tasks?

    Try something like this

    Get-job | where {$_.} {ObjectId-match ' ^ VirtualMachine'} |

    Select StartTime,State,@{N='VM'; E = {Get-View-Id $_.} ObjectId-the property name. {{Select - ExpandProperty name}}, Description

  • Deleting a virtual machine

    I'm having a very difficult time trying to find how to delete a machine virtual vcenter through the SDK (the doc leaves much to be desired). I found the method unregisterVM() of the command VimPortType (just the syntax, no explanation of what it does), but after using it, it just gets rid of the VM inventory - all files are still on the data store.

    I want to get rid of the files as well as registration in the inventory. I found a method

    unregisterAndDestroyTask() , 

    but there is also no explanation of what it actually does.

    Can someone tell me please how to get rid of a vCenter virtual computer and the data store completely?

    There is a generic 'delete' method called Destroy_Task() http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.ManagedEntity.html#destroy which is applicable to different types of objects, including a VirtualMachine, HostSyste, Datacenter, etc depdning on the object, it will do different things. For a virtual machine, it will remove the virtual machine and it has associated the disc for a HostSystem, it will just remove it from vCenter

    The UnregisterVM_Task() is just, that he cancels his registration vCenter or ESX (i) inventory, but leaves his records intact. If you want to destroy everything, you want to use the Destroy_Task()

  • Cloning a virtual machine, is it possible?


    Hello

    Before this question, I tried to find the answer and to clear me on this issue, the fact is that it is is not clear to me yet.

    I would like to know if it is technically possible to clone a virtual machine running and what are the disadvantages - if there is - with a running virtual machine. Perhaps it is preferable or necessary to stop the mv to be cloned.

    I have 5 Vcenter. I don't know about cloning function it is differences between versions of vmware and have been improved accordingly.

    I give thanks for your help.

    Best regards

    John

    Yes you can clone the virtual machine running, you have vcenter to do.

    If you clone with virtual machine off, ends faster than running.

  • Migrate a virtual machine Fisical VCenter

    Buenas,

    Hello.

    I need to migrate a Vcenter 4.1 running in a virtual machine (with the default installation) to a physical machine.

    I know the process is like this:

    • Stop the Vmware services
    • Open SQL management studio and make a backup a Vmware DB.

    My doubts are:

    Should I install separately located in the Vcenter ISO Sql create a DSN pointing to this SQL instance, create DB, restore it from the backup and installing vcenter, choose this DSN and "keep existing DB" or similar.

    or

    What can I install Vcenter in default mode (then then finish etc. ), automatically install SQL Server, DB, and the DSN; and restore this DB form the backup (in other words, crushing the fresh new DB created automatically)

    In the first option, I'm afraid because according to this file official http://www.vmware.com/pdf/vsphere4/r40/vsp_compatibility_matrix.pdf , vmware provides that if you use SQl express (as the default installation), you will have a 5host and 50 VM limit, but I am runnig 6 guests right now without any problem! Any comment on this?

    Another problem is to create the DSN. In data sources, I see that sql server and client installed nativle, but I get a timeout of the connection when I try to set up the system DSN. I have the firewall turned off, etc., but it's like there is a missing configuration... Do I have to install the native client anyway?

    On the second option, I do not know if restoring the backup would be an adequate procedure...

    PS: care of the machine: Win 2008 R1 x 64, Vcenter 4.1.

    Thx a lot.

    Yes it is possible.

  • vcenter feature will work properly if my virtual machine to vcenter fail?

    Hello

    1 if my vcenter server machine was stopped or failed and in this time if my esxi host does not HA will or not?

    2 - if a month my judgment of the vcenter server or not will work work vcenter features such as HA and drs and...?

    Best regards

    Yes, if vCenter descends from VMware HA master node will take care to restart virtual machines from the host failed to other hosts that are running.

    DRS will not work if the vCenter server is not available.

    If you keep your vCenter down for a month, then that certainly creates questions about virtual infrastructure management.

    See this URL for the list of features that works and that will not work if vCenter isn't available.

    http://www.yellow-bricks.com/wp-content/uploads/VC.PDF

    What happens if my VirtualCenter server goes down? -Yellow brick

    vCenter is low - impact VMware infrastructure. | Settlersoman - a colon in the world SDDC.

    Thank you

    Hentzien

  • Dummy data (txt file) in a virtual machine (ESxi, vCenter 5.1 5.1)

    I created a dummy text file by using the command fsutil file createnew test.txt 1000000000 in my Windows VM, with prov space 500 GB. After I run this command, I do not see that the virtual machine has filled with 485 GB of data. But in vCenter space used is still the Prov. as 20 GB space that is taken by the guest operating system. No idea why its not reflected with the VMDK. Checked the datatstore (in navigating the VMDK) is not reflcted. Has also had the same problem with LInux VM. It was conducted to make a larger VM to run some tests. Any response is appreciated.

    Thank you.

    The createnew option you use "Creates a file name and size, with content that is composed of zeros."

    With a thin virtual disk put in service, blocks of data but which are composed of binary zeros are not actually allocated, only a NULL pointer is created which - if the data are read re - returns binary zeros again. If you want to allocate disk space on the data store (i.e. cultivating the hard file) you need to write values non-null. For Linux, you can for example use the shred command.

    André

  • Locate a virtual machine without vCenter?

    We run ESXi 4.1 with vCenter 4.1.  Our vCenter server as its backend SQL are located on the virtual machines.  Recently, our SQL Server went down vCenter rendered useless.  I rose all return successfully logging into the host of the SQL Server virtual computer with my client vSphere and restart it.  However, without vCenter, I was connecting each host and verification of inventory search of the virtual machine.  Fortunately, we do not have many guests, but y at - it a script or tool I can ues to know about what a particular VM host lies when vCenter isn't available?

    Thank you-

    Al Gaspar

    If you are looking for a particular virtual machine, you can use a script like PowerCLI below

    $hostlist = "esxihost1", "esxihost2", "esihost3".

    $hostlist = Read-Host "enter the name of the virtual machine:

    $hostlist | %{

    $dummy = connect-VIServer-Server $_-username-password

    If (Get-VM-name $vmName - ErrorAction SilentlyContinue) {}

    Write-Host "VM" $vmName "found on" $defaultViServer - ForegroundColor Green

    Disconnect-VIServer-confirm: $false

    breaking

    }

    Disconnect-VIServer-confirm: $false

    }

  • Delete the virtual machine to the specified date

    I'm trying to write a script to remove a virtual computer on a certain date.  Currently, I want people to add this in the name of the virtual machine "VMname_Delete-/ 1/1/14", I then search for the virtual computer with:

    Get - VM | where {$_.name - cmatch "Delete-\d\/\d\/\d"}

    With that, I'm sure that the correct VM is selected, and I tested it with virtual machines to make sure.  Now comes the hardest part (at least for me), I want to take the date to which belongs the VM name, convert it to a DateTime and then compare it to the current date.  If they match, I want to remove the virtual machine.  I tried something in the sense of:

    Get - VM | where {$_.name - cmatch "Delete-\d\/\d\/\d"} | foreach {$_ .name-split "-"}

    Which of course divide the table edge, and on tests, I had an output similar to:

    VM_Delete

    01/01/14

    Of course, now I don't know how to finish the rest.  I thought that the script would be something like:

    Get - VM | where {$_.name - cmatch "Delete-\d\/\d\/\d"} | {foreach}

    If (($_.name-split «-»)-[DateTime] - game (get-date-format ' MM/dd/yy'))

    {Remove-VM - VM $_ - DeletePermanently}

    }

    I don't see the logic in my head, but of course, I just can't write they way I think it should go.  Any help is appreciated.

    Perhaps you could do something in this direction

    $now = get-Date

    Get - VM | where {$_.name - cmatch "Delete-\d\/\d\/\d"} | {foreach}

    $dt = [datetime]($_.) Name.Split('-') [1])

    If ($dt - lt $now) {}

    Remove-VM - VM $_ - DeletePermanently

    }

    }

    With the use of the index ([1]), we select the date part of the name of the virtual computer.

    Then we have "cast" the string into a DateTime object.

    Note that typeface could cause problems, depending on the culture settings you use.

    Worse, divide you the date on the character string ' / ' and then generate the DateTime object as follows

    $now = get-Date

    Get - VM | where {$_.name - cmatch "Delete-\d\/\d\/\d"} | {foreach}

    $dummy, $year $day, $month = $_. Name.Split('-') [1]. Split('/')

    $dt = get-Date-day $day - month $month-year $year

    If ($dt - lt $now) {}

    Remove-VM - VM $_ - DeletePermanently

    }

    }

  • WS8... Delete the virtual machine list

    I have 8 Workstation for Windows (running on Windows 7 x 64), just put at level towards the new generation today. The other day, I deleted a VM by going to my directory and just delete the VM folder. Now 8 Workstation, it still shows the VM it but when I click it, it gives me an error (not found) as it should.

    If I right click on this missing virtual machine, it gives me just an option to play. How can I remove these virtual machines in the list if there is not a virtual machine it more? Is there a file I can edit or a parameter somewhere? I have searched but can't see to find.

    I am looking for and looked through 10 pages here and not see this question, unless I missed it, so please give me a link and close this post.

    Thank you!

    Edit
    C:\Documents and Settings\userApplication Data\VMware\inventory.vmls

    and if still necessary
    C:\Documents and Settings\userApplication Data\VMware\preferences.ini

Maybe you are looking for