Quantcast
Channel: VMware Communities : Blog List - All Communities
Viewing all articles
Browse latest Browse all 3135

Add a vDisk/vmdk to a running virtual machine via esxi command line

$
0
0

Hello,

if you want to add a new vdisk (vmdk file) to a running virtual machine, you can do it via command line.

 

First, connect to the esxi host where is the placed the vm that you want to add a new vdisk/vmdk.

 

Then go to the datastore where you want to place the new vdisk/vmdk:

cd /vmfs/volumes/WhatEverDatastore/

 

Then create the vmdk file using vmkfstools:

vmkfstools -c 150G --diskformat zeroedthick vDisk.vmdk

 

Finally, add the new vdisk to the virtual machine:

 

First, get the vmid of the virtual machine:

 

vim-cmd vmsvc/getallvms

 

With the vmid, add the vdisk/vmdk:

 

vim-cmd vmsvc/device.diskaddexisting 464 /vmfs/volumes/WhatEverDatastore/vDisk.vmdk 0 3

 

 

Best regards,

Pablo

P.D: If you want a linux virtual machine be able to detect the new vDisk, check this.


Viewing all articles
Browse latest Browse all 3135

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>