weixin_39950812
weixin_39950812
2020-11-28 16:11

Doing a "storage vmotion" without doing a clone?

From looking through the vSphere API docs and the govmomi source code, it seems like the only way I can do something like a "storage vmotion" is with vm.clone, due to it supporting https://github.com/vmware/govmomi/blob/master/govc/vm/clone.go#L299-L303

However, a vm.clone takes a fair bit longer than if I use the Migrate wizard... to change the datastore of the VM via storage vmotion, 23 minutes vs 14 minutes.

Is it possible to use govc to initiate the same action that done with the Migrate... wizard, when choosing Change datastore, like what's shown in http://greg.porter.name/wordpress/?p=1692?

image

该提问来源于开源项目:vmware/govmomi

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39679468 weixin_39679468 5月前

    Not at the moment, but I have some related work planned soonish, I'll take a look.

    点赞 评论 复制链接分享
  • weixin_39679468 weixin_39679468 5月前

    there are a pile of other options we could provide by using RelocateVM instead of MigrateVM, but sounds like you just need the Datastore. Can you give it a try and let me know?

    点赞 评论 复制链接分享
  • weixin_39950812 weixin_39950812 5月前

    I've built govc from your PR and am testing it out now, will let you know it goes

     bash
    14:06:25  ✘  ...vmware/govmomi/govc  🐍 system   issue-639 ✘ ✹ 
    $ ./govc vm.migrate -ds=/TravisCI/datastore/EMC-VMAX-1 "/TravisCI/vm/In Progress Base VMs/travis-ci-macos10.12-brandontest-1481155580"
    [09-12-16 14:07:29] migrating VirtualMachine:vm-7950261... (37%)
    
    点赞 评论 复制链接分享
  • weixin_39950812 weixin_39950812 5月前

    This worked successfully for me

     shell
    $ ./govc vm.migrate -ds=/TravisCI/datastore/EMC-VMAX-1 "/TravisCI/vm/In Progress Base VMs/travis-ci-macos10.12-brandontest-1481155580"
    [09-12-16 14:17:01] migrating VirtualMachine:vm-7950261... OK
    

    Took from 14:06:39 to 14:17:01, so the timing is what I expected from using the Migrate wizard.

    Thank you for getting this added so quick

    点赞 评论 复制链接分享
  • weixin_39679468 weixin_39679468 5月前

    great thanks for testing it out

    点赞 评论 复制链接分享

相关推荐