I'm sponsoring this fasttrack for Mark Johnson. The timer is set for 09/26/2008.

-Artem

Template Version: @(#)sac_nextcase %I% %G% SMI
This information is Copyright 2008 Sun Microsystems
1. Introduction
     1.1. Project/Component Working Name:
         Block Tap Support for Solaris
     1.2. Name of Document Author/Supplier:
         Author:  Mark Johnson
     1.3  Date of This Document:
        19 September, 2008
4. Technical Description

4.1.  Summary

This fasttrack delivers a new virtual disk backend driver for Solaris
which is capable of reading & writing VMWare native (vmdk), VirtualBox
native (vdi), and raw disk files. See the sister vdiskadm fasttrack for
information on how to create and manage these file based virtual disks.

Minor release binding is requested.


4.2.  Discussion

On Solaris, a para-virtualized disk is implemented with a frontend
block driver (which lives in the guest OS) and a backend block driver
(which lives in the IO domain). The backend driver performs the actual
disk I/O on behalf of the guest OS.

This case adds an additional backend driver to handle additional file
based disks. This includes support for VMWare native (vmdk), VirtualBox
native (vdi), and raw disk files. COW based snapshot support is
included for both vmdk and vdi based files. This driver will be the
default backend driver for file based disks going forward.

The actual block tap driver is split into two parts. A kernel driver
(xpvtap) and a user space application (vdisk). xpvtap will receive
block requests from the guest OS, map in the guest pages into the vdisk
application's address space, and then forward the request to the vdisk
application using a standard Xen blkif ring. The vdisk application will
perform the block operation on the file based virtual disk, and then
send the response back down to the xpvtap driver. The xpvtap driver
will then forward the response on to the guest.

The vdisk application runs as user xvm and runs with the
PRIV_XVM_CONTROL privilege. The xpvtap driver requires this privilege
to perform and ioctl or mmap operations. See PSARC/2008/289 for further
information on PRIV_XVM_CONTROL.

A hot plug script (tap-event), which fits into the existing i86xpv PV
driver hotplug infrastructure, takes care of start & stopping the vdisk
application, and synchronizing the application startup with the driver
instance.

The current backend block driver (xdb) allows block devices or raw
files (using lofi) to be exported to the guest as disks. xdb will
continue to be present and will co-exist with the block tap driver
(xpvtap). A guest may contain many disks. These disks can be a mixture
of block devices using xdb, raw files using xdb, and vmdk, vdi, and/or
raw files using xpvtap.

For illustration purposes of what exists today with xdb, either of the
following commands would add a raw file based disk ("file") to a guest
using the existing xdb backend driver.

  # xm block-attach nevada file:/tank/guests/nevada/disk.raw 3 w
  # virsh attach-disk nevada /tank/guests/nevada/disk.raw 3 --driver file

And either of the following commands would add a block based disk
("phy") to a guest using the existing xdb backend driver.

  # xm block-attach nevada phy:/dev/zvol/dsk/tank/guests/scratch 3 w
  # virsh attach-disk nevada /dev/zvol/dsk/tank/guests/scratch 3 --driver phy

For block tap, the "tap:vdisk" syntax is used to add a block tap file
based virtual disk. The same syntax is used for all formats (vmdk, vdi,
raw).

  # xm block-attach nevada tap:vdisk:/tank/guests/nevada/disk 3 w
  # virsh attach-disk nevada /tank/guests/nevada/disk hdb --driver tap 
--subdriver vdisk


4.3.  Interfaces

The extension to select the block tap driver (tap:vdisk) is
Uncommitted (consistent with the current file: and phy: tags).

The vdisk command line options and output are Project Private.
The only consumer of these interfaces are the tap-event script.

The tap-event script command line options and output are
Project Private.

Interfaces between the xpvtap driver and vdisk application
are Project Private.


5.  References

PSARC/2006/260 Solaris on Xen
PSARC/2007/157 libvirt - a LGPL library to control guest domain
PSARC/2008/289 Least Privilege for xVM

6. Resources and Schedule
     6.4. Steering Committee requested information
        6.4.1. Consolidation C-team Name:
                ON
     6.5. ARC review type: FastTrack
     6.6. ARC Exposure: open


Reply via email to