Chinaunix首页 | 论坛 | 博客
  • 博客访问: 230311
  • 博文数量: 96
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 0
  • 用 户 组: 普通用户
  • 注册时间: 2016-07-14 11:43
文章分类

全部博文(96)

文章存档

2016年(41)

2015年(55)

我的朋友

分类: 系统运维

2015-12-22 14:26:18

1. vim-cmd命令 增加命令如下:

 hot add a virtual disk to a virtual machine:
  1. Connect to the host through SSH. For more information, see .
  2. Run this command to get the VMID of the virtual machine you want to add the disk to:

    vmware-vim-cmd vmsvc/getallvms

  3. Run this command to hot add a disk to the virtual machine:

    vmware-vim-cmd vmsvc/device.diskaddexisting vmid /vmfs/volumes/path to disk.vmdk 0 1

    The 0 at the end represents the SCSI controller you want to add the disk to and the 1 represents the SCSI target number, so if you already have a SCSI0:0 disk, add the next disk as SCSI0:1 (0 1). 

    Note
    : Make sure you use an absolute path when specifying the VMDK. For ESXi, use the vim-cmd command.
2. 创建虚拟磁盘:
vim-cmd vmsvc/get.datastores + vimid  查看vim id的磁盘存储
vim-cmd vmsvc/device.diskadd 16 10000 scsi0 2 datastore1 

This adds to vmid 16 a 10000 KB disk on the SCSI0 controller, as the second disk (there is already a disk at the 1 position), to datastore1.

阅读(4141) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~