A.28 create VirtualDisk

Creates a virtual disk.

Syntax

create VirtualDisk size=value shareable= { yes | no } sparse= { yes | no } name=value [description=value] on Repository instance

Where instance is:

{ id=id | name=name }

Description

This command creates a virtual disk in a storage repository.

Options

The following table shows the available options for this command.

Option

Description

size=value

The size of the virtual disk in GiB.

shareable= { yes | no }

Whether the virtual disk is shareable. Shareable disks have read/write privileges in multiple virtual machines and should be used with caution.

sparse= { yes | no }

Whether to create a sparse or non-sparse virtual disk.

name=value

A name to identify the virtual disk.

description=value

Optional description for the virtual disk.

{ id=id | name=name }

The instance of the object using either the id or name option, for example name=MyRepository.

Note

Any create command only creates a single instance of an object, and therefore only accepts a single object instance as an attribute. Providing more than one object of the same attribute type as a parameter always results in the last attribute value taking precedence.

Examples

Example A.37 Creating a virtual disk in a storage repository

OVM> create VirtualDisk name=MyVMDisk size=10 sparse=yes shareable=no on Repository \
  name=MyRepository

See Also