Exactly which information from the 'route print' output do you want to extract to the CSV?
Re: route print info
Re: To create PowerCLI 6.0 script for create & delete snapshot of multiple vm (some for daily basis & some weekly)
Removing snapshots from VMs is really quite straightforward.
The following will remove all snapshost from all VMs.
Get-VM|Get-Snapshot|Remove-Snapshot-Confirm:$false
If that is not what you want, you will have to give more information on how to select the snapshot(s) to remove.
For using the Windows Task Scheduler, have a look at Alan's Running a PowerCLI Scheduled task post.
Can no longer drag and drop into the Virtual Desktop from the Host Desktop
Hello,
I have VMware Player 3.1.5, installed to Windows 7 Starter, SP1.
I appreciate that this is an old version of the VMware Player, but would appreciate help.
(I had to choose this version of VMware Player in order to install Win98SE - later versions of VMware Player do not support this Guest OS. The Win98SE is for the purpose of running some old, but still useful, applications that do not run in the Host operating system Windows 7.)
I can no longer drag and drop files / folders into the Virtual Desktop, from the Host Desktop.
I can still do it the other way round.
Until recently, drag and drop between the VM installed Guest operating system Desktop and the host real Desktop, worked fine.
This Win98SE Guest operating system does not support / is not supported for, the alternative Import method, of using Shared folders.
The antivirus installed to the Host operating system is Avast and I always disable it when using the VM.
When I try to drag and drop from the Host system to the Guest VM, there is no error message, but the "read-only" pointer symbol appears (a circle with two diameter lines in it) instead of the usual pointer "dragging file" symbol, and NO transfer takes place.
I have tried dragging and dropping: a folder, a simple .txt format file, and a Microsoft Word file.
I have no restore points available dated prior to August 7, 2016, the date when the VM's Import function last worked.
The following is what I have tried to do to resolve the issue:
Rebooting.
("VMware Player 3.1.5" does not run in Safe Mode.)
Used "MSCONFIG" with minimum 'Startup' items Enabled (including with "VMWare Workstation" enabled).
Carried out a "Repair" of "VMware Player 3.1.5" (which can only be done from its original installer file).
Within "VMWare Player", carried out a "Repair" of its VM Tools".
It detects a new version of VM Tools but is unable to install it.
VM Tools are installed.
Iindividually uninstalled all but one of the Windows Security and Non-Security Updates that have been installed till now since 7.8.2016 (which was the date when the Import function of VMWare Player was last used successfully), testing VMWare Player's Import function after each individual Windows Update uninstall.
(Did NOT test the following Windows Updates types, installed since 7.8.2016 (see above):
.NET Framework Updates,
Microsoft Office Updates,
and one Silverlight Update.)
I also replaced the VM folder with a Backup made prior to the issue.
DIsabled both Avast Antivirus and Comodo Firewall, and thenI tested the VM's Import function.
I uninstalled the VMware Player, and then reinstalled it.
I uninstalled Avast antivirus, then used the Avast Clean Tool to ensure complete removal, and then tested the VM's Import function.
All the above changes were reversed using System Restore.
Then I replaced the Backup VM I had tried, with the version I had been using when the Import function had failed.
I then found that the Import function worked , but because there was no logical reason why it should have been "repaired" - since in effect, NO changes had been made since it failed, I suspected correctly that this "miracle" would be temporary. Therefore I rebooted the computer and tested the VM's Import function again, when (of course) it did NOT work.
I have no idea why it failed, nor why it worked just temporarily, and it is NOT working now.
I would appreciate help in restoring the VM's Import (drag and drop) function.
Regards,
Robert333
Re: Upgrade for BUGS/FIXES for ESXI 5.5
VMware provides several methods to install updates and patches. The method which fits best for you depends on the environment. For large environments Update Manger might be the best choice, whereas an update from the command line, or an interactive CD-ROM update may fit best for a single (or only a few) host.
Please take a look at https://kb.vmware.com/kb/2008939 which shows how to update the host from the command line, and also contains links to e.g. the Upgrade Guide.
André
Re: VRO same workflow concurrent execution is getting failed
Hi,
For such concurrent scenarios, vRO provides a mechanism to lock/unlock/wait.
Take a look at LockingSystem scripting object in vRO API Explorer.
Re: PowerCLI Report :Getting inventory VMs from ESX cluster hosts
when attempting to open ZIP file then I got the following the error like the archive is either in unknown format or damaged. Addionataly , I need to retrieve Virtual machine Consolidation Needed status from VMs how can we add into the powercli script?
Thanks in advance for your all help.
VMware vRealize Automation integrated AD has error
Re: PowerCLI Report :Getting inventory VMs from ESX cluster hosts
That zip file was created by the forum SW, not sure what happened there.
In any case I'll include the script inline.
$report=foreach($vcin$global:defaultviservers){
foreach($vmin (Get-View-ViewTypeVirtualMachine-PropertyName,runtime.powerState,Guest.net,Config.Hardware.numCPU,Config.Hardware.MemoryMB,Runtime.Host,Guest.GuestFullName,
Config.GuestFullName,Parent,ResourcePool,Config.Hardware.Device,Config.version,Config.Tools.ToolsVersion,guest.toolsversionstatus,
Config.Files.VMPathName-Server$vc )){
$t=Get-View$vm.ResourcePool -PropertyName,Parent-Server$vc
while($t.getType().Name -eq"ResourcePool"){
$t=Get-View$t.Parent -PropertyName,Parent-Server$vc
}
if($t.GetType().Name -eq"ClusterComputeResource"){
$cluster=$t.Name
}
else{
$cluster="Stand Alone Host"
}
while($t.getType().Name -ne"Datacenter"){
$t=Get-View$t.Parent -PropertyName,Parent-Server$vc
}
$datacenter=$t.Name
$vm.Config.Hardware.Device |where {$_.GetType().Name -eq"VirtualDisk"} |
Select @{N="VM";E={$vm.Name}},
@{N='powerState';E={$vm.runtime.powerState}},
@{N='IP';E={[string]::Join(',',($vm.Guest.Net |%{$_.IpAddress |where{$_.Split('.').Count -eq4} |%{$_}}))}},
@{N='NumCPU';E={$vm.config.Hardware.NumCpu}},
@{N='Memory GB';E={$vm.Config.Hardware.MemoryMB|%{[math]::Round($_/1kb,2)}}},
@{N='vCenter';E={$vc.Name}},
@{N='VMHost';E={$script:esx=Get-View-Id$vm.Runtime.Host -Server$vc ; $script:esx.name}},
@{N='GuestOS';E={$vm.Guest.GuestFullName}},
@{N='ConfiguredOS';E={$vm.Config.GuestFullName}},
#@{N="Folder";E={$path}},
@{N="Cluster";E={$cluster}},
@{N="Datacenter";E={$datacenter}},
@{N="Scsi";E={$_.UnitNumber}},
@{N="Hard Disk";E={$_.DeviceInfo.Label}},
@{N="Disk datastore";E={$_.Backing.Filename.Split(']')[0].TrimStart('[')}},
@{N="Disk capacity GB";E={$_.CapacityInKB|%{[math]::Round($_/1MB,2)}}},
@{N="Disk type";E={
if($_.Backing.GetType().Name -match"flat"){
"Flat"
}
else{
$_.Backing.CompatibilityMode
}}},
@{N='DeviceName';E={
if($_.Backing.GetType().Name -match'raw'){
$_.Backing.DeviceName
}
else{
$script:lunnaa= (Get-View-Id$_.Backing.Datastore -Server$vc ).Info.Vmfs.Extent[0].DiskName
$script:lun=$script:esx.Config.StorageDevice.ScsiLun |where{$_.CanonicalName -eq$script:lunnaa}
$script:lun.Descriptor |where{$_.Id -match'vml.'} |Select-ExpandPropertyId
}}},
@{N='LUN NAA';E={
if($_.Backing.GetType().Name -match'raw'){
$lunUuid=$_.Backing.LunUuid
$script:lun=$script:esx.Config.StorageDevice.ScsiLun |where{$_.Uuid -eq$lunUuid}
$script:lun.CanonicalName
}
else{
$script:lunnaa
}}},
@{N='LUN ID';E={
$dev=$script:esx.Config.StorageDevice.PlugStoreTopology.Device |where {$_.Lun -eq$script:lun.Key}
$script:esx.Config.StorageDevice.PlugStoreTopology.Path |where {$_.Device -eq$dev.Key} |
Select-First1-ExpandPropertyLunNumber
}},
@{N='VMConfigFile';E={$VM.config.files.VMpathname}},
@{N='VMDKPath';E={$_.Backing.FileName}},
@{N="HW Version";E={$vm.Config.version}},
@{N="VMware Tools version";E={$vm.Config.Tools.ToolsVersion}}
@{N="Tools Status";E={$vm.guest.toolsversionstatus}},
@{N="NIC Name";E={($vm.config.hardware.device |where {($_.DeviceInfo.Label -like"Network*")}).DeviceInfo.Label}},
@{N="Mac"; E={($vm.Config.Hardware.Device |where{$_.DeviceInfo.Label -like"Network*"}).MacAddress}},
@{N="Portgroup"; E={
$nic=$vm.Config.Hardware.Device |where{$_.DeviceInfo.Label -like"Network*"}
[string]::Join(',',(
$nic|%{
if($_.DeviceInfo.Summary -notmatch'DVSwitch'){
$_.DeviceInfo.Summary
}
else{
Get-View-ViewTypeDistributedVirtualPortgroup-PropertyName-Filter @{'Key'=$_.Backing.Port.PortgroupKey} -Server$vc |
Select-ExpandPropertyName
}}))}}
}
}
$report|Export-Csvreport.csv-NoTypeInformation-UseCulture
Re: PowerCLI Report :Getting inventory VMs from ESX cluster hosts
Lastly I need to retrieve Virtual machine Consolidation Needed status from VMs how can we add into the powercli script?
Re: route print info
What I am trying to achieve with this script is HostName,IPconfig details for all active adapters,Persistent Routes info
====CSV=====> HostName || IP Info || Persistent Route
Something like this for IPConfig and route print
For Ipconfig output to CSV (Invoke Get-NetIPConfiguration -Detailed)
ComputerName : test01
InterfaceDescription : vmxnet3 Ethernet Adapter
NetAdapter.LinkLayerAddress : 00-50-56-BB-78-9A
IPv4Address : 10.XX.XX.XX
IPv4DefaultGateway :
NetIPv4Interface.NlMTU : 1500
NetIPv4Interface.DHCP : Disabled
DNSServer : 8.8.8.8
ComputerName : test01
InterfaceAlias : VLAN 3504
InterfaceIndex : 13
InterfaceDescription : vmxnet3 Ethernet Adapter #2
NetAdapter.LinkLayerAddress : 00-50-56-BB-4F-3A
NetProfile.Name : servereps.local
NetProfile.NetworkCategory : DomainAuthenticated
IPv4Address : 153.71.4.36
IPv4DefaultGateway : 153.71.4.126
NetIPv4Interface.NlMTU : 1500
NetIPv4Interface.DHCP : Disabled
DNSServer : 8.8.8.8
--------------------------------------------------------
For route print output to CSV
Host name & Persistent Routes are enough.
Something like this output..
Persistent Routes:
Network Address Netmask Gateway Address Metric
10.1.10.0 255.255.255.0 10.1.20.254 1
10.1.30.0 255.255.255.0 10.1.20.254 1
Re: Can't login to console after alt - f1
OK - after sleeping on it - and not sleeping on it. There are 3 problems - the main one is this - When upgrading to exsi 6.0 the Lockout root feature is enabled and it even applies to the local console command interface. Secondly, this ones on me, I never configured vCenter to auto start - duh! Thirdly, even if I had, the upgrade swapped the network static IP addresses of the interface cards from the previous configuration so none of the vms on that box were visible on the network.
Re: snap shot Deletion
Is there any way to SSH to host and delete file and reduce the VM down time.
Re: Fusion 8.5 - macOS Sierra 10.12 (GM) - MacBook Pro Camera Malfunction
I this mean time, I suggest to use this workaround:
KB Parallels: Facetime Camera stops working after starting Parallels Desktop
It is for Parallels but I can confirm it works on VMware Fusion 8.5 with macOS Sierra 10.12 on Macbook Pro 10.1.
Note that this workaround doesn't fix the problem, it just make possible to use your camera without restart computer.
Re: How to edit IPAM plugin in vRO 7.1
Okay .. you need to specify it as an endpoint .
Please see the documentation note
"
When you create an Infoblox IPAM endpoint, you specify the master connection that vRealize Automation uses for communicating with NIOS. Inside the endpoint, you can add more connections and specify their priorities. You can create up to four failover connections. In the master connection, you specify the API type: WAPI or Cloud API. The failover connections use this same API type.
"
Re: How to manage HP Smart Array via GUI?
This is not possible in ESXi, you can only use the CLI to manage the Smart Array Controller.
An option would be to use HP Insight Control to do this.
Re: VRO same workflow concurrent execution is getting failed
Wow. that's a great one ,
VMware VMXNET3 drive issue
Dear Support,
We are facing issue after upgrading VMware 5.5. update 2 to VMware 6.0 update 2. As some of the machine working fine only on one host but when we do the live migration of that machine to other host then it wont work. When we checked the device manager the drivers for VMxnet3 shows yellow exclamation after migration.
Please advise.
Regards,
Hakim B
Cisco hyper flex
If you are an existing customer with CISCO UCS and one thing you should not miss to check is , CISCO HYPER FLEX.
Get VM DRS-Group and Datatsore
Hello,
I'm a Script Newbie.
Hope somebody can help me. This Script works fine. But I Need also the Datastore Location of each VM.
$Cluster=Get-Cluster-Name<Name>
$vmsInGroup=$cluster.ExtensionData.ConfigurationEx.Group |where {$_-is[VMware.Vim.ClusterVmGroup]} |%{Get-View-Id$_.VM |Select-ExpandPropertyName}
$VMsNotInDrsGroup= @(Get-VM-Location$Cluster|where {$vmsInGroup-notcontains$_.Name} |SelectName,VMHost|SortVMHost)
Thank you
Andi
Re: How to get all the "In Progress" requests submitted (vRA - Requests page)
Here is a sample code showing how to enumerate all requests and print their number and state:
var all = Server.findAllForType("vCACCAFE:CatalogItemRequest"); for each (var request in all) { System.log("Request " + request.requestNumber + " is in state " + request.state.value()); }
By comparing state value, you can easily filter those which match a given criteria (eg. are in progress).