InomHitta mer dokumentationSupportresurser som ingår | Ladda ner denna bok i PDF (9688 KB)
vdiskadm(1M)Name | Synopsis | Description | Sub-commands | Examples | Attributes | See Also Name
Synopsis
vdiskadm create -s size [-t type[:opt],[opt]
[-c comment] vdname
vdiskadm destroy [-r] vdname|snapshot vdiskadm snapshot vdname@snapname vdiskadm rollback [-r] snapshot vdiskadm clone [-c comment] vdname|snapshot clone_vdname vdiskadm move vdname dir vdiskadm rename vdname|snapshot vdname|snapshot vdiskadm list [-fp]vdname vdiskadm verify vdname vdiskadm prop-get [-l] -p property vdname vdiskadm prop-set -p property=value vdname vdiskadm prop-add -p property=value vdname vdiskadm prop-del -p property vdname
vdiskadm import [-fnpqm] [-x type] -d file|zvol|dsk
[-t type[:opt]] vdname
vdiskadm export -x type[:opt] -d file|zvol|dsk vdname vdiskadm convert [-t type[:opt]] vdname
vdiskadm translate [-i type[:opt]] -I input_file -x type[:opt]
-d output_file
vdiskadm help [command] Description
The vdiskadm command manages virtual disks within dom0. In the SYNOPSIS above, vdname is the pathname of the virtual disk; it has a maximum length of MAXPATHLEN (1024 bytes). vdiskadm is implemented as a set of subcommands, many with their own options and operands. These subcommands are described under “Subcommands,” below. The following subsections describe concepts related to virtual disks. SnapshotsA snapshot is a read-only copy of a virtual disk. Snapshots can be created extremely quickly and initially consume little space. As data within the active virtual disk changes, the snapshot consumes more data than would otherwise be shared with the active virtual disk. ClonesA clone is a writable copy of a virtual disk. The default type of clone is a merged (that is, coalesced) copy of the original virtual disk. An example of a merged clone occurs when a virtual disk is comprised of several snapshots; a subsequent clone operation results in a new virtual disk containing no snapshots. A clone will be of the same type as the original virtual disk (that is, vmdk:fixed). When a merged clone is created there is no linkage back to the original virtual disk or to any of its snapshots. This lack of linkage allows the merged clone to be moved to another physical machine. Numeric ValuesThe values of numeric properties can be specified using human-readable suffixes, such as k, KB, M, Gb, and so forth, up to Z for zettabyte). The following are all valid (and equal) specifications:
Types of Virtual DisksThe following types and options of virtual disks are supported: where vmdk is the native VMware format, vdi is the native VirtualBox format, vhd is the native Microsoft format, and raw describes a file that looks like a raw disk. A raw disk is always in fixed format so that option can be explicitly set or implicitly understood. If the type is not specified, the default value is vmdk. If the option is not specified, the default value is fixed for type raw and sparse for types vmdk, vdi, and vhd. Native and User-defined PropertiesProperties are divided into two types, native and user defined. Native properties either export internal statistics or control vdiskadm behavior. In addition, native properties are either editable or read-only. User–defined properties are arbitrary strings that have no effect on vdiskadm behavior. You can use them to annotate virtual disks in a way that is meaningful in your environment. User–defined property names must contain a colon (:) character, to distinguish them from native properties. Properties are associated only with the virtual disk and not with individual snapshots. Every virtual disk has a set of native properties that export statistics about the virtual disk, as well as control various behaviors. The following are the native properties for a virtual disk: Sub-commands
The vdiskadm subcommands and their arguments are described in the following subsections. vdiskadm create
Creates a new virtual disk of the specified size and at the location specified by vdname. If vdname includes a path to the virtual disk, the directories that follow from that path will be created during creation of the virtual disk. This subcommand has the options listed below. vdiskadm destroy
Destroys the specified virtual disk or snapshot. By default, the destroy operation fails if the specified virtual disk contains snapshots. This subcommand has the option listed below. vdiskadm snapshot
Creates a snapshot of the virtual disk with the specified snapname. This subcommand has no options. vdiskadm rollback
Roll back the virtual disk to a previous snapshot. When a virtual disk is rolled back, all data that has changed since the snapshot is discarded, and the virtual disk reverts to the state at the time of the snapshot. By default, the command refuses to roll back to a snapshot other than the most recent one. In order to roll back further, all intermediate snapshots must be destroyed by specifying the -r option. This subcommand has the option listed below. vdiskadm clone
Creates a clone of the specified snapshot or virtual disk. The clone is created with the type and option and the size of the virtual disk being cloned. If clone_vdname includes a path the directories that flow from that path will be created during creation of the cloned virtual disk. By default, a merged clone image is created. This subcommand has the option listed below. vdiskadm move
Moves a specified virtual disk into the specified directory. The virtual disk maintains the same name. The new directory must exist. This subcommand has no options. vdiskadm rename
Renames a virtual disk or snapshot. This subcommand has no options. vdiskadm list
Lists a specified virtual disk and its snapshots. This subcommand has the options listed below. vdiskadm verify
Returns an error if the virtual disk cannot be recognized or opened by Solaris xVM. This subcommand has no options. vdiskadm prop-get
Returns the value of the property for the specified virtual disk. A property value of all displays all native and user-defined properties for the virtual disk. This subcommand has the options listed below. vdiskadm prop-set
Sets the value of the specified property for the specified virtual disk. property can be a native or a user-defined property, but must be writable. Can be used to change the value of a property added with the prop-add subcommand. This subcommand has the option listed below. vdiskadm prop-add
Adds the user-defined property with the specified value to the specified virtual disk. Returns an error if the property already exists. The user-defined property name must contain a colon character (:). This subcommand has the option listed below. vdiskadm prop-del
Deletes a user–defined property from the specified virtual disk. This subcommand has the option listed below. vdiskadm import
Creates a new virtual disk using data from a file or block device. The file may be in vdi, vhd, vmdk, or raw format. A block device is always assumed to be in raw format. This subcommand has the following options. vdiskadm export
Exports data from a virtual disk to a file or block device. This subcommand has the following options. vdiskadm convert
Converts a virtual disk into a different type virtual disk. This subcommand has the following option. vdiskadm translate
Translate data from one virtual disk data type to another without creating a virtual disk. This subcommand has the following options. vdiskadm help
Displays a general or command-specific help message. This subcommand has only the command name optional argument. ExamplesExample 1 Creating a vmdk Sparse FileThe following command creates a virtual disk named disk1 of size 8 GB in the directory /guests/disks.
Example 2 Creating a SnapshotThe following command creates a snapshot of the virtual disk located at /guests/disks/disk1. The snapshot is named install.
Example 3 Creating and Destroying SnapshotsThe following commands create two snapshots, named install and bfu, of the virtual disk located at /guests/disks/disk1. The third command destroys the newly created snapshot install.
Example 4 Rolling Back a Virtual DiskThe following command reverts the contents of the virtual disk to the snapshot named install, deleting all intermediate snapshots.
Example 5 Listing a Virtual Disk and SnapshotsThe following command lists all of the images associated with the virtual disk /guests/disks/disk1.
Example 6 Creating a CloneThe following command creates a new virtual disk that is a coalesced copy of the virtual disk /guests/disks/disk1. The clone is created in the same format (that is, vmdk:sparse) as the original virtual disk.
Example 7 Adding a User-defined PropertyThe following command adds a user-defined property to the virtual disk and assigns it the specified value. This property name was chosen to represent the source and requirements of this virtual disk data using the required colon to delineate the fields.
Example 8 Importing Existing vmdk Format FileThe following command takes an existing vmdk format file and imports it to a virtual disk.
Example 9 Importing vmdk File and Converting to vhdThe following command takes an existing vmdk format file and, upon import, converts it to a vhd-type virtual disk.
Example 10 Importing Data from zvolThe following command imports virtual disk data from a zvol and, upon import, converts it to a vmdk:fixed type virtual disk.
Example 11 Exporting Data to Block DeviceThe following command takes an existing virtual disk and, upon export, converts it to a disk slice, of raw type.
Example 12 Converting Virtual Disk TypeThe following command takes an existing virtual disk and converts it (in place) to a different format type.
Example 13 Translating Data from One Type to AnotherThe following command translates data from a virtual disk format file to raw data written to a zvol without creating a virtual disk.
AttributesSee attributes(5) for descriptions of the following attributes:
See AlsoSunOS 5.11 Last Revised 2 Apr 2009Name | Synopsis | Description | Sub-commands | Examples | Attributes | See Also |
||||||||||||||||||||||||||||||||||||||