News, tips, partners, and perspectives for the Oracle Solaris operating system

VirtualBox and the ZFS Demonstration Tutorial

Guest Author

The ZFS Demonstration Tutorial is an excellent resource, however, many are probably put off by the requirements necessary to complete it:

"You need a minimum of four disks, preferably five or more and if possible, all the same size."

As my teammate Gregg would say - Yowza!

The good news is that VirtualBox makes this REAL easy. If you do not already have OpenSolaris running under VirtualBox, follow Running OpenSolaris Using VirtualBox to get started.

Once you have OpenSolaris successfully installed in VirtualBox, we can begin to add the additional disks (you'll need to shut down OpenSolaris if it is running). From the VirtualBox File menu, select Virtual Disk Manager. Here you'll see the virtual disk image you created when you first installed OpenSolaris (your vdi name, of course, may be different):

Click New to add a new disk:

Select Dynamically expanding image as the image type: 

Name the image ZFSTutorial1.vdi and set the size to 100 MB:

Repeat those steps to create disks 2 through 5. Once complete your disk manager should look as follows:

Click OK to close the Virtual Disk Manager. Open the Settings for your OpenSolaris virtual machine and select Hard Disks:

Select Enable SATA Controller.

Click the Add Attachment icon on the right 5 times to add the 5 disks we just created:

Then change the slot property so all of the disks use SATA ports. This will just make managing the disks easier from OpenSolaris as they'll all be assigned to the same controller:

Now start OpenSolaris and identify the disks by opening a terminal and running the format command:

bleonard@opensolaris:~$ pfexec format
Searching for disks...done
0. c4d0
1. c6t1d0
2. c6t2d0
3. c6t3d0
4. c6t4d0
5. c6t5d0
Specify disk (enter its number):

You can see the disk IDs are nicely labeled c6t1d0 through c6t5d0 (for this tutorial, I'm not going to mess with my existing hard disk - c4d0). The tutorial uses disk IDs c1t0d0 through c5t0d0, which cleanly map as follows:

 Tutorial Device ID  Your Device ID
 c1t0d0  c6t1d0
 c2t0d0  c6t2d0
 c3t0d0  c6t3d0
 c4t0d0  c6t4d0
 c5t0d0  c6t4d0

With that you should be ready to complete the ZFS Demonstration Tutorial. Enjoy!

Join the discussion

Comments ( 11 )
  • guest Tuesday, July 8, 2008

    Or use files instead of physical disks to create you pool on (as is explained on the next page of the tutorial).

  • Roman Strobl Tuesday, July 8, 2008

    I am running OpenSolaris both as host and as guest with VirtualBox, so I think the document needs to be updated.

  • Pieter Thursday, July 10, 2008

    I did the same thing on my virtualbox (windows host) but if i run the "pfexec format" i still only see one disk.

    what i am doing wrong?

  • deffo Wednesday, October 15, 2008

    please can i have translation in french?

  • hmhung Tuesday, October 21, 2008

    please can i have translation in vietnmese

  • srideep bardhan roy Thursday, October 23, 2008

    it is a very good operating system which works very fast

  • hiren Friday, October 24, 2008

    asdfg m

  • Ratan Nampelly Tuesday, November 18, 2008

    Am very happy to use this infomration regarding virtual box.

  • Jan Hlodan Monday, February 9, 2009

    "please can i have translation in french?

    Posted by deffo on October 15, 2008 at 05:19 PM GMT"


    do you mean translation of this blog or ZFS/VirtualBox documentation?

    The Observatory blog is running in multilingual mode now.

    So if you want to help and translate some articles into your native language, you are welcomed!

    Unfortunately, only Sun employees can manage blog.

    However, you can send me a translations and I'll post them on the blog.

  • hendro moeljono Thursday, June 18, 2009

    you need to run devfsadm -c disk to make the solaris 10 to recognize the sata disk.

  • Newebby Tuesday, December 29, 2009

    Is the first time that my old Workstation SUN Ultra 5 start and give me (OK)prompt, and now?

    Linux & DOS commands don't work

    Someone could help me.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.