Wednesday, 4 September 2019

Steps for converting Hyper-V to VMware using VCenter Converter


1)      Install VCenter Converter Standalone
2)      Convert local machine
            a)       Choose relevant VCenter server
            b)      Choose appropriate VM Folder
            c)       Choose appropriate VM Storage
            d)      Edit “Data to Copy”, choose advanced, open Destination Layout, and change disks to Thin
            e)      Remove the NIC under networks (Will re-add different type later)
            f)        Enable “Synchronize Changes under Advanced Operations. Uncheck “Perform Final Sync”
3)      Run "BackupNetwork.bat", verify c:\temp has the network adapter settings dumped.
4)      After the initial sync is complete, when you are ready to make the cutover right click the job in VCenter Converter and choose Synchronize.
            a)       Under Advanced Options, choose edit and say Perform Final Sync
5)      Immediately after the final sync is complete, shutdown the Source VM
6)      Power on the VMware VM
7)      Edit the VMware VM and add a network adapter
           a)       Choose the VM Network on the appropriate VLAN
           b)      Change adapter type to VMXNET3
8)      Let the check disk run
9)      Mount VMware tools and login
10)   Install VMware tools
11)   Configure IP settings on network adapters once they show up as per the backup
12)   Reboot
13)   Done? Verify services working
14) Uninstall VCenter Converter software

Optional step: Copy the mac address from Hyper-V into VMware



The contents of backupnetwork.bat:

mkdir c:\temp
netsh interface ip dump >> c:\temp\NetworkSettings.txt

Monday, 4 December 2017

Powershell - Wait for process from current user

After much searching online I couldn't find a way to do this without WMI and a bunch of extra work... So I figured this out. Tested and working in Windows 10 at least.

$user = "$env:USERDOMAIN\$env:USERNAME"
$proc = Get-Process -Name notepad -IncludeUserName | where {$_.UserName -eq $user}
Wait-Process -InputObject $proc


That will look for all instances of notepad running under the current user, and wait for all of them to terminate before continuing.

Super useful when waiting for something like msiexec

Tuesday, 17 October 2017

Citrix VDA memory Cache - Enabled on non PVS or MCS server

Apparently a known issue, for me encountered in 7.12 with no fix as of 7.15

To resolve, either boot into a recovery environment (Or load the filesystem offline to another machine) and load the System registry hive into reg edit.

Make the following changes:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet00x\Services\CtxMcsWbc  startup to 4 (For both 001 and 002)

Additionally (Again in both):

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet00x\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318} Delete ctxMscWbc from upper filters

Then unload the hive from regedit, and reboot the machine. You should now have a once more persistent filesystem.

Thursday, 15 June 2017

Enable NFS 4.1 on Synology

Enable SSH from Control Panel -> Terminal and SNMP
Connect using Putty, login with your Synology admin credentials
Enter the following commands:
cd /usr/syno/etc/rc.sysv
sudo vi S83nfsd.sh

Go down to line 90, position your cursor at the N on the line "/usr/sbin/nfsd $N"
Press "i" to begin editing
Change the line to:
/usr/sbin/nfsd $N -V 4.1
Press Esc to finish editing

Type the following to save:
:w

Type the following to quit:
:q

The following will restart the NFS service:
sudo ./S83nfsd.sh restart

Now, if you run the following command you should see NFS 4.1 enabled:
sudo cat /proc/fs/nfsd/versions

Wednesday, 17 May 2017

Windows Updates via Powershell

This requires Powershell V5. The powershell script to install the module is:

$psversion = $PSVersionTable.PSVersion.Major

if ($psversion -ge 5){

Install-PackageProvider -Name NuGet -Force

Install-Module -Name PSWindowsUpdate -Force -Scope AllUsers

Get-WUServiceManager

}else{
echo "Error, PS is out of date"
}



Then, to run it simple use:

"Get-WuInstall -AcceptAll -IgnoreUserInput -AutoReboot -Confirm:$false -nottitle 'preview' -updatecount 30" 

(Update count just limits the amount it does at once, so if there is an error with one it doesn't undo them all. Good for computers very out of date.)



The github for this module is located at:

https://github.com/joeypiccola/PSWindowsUpdate

Thursday, 11 May 2017

Type 4 Print Driver for Server 2016 - Ricoh

After setting up your print server with Type 4 generic drivers you then have to roll the drivers out to Windows 8/2012+ installations using Windows Update/WSUS.

Note, the print server no longer provides the driver with Type 4, this has to be done externally with WSUS apparently being the preferred method.

My setup:
Server 2016 Core print server
Server 2016 Citrix Server
Ricoh C4502A printer

To get this to work, after setting up the Ricoh on the print server I then added the printer to my user profile in citrix. (Can be done manually or via GPP)

Upon doing so, I found I had the Microsoft Enhanced Point and Print driver instead of the proper driver. As much as I tried, I could not get Windows update to detect and install the driver. To make it work, I ended up having to go into Device manager where I found the proper Type 4 printer, and an Unkown Device. Uninstalling the unknown printer and checking for an updated driver on the Type 4 printer caused it to immediately detect and install the proper driver. After doing so, all users logging into the server then  had the proper driver available.

Tuesday, 9 May 2017

Ubuntu Active Directory setup (17.04 Gnome)



To join the domain, download PBIS-open from here:
https://github.com/BeyondTrust/pbis-open/releases
(Choose linux.x86_64.deb.sh)

After installing, run domainjoin-cli join --disable ssh DOMAIN.NAME domain\admin

Replace domain.name with uppercase your full domain name, and domain\admin with a user that can join computers to AD.

To gain admin access, edit the sudoers file with the visudo command.

Add:

%DOMAINNAME\\domain^admins ALL=(ALL:ALL) all

Proxmox Backup Server - Recover a ZFS Datastore that is 100% full

This has happened to me a couple times now where my ZFS pool has filled to 100% causing not only backups to fail, but also the ability to ru...