App Volumes – Office 365


After installing Office 365 32bits in a Windows 7 64bit everything seemed to work as expected.

But after attaching a writable volume to the VM, Macros on Office stopped working even if it was a clean writable volume (not used before).

VMware KB provided a walk around for environments that use snapvol.cfg in Writable Volumes or in Appsatcks, but after trying to implement it, nothing changed, as soon as a writable volume is attached to the VM, Macros on Office365 stop working.

KB2145079(I will be using the Writable Volumes option but the same applies to Appstacks):

Writable volumes:
1. Attach writable volumes to a virtual machine.
2. Log in to the virtual machine as the administrator.
3. Open the computer management on the Windows machine.
4. Go to Storage > Disk Management.
5. Right-click CVWritable and click Change Drive Letter and Paths.
6. Assign a drive letter to the CVWritable.
7. Copy the snapvol.cfg file from the root folder of CVWritable and paste it on other location, such as desktop.
8. Open the snapvol.cfg file using a text editor.
9. Add this entry:
# Office 365 Virtual Registry exclusions
10. Save and close the snapvol.cfg file.
11. Zip the snapvol.cfg file.
12. Go to the App Volumes Manager.
13. In the Volumes tab, click Writables tab and click Update Writables.
14. Upload the file to Update Writable volume.

After reading the walk around I noticed two things:

  1. Office 365 it’s not on 15.0 but instead on 16.0
  2. The path for the exclude_registry does not fully exist

After a quick search, I found that the REGISTRY folder is not under


but instead


So after changing:


to (removing the 15.0)


log off and log on again, Office 365 Macros are working as they are intended to.

I hope this helps someone that is facing the same issue!


VMware vEXPERT 2017


It was with great joy that today morning I found an email in my mailbox with the subject

Welcome to the 2017 vExpert Program

For those who don’t know vExpert Program started in 2009 and is a community that recognizes VMware enthusiasts that have an active role in the VMware community by sharing their knowledge.

With this recognition and certificate, you are able to get access to special offers like private betas, free licenses, exclusive events and restricted content on VMware Technology Network – VMTN

VMware vExperts have three paths:

  • Evangelist
  • Customer
  • VMware Partner

The path that I applied was the Evangelist one that is intended to bloggers, authors, speakers and VMTN contributors.

The applications for VMware vExpert are open twice a year.

I wish you all a great day and thanks for reading.

Script – Get VMs created, deleted or modified on vCenter


A while back someone asked me if i could tell him who deleted a vm and when.

I was able to get the information but it took me quite some time digging in the events.

After this request I was asked to create a script that would send an email every day with the VMs that were created, deleted or modified.

So this is what I came up with:

Connect-VIServer localhost
$Yesterday = (Get-Date).AddDays(-1).ToString('MM-dd-yyyy')
$Yesterday2 = (Get-Date).AddDays(-2).ToString('MM-dd-yyyy')
Get-VIEvent -maxsamples 10000 -Start (Get-Date).AddDays(-1) |where {$_.Gettype().Name-eq "VmRemovedEvent" -or $_.Gettype().Name-eq "VmCreatedEvent" -or $_.Gettype().Name-eq "VmReconfiguredEvent"} |Sort CreatedTime -Descending |Select CreatedTime, UserName,FullformattedMessage | Export-Csv D:\Scripts\VMReport\$Yesterday.csv -NoTypeInformation
#defining file
$file = "D:\Scripts\VMReport\$Yesterday.csv"
$att = New-Object Net.Mail.Attachment($file)
$smtpServer = ""
$smtpFrom = "VMware Report <>"
$smtpTo = "e-mail address 1 <>, e-mail address 2 <>"
$messageSubject = "Changes on VMs"
$message = New-Object System.Net.Mail.MailMessage $smtpfrom, $smtpto
$message.Subject = $messageSubject
$message.IsBodyHTML = $true
$message.Body = "VMs created, deleted or modified on VCenter"
$smtp = New-Object Net.Mail.SmtpClient($smtpServer)
Remove-Item D:\Scripts\VMReport\$Yesterday2.csv

Now the explanation

Get-VIEvent -maxsamples 10000 -Start (Get-Date).AddDays(-1) |where {$_.Gettype().Name-eq "VmRemovedEvent" -or $_.Gettype().Name-eq "VmCreatedEvent" -or $_.Gettype().Name-eq "VmReconfiguredEvent"} |Sort CreatedTime -Descending |Select CreatedTime, UserName,FullformattedMessage | Export-Csv D:\Scripts\VMReport\$Yesterday.csv -NoTypeInformation

Get-VIEvent from the vCenter from the day before where the event is equal to removed (VmRemovedEvent), created (VmCreatedEvent) or modified (VmReconfiguredEvent)VMs

The result is sorted by date and it’s exported to a csv file named with the date of a day before.

And this is it from VMware side.

The next part is to send the file by email  (normal powershell scripting)

$file = "D:\Scripts\VMReport\$Yesterday.csv"
$att = New-Object Net.Mail.Attachment($file)
$smtpServer = ""
$smtpFrom = "VMware Report <>"
$smtpTo = "e-mail address 1 <>, e-mail address 2 <>"
$messageSubject = "Changes on VMs"
$message = New-Object System.Net.Mail.MailMessage $smtpfrom, $smtpto
$message.Subject = $messageSubject
$message.IsBodyHTML = $true
$message.Body = "VMs created, deleted or modified on VCenter"
$smtp = New-Object Net.Mail.SmtpClient($smtpServer)
Remove-Item D:\Scripts\VMReport\$Yesterday2.csv

In the end it removes the file from two days back.

I hope this helps you in some way.


AppStack packages migration


App Volumes by VMware provides, in the fly, application delivery to virtualized desktop environments.

This application delivery system allows applications to be delivered to virtualized desktop environments based on profiles using VMDK virtual disks without modifying the Virtual Machine or applications themselves.

App Volumes v. 2.xx has some issues when you try to migrate AppStack packages from one site to another using vSAN storage.

1. Find the AppStack you want to move and Copy the name of the package


For you to be able to migrate the AppStack packages from one site to another you need in the original site to create a VM, name it exactly as the AppStack package and attach the VMDK file of the AppStack package you want to migrate as a new disk.


After this process is completed you need to clone the machine to the new datacenter and use the same name as the previous one.


Now that you have the new VM on the new the VMDK file needs to be copied to VSAN.

To do this you’ll need to run the following command on the destination ESXi that has the VM

vmkfstools -d thin -i /vmfs/volumes/VSAN_FOLDER/NAME_OF_THE_APPSTACK_PACKAGE/NAME_OF_THE_APPSTACK_PACKAGE.vmdk /vmfs/volumes/VSAN_FOLDER/cloudvolumes2/apps/NAME_OF_THE_APPSTACK_PACKAGE.vmdk

You should get an output

Clone: 100% done.

You also need to copy the metadata from the original VSAN storage to the destination VSAN storage

After this procedure is completed you are able to Import the AppStack package to App Volumes on the new site



Congratulations you now have replicated an AppStack Package stored in vSAN between two sites.

Now it’s time to delete the VMs you have just created.

On the new site just delete the VM and the disk because you have copied it to a new location.

On the original site detach the disk and delete the VM.

I hope this was clarifying enough.

Get VM name with specific MAC Address

-Recently I got a request to get a virtual machine (vm) name using only the network interface MAC Address.

After search for some scripts I could not find one that really worked for me so I put my brain to work and this is what I came up:

get-vm | get-networkadapter | Where-Object { $_.macaddress -eq "00:50:56:XX:XX:XX"} | select parent, macaddress

A brief description on how it’s working

get-vm -> gets all VMs on the vSphere server.

get-netwrokadapter -> gets the nertwork adapter properties as name, type, macaddress…

$_.macaddress -eq -> for each networkadapter it is going to compare the MACs and if they are equal it is going to be printed out

The output should be something like this:


Performance Graphs

In my current job I have to able to provide on demand all kind of performance charts from the virtual machines through VMware vSphere Client.

While doing this some details caught my attention. I’ll try to explain.

Imagine that you want to take a performance log from one week ago lets say 26/08/2016 from 3:00PM till 5:00PM.

The normal procedure is:

  • Find the machine
  • Choose the Performance Tab and click in Advanced


  • Chart options


  • Then you choose the Chart Option and in this case is going to be CPU then Custom with the time frame that we want, the counters Usage and click OK


Now you have your graph all ready to present but… what is that? We are missing the first 30 minutes…


But the time frame is correct!!!


Well it’s not entirely correct as you can see it starts at 3:00:19 and VMware to save log space from performance logs older than a week only saves in 30 minutes intervals this means that you get a reference point from 30 minutes to 30 minutes and as the log starts at 3:00:19 you don’t get the first reference point.

The only way to solve this as we are unable to choose the seconds when we fill in the custom chart option is to put one minute earlier


Whit this tweak you’ll get your performance graph correct


I hope that VMware solves this “problem” and don’t assume the seconds in the performance charts or if so they must be zeroed.



Add host to Icinga2


Adding a Windows 2008 Server to Icinga2 master Server using Icinga2 agent

Setup the Icinga2 master for node clients and make shure the answer to the first question is n (no).

# icinga2 node wizard

Dowload  the agent from Icinga2 website and run it.

After the installation the setup wizzard will pop up.


Remember the Instance Name as you will need it to generate the Setup Ticket in the Icinga2 server.

Add the Icinga2 master

Click the Add button and fill in the box


Run this command in Icinga2 server to generate the Setup Ticket

# icinga2 pki ticket -cn infra-veeam.domain.local

Now copy the ticket and past it to the box



Before you click next check if the port 5665 is open in the Windows server and add a rule in Icinga2 server to permit connections

Check your active zones

# firewall-cmd --get-active-zones

I just had one “public” zone

At this point i added the rule to the firewall by running the command

# firewall-cmd --zone=public --add-port=5665/tcp --permanent

Continue the installation and finish it.

Open a command prompt and type in the command:


If all goes well you should get this output


Now update the configured hosts by running and restart icinga2

# icinga2 node update-config
# systemctl reload icinga2

And that’s it! If you have Icinga Web 2 the host should pop up.
This post was based on the Documentation shared by the Icinga project