Virtual computer shutdown

Simple question:

Is this OK to shut down Windows servers since the close button in the vSphere client?

Or, they are still the operating system shutdown? (assuming, of course, there both connected person)

Thank you

eakinsb

If VMware Tools are installed the form stop the vSphere client stationary within the operating system of the virtual machine - so that they are in the in the same with VMware tools installed.

If you find this or any other answer useful please consider awarding points marking the answer correct or useful

Tags: VMware

Similar Questions

  • my computer shutdown itself each time I use netflix for a few minutes

    my computer shutdown itself each time I use netflix for a few minutes. I don't know what the cause, but it's okay

    Hey, Zain.

    Of course, everything is not fine - as a result, the problem.  ;)
    My first thought would be overheating.  Clean dust from the computer lately (if ever)?

    Spent, I suggest you have a look through the system logs (right click on computer > manage; go to computer Management\System Tools\Event Vieewer) and find the event entry that indicates why the computer turns off.  You'll find it at ~ downtime (can be registered just before closing, can be generated on the reboot log entries.)  You devriez find the offending entry in Windows logs\System.
    Whatever it is, search through newspapers preceded entires, a yellow or red !

    HTH,
    Chris

  • Running a Windows 7 virtual computer in Windows 7

    I need to set up a computer virtual of Windows 7 on a pc running Windows 7 already due to software that is in conflict with each other and I need to know if I need a second license for it or I can even use the license for the local computer and the virtual computer?

    You will need a second license of full version:

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

  • copy a folder with its content on a remote virtual computer

    Hello

    I need your help with a script that I am building. "I need to:

    # to find a virtual computer and see if it is enabled, disabled, or enabled.

    # If it is off and then turn it on and copy a folder with the contents of the VM machine.

    Improvements,

    Michel Vaillancourt

    You'd put it in before, something like this:

    $vmName = 'Target'
    $folderName = 'C:\Folder'
    
    Invoke-VMScript "del $folderName" -vm $vmName -HostCredential $HostCred -GuestCredential $GuestCred -ScriptType "bat"
    
    Get-VM -Name $vmName | where{$_.PowerState -ne 'PoweredOn'} | Start-VM -Confirm:$false
    sleep 30
    
    Copy-VMGuestFile  -LocalToGuest -Source $folderName -Destination $folderName -Confirm:$false
    

    You may need to play with the Invoke-vmscript command more

    $cmd = "del $folderName"
    
    Invoke-VMScript "$cmd" -vm $vmName -HostCredential $HostCred -GuestCredential $GuestCred -ScriptType "bat"
    
  • need to reconfigure the virtual computer after deployment of the vm

    Hi all

    I have a script to deploy a computer virtual to a CSV file. I need to change the configuration of virtual machine (CPU and memory) after the deployment of the vm. where the name of the virtual machine should be taken to csv. So any help is appreciated.

    Attach the script used. (downloaded and works fine)

    $vms = import-CSV D:\vm-deploy\vm-deploy.csv

    {foreach ($vm to $vms)

    $Template = get-model $vm.template

    $VMHost = get-VMHost $vm.host

    $Datastore = get-data store $vm.datastore

    $OSCustomization = get-OSCustomizationSpec $vm.customization

    New-VM-name $vm.name - OSCustomizationSpec $OSCustomization - VMHost - $VMHost model $Template - $Datastore - Datastore RunAsync

    }

    # This cmd need to run after the vm deployment completed. The virtual computer name must come from the 1 column of the CSV file

    Set-VM $vmname - NumCpu 2 - MemoryGB 5 - confirm: $false

    Write-Host "All VMs deployed" - ForegroundColor Green

    Disconnect-VIServer-confirm: $false

    CSV file looks like this

    Name, host datastore, Template, customizing

    Test-VM,vm-dep-test,ESX02,P5-vm-stage,vm-deploy

    Thanks in advance...

    A simpler, but not optimal, solution is to use the Wait-job cmdlet.

    Something like that

    $vms = import-CSV D:\vm-deploy\vm-deploy.csv

    $tasks = @)

    {foreach ($vm to $vms)

    $Template = get-model $vm.template

    $VMHost = get-VMHost $vm.host

    $Datastore = get-data store $vm.datastore

    $OSCustomization = get-OSCustomizationSpec $vm.customization

    $tasks += new-VM-name $vm.name - OSCustomizationSpec $OSCustomization - model $Template - VMHost $VMHost '

    Data - $Datastore - RunAsync store

    }

    Waiting-task-task $tasks

    {foreach ($vm to $vms)

    $vm.name set-VM - NumCpu 2 - MemoryGB 5 - confirm: $false

    }

  • Using Get - view instead of Get - VM for BusSharingMode from a virtual computer

    Yet again, another issue was with Get - view. I searched a lot of documentation, but still I don't get the logic how to find good properties that I need to use.

    In this case, I need to transfer this one:

    Get - VM | Get-SCSI controller. Where-Object {$_.} BusSharingMode - eq ˜Physical"} | Select {$_.} Parent.Name}, BusSharingMode

    in:

    Notice-EEG - ViewType VirtualMachine-Property Name,Config.NameofthePropertyforBusSharingMode

    I will be grateful if someone could provide a documentation (or at least give me an idea what to read to get oriented) on these properties and their format so that they can be used to Get-View.

    The closest thing I found is this one: http://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.VirtualMachine.html and the VirtualMachineConfigInfo: http://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.vm.ConfigInfo.htmlhttp://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.vm.ConfigInfo.html
    I guess that in this case, we are talking about VirtualHardware (SCSI controller): http://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.vm.VirtualHardware.html and still I cannot establish the connection.

    It is all documented in the VMware vSphere QAnywhere, but as the title suggests, this is a reference.

    The vSphere Web Services SDK Programming Guide is intendedas a learning guide.

    Only no VMware book that explains a bit more on the vSphere API and objects is the book of Steve Jin, called VMware VI and vSphere SDK: management of VMware Infrastructure and vSphere

    It is written for Java developers, but it explains the basic concepts.

    In this specific question, you must know that all devices connected to a virtual computer is located in Config.Hardware.Device.

    It is a loop through the devices and extract the virtual SCSI controllers, also with bus physics active sharing.

    Once you have, it's simple extract properties.

    foreach ($vm in Get-View - ViewType VirtualMachine - Name property, Config.Hardware.Device) {}

    $scsi = $vm. Config.Hardware.Device | where {$_-is [VMware.Vim.VirtualSCSIController] - and $_.} SharedBus - eq "physicalSharing"}

    {if ($SCSI)}

    $scsi | Select @{N = "VM"; E = {$vm. Name}},

    @{N = "Controller"; E={$_. DeviceInfo.Label}},

    @{N = "BusSharingMode"; E={$_. SharedBus}}

    }

    }

  • Behavior of a virtual computer when it is placed on Standard vSwitch with multiple active adapters

    Hey everybody

    Right now I'm focusing on the aspect of vSphere network design and I have a question about this:

    If I have a vSwitch with a group of ports and attached to this group of ports there are 2 vNIC or NIC better and I chose road based on the Port ID and all cards are active, what happens to machines when I unplug a power cord? Lets assume vm1 is vnic 0 and vm2 on vnic1 and I unplug the power cord of vnic1. VM2 will switch automatically to vnic0 or should I restart? How should I take care of this problem when there is no automatic failover? Create an etherchannel and two assets assets adapters?

    Thank you and best regards

    Michael

    Hi Michael,

    your virtual computer will be moved to the other vmnic again access to the network after the failure. No reboot needed.

    It is indeed a very simple way of load balancing / team. When you turn on a virtual machine is bound to a vminc. As you said correctly for this example, vm1 goes to vmnic0, vm2 to vmnic1, to vmnic0 vm3 and vm4 to vmnic1.

    This is the default setting as it is quite simple and you don't need any additional switch configuration.

    If you want to change this behavior, for example to build an etherchannel, remember to change the policy on the vSwitch / exchanges, which would require a load balancing of "route based on the hash of the IP.

    Tim

  • Get the content of the field "Annotation" of a virtual computer

    I can get the content of the field "Annotation" in the tab "Summary" of a virtual computer using the .notes property.

    Think the contents of the field as:

    First line

    Second line

    Fourth line

    Fifth line

    In this case, the .notes property returns a single string.

    Looking inside the string I get I see the contents of the first line, a HEX '0A' character, the content of the second line, another character HEX '0A' and so on.

    How can I get the content of each individual line?

    Concerning

    Marius

    One solution is to cut the string as = $b $a.Split([char]0x0a)

    Then read the lines simple as $b.item (n) beginning with index 0. $b.count returns the number of lines.

    André

  • Get a virtual computer IP addresses

    In powershell I can use the VMGuest object and the IP address property to return an array of all the IP addresses on the machine. I can't find anything to vCO that does the same thing. In my view, there is a VcVirtualMachineGuestSummary, but the ipAddress property returns only 1 IP.

    Is there something to vCO which will return all the IP addresses?

    Yes, there is.

    The script code below will display all the IP address all cards on a given virtual machine ("vm" is the virtual computer object)

    var nics = vm.guest.net; // enumerate all NICs
    for (var i in nics) {
      var nic = nics[i];
      var ips = nic.ipConfig.ipAddress; // enumerate all IP addresses on this NIC
      for (var j in ips) {
        var ip = ips[j];
        System.log("IP -> " + ip.ipAddress);
      }
    }
    
  • PowerCLI script needed to change the 9 network adapters to a virtual computer in a single operation

    I got about 30 mV, and I need to change the 9 cards each virtual computer network. The script below takes a while to run, is there a way to speed it up, by changing all the interfaces of a VM in a single operation?

    $VM = "MY_VM_".

    1... 30 | % {

    $VMS = $VM + $_

    Get-vm-name $VMS | Get-NetworkAdapter-name '2 network adapter | Together-NetworkAdapter - NetworkName "blah1" - connected: $true - confirm: $false

    Get-vm-name $VMS | Get-NetworkAdapter-name "Network adapter 3 | Together-NetworkAdapter - NetworkName "blah2" - connected: $true - confirm: $false

    Get-vm-name $VMS | Get-NetworkAdapter-name "NIC 4 | Together-NetworkAdapter - NetworkName "blah3" - connected: $true - confirm: $false

    Get-vm-name $VMS | Get-NetworkAdapter-name "adapter 5 network | Together-NetworkAdapter - NetworkName "blah4" - connected: $true - confirm: $false

    Get-vm-name $VMS | Get-NetworkAdapter-name "NIC 6. Together-NetworkAdapter - NetworkName "blah" - connected: $true - confirm: $false

    Get-vm-name $VMS | Get-NetworkAdapter-name 'network 7 adapter | Together-NetworkAdapter - NetworkName "blah" - connected: $true - confirm: $false

    Get-vm-name $VMS | Get-NetworkAdapter-name '8 network adapter | Together-NetworkAdapter - NetworkName "blah7" - connected: $true - confirm: $false

    Get-vm-name $VMS | Get-NetworkAdapter-name 'network 9 adapter | Together-NetworkAdapter - NetworkName "blah8" - connected: $true - confirm: $false

    Get-vm-name $VMS | Get-NetworkAdapter-name '10 network adapter | Together-NetworkAdapter - NetworkName "blah9" - connected: $true - confirm: $false

    }

    Thank you very much!!. I was able to change the script of LucD work in DVS.

    FINAL VERSION:

    $hash = $null

    $hash = @ {}

    $dvs = get-view (get-VirtualSwitch-name "DVS5.1")

    $dvs. PortGroup | % {Get-View-Id $_} | %{

    $hash.add ($_.) Name, $_. Key)

    }

    # Loop below for all virtual machines

    1... 90 | %{

    $i = $_

    write-host 'tenant = $i'

    $convertTab = @ {}

    "Network adapter 1" = "$1te I".

    "Network adapter 2" = "$2te I".

    'Network adapter 3' = ' $3te I ".

    "Network adapter 4" = "$4te I".

    'Network adapter 5' = ' $5th I ".

    'Network adapter 6' = ' $6te I ".

    'Network adapter 7' = ' $7te I ".

    'Network adapter 8' = ' $8te I ".

    'Network adapter 9' = ' $9te I ".

    'Network adapter 10' = ' $10te I ".

    }

    Notice-EEG - ViewType VirtualMachine-property "Config.Hardware.Device" - filter @{' Name '=' VM-$i - 1 ""} | %{

    $spec = new-Object VMware.Vim.VirtualMachineConfigSpec

    $_. Config.Hardware.Device | where {$_-is [VMware.Vim.VirtualEthernetCard]} | %{

    $dev = new-Object Vmware.Vim.VirtualDeviceConfigSpec

    $dev. Operation = "├editer."

    $dev. Device = $_

    $dev.device.Backing = new-Object VMware.Vim.VirtualEthernetCardDistributedVirtualPortBackingInfo

    $dev.device.backing.port = new-Object VMware.Vim.DistributedVirtualSwitchPortConnection

    $dev.device.backing.port.switchUuid = $dvs. UUID

    $dev.device.backing.port.portgroupKey = $hash [$convertTab [$_.]] DeviceInfo.Label]]

    $spec. DeviceChange += $dev

    }

    $_. ReconfigVM ($spec)

    }

    }

  • How to make a virtual computer to connect to a CD player with an ISO mounted when you start the virtual machine?

    I am the creation of virtual machines using PowerCLI 5.5 on vSphere 5.0; and while the virtual machine is turned off, I am able to mount an ISO on a CD player and change the boot order to boot from the CD-ROM (for another post).  I have the flag startConnected set to true, but am not having much luck getting the virtual machine to connect to the CDDrive

    $cdObj = $Vm | New-CDDrive - IsoPath $isoPathName - StartConnected: $true

    If ($cdObj - no $null)
    {
    #Power off VM if it is on
    $VmState = $Vm.PowerState

    If ($VmState - eq "Receptor")
    {
    $Vm | Stop-Vm-confirm: $false - ea 0
    }

    $BootHardDiskName = 'disk 1 '.
    $VmView = get - VM $VmName - Server $serverObj.Name | Get-View
    $HardDiskDeviceKey = ($VmView.Config.Hardware.Device |) Where-Object {$_.} DeviceInfo.Label - eq $BootHardDiskName}). Key

    $BootableHardDisk = new-Object - TypeName VMware.Vim.VirtualMachineBootOptionsBootableDiskDevice - property @{'DeviceKey' = $HardDiskDeviceKey}
    $BootableCDRom = new-Object-Type VMware.Vim.VirtualMachineBootOptionsBootableCdromDevice

    #Set for CDRom boot order
    $BootIso = new-Object VMware.Vim .VirtualMachineConfigSpec - property @ {}
    "BootOptions' = New-Object VMware.Vim.VirtualMachineBootOptions - property @ {}
    BootOrder = $BootableCDRom
    }
    }

    #Set VM from the start settings at the start of the first CD and forces the display to update (sometimes delayed)
    $VmView.ReconfigVM_Task ($BootIso) | out-null
    $VmView.UpdateViewData ("Config.BootOptions.BootOrder")

    #Power on VM
    $Vm | Start-VM-confirm: $false - ea - global 0EV: vmOpsError | out-null

    When I start the VM, it does start the ISO.

    If I go to vCenter, the CD is pointing to the ISO file, but the 'Connected' to change settings option is not checked;  I can restart the VM of vCenter and then the VM restarts the ISO, but not in the script.

    I even put code to add a lead time of 5 to 10 seconds; I restart the virtual machine twice in the script and I can't CD to connect to start the virtual computer.

    Appreciate any suggestions.

    Maureen

    Have you tried to do a

    Game-CDDrive - CD $cdObj - connected - confirm: $false

    immediately after the start-VM?

  • Mutiple remove virtual computer in Virtual Center 5.1?

    Does anyone know how to remove several virtual machines both in the virtual Center 5.1?

    Looking for an easier way rather than a virtual computer to both research and removing one at a time.

    I did a LOT of research with ZERO success.

    Hi theire,.

    so if I would have a very big amount of VM that I have to delete then I would with an input file and using powercli for quicker removal.

    try following:

    create the file vms.txt (and writing of the vm vertically)

    Then, you can use following code as deletion for all virtual machines of this entry.

    ####################

    to connect-viserver xxxxxx

    $content = get-content "path to the file.

    $vms = get - vm $content

    {foreach ($vm to $vms)

    Remove-VM $vm - DeletePermanently-confirm: $false

    }

    #####################

    It's a very simple Code > you could also integrate some kind of loop until the VM is turned off,...

    But in any case with Powercli I think delete is much more rapid then plu vi-client. equal to how the script looks like.

    Best regards

    Max

  • Reload the Configuration of the virtual computer after changing the VMX file

    Hello

    If I make changes to a file on a virtual machine's .vmx in vCenter 5.5 is automatically valid configuration for the engine power vm off? I made some changes earlier and it seemed to be the case, but one of the steps that I see in some of the documents is to reload the configuration of the vm, so it can be used appropriately. So this happens automatically or not?

    Hello

    If she turned off the virtual computer, then during power on, changes to take effect.

    Concerning

    Mohammed

  • Move-vm can migrate a powered off the virtual computer to a DRS cluster?

    When I try to move-vm has propelled off VM to a destination of DRS cluster, he says that he cannot migrate a powered off the virtual computer to a DRS cluster.   I can explicitly name the destination of the host and it works, but that defeats the purpose of using the DRS and forces me to script on the destination hosts.

    I do something wrong or I would be able to migrate a powered off the virtual computer to a DRS cluster?

    Thank you

    -MattG

    Hello, MattG-

    I get the same behavior as you when you try to move a VM PoweredOff to a DRS cluster, specifying the cluster as the value for the parameter - Destination to Move-VM (using PowerCLI v5.1 Rel 2 v5.5 Rel 1).  Not quite what I expected.

    To work around the problem, and without having to appoint a particular host as destination, you could use some Get-Random, do something like:

    Move-VM myVM0 -Destination (Get-Cluster myDestDRSCluster | Get-VMHost | ?{$_.State -eq "Connected"} | Get-Random) -RunAsync
    

    Who should receive the machine said cluster and on a host that is in the connected state.  A subsequent operation to the market (whenever do you eventually) should then see DRS power on the virtual machine on a suitable host in the cluster.

    Maybe the dev team can comment if this behavior is the expected or desired.

    Anyway, how does do for you?

  • Can I migrate a virtual computer to a new family of CPU? -Cisco Call Manager PUB/SUB

    I currently have 2 host VMware ESXi 4.1:

    1. Dell PER905 - running 16 x 2.39 GHz (core) CPU / Quad-Core AMD Opteron (tm) Processor 8378 (processor type)

    2 cisco UCS C260 M2 (BASE-2646) - running 20 x 2,393 GHz (core) CPU / Intel (R) Xeon (R) CPU E72870 (processor type)


    The main objective is to move 2 VM of the Dell host to the host of Cisco, the reason is because Cisco Support said that the virtual machine requires an Intel and not AMD they are currently.  I currently have a Publisher Cisco Call Manager and Call Manager subscriber residing on the host of Dell, they are constructed (non - OVF) on this machine some time ago.  We started to have problems with them and ultimately Cisco indicated above.


    A few questions come to mind, can someone please shed some light on them for me?

    1. can I migrate these 2 AMD to Intel VM, without her damage/destruction of the virtual machine?  What that is the answer may be, can you explain to me the why?  The answer to the migration of the CPU is dependent on the guest OS or what?  I ask because I did this successfully on a Windows Guest OS virtual machine, but I guess it is that Cisco makes me hesitate/question.

    2 would it not be better to each virtual machine rebuilt on the new host, rather than through migration for the purposes of the CPU?

    3. What is the recommended method to endorse these VM, before proceeding with the migration?  I'm not talking about save data in the call manager for reasons that I will perform a backup it first.  I ask more along the lines of - for the love of the virtual machine itself.

    1. can I migrate these 2 AMD to Intel VM, without her damage/destruction of the virtual machine?  What that is the answer may be, can you explain to me the why?  The answer to the migration of the CPU is dependent on the guest OS or what?  I ask because I did this successfully on a Windows Guest OS virtual machine, but I guess it is that Cisco makes me hesitate/question.

    You should be able to perform a cold migration. The concern is the guest operating system level.  The Cisco device is probably a Linux distro.  The distribution must use the AMD64 instruction set (Intel 64 compatible) and theoretically should migrate fine.  However, if the guest what OS was improved the AMD CPU instructions, he can expect these features when you restart.  We have at least a virtual computer in our environment that we need to stick to a certain family of Intel processor because the software license dig and binds to it, but this is the only scenario that I have met.

    2 would it not be better to each virtual machine rebuilt on the new host, rather than through migration for the purposes of the CPU?

    I feel better on the redeployment, but if the migration is successful and applications run stable, then you reaped just the benefits of virtualization.

    3. What is the recommended method to endorse these VM, before proceeding with the migration?  I'm not talking about save data in the call manager for reasons that I will perform a backup it first.  I ask more along the lines of - for the love of the virtual machine itself.

    You could do something as simple as the cloning of a copy.  Depending on how you are approved for vSphere, you can have the POS to back up your virtual machine.  You can also use a tool such as VMWare Converter or Veeam Backup and replication. Given the importance of these virtual machines, I would get at least 2 backups of different type.  You should be able to validate any backup with VMWare Workstation prior to migration.

Maybe you are looking for