VMware {code} Community
cserafin
Contributor
Contributor

vmkfstools through API

I was wondering if there is a way to run vmkfstools through an api call. specifically I need the -r command.

Tags (3)
Reply
0 Kudos
5 Replies
stumpr
Virtuoso
Virtuoso

See if this is what you're looking for:

VMware KB: Renaming a virtual machine disk (VMDK) via the vSphere Management Assistant (vMA) or vSph...

Reuben Stump | http://www.virtuin.com | @ReubenStump
Reply
0 Kudos
cserafin
Contributor
Contributor

So installing vmware tools will give me command line access to the hypervisor though vCLI?

Reply
0 Kudos
stumpr
Virtuoso
Virtuoso

Yes.  vmkfstools in vCLI has a remote connection option so you can do just that.  There are other tools as well.

You can also rename a VMDK through the API with a reconfigVM_task(), but that's probably a bit more work than what you want to jump into.  It's also low-level, so you have to understand the ReconfigSpec for the VM and backing types.

Reuben Stump | http://www.virtuin.com | @ReubenStump
Reply
0 Kudos
cserafin
Contributor
Contributor

I was hoping to run vmkfstools to get around not having an api to do what i need to though there. Thanks this helps a lot. Are there any problems with using the cli when there are no api calls for vmkfstools?

Reply
0 Kudos
stumpr
Virtuoso
Virtuoso

Not sure I follow, but the vCLI vmkfstools will let you run the tool as if you were local to the host.

Reuben Stump | http://www.virtuin.com | @ReubenStump
Reply
0 Kudos