顯示具有 XenAPI 標籤的文章。 顯示所有文章
顯示具有 XenAPI 標籤的文章。 顯示所有文章

2013年5月16日 星期四

Citrix Xenserver VDI type


Type:enum vdi_type
ValueDescription
systema disk that may be replaced on upgrade
usera disk that is always preserved on upgrade
ephemerala disk that may be reformatted on upgrade
suspenda disk that stores a suspend image
crashdumpa disk that stores VM crashdump information
Name:type
type of the VDI
Field is read-only



http://docs.vmd.citrix.com/XenServer/4.0.1/api/docs/html/browser.html

2013年5月15日 星期三

查閱XeAPI當中的session物件以及xenapi物件底下的method



#!/usr/bin/env python

import sys
import XenAPI
import pprint
import inspect

if __name__ == "__main__":
    url = sys.argv[1]
    username = sys.argv[2]
    password = sys.argv[3]

    session = XenAPI.Session(url)
    session.xenapi.login_with_password(username,password)
    print session.__dict__.items()
    print session.xenapi.__dict__.items()



root@StorageController:[~/xenapi-test](master) 4h5m $ python vdi-create.py https://ip:443  account password

[('last_login_method', 'login_with_password'), ('_ServerProxy__transport', <xmlrpclib.SafeTransport instance at 0x7f4a7640ccb0>), ('_ServerProxy__handler', '/RPC2'), ('_ServerProxy__host', '<ip>:443'), ('last_login_params', ('<acccount>', '<password>')), ('_ServerProxy__verbose', 0), ('_ServerProxy__allow_none', 1), ('_session', 'OpaqueRef:35bd0f38-b821-af71-eb26-e151370c6337'), ('API_version', '1.8'), ('_ServerProxy__encoding', None), ('transport', None)]

[('_Dispatcher__API_version', '1.8'), ('_Dispatcher__send', <bound method Session.xenapi_request of <ServerProxy for <ip>:443/RPC2>>), ('_Dispatcher__name', None)]

2013年4月30日 星期二

xapi a.k.a XenAPI

XAPI is at the heart of XenServer. It manages everything – all the resources in your XenServer environment, 

  1. reads in configs, 
  2. initializes networking paths, 
  3. checks licensing, 
  4. maintains a Database with all this info (the XAPI database), 
  5. manages Storage Repositories, 
  6. manages VMs, 
  7. tracks VM states, 
  8. manages networking, 
  9. High Availability 
  10. other XenServer hosts in the pool and more……
Each XenServer request or action is done via Xapi – and only by asking the Master XenServer XAPI to do so. 

A copy of the XAPI database (or you could consider this to be the state of XAPI) is synchronized among all the hosts in the pool – so they all have a copy of the current XAPI database – giving them the knowledge of what is going on – and in the case of the master going down – a new master can be appointed from the pool using the XAPI state information or shared database.
When you collect a status report from XenServer – the XAPI Database is stored in the status report. It is a relational database – and shows us the state of the environment at that point in time (when the status report was captured).

Reference

2013年4月20日 星期六

XCP / Citrix Xenserver Volume Drivers on OpenStack

PS: Cinder是由Folsom版本開始從原本的nova-volume這部分去進行抽離的子專案



XenAPINFS

XenAPINFS is a Block Storage (Cinder) driver which is using an NFS share through XenAPI's Storage Manager to store virtual disk images and exposing those virtual disks as volumes.

XenAPINFS不能直接存取NFS,只能透過XenAPI Storage Manager來存取NFS。
( This driver is not accessing the NFS share directly, it is only accessing the share through XenAPI Storage Manager. )

This driver should be considered as a reference implementation for using XenAPI's storage manager in OpenStack ( present in XenServer and XCP).


配置方式

  1. Local:
    推薦的做法,這樣的話可以使用qemu-img,但必須在當作Storage Controller上的XCP/Xenserver host上開啟一台PV guest VM安裝 cinder + XenAPINFS driver
  2. Remote:
    不需要使用PV guest VM,直接拿XCP/Xenserver當作Storage Controller。但這樣的話只能用VDI格式的VHD。


Source Code:

1. Grizzly cinder, https://github.com/openstack/cinder/blob/stable/grizzly/cinder/volume/drivers/xenapi/sm.py



XenAPI Storage Manager Volume Driver ( only in Folsom version, 在grizzly版中似乎已經移除 )

The Xen Storage Manager Volume driver (xensm) is a XenAPI hypervisor specific volume driver

功用:

  1. provide basic storage functionality, including volume creation and destruction, on a number of different storage back-ends.
  2. It also enables the capability of using more sophisticated storage back-ends for operations like cloning/snapshots, etc.


The list below shows some of the storage plugins already supported in Citrix XenServer and Xen Cloud Platform (XCP):

  1. NFS VHD: 
    Storage repository (SR) plugin which stores disks as Virtual Hard Disk (VHD) files on a remote Network File System (NFS).

  2. Local VHD on LVM: 
    SR plugin which represents disks as VHD disks on Logical Volumes (LVM) within a locally-attached Volume Group.

  3. HBA LUN-per-VDI driver: 
    SR plugin which represents Logical Units (LUs) as Virtual Disk Images (VDIs) sourced by host bus adapters (HBAs). E.g. hardware-based iSCSI or FC support.

  4. NetApp: 
    SR driver for mapping of LUNs to VDIs on a NETAPP server, providing use of fast snapshot and clone features on the filer.

  5. LVHD over FC: 
    SR plugin which represents disks as VHDs on Logical Volumes within a Volume Group created on an HBA LUN. E.g. hardware-based iSCSI or FC support.

  6. iSCSI: 
    Base ISCSI SR driver, provides a LUN-per-VDI. Does not support creation of VDIs but accesses existing LUNs on a target.

  7. LVHD over iSCSI: 
    SR plugin which represents disks as Logical Volumes within a Volume Group created on an iSCSI LUN.

  8. EqualLogic: 
    SR driver for mapping of LUNs to VDIs on a EQUALLOGIC array group, providing use of fast snapshot and clone features on the array.