天天看点

VBOX命令行创建虚拟机 及开启远程访问

vboxmanage createvm --name "xp" --register 创建虚拟机

vboxmanage unregistervm xp 删除虚拟机 删除rm文件

vboxmanage modifyvm "xp" --memory 512 调整虚拟机的内存大小 //

vboxmanage modifyvm "xp" --acpi on --boot1 dvd --nic1 nat 调整虚拟机设置 //

vboxmanage createhd --filename "xp.vdi" --size 10000 创建虚拟磁盘

vboxmanage controlvm xp poweroff 关闭虚拟机

vboxmanage storagectl "xp" --name "ide controller" --add ide --controller piix4

添加ide控制器

vboxmanage storageattach "xp" --storagectl "ide controller" --port 0 --device 0 --type hdd --medium "xp.vdi"  虚机绑定虚拟硬盘

vboxmanage storageattach "xp" --storagectl "ide controller" --port 0 --device 1 --type dvddrive --medium /root/vol.iso 虚机绑定镜像

vboxmanage setextradata "windows2003" "vboxinternal/devices/pcnet/0/lun#0/config/guestssh/protocol" tcp

vboxmanage setextradata "windows2003" "vboxinternal/devices/pcnet/0/lun#0/config/guestssh/guestport" 1433

vboxmanage setextradata "windows2003" "vboxinternal/devices/pcnet/0/lun#0/config/guestssh/hostport" 1433

继续阅读