Previous page

Next page

Locate page in Contents

Print this page

Creating a Virtuozzo Container

The final step in creating a Container is to build the XML request and send it to Agent. To create a Container, use the vzaenvm/create call.

The following request will create a Virtuozzo Container:

<packet version="4.0.0" id="2">

  <target>vzaenvm</target>

  <data>

    <vzaenvm>

      <create>

        <config>

          <name>My-CT10</name>

          <hostname>Host-110</hostname>

          <base_sample_id>c607f3c6-16b3-214a-9079-8113fdfa1630</base_sample_id>

          <veid>110</veid>

          <on_boot>true</on_boot>

          <offline_management>true</offline_management>

          <os_template>

            <name>redhat-as3-minimal</name>

          </os_template>

          <net_device>

            <id>venet0</id>

            <ip_address>

              <ip>10.17.3.121</ip>

            </ip_address>

            <host_routed/>

          </net_device>

        </config>

      </create>

    </vzaenvm>

  </data>

</packet>

If the Container is created successfully, you should see the output similar to the following:

<packet id="2" time="2007-09-10T11:02:33+0000" priority="4000" version="4.0.0">

  <origin>vzaenvm</origin>

  <target>vzclient139-4fce28dd-0cd3-1345-bb94-3192b940fb90</target>

  <dst>

    <director>gend</director>

  </dst>

  <data>

    <vzaenvm>

      <env>

        <parent_eid>00000000-0000-0000-0000-000000000000</parent_eid>

        <eid>8d5c125b-e7f5-c448-9c8a-ee7ccab18599</eid>

        <status>

          <state>1</state>

        </status>

        <alert>0</alert>

        <config/>

        <virtual_config>

          <veid>110</veid>

          <type>virtuozzo</type>

        </virtual_config>

      </env>

    </vzaenvm>

  </data>

</packet>

The output contains the Server ID that was assigned to the new Container by Agent, the ID of the Parent Server (the Hardware Node), and some of the Container information. If you see an output like that, it means that the Container was created successfully. You can also log in to your Hardware Node and run the vzlist command from the command prompt. You should see the new Container in the list.

Please send us your feedback on this help page