Category Archives: VirtualBox

Create VirtualBox Shared Disks for RAC Configuration

In the previous release of Virtualbox, we were able to create a virtual disk and specify the shareable option with the createhd command.  Here’s what the old syntax looked like:

# Create the disks and associate them with VirtualBox as virtual media.
$ VBoxManage createhd –filename asm1.vdi –size 10240 –format VDI –variant Fixed –type shareable –remember

With Virtualbox 4 that option went away, and now we have to issue the modifyhd command and specify that the disk will be shareable.  First, we need to create our virtual disk with the new syntax:

$ VBoxManage createhd –filename asm1.vdi –size 2048 –format VDI –variant Fixed
Disk image created. UUID: 1f4b1d28-23b5-4dfd-89da-4e4546a2f969

Notice the UUID generated from the createhd command.  Subsequent commands with the modifyhd and storageattach options can reference either the disk name or UUID:  Here’s the usage for the modifyhd command:

$ VBoxManage modifyhd

VBoxManage modifyhd <uuid>|<filename>
[–type normal|writethrough|immutable|shareable|
[–autoreset on|off]
[–resize <megabytes>|–resizebyte <bytes>]

In all of our examples, we will reference the virtual disk based on the file name.  To make the newly created virtual disk shareable, we execute the VBoxManage command again with the modifyhd option:

$ VBoxManage modifyhd asm1.vdi -type shareable

Lastly, when we attach the disk to our RAC server, we have to specify that it is a shared disk again.  In this example, the name of our RAC node happens to be ol63a:

$ VBoxManage storageattach ol63a –storagectl “SATA” –port 1 –device 0 –type hdd –medium asm1.vdi –mtype shareable