JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle VM Server for SPARC 2.0 Administration Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of the Oracle VM Server for SPARC Software

2.  Installing and Enabling Software

3.  Security

4.  Setting Up Services and the Control Domain

5.  Setting Up Guest Domains

6.  Setting Up I/O Domains

7.  Using Virtual Disks

Introduction to Virtual Disks

Managing Virtual Disks

Add a Virtual Disk

Export a Virtual Disk Back End Multiple Times

Change Virtual Disk Options

Change the Timeout Option

Remove a Virtual Disk

Virtual Disk Identifier and Device Name

Virtual Disk Appearance

Full Disk

Single-Slice Disk

Virtual Disk Back End Options

Read-only (ro) Option

Exclusive (excl) Option

Slice (slice) Option

Virtual Disk Back End

Physical Disk or Disk LUN

Export a Physical Disk as a Virtual Disk

Physical Disk Slice

Export a Physical Disk Slice as a Virtual Disk

Export Slice 2

File and Volume

File or Volume Exported as a Full Disk

Export a File as a Full Disk

File or Volume Exported as a Single-Slice Disk

Export a ZFS Volume as a Single-Slice Disk

Exporting Volumes and Backward Compatibility

Summary of How Different Types of Back Ends Are Exported

Guidelines for Exporting Files and Disk Slices as Virtual Disks

Using the Loopback File (lofi) Driver

Directly or Indirectly Exporting a Disk Slice

Configuring Virtual Disk Multipathing

Configure Virtual Disk Multipathing

CD, DVD and ISO Images

Export a CD or DVD From the Service Domain to the Guest Domain

Export an ISO Image From the primary Domain to Install a Guest Domain

Virtual Disk Timeout

Virtual Disk and SCSI

Virtual Disk and the format(1M) Command

Using ZFS With Virtual Disks

Configuring a ZFS Pool in a Service Domain

Storing Disk Images With ZFS

Examples of Storing Disk Images With ZFS

Create a Disk Image Using a ZFS Volume

Create a Disk Image Using a ZFS File

Export the ZFS Volume

Export the ZFS File

Assign the ZFS Volume or File to a Guest Domain

Creating a Snapshot of a Disk Image

Create a Snapshot of a Disk Image

Using Clone to Provision a New Domain

Cloning a Boot Disk Image

Using Volume Managers in a Logical Domains Environment

Using Virtual Disks on Top of Volume Managers

Using Virtual Disks on Top of Solaris Volume Manager

Using Virtual Disks When VxVM Is Installed

Using Volume Managers on Top of Virtual Disks

Using ZFS on Top of Virtual Disks

Using Solaris Volume Manager on Top of Virtual Disks

Using VxVM on Top of Virtual Disks

8.  Using Virtual Networks

9.  Migrating Domains

10.  Managing Resources

11.  Managing Configurations

12.  Performing Other Administration Tasks

A.  Oracle VM Server for SPARC Physical-to-Virtual Conversion Tool

B.  Oracle VM Server for SPARC Configuration Assistant

C.  Logical Domains Manager Discovery

D.  Using the XML Interface With the Logical Domains Manager

E.  Logical Domains Manager XML Schemas

Glossary

Index

Virtual Disk Back End

The virtual disk back end is the location where data of a virtual disk are stored. The back end can be a disk, a disk slice, a file, or a volume, such as ZFS, Solaris Volume Manager, or VxVM. A back end appears in a guest domain either as a full disk or as single-slice disk, depending on whether the slice option is set when the back end is exported from the service domain. By default, a virtual disk back end is exported non-exclusively as a readable-writable full disk.

Physical Disk or Disk LUN

A physical disk or disk LUN is always exported as a full disk. In that case, virtual disk drivers (vds and vdc) forward I/O from the virtual disk and act as a pass-through to the physical disk or disk LUN.

A physical disk or disk LUN is exported from a service domain by exporting the device that corresponds to the slice 2 (s2) of that disk without setting the slice option. If you export the slice 2 of a disk with the slice option, only this slice is exported and not the entire disk.

Export a Physical Disk as a Virtual Disk

  1. Export a physical disk as a virtual disk.

    For example, to export the physical disk c1t48d0 as a virtual disk, you must export slice 2 of that disk (c1t48d0s2).

    primary# ldm add-vdsdev /dev/dsk/c1t48d0s2 c1t48d0@primary-vds0
  2. Assign the disk to a guest domain.

    For example, assign the disk (pdisk) to guest domain ldg1.

    primary# ldm add-vdisk pdisk c1t48d0@primary-vds0 ldg1
  3. After the guest domain is started and running the Oracle Solaris OS, verify that the disk is accessible and is a full disk.

    A full disk is a regular disk that has eight (8) slices.

    For example, the disk being checked is c0d1.

    ldg1# ls -1 /dev/dsk/c0d1s*
    /dev/dsk/c0d1s0
    /dev/dsk/c0d1s1
    /dev/dsk/c0d1s2
    /dev/dsk/c0d1s3
    /dev/dsk/c0d1s4
    /dev/dsk/c0d1s5
    /dev/dsk/c0d1s6
    /dev/dsk/c0d1s7

Physical Disk Slice

A physical disk slice is always exported as a single-slice disk. In that case, virtual disk drivers (vds and vdc) forward I/O from the virtual disk and act as a pass-through to the physical disk slice.

A physical disk slice is exported from a service domain by exporting the corresponding slice device. If the device is different from slice 2 then it is automatically exported as a single-slice disk whether or not you specify the slice option. If the device is the slice 2 of the disk, you must set the slice option to export only slice 2 as a single-slice disk; otherwise, the entire disk is exported as full disk.

Export a Physical Disk Slice as a Virtual Disk

  1. Export a slice of a physical disk as a virtual disk.

    For example, to export slice 0 of the physical disk c1t57d0 as a virtual disk, you must export the device that corresponds to that slice (c1t57d0s0) as follows.

    primary# ldm add-vdsdev /dev/dsk/c1t57d0s0 c1t57d0s0@primary-vds0

    You do not need to specify the slice option, because a slice is always exported as a single-slice disk.

  2. Assign the disk to a guest domain.

    For example, assign the disk (pslice) to guest domain ldg1.

    primary# ldm add-vdisk pslice c1t57d0s0@primary-vds0 ldg1
  3. After the guest domain is started and running the Oracle Solaris OS, you can list the disk (c0d13, for example) and see that the disk is accessible.
    ldg1# ls -1 /dev/dsk/c0d13s*
    /dev/dsk/c0d13s0
    /dev/dsk/c0d13s1
    /dev/dsk/c0d13s2
    /dev/dsk/c0d13s3
    /dev/dsk/c0d13s4
    /dev/dsk/c0d13s5
    /dev/dsk/c0d13s6
    /dev/dsk/c0d13s7

    Although there are 8 devices, because the disk is a single-slice disk, only the first slice (s0) is usable.

Export Slice 2

File and Volume

A file or volume (for example from ZFS or Solaris Volume Manager) is exported either as a full disk or as single-slice disk depending on whether or not the slice option is set.

File or Volume Exported as a Full Disk

If you do not set the slice option, a file or volume is exported as a full disk. In that case, virtual disk drivers (vds and vdc) forward I/O from the virtual disk and manage the partitioning of the virtual disk. The file or volume eventually becomes a disk image containing data from all slices of the virtual disk and the metadata used to manage the partitioning and disk structure.

When a blank file or volume is exported as full disk, it appears in the guest domain as an unformatted disk; that is, a disk with no partition. Then you need to run the format(1M) command in the guest domain to define usable partitions and to write a valid disk label. Any I/O to the virtual disk fails while the disk is unformatted.


Note - Prior to the Oracle Solaris 5/08 OS release, when a blank file was exported as a virtual disk, the system wrote a default disk label and created default partitioning. This is no longer the case with the Oracle Solaris 5/08 OS release, and you must run format(1M) in the guest domain to create partitions.


Export a File as a Full Disk

  1. From the service domain, create a file (fdisk0 for example) to use as the virtual disk.
    service# mkfile 100m /ldoms/domain/test/fdisk0

    The size of the file defines the size of the virtual disk. This example creates a 100-megabyte blank file to get a 100-megabyte virtual disk.

  2. From the control domain, export the file as a virtual disk.
    primary# ldm add-vdsdev /ldoms/domain/test/fdisk0 fdisk0@primary-vds0

    In this example, the slice option is not set, so the file is exported as a full disk.

  3. From the control domain, assign the disk to a guest domain.

    For example, assign the disk (fdisk) to guest domain ldg1.

    primary# ldm add-vdisk fdisk fdisk0@primary-vds0 ldg1
  4. After the guest domain is started and running the Oracle Solaris OS, verify that the disk is accessible and is a full disk.

    A full disk is a regular disk with 8 slices.

    The following example shows how to list the disk, c0d5, and verify that it is accessible and is a full disk.

    ldg1# ls -1 /dev/dsk/c0d5s*
    /dev/dsk/c0d5s0
    /dev/dsk/c0d5s1
    /dev/dsk/c0d5s2
    /dev/dsk/c0d5s3
    /dev/dsk/c0d5s4
    /dev/dsk/c0d5s5
    /dev/dsk/c0d5s6
    /dev/dsk/c0d5s7
File or Volume Exported as a Single-Slice Disk

If the slice option is set, then the file or volume is exported as a single-slice disk. In that case, the virtual disk has only one partition (s0), which is directly mapped to the file or volume back end. The file or volume only contains data written to the virtual disk with no extra data like partitioning information or disk structure.

When a file or volume is exported as a single-slice disk, the system simulates a fake disk partitioning which makes that file or volume appear as a disk slice. Because the disk partitioning is simulated, you do not create partitioning for that disk.

Export a ZFS Volume as a Single-Slice Disk

  1. Create a ZFS volume to use as a single-slice disk.

    The following example shows how to create a ZFS volume, zdisk0, to use as a single-slice disk.

    service# zfs create -V 100m ldoms/domain/test/zdisk0

    The size of the volume defines the size of the virtual disk. This example creates a 100-megabyte volume to get a 100-megabyte virtual disk.

  2. From the control domain, export the corresponding device to that ZFS volume, and set the slice option so that the volume is exported as a single-slice disk.
    primary# ldm add-vdsdev options=slice /dev/zvol/dsk/ldoms/domain/test/zdisk0 \ zdisk0@primary-vds0
  3. From the control domain, assign the volume to a guest domain.

    The following shows how to assign the volume, zdisk0, to guest domain ldg1.

    primary# ldm add-vdisk zdisk0 zdisk0@primary-vds0 ldg1
  4. After the guest domain is started and running the Oracle Solaris OS, you can list the disk (c0d9, for example) and see that the disk is accessible and is a single-slice disk (s0).
    ldg1# ls -1 /dev/dsk/c0d9s*
    /dev/dsk/c0d9s0
    /dev/dsk/c0d9s1
    /dev/dsk/c0d9s2
    /dev/dsk/c0d9s3
    /dev/dsk/c0d9s4
    /dev/dsk/c0d9s5
    /dev/dsk/c0d9s6
    /dev/dsk/c0d9s7
Exporting Volumes and Backward Compatibility

Prior to the Oracle Solaris 10 5/08 OS release, the slice option did not exist, and volumes were exported as single-slice disks. If you have a configuration exporting volumes as virtual disks and if you upgrade the system to the Oracle Solaris 10 5/08 OS, volumes are now exported as full disks instead of single-slice disks. To preserve the old behavior and to have your volumes exported as single-slice disks, you need to do either of the following:

Summary of How Different Types of Back Ends Are Exported
Back End
No Slice Option
Slice Option Set
Disk (disk slice 2)
Full disk1
Single-slice disk2
Disk slice (not slice 2)
Single-slice disk3
Single-slice disk
File
Full disk
Single-slice disk
Volume, including ZFS, Solaris Volume Manager, or VxVM
Full disk
Single-slice disk

1Export the entire disk.

2Export only slice 2

3A slice is always exported as a single-slice disk.

Guidelines for Exporting Files and Disk Slices as Virtual Disks

This section includes guidelines for exporting a file and a disk slice as a virtual disk.

Using the Loopback File (lofi) Driver

It is possible to use the loopback file (lofi) driver to export a file as a virtual disk. However, doing this adds an extra driver layer and impacts performance of the virtual disk. Instead, you can directly export a file as a full disk or as a single-slice disk. See File and Volume.

Directly or Indirectly Exporting a Disk Slice

To export a slice as a virtual disk either directly or indirectly (for example through a Solaris Volume Manager volume), ensure that the slice does not start on the first block (block 0) of the physical disk by using the prtvtoc(1M) command.

If you directly or indirectly export a disk slice which starts on the first block of a physical disk, you might overwrite the partition table of the physical disk and make all partitions of that disk inaccessible.