mylesagray / blog-comments

Comments for Blah, Cloud. Hugo blog
0 stars 0 forks source link

Fix for CBT bug in VMWare Products | Blah, Cloud #17

Open mylesagray opened 2 years ago

mylesagray commented 2 years ago

Written on 12/02/2014 18:00:13

URL: https://blah.cloud/infrastructure/fix-cbt-bug-vmware-products/

mylesagray commented 2 years ago

Comment written by Ashley Milne on 12/06/2014 06:09:10

Hi, I am following your steps and get stuck on the third step, perhaps I am a bit thick, but I am cutting and pasting your script and I get this error:

The term 'Get-VM ' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was inc
luded, verify that the path is correct and try again.
At line:1 char:45
+ [System.Collections.ArrayList]$vms = Get-VM <<<< | ?{$_.ExtensionData.Config
.Hardware.Device.CapacityInKB -ge 128000000} | ?{$_.ExtensionData.Config.Change
TrackingEnabled -eq $true}
+ CategoryInfo : ObjectNotFound: (Get-VM :String) [], CommandNotF
oundException
+ FullyQualifiedErrorId : CommandNotFoundException

Are there variables I need to change specific to my environment?

mylesagray commented 2 years ago

Comment written by Myles Gray on 12/06/2014 14:25:29

Hi Ashley,

You've made sure to install PowerCLI as listed above and launched it instead of straight PowerShell?

Myles

mylesagray commented 2 years ago

Comment written by Ashley Milne on 12/06/2014 14:52:15

Yes that is correct.

mylesagray commented 2 years ago

Comment written by Myles Gray on 12/06/2014 15:38:50

Can you try running the below just on it's own after you've made a successful connection to the vCenter Server with Connect-VIServer:

`Get-VM`

You should get a list of all the VMs in your vCenter?

mylesagray commented 2 years ago

Comment written by Ashley Milne on 12/06/2014 15:47:04

Correct, that command returns a list of vm's in my Vcenter.

mylesagray commented 2 years ago

Comment written by Ashley Milne on 12/06/2014 15:48:54

If its helpful, the version of Vcenter I am running is 5.1 1473063 and the host I am running the script against is running Esxi 5.0 441354

mylesagray commented 2 years ago

Comment written by Myles Gray on 12/06/2014 16:03:31

Ashley,

Got to the bottom of it, apologies, the error you're seeing is: The term 'Get-VM ' is not recognized - note the extra whitespace after the Get-VM, I have adjusted my code above by removing the space after the Get-VM command, it should work as expected now.

Myles

mylesagray commented 2 years ago

Comment written by Ashley Milne on 12/06/2014 16:52:58

Thanks, it works now as expected. Cheers!

mylesagray commented 2 years ago

Comment written by gbkhor on 12/16/2014 08:48:36

Folks,

so.... after apply above script, we doesn't need to power cycle VM machine and this will fix the CBT issue temporary while waiting VM to come out a permanent fix?

Note: I'using NBU 6.0.2 making use of CBT for backup.

mylesagray commented 2 years ago

Comment written by Myles Gray on 12/16/2014 08:51:06

Correct, no power cycle is needed, your next backup should take a lot longer as it is a full rather than a differential but it should be okay after that.

mylesagray commented 2 years ago

Comment written by gbkhor on 12/18/2014 05:34:57

Myles,

How do we verify that CBT was recreated after running the above script? do we just look at the size of it?

Thanks

mylesagray commented 2 years ago

Comment written by gbkhor on 12/18/2014 10:25:58

Myles

I notice after run the below script

$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.ChangeTrackingEnabled = $false

it change the "scsi0:1.deviceType = "disk"" TO "scsi0:1.deviceType = "scsi-hardDisk"" at vmx file and it basically changing the 'SCSI controller' from "LSI Logic SAS" to "LSI Logic Parallel"

Can we maintain the SCSI controller type? as I do have other disk is using "VMware Paravirtual" and would like to maintain all the SCSI controller type as what it is now.

Thanks

mylesagray commented 2 years ago

Comment written by gbkhor on 12/18/2014 10:27:43

I got the answer already, CBT file is deleted once the script is run

mylesagray commented 2 years ago

Comment written by Myles Gray on 12/18/2014 10:29:20

Yep thats correct, it is then recreates with zero size

mylesagray commented 2 years ago

Comment written by Myles Gray on 12/18/2014 10:58:41

I've never seen that behaviour or that deviceType before, scsi-hardDisk as far as I am aware it doesn't code for the scsi-controller, that is set with the `scsi*.virtualDev` param in the vmx:

http://faq.sanbarrow.com/in...

Did you upgrade your ESX instance from a very old version to a newer one or has the machine in question been imported from an OpenStack / Fusion / Workstation / Xen / OtherVirtSolutionHere instance?

More reference on vmx props:

http://sanbarrow.com/vmx/vm...

mylesagray commented 2 years ago

Comment written by gbkhor on 12/18/2014 11:13:03

Myles

Yes, it was upgraded from ESX 4 to 5 and to 5.5

Thanks

mylesagray commented 2 years ago

Comment written by Myles Gray on 12/18/2014 11:40:14

Only references to deviceType="disk" is with relation to IDE controllers.

Where have you found info suggesting deviceType converts from SAS to Parallel?

The SCSI controller should be unaffected by this operation.

mylesagray commented 2 years ago

Comment written by Myles Gray on 12/19/2014 11:34:26

Sounds like one to take up with VMware support - this isn't an expected behaviour.