VMware Cloud Community
pramodnaik
Contributor
Contributor

Upgrade to vmfs 6 using Update-VmfsDatastore

While using

Update-VmfsDatastore, we consistently get the error:

Update-VmfsDatastore -Datastore $Source -TemporaryDatastore $Temp -TargetVmfsVersion "6" -Server $Server

" Update-VmfsDatastore : Cannot validate argument on parameter 'id'. the argument is null or empty. Provide an argument that is not null or empty; and then try the command again. "

Pleas help.

19 Replies
IRIX201110141
Champion
Champion

You cant upgrade an existing Datastore to VMFS6. Prior the VMFS 2,3 up to 5 can upgraded. For VMFS 6.0 you have to create a new Datastore and use svMotion to migrate the VMs onto.

Regards

Joerg

0 Kudos
a_p_
Leadership
Leadership

How exactly did you set/define the variables?

Please provide the required portion of your code.

André

0 Kudos
pramodnaik
Contributor
Contributor

Connect-VIServer xxxx -User xxxx -Password

$Source = Get-Datastore "xxx-LUNXX"

$Temp = Get-Datastore "yyy-LUNYY"

$Server = (Get-VIServer -Server "xxxx" -User xxx )

Update-VmfsDatastore -Datastore $Source -TemporaryDatastore $Temp -TargetVmfsVersion "6" -Server $Server

0 Kudos
IRIX201110141
Champion
Champion

Again....  VMware Knowledge Base

Regards

Joerg

0 Kudos
a_p_
Leadership
Leadership

Assuming that the variables are set properly, I can only think of a bug within the Update-VMFSDatastore cmdlet, or an object on the source datastore which isn't expected.

Can you confirm that the datastore isn't used for e.g. HA heartbeats, templates, ...?

André

IRIX201110141​: You are right, there's no direct update available for VMFS5 to VMFS6. However, the Update-VMFSDatastore cmdlet takes this into account, by evacuating the source datastore prior to recreating/reformatting it with the new format.

IRIX201110141
Champion
Champion

a.p.

Ahh...... now i understood! Thx for clarification.  Thats  a nice Posh function!!

Regards

Joerg

0 Kudos
dnk9999
Contributor
Contributor

Thanks a.p

data store is not used and its completely empty. also, we have tested on multiple data stores across multiple vcenters. all of them are throwing same errors.

BTW i am pramod colleague

0 Kudos
a_p_
Leadership
Leadership

Out of curiosity, are all the datastores that you've tried to upgrade empty?

If yes, it may be worth a try to create a tiny VM on that datastore to find out whether the cmdlet expects at least one VM on the datastore.

André

0 Kudos
dnk9999
Contributor
Contributor

yeah. i moved out VMs before using as temp datastore.

just now deleted data store and recreated datastore with vmfs 5 still failed with same error

0 Kudos
a_p_
Leadership
Leadership

Did you try this with at least one tiny VM on the source datastore?

André

0 Kudos
continuum
Immortal
Immortal

Andre - do you know wether the command Update-VmfsDatastore
does more than the steps:
1. move out all VMs
2. check if vmfs-volume is ready to unmount

3. unmount

4. run a vmkfstools command to format the already existing partition one on the LUN/disk
If thats all it does we could create a sh.script that does the same - but gives us better troubleshooting hints


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
dnk9999
Contributor
Contributor

if any template or VM on temp data store it will give error during pre check.

0 Kudos
srujan22
Contributor
Contributor

Facing similar issue, tried with all the suggested recommendations, same error everytim

0 Kudos
ThompsG
Virtuoso
Virtuoso

Hi pramodnaik,

Could you output the contents of the variables you are using? Please obfuscate any information you don't want to be seen publicly. If you could run the output with the Format-List * option as well please.

You can also probably limit this to just the parameter that is having issues if you look at the error. The variable that is causing a problem with be underscored with "~" symbols and this is the one that would be interesting to see the output from.

Cannot validate argument on parameter 'id'

This is indicating that the cmdlet is having issues with what is being passed to it. Its strange because Id is a readonly attribute of the objects but this might be a wrong lead to follow. The output of your variables should help... maybe...

Kind regards.

0 Kudos
dnk9999
Contributor
Contributor

FileSystemVersion              : 5.61

DatacenterId                   :

Datacenter                     :

ParentFolderId                 :

ParentFolder                   :

DatastoreBrowserPath           :

FreeSpaceMB                    : 5675792

CapacityMB                     : 6291200

Accessible                     : True

Type                           : VMFS

StorageIOControlEnabled        : True

CongestionThresholdMillisecond : 30

State                          : Available

ExtensionData                  : VMware.Vim.Datastore

CapacityGB                     : 6143.75

FreeSpaceGB                    : 5542.765625

Name                           :

Id                             : Datastore-datastore-45496

Uid                            :

FileSystemVersion              : 5.81

Datacenter                     :

ParentFolderId                 :

ParentFolder                   :

DatastoreBrowserPath           :

FreeSpaceMB                    : 6290185

CapacityMB                     : 6291200

Accessible                     : True

Type                           : VMFS

StorageIOControlEnabled        : True

CongestionThresholdMillisecond : 30

State                          : Available

ExtensionData                  : VMware.Vim.Datastore

CapacityGB                     : 6143.75

FreeSpaceGB                    : 6142.7587890625

Name                           :

Id                             :

Uid                            :

0 Kudos
ThompsG
Virtuoso
Virtuoso

Hi dnk9999,

There we are - the second datastore object is missing the Id attribute. This make it an incomplete object and hence the error.

Now this doesn‘t help your issue but at least we know the Update-VmfsDatastore cmdlet is probably okay.

The second object appears to be the target so let’s focus on that - now I would have thought every object would be assigned an Id because that’s how vCenter tracks stuff by assigning its own name to things.

Can you confirm that in the datastore objects you output what fields you blanked, if any? I would have expected the following to be present in your objects: DatacenterId, Datacenter, ParentFolderId, ParentFolder, DatastoreBrowserPath, Name, Id and Uid.

Also what vCenter privileges do you hold when running the cmdlet, i.e. do you have the Administrator role at the vCenter level?

Kind regards.

0 Kudos
dnk9999
Contributor
Contributor

sorry for confusing.

id attribute i removed it while pasting here. i have admin privileges

0 Kudos
ThompsG
Virtuoso
Virtuoso

D’oh! I‘m gathering then the Id attribute is also on the $Server object as well then.

0 Kudos
tobyjosham
Contributor
Contributor

Hello

I have exactly the same issue and it errors in exactly the same way.

Does anyone have an update to this?

0 Kudos