I am on vSphere 5.5. Recently I used Storage vMotion to move several datastores from one LUN to another. My process was - I created a LUN on the storage, created a temp datastore on the LUN, SvMotion'ed several VMs to the temporarry datastore, deleted the original LUN and datastore, re-created the LUN and datastore, then SvMotion'ed the VMs back to the original storage (basically a temporary swap so I could re-size datastores smaller). Somewhere during the process, I noticed that I now have folders with the name ".sdd.sf" on the root of every datastore that I used SvMotion on. On datastores that I did not do anything with, there is no such folder. The folder is visible in the datastore browser. I see from some research that ESXi has system files with the name .sdd.sf, but I see nothing about folders, and I am not sure why they showed up after a SvMotion. Anyone else seen this? Can I delete these folders?
.sdd.sf folder after Storage vMotion
Can not run Invoke-VMScript in parallel
Hello everyone!
I create script which convert VM to template, then run converted VMs, then Invoke-VMScript. After this my script reboot, shutdown this VMs and convert VMs to templates.
All this operations I run in powershell parallel mode.
But when my script try to run Invoke-VMScript in parallel mode, my script freezes on this operation. I see only - "Inline Script runniung"
But If I open one of VMs, I see command run my local script on VM and it's done.
In VM events I see the same, command Invoke-VMScript done.
How to fix this? What I do wrong?
Thanks in advance!
My script:
function Load-PowerCLI
{
Add-PSSnapin VMware.VimAutomation.Core
Add-PSSnapin VMware.VimAutomation.Vds
}
Load-PowerCLI
# Connect to Vcenter
$vcenter="vcenter.domain.local"
function Connect-Vcenter
{
Connect-VIServer -Server $vcenter
}
Connect-Vcenter
function Unload-PowerCLI
{
Remove-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
Remove-PSSnapin VMware.VimAutomation.Vds -ErrorAction SilentlyContinue
}
# Get template List
function Get-FolderFromPath
{
param(
[String] $Path
)
$chunks = $Path.Split('\')
$root = Get-View -VIObject (Get-Folder -Name $chunks[0])
if (-not $?){return}
$chunks[1..$chunks.Count] | % {
$chunk = $_
$child = $root.ChildEntity | ? {$_.Type -eq 'Folder'} | ? { (Get-Folder -id ("{0}-{1}" -f ($_.Type, $_.Value))).Name -eq $chunk}
if ($child -eq $null) { throw "Folder '$chunk' not found"}
$root = Get-View -VIObject (Get-Folder -Id ("{0}-{1}" -f ($child.Type, $child.Value)))
if (-not $?){return}
}
return (Get-Folder -Id ("{0}-{1}" -f ($root.MoRef.Type, $root.MoRef.Value)))
}
$Templateslist=(Get-FolderFromPath -Path 'DC\Templates\Windows' | Get-Template | ? {$_.name -eq 'TEST'}).name
$Templateslist
# Convert Templates to VMs
workflow convert-templates-to-vm {
param(
[string[]]$templates,
[string]$vcenter,
[string]$session,
[string]$user,
[string]$pass
)
foreach -parallel ($template in $templates)
{
$run = InlineScript{
Add-PSSnapin VMware.VimAutomation.Core
Connect-VIServer -Server $Using:vcenter -Session $Using:session
Set-Template -Template $Using:template -ToVM
Remove-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
}
$run
}
}
convert-templates-to-vm -templates $Templateslist -vcenter $vcenter -session $global:DefaultVIServer.SessionSecret
# PowerOn VMs
workflow poweron-vms {
param(
[string[]]$templates,
[string]$vcenter,
[string]$session,
[string]$user,
[string]$pass
)
foreach -parallel ($vm in $templates)
{
$run = InlineScript{
Add-PSSnapin VMware.VimAutomation.Core
Connect-VIServer -Server $Using:vcenter -Session $Using:session
Start-VM -VM $Using:vm | Wait-Tools
Remove-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
}
$run
}
}
poweron-vms -templates $Templateslist -vcenter $vcenter -session $global:DefaultVIServer.SessionSecret
# Wait 1 minute
sleep 60s
# Run Update Command Script
workflow run-update {
param(
[string[]]$templates,
[string]$vcenter,
[string]$session,
[string]$script,
[string]$guestuser,
[string]$guestpass
)
foreach -parallel ($vm in $templates)
{
$run = InlineScript{
Add-PSSnapin VMware.VimAutomation.Core
Connect-VIServer -Server $Using:vcenter -Session $Using:session
Invoke-VMScript -ScriptText "$Using:script" -VM "$Using:vm" -Server "$Using:vcenter" -GuestUser "$Using:guestuser" -GuestPassword "$Using:guestpass"
Remove-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
}
$run
}
}
$script = 'c:\update.ps1'
$guestuser="Administrator"
$guestpass="myPASS"
run-update -templates $Templateslist -vcenter $vcenter -session $global:DefaultVIServer.SessionSecret -script $script -guestuser $guestuser -guestpass $guestpass
# Restart VMs
workflow restart-vms {
param(
[string[]]$templates,
[string]$vcenter,
[string]$session,
[string]$user,
[string]$pass
)
foreach -parallel ($vm in $templates)
{
$run = InlineScript{
Add-PSSnapin VMware.VimAutomation.Core
Connect-VIServer -Server $Using:vcenter -Session $Using:session
Restart-VMGuest -VM $Using:vm | Wait-Tools
Remove-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
}
$run
}
}
restart-vms -templates $Templateslist -vcenter $vcenter -session $global:DefaultVIServer.SessionSecret
# shutdown VMs
workflow shutdown-vms {
param(
[string[]]$templates,
[string]$vcenter,
[string]$session,
[string]$user,
[string]$pass
)
foreach -parallel ($vm in $templates)
{
$run = InlineScript{
Add-PSSnapin VMware.VimAutomation.Core
Connect-VIServer -Server $Using:vcenter -Session $Using:session
Shutdown-VMGuest -VM "$Using:vm" -Confirm:$false
Remove-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
}
$run
}
}
shutdown-vms -templates $Templateslist -vcenter $vcenter -session $global:DefaultVIServer.SessionSecret
sleep 120
# Convert VMs to Templates
workflow convert-vm-to-templates {
param(
[string[]]$templates,
[string]$vcenter,
[string]$session,
[string]$user,
[string]$pass
)
foreach -parallel ($template in $templates)
{
$run = InlineScript{
Add-PSSnapin VMware.VimAutomation.Core
Connect-VIServer -Server $Using:vcenter -Session $Using:session
Set-VM -VM "$Using:template" -ToTemplate -Confirm:$false
Remove-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
}
$run
}
}
convert-vm-to-templates -templates $Templateslist -vcenter $vcenter -session $global:DefaultVIServer.SessionSecret
Unload-PowerCLI
Problem in this part:
workflow run-update {
param(
[string[]]$templates,
[string]$vcenter,
[string]$session,
[string]$script,
[string]$guestuser,
[string]$guestpass
)
foreach -parallel ($vm in $templates)
{
$run = InlineScript{
Add-PSSnapin VMware.VimAutomation.Core
Connect-VIServer -Server $Using:vcenter -Session $Using:session
Invoke-VMScript -ScriptText "$Using:script" -VM "$Using:vm" -Server "$Using:vcenter" -GuestUser "$Using:guestuser" -GuestPassword "$Using:guestpass"
Remove-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
}
$run
}
}
$script = 'c:\update.ps1'
$guestuser="Administrator"
$guestpass="myPASS"
run-update -templates $Templateslist -vcenter $vcenter -session $global:DefaultVIServer.SessionSecret -script $script -guestuser $guestuser -guestpass $guestpass
Problems getting Intel Ethernet Controller X540-AT2 to consistently auto-negotiate 1Gb portspeed
I am setting up ESXi 6U1 on three Supermicro SYS-6018R-WTRT servers that come with the Intel Ethernet Controller X540-AT2 nic. unfortunately, the auto-negotiated port speed is changing between 1000 Mb and 100 Mb, seemingly randomly. sometimes, both vmnic adapters are recognized as 1000 Mb, sometimes one is 1000 Mb and one at 100 Mb, sometimes both are 100 Mb. the switch (Extreme Networks Summit X350-48T) works fine for other gbit servers, tho the supermicro servers are the first one with 10Gb cards.
ESXi is at the latest patch level with the additional ixgbe driver vib v4.1.11 installed:
[root@endor1:~] esxcli software vib list | grep ixgbe
net-ixgbe 4.1.1.1-1OEM.550.0.0.1331820 Intel VMwareCertified 2015-12-15
when manualy disabling/enabling the port on the switch, dmesg on esxi shows:
2015-12-17T14:47:25.871Z cpu8:33247)<6>ixgbe 0000:01:00.1: vmnic1: NIC Link is Down
2015-12-17T14:47:25.871Z cpu8:33247)<3>ixgbe: vmnic1: ixgbe_watchdog_link_is_down: NIC CNA Link is Down
2015-12-17T14:48:29.571Z cpu14:33243)<6>ixgbe 0000:01:00.1: vmnic1: NIC Link is Up 100 Mbps, Flow Control: RX/TX
2015-12-17T14:48:29.571Z cpu14:33243)<3>ixgbe: vmnic1: ixgbe_watchdog_link_is_up: NIC CNA Link is Up
2015-12-17T14:48:29.905Z cpu11:32854)NetPort: 1780: disabled port 0x2000005
2015-12-17T14:48:29.905Z cpu11:32854)Uplink: 7316: enabled port 0x2000005 with mac 00:25:90:f9:75:f3
any hints are very much appreciated.
search for AD user with LDAP search string
Hello,
is there a way to use LDAP search strings with vCO/vRO AD Plugin to find users?
ActiveDirectory.searchRecursively(string,string) doesn't do the job :-(
best regards,
Mike
Why did HA event change VM UUID?
We had a network problem that caused all my hosts connected to a distributed switch to to crash (PSOD). That crash took down my vCenter server too. After rebooting the hosts, HA kicked in and eventually everything came back up but in our management db where we track all the vms, we discovered that roughly 10 had changed their UUID (that I've found so far) which is a bit of a problem as we lose the link to the vm in vmware.
The storage was not affected by the problem so why would the vms change their uuid? I was directly connected to a few hosts after they came back up and saw on some hosts a few (a lot in some cases) of vms that were shown as inaccessible or the name of the VM changed to the path and was grayed out). Once everything settled down though there all vms were accessible just file and nothing was lost. The only problem was the uuid change and I can't figure out why some vms were affected but not others.
Any ideas?
Thanks
REST API Resources Query
I'm trying to get a resource by name using the /api/resources URI. It has a list of parameters that can be used to perform a more detailed query. I've tried just about everything i can think of to get the query to work but nothing has. Does anyone have a working resource query?
name | Array of resource names to query for. NOTE: Currently, only single element supported | query | xs:string | no | yes |
var body = {"name" : "vmName"} System.log(JSON.stringify(body)); var request = restHost.createRequest("GET", "/resources", JSON.stringify(body)); request.contentType = "application/json"; var json = JSON.stringify(System.getModule("com.vmware.library.http-rest").xml2json(request.execute().contentAsString)); System.log(json);
I've tried all these with no success:
var body = {"name" : "vmName"} var body = {"name" :["vmName"]} var body = [{"name" : "vmName"}] var body = {"value" : {"name" : "vmName"} var body = {"value": {"name" : ["vmName"]} var body = {"value" : [{"name" : "vmName"}]
variations of the above but with different top level property names like, value(s), key(s), resource(s), property/properties, etc.
Direct execution and Binary translation
Team ,
I am new to VMWARE as i read the base for VMWARE is direct execution and binary translation . I kind of understand direct execution to an extent . But what is this Binary translation technique . I asked this question to many people who are blaming me why i am going this deep
My worry is if i do not understand the base how will i proceed . Can someone please explain Binary translation in laymans language ?
Regards,
Sagar
PCOIP Monitors
Best place to buy PCOIP Monitors?
Приоритет при миграции хранилища
Люди подскажите, можно ли как то назначить приоритет при миграции ВМ с 1 хранилища на другой. А то чет при миграции остальные машины находящиеся на этих хранилках не очень себя чувствуют.
Либо может как то скорость миграции снизить, ограничение по IOPS сделать?
Sample Script: Creating an Empty vApp with vCloud PowerCLI
Hi Everyone,
The New-CIVApp cmdlet does not allow us to create empty vApps (which can be useful when templating out network configurations, for example). This shortcoming can be overcome by calling the "ComposeVApp" method of a vDC directly. In case anybody else runs into this same problem, I've included my script. Note that it uses the first created organization vDC, so ymmv.
I also realize that I could probably get the vDC directly instead of going through ExtensionData, but I think that this illustrates that "otherwise hidden" parameters can be discovered rather easily through this object ("Get-Member" is your friend!)
$newvapp = New-Object VMware.VimAutomation.Cloud.Views.ComposeVAppParams
$newvapp.Name = "My New vApp"
$newvapp.Description = "An empty vApp"
$result = (DefaultCIServers[0].ExtensionData.OrganizationReferences.OrganizationReference | Where-Object {$_.Name -like "organization name"}).GetCIView().VDCs.VDC[0].GetCIView().ComposeVApp($newvapp)
$result.tasks.task.wait($null)
Write-Host "$($result.tasks.task.Operation) $($result.tasks.task.status)
6.1 upgrade, Please add the new "Notes" field as a column in Alerts!
This would be EXTREMELY valuable for us!
HP ML370 G6 does not start EXSi 5.1
I've installed multiple HP custom EXSi images (5.5 and 5.1) on my ML370 G6 sever, but the server fails to start the OS. I successfully complete the installation of EXSi and it asks to remove the CD and restart. The server just loops searching through it's boot order. It's like it doesn't recognize the OS on the P410i Array. Any help is greatly appreciated.
Modify Powershell script to NIC and HBA info
Hello,
1) For HBA script ->
Can anyone please modify below script to include
-- Vendor (i.e. HBA make, QLOGIC etc)
-- Device (i.e. vmhba1 or vmhba2)
ESXi 5.0 U1 HBA Details: Power CLI
2) For NIC
Can anyone please modify below script to include
-- Network Adapter model
-- vmkchdev (which will list VID, SSID etc)
http://www.cit3.net/vmware-powercli-gather-nic-driver-and-firmware-versions-from-hosts-via-vcenter/VMware Powercli – Gather NIC Driver and Firmware Versions from Hosts via vCenter | Cit3.net
Thanks.
Powershell for getting ESXi info, NIC driver and firmware, HBA driver and firmware
Hello,
Can anyone please provide me Powershell or PowerCLI script that can list;
1) ESXi info
2) NIC driver and firmware
3) HBA driver and firmware
into Excel sheet?
I do not mind if there are 3 separate scripts.
Thanks.
OVF deployment issue with SHA256 digest algorithm
We are facing issue in deploying a SHA256 OVA (created using ovftool 3.5.0) on ESX5.5 and ESX6.0 (from vsphere client).
Deployment is failing with the following error message.
"The following manifest file entry (line 1) is invalid: SHA256(*.vmdk)={SHA1 digest of file}
Same OVA can be deployed in VMWare workstation 11 successfully.
Any suggestions ??
A holiday gift for our users: More Lab Time Available
At the VMware Hands-on Labs, we receive a lot of feedback about our free online labs. As you can imagine, a great deal of it is positive, but we also receive notifications about broken labs (THANK YOU!), steps in the manual that seem confusing, and feedback about how we can make the experience more valuable to our users.
Obviously, there are certain limitations to what we can do, especially since the service is offered at no cost to our users, and we have to manage our available capacity very efficiently to keep our overhead as low as possible.
One of the requests we hear frequently is that some of our users prefer to sit for 4-8 hours and "finish" a lab in a single sitting rather than take it a couple of modules at a time. For what it is worth, a vast majority of our users spend roughly 60 minutes at a time, even at large events like VMworld. We only offer 90 minute sessions at VMworld, and have increased that to 4-5 hours for most labs online. We serve various workshops around the world using the same portal and capacity, and many of these workshops request extended sessions that keeps the lab environment live throughout the day so that attendees have a continuous experience. These requests either require handling one at a time (labor intensive) or modification of ALL deployments (resource intensive). For more information, or to request your own workshop, please check out HOL-In-A-Box at http://vmware.com/go/holinabox
To address the "more time" request for those who want it, but not kill our available capacity, we have decided to change things up a bit and scale the initial lifetime of HOL labs back from 4 hours to 90 minutes. Before you grab the torches and pitchforks, please read on! However, we are allowing labs to be extended by users in one-hour increments for up to 8 more hours. This allows those who would like to stay in a lab longer to do so, but prevents idle labs from consuming resources unnecessarily. In the current model, a lab pod that is deployed for 4-8 hours but used for only 1 hour may continue consume resources for 4-8 hours, which prevents new users from benefitting from "warm" labs, or getting a lab at all. In this new model, we enable people to extend the lab time to fit their needs, but also allow the system to more aggressively clean up labs that are no longer being used.
This is currently an experiment, but we think it is a good compromise and look forward to feedback from our users, including all of YOU.
Check out the post on the HOL blog: Please, Sir, I Want Some More (Time) - VMware Hands-On Lab (HOL) Blog - VMware Blogs
Thanks and enjoy your labs!
PowerCLI: OSCustomizationSpec does not support any -Timezone option which is UTC/GMT
OSCustomizationSpec (New-OSCustomizationSpec, Set-OSCustomizationSpec, etc) does not allow you to select a GMT without DST (UTC) time zone .
The -Timezone option is defined as:
Specifies the name or ID of the time zone for a Windows guest OS only. Using wildcards is supported. The following time zones are available:
000 Int'l Dateline
001 Samoa
002 Hawaii
003 Alaskan
004 Pacific
010 Mountain (U.S. and Canada)
015 U.S. Mountain: Arizona
020 Central (U.S. and Canada)
025 Canada Central
030 Mexico
033 Central America
035 Eastern (U.S. and Canada)
040 U.S. Eastern: Indiana (East)
045 S.A. Pacific
050 Atlantic (Canada)
055 S.A. Western
056 Pacific S.A.
060 Newfoundland
065 E. South America
070 S.A. Eastern
073 Greenland
075 Mid-Atlantic
080 Azores
083 Cape Verde Islands
085 GMT (Greenwich Mean Time)
090 GMT Greenwich
095 Central Europe
100 Central European
105 Romance
110 W. Europe
113 W. Central Africa
115 E. Europe
120 Egypt
125 EET (Helsinki, Riga, Tallinn)
130 EET (Athens, Istanbul, Minsk)
135 Israel: Jerusalem
140 S. Africa: Harare, Pretoria
145 Russian
150 Arab
155 E. Africa
160 Iran
165 Arabian
170 Caucasus Pacific (U.S. and Canada)
175 Afghanistan
180 Russia Yekaterinburg
185 W. Asia
190 India
193 Nepal
195 Central Asia
200 Sri Lanka
201 N. Central Asia
203 Myanmar: Rangoon
205 S.E. Asia
207 N. Asia
210 China
215 Singapore
220 Taipei
225 W. Australia
227 N. Asia East
230 Korea: Seoul
235 Tokyo
240 Sakha Yakutsk
245 A.U.S. Central: Darwin
250 Central Australia
255 A.U.S. Eastern
260 E. Australia
265 Tasmania
270 Vladivostok
275 W. Pacific
280 Central Pacific
285 Fiji
290 New Zealand
300 Tonga
However neither 085 GMT (Greenwich Mean Time) nor090 GMT Greenwich are actual GMT. They are GMT with DST or Greenwich Standard. So they cannot be used as UTC.
Microsoft also defines 360 as UTC for many applications and I suspect this could be used for this purpose is the PowerCLI & ESXi were updated to support it. However this is not the case as any command including code 360 will result in an error.
Is there a workaround for this? How can I ensure that the client customization on the VM is set to UTC regardless of the original original settings of the VM of which the template was made from?
Thanks in advance.
Best regards,
GVD
View Planner 3.5 issue: single-VM local mode test won't complete due to Outlook issue
Every time I try to run a single-VM local mode test, it fails. The test runs ok for the most part - I open a console session on the GoldenDesktop VM and see applications start up, including IE, Acrobat, and Office applications such as Word, Excel, Powerpoint. But every time Outlook is launched, the Outlook account setup wizard gets started and eventually the test times out.
I'm using the latest View Planner code, build 2236700.
This is what I see in the goldendesktop log file:
15:30:45 ERROR: Workload was killed because it was stuck for too long.
15:30:45 ERROR: LastOp: Outlook_OPEN, numOps: 139
Any ideas on how to get this resolved?
Thanks much!
Roberto
New to VMware.
Do I have to have a server to load a virtual server app or will a desktop do? I'm in the trial stages of VMware and don't want to waste money if necessary.
Profile-Driven Storage Service not start
C:\ProgramData\VMware\vCenterServer\logs\vmware-sps\wrapper.log
INFO | jvm 1 | | 2015/11/30 19:11:14 | 2015-11-30T19:11:14.033+03:00 ERROR opId= - Error reading the configuration file: java.lang.NumberFormatException: null |
INFO | jvm 1 | | 2015/11/30 19:11:14 | 2015-11-30T19:11:14.036+03:00 ERROR opId= - Storage Policy Service could not be initialized: |
INFO | jvm 1 | | 2015/11/30 19:11:14 | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adapterServer' defined in class path resource [../conf/sps-spring-config.xml]: Cannot resolve reference to bean 'storageProfileManager' while setting bean property 'managedObjects' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storageProfileManager' defined in class path resource [../conf/sps-spring-config.xml]: Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError |
C:\ProgramData\VMware\vCenterServer\logs\vmware-sps\sps.log
2015-11-30T19:11:14.041+03:00 [WrapperSimpleAppMain] ERROR opId= com.vmware.sps.StorageMain - Exception when running SPS service
com.vmware.sps.fault.SpsInitializedException: Storage Policy Service could not be initialized.
at com.vmware.sps.SpsLocalService.initialize(Unknown Source)
at com.vmware.sps.SpsLocalService.<init>(Unknown Source)
at com.vmware.sps.StorageMain.loadSpsService(Unknown Source)
at com.vmware.sps.StorageMain.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:290)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adapterServer' defined in class path resource [../conf/sps-spring-config.xml]: Cannot resolve reference to bean 'storageProfileManager' while setting bean property 'managedObjects' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storageProfileManager' defined in class path resource [../conf/sps-spring-config.xml]: Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError
C:\Program Files\VMware\vCenter Server\vmware-sps\sps\conf\sps-spring-config.xml
<bean id="adapterServer"
class="com.vmware.vim.vmomi.server.impl.AdapterServerImpl">
<property name="managedObjects">
<list>
<ref bean="storageProfileManager"/>
<ref bean="storageCapabilityService"/>
<ref bean="taskTracker"/>
<ref bean="complianceManager"/>
<ref bean="storageProfileServer"/>
</list>
</property>
<property name="activationValidators">
<list>
<ref bean="sessionValidator"/>
</list>
</property>
</bean>
Please help!