用户工具

站点工具


virtualbox_cli_configuration
$Rev 0.0.0.1
$Author Alex
$Date 03/11/2011

How to Install VirtualBox VMs on Oracle Solaris with CLI Interface

Creation of Zone

Creation of VM

Switch to `/VM' then issue the following command:

$ VBoxManage createvm –name "WinWebServer" –ostype Windows2003_64 –register –basefolder `pwd`

Then, default configuration files will be created in /VM/WinWebServer .

To limit memory of the VM, use the following command:

$ VBoxManage modifyvm "WinWebServer" –memory 4096

And memory limit will be set to 4096MB.

Basic settings

$ VBoxManage modifyvm "WinWebServer" –hwvirtex on –hwvirtexexcl on –cpus 4 –nic1 bridged –nictype1 virtio –bridgeadapter1 bnx611001

Create virtual disk:

$ VBoxManage createhd –filename `pwd`/hda1.img –size 74755

A 73GB disk image will be created after issuing the command. A sample output:

winwebvm# VBoxManage createhd --filename `pwd`/hda1.img --size 74755 
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 1fa133c8-8611-4d43-911f-40e6ba4cfc48

Attach IO Controller

In order to avoid installing hardware drivers, use IDE controller.

$ VBoxManage storagectl "WinWebServer" –name io –add ide

Attach the HD and Installation Medium

$ VBoxManage storageattach "WinWebServer" –storagectl io –port 0 –device 0 –medium /VM/WinWebServer/hda1.img –type hdd

And, the installation medium:

$ VBoxManage storageattach "WinWebServer" –storagectl io –port 0 –device 1 –type dvddrive –medium /VM/WinWebServer/win2003-ent-cn.iso

Enable RDC

We have to set user/pass combination.

Enable RDC:

$ VBoxManage modifyvm WinWebServer –vrde on –vrdeaddress 172.16.1.10 –vrdeauthtype external

Set password:

$ VBoxManage setextradata WinWebServer "VBoxAuthSimple/users/USERNAME" PASSWORDHASH

Replace USERNAME and PASSWORDHASH. Password hash can be generated as follows:

$ VBoxManage internalcommands passwordhash "secret"

virtualbox_cli_configuration.txt · 最后更改: 2011/10/31 21:11 由 admin