[PowerShell] 将 VMWARE vmdk 文件转换成 VIRTUALBOX vdi 文件 →→→→→进入此内容的聊天室

来自 , 2020-10-01, 写在 PowerShell, 查看 145 次.
URL http://www.code666.cn/view/83187550
  1. vboxmanage clonehd -format vdi "Virtual Disk.vmdk" vbox2.vdi
  2.  
  3. # Create & register a new virtual machine in virtualbox
  4. vboxmanage createvm --name phd07 --register
  5.  
  6. # Set Parameters for newly created VM
  7. vboxmanage modifyvm phd07 --ostype RedHat_64 --memory 8192 --cpus 6 --nic1 nat
  8.  
  9. # Storage Controller
  10. vboxmanage storagectl phd07 --name "SATA1" --add sata --controller IntelAhci
  11.  
  12. # Attach a existing disk
  13. vboxmanage storageattach phd07 --storagectl "SATA1" --port 0 --device 0 --type hdd --medium "/vhdd/vbox2.vdi"
  14.  
  15. # Set up port forwarding
  16. vboxmanage modifyvm phd07 --natpf1 "guestssh,tcp,,2222,,22"
  17. vboxmanage modifyvm phd07 --natpf1 "psql,tcp,,5432,,5432"
  18. vboxmanage modifyvm phd07 --natpf1 "phdcc,tcp,,5000,,5000"
  19.  
  20. # If you need RDP support
  21. vboxmanage modifyvm phd07 --vrde on --vrdemulticon on --vrdeport 3389 --vrdeauthtype external
  22. VBoxManage setextradata phd07 "VBoxAuthSimple/users/gpadmin" 0fb25430a453886e1ae6974205cb89a7abfe6d7b4e308f5346f407977f83a513
  23.  
  24. # Kick off the VM in headless mode
  25. vboxmanage startvm phd07 --type headless  
  26.  
  27.  
  28. # APPENDIX
  29.  
  30. # Shutdown & Delete the VM   - p.s. this deletes config files and the attached disk
  31. vboxmanage controlvm phd07 poweroff  
  32. vboxmanage unregistervm phd07 --delete                
  33.  
  34. # Monitor VMs
  35. vboxmanage list runningvms
  36. vboxmanage showvminfo phd07
  37.  
  38.  
  39. #download virtualbox extension pack for enabling vrde
  40. http://download.virtualbox.org/virtualbox/4.2.16/Oracle_VM_VirtualBox_Extension_Pack-4.2.16-86992.vbox-extpack
  41.  
  42. # Enable VRDE simpleauth (the username and password stored in the local config file itself)
  43. VBoxManage setproperty vrdeauthlibrary "VBoxAuthSimple"
  44. VBoxManage internalcommands passwordhash "gpadmin"
  45. vboxmanage clonehd -format vdi "Virtual Disk.vmdk" vbox2.vdi
  46.  
  47. Reference : http://stdioe.blogspot.com/2012/01/creating-virtual-machine-with.html
  48. //shell/8305

回复 "将 VMWARE vmdk 文件转换成 VIRTUALBOX vdi 文件"

这儿你可以回复上面这条便签

captcha