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

Document Information

Preface

Part I Oracle VM Server for SPARC 2.1 Software

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

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 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

Part II Optional Oracle VM Server for SPARC Software

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

14.  Oracle VM Server for SPARC Configuration Assistant

15.  Using the Oracle VM Server for SPARC Management Information Base Software

16.  Logical Domains Manager Discovery

17.  Using the XML Interface With the Logical Domains Manager

Glossary

Index

Using ZFS With Virtual Disks

This section describes using the Zettabyte File System (ZFS) to store virtual disk back ends exported to guest domains. ZFS provides a convenient and powerful solution to create and manage virtual disk back ends. ZFS enables:

Refer to the Oracle Solaris ZFS Administration Guide for more information about using the ZFS.

In the following descriptions and examples, the primary domain is also the service domain where disk images are stored.

Configuring a ZFS Pool in a Service Domain

To store the disk images, first create a ZFS storage pool in the service domain. For example, this command creates the ZFS storage pool ldmpool containing the disk c1t50d0 in the primary domain.

primary# zpool create ldmpool c1t50d0

Storing Disk Images With ZFS

The following command creates a disk image for guest domain ldg1. A ZFS file system for this guest domain is created, and all disk images of this guest domain will be stored on that file system.

primary# zfs create ldmpool/ldg1

Disk images can be stored on ZFS volumes or ZFS files. Creating a ZFS volume, whatever its size, is quick using the zfs create -V command. On the other hand, ZFS files have to be created using the mkfile command. The command can take some time to complete, especially if the file to create is quite large, which is often the case when creating a disk image.

Both ZFS volumes and ZFS files can take advantage of ZFS features such as the snapshot and clone features, but a ZFS volume is a pseudo device while a ZFS file is a regular file.

If the disk image is to be used as a virtual disk onto which an OS is installed, the disk image must be large enough to accommodate the OS installation requirements. This size depends on the version of the OS and on the type of installation performed. If you install the Oracle Solaris OS, you can use a disk size of 20 Gbytes to accommodate any type of installation of any version of the Oracle Solaris OS.

Examples of Storing Disk Images With ZFS

The following examples:

  1. Create a 20-gigabyte image on a ZFS volume or file.

  2. Export the ZFS volume or file as a virtual disk. The syntax to export a ZFS volume or file is the same, but the path to the back end is different.

  3. Assign the exported ZFS volume or file to a guest domain.

When the guest domain is started, the ZFS volume or file appears as a virtual disk on which the Oracle Solaris OS can be installed.

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

When your disk image is stored on a ZFS volume or on a ZFS file, you can create snapshots of this disk image by using the ZFS snapshot command.

Before you create a snapshot of the disk image, ensure that the disk is not currently in use in the guest domain to ensure that data currently stored on the disk image are coherent. There are several ways to ensure that a disk is not in use in a guest domain. You can either:

In this example, because of the ZFS layout, the command to create a snapshot of the disk image is the same whether the disk image is stored on a ZFS volume or on a ZFS file.

Create a Snapshot of a Disk Image

Using Clone to Provision a New Domain

Once you have created a snapshot of a disk image, you can duplicate this disk image by using the ZFS clone command. Then the cloned image can be assigned to another domain. Cloning a boot disk image quickly creates a boot disk for a new guest domain without having to perform the entire Oracle Solaris OS installation process.

For example, if the disk0 created was the boot disk of domain ldg1, do the following to clone that disk to create a boot disk for domain ldg2.

primary# zfs create ldmpool/ldg2
primary# zfs clone ldmpool/ldg1/disk0@version_1 ldmpool/ldg2/disk0

Then ldompool/ldg2/disk0 can be exported as a virtual disk and assigned to the new ldg2 domain. The domain ldg2 can directly boot from that virtual disk without having to go through the OS installation process.

Cloning a Boot Disk Image

When a boot disk image is cloned, the new image is exactly the same as the original boot disk, and it contains any information that has been stored on the boot disk before the image was cloned, such as the host name, the IP address, the mounted file system table, or any system configuration or tuning.

Because the mounted file system table is the same on the original boot disk image and on the cloned disk image, the cloned disk image has to be assigned to the new domain in the same order as it was on the original domain. For example, if the boot disk image was assigned as the first disk of the original domain, then the cloned disk image has to be assigned as the first disk of the new domain. Otherwise, the new domain is unable to boot.

If the original domain was configured with a static IP address, then a new domain using the cloned image starts with the same IP address. In that case, you can change the network configuration of the new domain by using the sys-unconfig(1M) command. To avoid this problem you can also create a snapshot of a disk image of an unconfigured system.

If the original domain was configured with the Dynamic Host Configuration Protocol (DHCP), then a new domain using the cloned image also uses DHCP. In that case, you do not need to change the network configuration of the new domain because it automatically receives an IP address and its network configuration as it boots.


Note - The host ID of a domain is not stored on the boot disk, but it is assigned by the Logical Domains Manager when you create a domain. Therefore, when you clone a disk image, the new domain does not keep the host ID of the original domain.


Create a Snapshot of a Disk Image of an Unconfigured System

  1. Bind and start the original domain.
  2. Execute the sys-unconfig command.
  3. After the sys-unconfig command completes, the domain halts.
  4. Stop and unbind the domain; do not reboot it.
  5. Take a snapshot of the domain boot disk image.

    For example:

    primary# zfs snapshot ldmpool/ldg1/disk0@unconfigured

    At this point you have the snapshot of the boot disk image of an unconfigured system.

  6. Clone this image to create a new domain which, when first booted, asks for the configuration of the system.