   9.3.3.3. Examples
    ----------------

     9.3.3.3.1 Install a Xen VM - CentOS-5
      ------------------------------------

      9.3.3.3.1.1 Templates
       --------------------

       The templates supported with ctys are based on the same
       environment as most of teh examples.

       The assumed network services are:

        - DHCP + DNS
        - FTP  + NFS
        - TFTP

       For additional services the following will be helpful:

        - PXE/PXELinux
        - Kerberos+LDAP+(Samba/SMB)+automount

       Based on this the testenvironment is the CentOS-5 distribution
       with a yum setup and an environment for kickstart install,
       which could be selcted by PXE-menues.

       So in accordance to the PXELinux name resolution convention by
       MAC/host addresses (see gethostip and ctys-vhost) an easy setup
       based on type-templates and symbolic links is possible.

       The following files support a basic install, which is performed
       fully automatic by simple scripts. It is based on NFS and FTP.
       The principle is based on the excellent CentOS HowTo: "Creating
       and installing a CentOS 5 domU instance" available at the
       CentOS website.

       Just a few adaptations are done and some scripting is applied.

       The only required interaction is:

         createVM.sh tst100.i386.anchor

       or

         createVM.sh tst101.x86_64.anchor

       Some preparations has to be done of course. But these are
       almost only the definitions of some pathnames and the DomU
       name. Anything else will be derived from the so called
       anchor-files, including the generation of the required image
       file for the virtual disk.


       The whole process reuqires 12-20 minutes in avarage. Starting
       from the scratch by one call and ending with a running Xen-DomU
       with a console.

       The VMM - Redhat Virtual Machine Manager will be really helpful
       for monitoring.


        - createVM.sh
          Main script, replacing own configuration entries within the
          templates. It generates the required directories,
          $HOME/xen/<DomUName>, the images and starts the install.

        - MYVM.anchor
          Anchor template and example.

        - MYVM.conf
          Configuration example for runtime system.

        - MYVM-inst.conf
          Configuration example for install system.

        - MYVM.ctys
          Example entries as generated by "ctys-genmconf"

        - MYVM.ks
          Kickstart file for first basic install

        - tst100.i386.anchor
          Example for 32bit-para.

        - tst101.x86_64.anchor
          Example for 64bit-para.
     
       The two created VMs tst100 and tst101 are the test VMs used to
       perform the basic tests on the XEN plugin.



     9.3.3.3.2 CREATE a session
      -------------------------


      9.3.3.3.2.1 CREATE a session with CONSOLE:CLI
       --------------------------------------------

       This will create a new session by starting a DomU on the host
       lab01 and openning a CLI console access with the "-c" option.

        ctys \
          -t xen  \
          -a create=p:$HOME/xen/tst100/tst100.conf,CONSOLE:cli \
          lab01

   

        ctys \
          -t xen  \
          -a create=p:$HOME/xen/tst100/tst100.conf,CONSOLE:cli \
          lab01



      9.3.3.3.2.2 CREATE a session with CONSOLE:XTERM
       ----------------------------------------------

        ctys \
          -t xen  \
          -a create=p:$HOME/xen/tst100/tst100.conf,CONSOLE:xterm \
          lab01


      9.3.3.3.2.3 CREATE a session with CONSOLE:GTERM
       ----------------------------------------------

        ctys \
          -t xen  \
          -a create=p:$HOME/xen/tst100/tst100.conf,CONSOLE:gterm \
          lab01



      9.3.3.3.2.4 CREATE a session with CONSOLE:VNC
       --------------------------------------------

        ctys \
          -t xen  \
          -a create=p:$HOME/xen/tst100/tst100.conf,CONSOLE:vnc \
          lab01



      9.3.3.3.2.5 CREATE a session with RESUME
       ---------------------------------------

        ctys \
          -t xen  \
          -a create=l:tst100,RESUME,CONSOLE:VNC \
          lab01


      9.3.3.3.2.6 CREATE a session with RESUME
       ---------------------------------------

        ctys \
          -t xen  \
          -a create=l:tst100,RESUME:mystate.stat \
          lab01




     9.3.3.3.3 CANCEL a session
      -------------------------


      9.3.3.3.3.1 CANCEL a session with POWEROFF
       -----------------------------------------

        ctys \
          -t xen \
          -a cancel=l:tst100,POWEROFF:0 \
          lab01


        ctys \
          -t xen \
          -a cancel=l:tst100,force,POWEROFF:0 \
          lab01



      9.3.3.3.3.2 CANCEL a session with REBOOT
       ---------------------------------------

        ctys \
          -t xen \
          -a cancel=l:tst100,REBOOT \
          lab01


        ctys \
          -t xen \
          -a cancel=l:tst100,FORCE,REBOOT \
          lab01



      9.3.3.3.3.3 CANCEL a session with PAUSE
       --------------------------------------

        ctys \
          -t xen \
          -a cancel=l:tst100,PAUSE \
          lab01


        ctys \
          -t xen \
          -a cancel=l:tst100,FORCE,PAUSE \
          lab01


      9.3.3.3.3.4 CANCEL a session with SUSPEND
       ----------------------------------------

        ctys \
          -t xen \
          -a cancel=l:tst100,SUSPEND \
          lab01


        ctys \
          -t xen \
          -a cancel=l:tst100,FORCE,SUSPEND \
          lab01



      9.3.3.3.3.5 CANCEL a session with INIT
       -------------------------------------

        ctys \
          -t xen \
          -a cancel=l:tst100,INIT:0 \
          lab01


        ctys \
          -t xen \
          -a cancel=l:tst100,FORCE,INIT:6 \
          lab01




     9.3.3.3.4 LIST XEN sessions
      --------------------------

        ctys \
          -t xen \
          -a list=machine,title \
          lab01




     9.3.3.3.5 ENUMERATE XEN sessions
      -------------------------------

        ctys \
          -t xen \
          -a enumerate=machine,title \
          lab01



     9.3.3.3.6 SHOW XEN sessions
      --------------------------

        ctys \
          -t xen \
          -a show \
          lab01




     9.3.3.3.7 INFO XEN sessions
      --------------------------


        ctys 
          -t xen \
          -a info \
          lab01



