Backtrack:  
 
showing posts of September 2018
 
edited by on September 27th 2018, at 11:38
It is best practice not to have an ISO mounted on a VM if it is not necessary. This is especially the case with VDI: if you forget to set the optical drive back to client, each of your desktops will have the ISO mounted as well, which can create a hassle with dependencies on the datastore where the ISO is located.

With PowerCLI, you can quickly resolve the matter with this one-liner:

Get-VM | Get-CDDrive | Where {$_.ISOPath -ne $null} | Set-CDDrive -NoMedia -Confirm:$false

For VDI, note that this will not work for replicas and master images containing snapshots, as the dependency remains intact if a snapshot exists where the ISO was still mounted. In that case, it is better to clone the m  ...
edited by on September 27th 2018, at 10:35

Similar as on FreeBSD and Linux, you can add/remove static network routes through the command line with the route command. The syntax somewhat differs from Linux, though.

To add a route (e.g. subnet 192.168.3.0/24 to gateway 192.168.1.254):

sudo route -n add -net 192.168.3.0/24 192.168.1.254

To remove a route:

sudo route -n delete -net 192.168.3.0/24

To show the current route table, you can use netstat:

netstat -nr
edited by on September 27th 2018, at 10:15
Folder view preferences are stored separately in a hidden file called .DS_Store in each folder. If you want to reset the folder view options to the default settings, you can use Terminal to do a search for those files and remove them.

To remove them in your home folder, you can run this:

find ~ -name ".DS_Store" -delete

Note that you can also do this on network shares. Just adjust the search path accordingly.

Suppose you have a share mapped to smb://server/data, then you would type:

find /Volumes/data -name "*.DS_Store" -delete

Caution
Be very careful with this command. It will not ask for confirmation!Making a typo (like forgetting to add the -name parameter) could result in permanent  ...
 
showing posts of September 2018
 
 
« March 2024»
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930
31      
 
Links
 
Quote
« You only find out who is swimming naked when the tide goes out. »
Warren Buffett