Previous page

Next page

Locate page in Contents

Print this page

create_drive

WindowsThis call is available on Windows only.

Summary:

Creates a new file system image and loopback-mounts it on the specified server.

Request specification:

Name

Min/Max

Type

Description

create_drive

 

mount_deviceType

 

{

 

 

 

eid

1..1

eid_type

Server ID.

}

 

 

 

Returns:

Name

Min/Max

Type

Description

device_info

 

 

New disk information.

{

 

 

 

device

0..[]

string

The full path to the image file.

}

 

 

 

Description:

Use the create_drive call to create EFD file system images. EFD is SWsoft's proprietary file system. The call creates a new, empty file system image file and then loopback-mounts it the specified Container. After the file is created and mounted, you can use it just like any other physical disk drive inside the Container.

The device parameter specifies the name and path where the file will reside. If you specify a full path, it will be treated as a path on the Hardware Node. If you specify just the name of the file, the file will be created in the Container private area. If you omit the device element, the file name will be generated automatically and the file will be created in the Container private area.

The image located in a particular Container private area can be mounted inside that Container only. Note that when creating an image file, you have to mount it inside a Container, you cannot create an unmounted EFD image.

The following describes the parameters used in this call:

device -- The name and path of the image file. If not specified, the name will be generated automatically by using the lpbk prefix (meaning "loopback") followed by a numeric value indicating the file number (i.e. 0000, 0001, 0002, etc.), and the .efd extension. The following are the examples of the automatic file names: lpbk0000.efd, lpbk0001.efd, lpbk0002.efd. If the name doesn't contain a full path, the image file will be created in the Container private area. If the full path is specified (e.g. C:\img.efd), it will be treated as a path on the Hardware Node.

size -- The size of the image file in bytes.The minimum allowed size is 6 megabytes. There's no limit on the max size. You can change this size later with the resize_drive call.

point -- The mount point. This must be the disk drive letter, e.g. E:

eid -- The ID of the server where you would like to mount the image file.

Configuring shared loopback based Container clustering

interface -- To configure shared loopback based Container clustering, the new drive must be recognized by Windows running inside the Container as SCSI block device. This is accomplished by include the interface element containing the SCSI value. Before you can start using the drive inside the Container, you'll have to initialize it as follows:

  1. Log in to the Container via Remote Desktop.
  2. On the Windows Start menu, select Programs->Administrative Tools->Computer Management.
  3. In the Computer Management window, select Storage->Disk Management.
  4. Right-click on the new disk and select the Initalize option from the pop-up menu.
  5. Right-click on the disk partition and select the New Parition option from the menu.
  6. Complete the New Partition wizard using the default values on all screens except the Assign the Drive Letter or Path screen where you should select the drive letter that you specified in the point parameter of the create_drive call.

The following steps describe how to deploy shared loopback based Container clustering.

1. Enable Windows Cluster Server support in a Virtuozzo Container by turning the failover_cluster capability on. The following code example shows how it is accomplished:

<packet version="4.0.0">

<target>vzaenvm</target>

<data>

<vzaenvm>

<set>

<eid>7f29d970-3e31-46f3-9b59-2654329e3e55</eid>

<config>

<capability>

<id>failover_cluster</id>

<value>1</value>

</capability>

</config>

</set>

</vzaenvm>

</data>

</packet>

2. Create a shared disk drive as described above.

3. Login to the Container via Remote Desktop and create/add the Container to a cluster using Microsoft Cluster Administrator.

Example 1:

Creating the filesystem image named img.efd in the C: drive root directory on the Hardware Node and mounting it as an F: drive inside the specified Virtuozzo Container.

Input

<packet version="4.0.0">

<target>vzadevm</target>

<data>

<vzadevm>

<create_drive>

<device>C:\img.efd</device>

<point>F:</point>

<size>6000000</size>

<eid>7f29d970-3e31-46f3-9b59-2654329e3e55</eid>

</create_drive>

</vzadevm>

</data>

</packet>

Output

<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns2="http://www.swsoft.com/webservices/vza/4.0.0/vzadevm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="2bc46486e35t6443re80" time="2007-05-15T13:12:23+0000" priority="0" version="4.0.0">

<ns1:origin>vzadevm</ns1:origin>

<ns1:target>vzclient2</ns1:target>

<ns1:dst>

<ns1:director>gend</ns1:director>

</ns1:dst>

<ns1:data>

<ns2:vzadevm>

<ns2:device_info>

<ns2:device>C:\img.efd</ns2:device>

</ns2:device_info>

</ns2:vzadevm>

</ns1:data>

<ns1:src>

<ns1:director>gend</ns1:director>

</ns1:src>

</ns1:packet>

Example 2:

In this example we do not specify the name for the image file. The name, therefore, will be generated automatically and the file will be created in the Container private area.

Input

<packet version="4.0.0">

<target>vzadevm</target>

<data>

<vzadevm>

<create_drive>

<point>I:</point>

<size>6000000</size>

<eid>7f29d970-3e31-46f3-9b59-2654329e3e55</eid>

</create_drive>

</vzadevm>

</data>

</packet>

Output

The output below contains the name of the image file: lpbk0004.efd

<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns2="http://www.swsoft.com/webservices/vza/4.0.0/vzadevm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="2cc46487129t66bbre80" time="2007-05-15T13:24:59+0000" priority="0" version="4.0.0">

<ns1:origin>vzadevm</ns1:origin>

<ns1:target>vzclient2</ns1:target>

<ns1:dst>

<ns1:director>gend</ns1:director>

</ns1:dst>

<ns1:data>

<ns2:vzadevm>

<ns2:device_info>

<ns2:device>lpbk0004.efd</ns2:device>

</ns2:device_info>

</ns2:vzadevm>

</ns1:data>

<ns1:src>

<ns1:director>gend</ns1:director>

</ns1:src>

</ns1:packet>

Example 3:

This example demonstrates how to create a shared SCSI storage device inside a Container.

Input

<packet version="4.0.0">

<target>vzadevm</target>

<data>

<vzadevm>

<create_drive>

<device>C:\img007.efd</device>

<point>L:</point>

<size>6000000</size>

<interface>SCSI</interface>

<eid>715d6510-b7f1-4eda-98e2-3c6b6ee1f608</eid>

</create_drive>

</vzadevm>

</data>

</packet>

Please send us your feedback on this help page