ovftool …

OVF is an open-standard for VM distribution. OVF has a number of important benefits, like encapsulating the entire VM in a single file, storing metadata, support for multi-VM configurations, disk compression, and platform independence. VC 2.5 also allows the VI client to import an OVF image from a URL and download it and install it automatically over the
internet.

In order to create an OVF image, you can use the OVF tool that VMware provides to convert an existing VM into an OVF image.

You can get more information about OVF from:
http://www.vmware.com/appliances/learn/ovf.html

docs here:

Click to access ovf_tool.pdf

You can download the OVF tool from:
http://www.vmware.com/download/eula/ovf_eula.html

In terms of building and packaging the VA, a good starting point is the VA build page: http://www.vmware.com/appliances/build/how.html. I suggest you also take a look at the VA best practices doc (http://www.vmware.com/files/pdf/vam_best_practices_building.pdf), which covers issues about how to package and distribute virtual appliances. A few key suggestions from the paper including using virtual SCSI (and not IDE) drives, disconnecting virtual CDROMs, floppies, etc, and installing VMware tools. If you follow the best practice guidelines, you can request to certify the virtual appliance as well. Those guidelines are at http://www.vmware.com/appliances/build/list.html. I suggest you read and follow the best practices paper whether you plan to certify or not, as it will allow maximum portability for your virtual appliance.

list of vmkernel errors

You can get this from running: vmkerrcode -l

VMK_ReturnStatus table for VMware ESX Server, Build #64607
Name Dec Hex errno equiv Description
——————————————————————————-
VMK_OK 0 0 OK Success
VMK_FAILURE 195887105 0xbad0001 EINVAL Failure
VMK_WOULD_BLOCK 195887106 0xbad0002 EAGAIN Would block
VMK_NOT_FOUND 195887107 0xbad0003 ENOENT Not found
VMK_BUSY 195887108 0xbad0004 EBUSY Busy
VMK_EXISTS 195887109 0xbad0005 EEXIST Already exists
VMK_LIMIT_EXCEEDED 195887110 0xbad0006 EFBIG Limit exceeded
VMK_BAD_PARAM 195887111 0xbad0007 EINVAL Bad parameter
VMK_METADATA_READ_ERROR 195887112 0xbad0008 EIO Metadata read error
VMK_METADATA_WRITE_ERROR 195887113 0xbad0009 EIO Metadata write error
VMK_IO_ERROR 195887114 0xbad000a EIO I/O error
VMK_READ_ERROR 195887115 0xbad000b EIO Read error
VMK_WRITE_ERROR 195887116 0xbad000c EIO Write error
VMK_INVALID_NAME 195887117 0xbad000d ENAMETOOLONG Invalid name
VMK_INVALID_HANDLE 195887118 0xbad000e EBADF Invalid handle
VMK_INVALID_ADAPTER 195887119 0xbad000f ENODEV No such SCSI adapter
VMK_INVALID_TARGET 195887120 0xbad0010 ENODEV No such target on adapter
VMK_INVALID_PARTITION 195887121 0xbad0011 ENXIO No such partition on target
VMK_INVALID_FS 195887122 0xbad0012 ENXIO No filesystem on the device
VMK_INVALID_MEMMAP 195887123 0xbad0013 EFAULT Memory map mismatch
VMK_NO_MEMORY 195887124 0xbad0014 ENOMEM Out of memory
VMK_NO_MEMORY_RETRY 195887125 0xbad0015 ENOMEM Out of memory (ok to retry)
VMK_NO_RESOURCES 195887126 0xbad0016 ENOMEM Out of resources
VMK_NO_FREE_HANDLES 195887127 0xbad0017 EMFILE No free handles
VMK_NUM_HANDLES_EXCEEDED 195887128 0xbad0018 ENFILE Exceeded maximum number of allowed handles
VMK_DEPRECATED_NO_FREE_PTR_BLOCKS195887129 0xbad0019 ENOSPC No free pointer blocks (deprecated)
VMK_DEPRECATED_NO_FREE_DATA_BLOCKS195887130 0xbad001a ENOSPC No free data blocks (deprecated)
VMK_CORRUPT_REDOLOG 195887131 0xbad001b EBADF Corrupt RedoLog
VMK_STATUS_PENDING 195887132 0xbad001c EAGAIN Status pending
VMK_STATUS_FREE 195887133 0xbad001d EAGAIN Status free
VMK_UNSUPPORTED_CPU 195887134 0xbad001e ENODEV Unsupported CPU
VMK_NOT_SUPPORTED 195887135 0xbad001f ENOSYS Not supported
VMK_TIMEOUT 195887136 0xbad0020 ETIMEDOUT Timeout
VMK_READ_ONLY 195887137 0xbad0021 EROFS Read only
VMK_RESERVATION_CONFLICT 195887138 0xbad0022 EAGAIN SCSI reservation conflict
VMK_FS_LOCKED 195887139 0xbad0023 EADDRINUSE File system locked
VMK_NOT_ENOUGH_SLOTS 195887140 0xbad0024 ENFILE Out of slots
VMK_INVALID_ADDRESS 195887141 0xbad0025 EFAULT Invalid address
VMK_NOT_SHARED 195887142 0xbad0026 ENOMEM Not shared
VMK_SHARED 195887143 0xbad0027 ENOMEM Page is shared
VMK_KSEG_PAIR_FLUSHED 195887144 0xbad0028 ENOMEM Kseg pair flushed
VMK_MAX_ASYNCIO_PENDING 195887145 0xbad0029 ENOMEM Max async I/O requests pending
VMK_VERSION_MISMATCH_MINOR 195887146 0xbad002a ENOSYS Minor version mismatch
VMK_VERSION_MISMATCH_MAJOR 195887147 0xbad002b ENOSYS Major version mismatch
VMK_IS_CONNECTED 195887148 0xbad002c EINVAL Already connected
VMK_IS_DISCONNECTED 195887149 0xbad002d ENOTCONN Already disconnected
VMK_IS_ENABLED 195887150 0xbad002e EINVAL Already enabled
VMK_IS_DISABLED 195887151 0xbad002f EINVAL Already disabled
VMK_NOT_INITIALIZED 195887152 0xbad0030 EINVAL Not initialized
VMK_WAIT_INTERRUPTED 195887153 0xbad0031 EINTR Wait interrupted
VMK_NAME_TOO_LONG 195887154 0xbad0032 ENAMETOOLONG Name too long
VMK_MISSING_FS_PES 195887155 0xbad0033 ENOTDIR VMFS volume missing physical extents
VMK_NICTEAMING_VALID_MASTER 195887156 0xbad0034 EINVAL NIC teaming master valid
VMK_NICTEAMING_SLAVE 195887157 0xbad0035 EEXIST NIC teaming slave
VMK_NICTEAMING_REGULAR_VMNIC 195887158 0xbad0036 EINVAL NIC teaming regular VMNIC
VMK_ABORT_NOT_RUNNING 195887159 0xbad0037 ECANCELED Abort not running
VMK_NOT_READY 195887160 0xbad0038 EIO Not ready
VMK_CHECKSUM_MISMATCH 195887161 0xbad0039 EIO Checksum mismatch
VMK_VLAN_NO_HW_ACCEL 195887162 0xbad003a EINVAL VLan HW Acceleration not supported
VMK_NO_VLAN_SUPPORT 195887163 0xbad003b EOPNOTSUPP VLan is not supported in vmkernel
VMK_NOT_VLAN_HANDLE 195887164 0xbad003c EINVAL Not a VLan handle
VMK_BAD_VLANID 195887165 0xbad003d EBADF Couldn’t retrieve VLan id
VMK_MIG_PROTO_ERROR 195887166 0xbad003e EINVAL Migration protocol error
VMK_NO_CONNECT 195887167 0xbad003f EIO No connection
VMK_SEGMENT_OVERLAP 195887168 0xbad0040 EINVAL Segment overlap
VMK_BAD_MPS 195887169 0xbad0041 EIO Error parsing MPS Table
VMK_BAD_ACPI 195887170 0xbad0042 EIO Error parsing ACPI Table
VMK_RESUME_ERROR 195887171 0xbad0043 EIO Failed to resume VM
VMK_NO_ADDRESS_SPACE 195887172 0xbad0044 ENOMEM Insufficient address space for operation
VMK_BAD_ADDR_RANGE 195887173 0xbad0045 EINVAL Bad address range
VMK_ENETDOWN 195887174 0xbad0046 ENETDOWN Network is down
VMK_ENETUNREACH 195887175 0xbad0047 ENETUNREACH Network unreachable
VMK_ENETRESET 195887176 0xbad0048 ENETRESET Network dropped connection on reset
VMK_ECONNABORTED 195887177 0xbad0049 ECONNABORTED Software caused connection abort
VMK_ECONNRESET 195887178 0xbad004a ECONNRESET Connection reset by peer
VMK_ENOTCONN 195887179 0xbad004b ENOTCONN Socket is not connected
VMK_ESHUTDOWN 195887180 0xbad004c ESHUTDOWN Can’t send after socket shutdown
VMK_ETOOMANYREFS 195887181 0xbad004d ETOOMANYREFS Too many references: can’t splice
VMK_ECONNREFUSED 195887182 0xbad004e ECONNREFUSED Connection refused
VMK_EHOSTDOWN 195887183 0xbad004f EHOSTDOWN Host is down
VMK_EHOSTUNREACH 195887184 0xbad0050 EHOSTUNREACH No route to host
VMK_EADDRINUSE 195887185 0xbad0051 EADDRINUSE Address already in use
VMK_BROKEN_PIPE 195887186 0xbad0052 EPIPE Broken pipe
VMK_NOT_A_DIRECTORY 195887187 0xbad0053 ENOTDIR Not a directory
VMK_IS_A_DIRECTORY 195887188 0xbad0054 EISDIR Is a directory
VMK_NOT_EMPTY 195887189 0xbad0055 ENOTEMPTY Directory not empty
VMK_NOT_IMPLEMENTED 195887190 0xbad0056 ENOSYS Not implemented
VMK_NO_SIGNAL_HANDLER 195887191 0xbad0057 EINVAL No signal handler
VMK_FATAL_SIGNAL_BLOCKED 195887192 0xbad0058 EINVAL Fatal signal blocked
VMK_NO_ACCESS 195887193 0xbad0059 EACCES Permission denied
VMK_NO_PERMISSION 195887194 0xbad005a EPERM Operation not permitted
VMK_UNDEFINED_SYSCALL 195887195 0xbad005b ENOSYS Undefined syscall
VMK_RESULT_TOO_LARGE 195887196 0xbad005c ERANGE Result too large
VMK_VLAN_FILTERED 195887197 0xbad005d ERANGE Pkts dropped because of VLAN (support) mismatch
VMK_BAD_EXCFRAME 195887198 0xbad005e EFAULT Unsafe exception frame
VMK_MODULE_NOT_LOADED 195887199 0xbad005f ENODEV Necessary module isn’t loaded
VMK_NO_SUCH_ZOMBIE 195887200 0xbad0060 ECHILD No dead world by that name
VMK_NO_SUCH_CARTEL 195887201 0xbad0061 ESRCH No cartel by that name
VMK_IS_A_SYMLINK 195887202 0xbad0062 ELOOP Is a symbolic link
VMK_CROSS_DEVICE_LINK 195887203 0xbad0063 EXDEV Cross-device link
VMK_NOT_A_SOCKET 195887204 0xbad0064 ENOTSOCK Not a socket
VMK_ILLEGAL_SEEK 195887205 0xbad0065 ESPIPE Illegal seek
VMK_ADDRFAM_UNSUPP 195887206 0xbad0066 EAFNOSUPPORT Unsupported address family
VMK_ALREADY_CONNECTED 195887207 0xbad0067 EISCONN Already connected
VMK_DEATH_PENDING 195887208 0xbad0068 ENOENT World is marked for death
VMK_NO_CELL_ASSIGNMENT 195887209 0xbad0069 EINVAL No valid scheduler cell assignment
VMK_CPU_MIN_INVALID 195887210 0xbad006a EINVAL Invalid cpu min
VMK_CPU_MINLIMIT_INVALID 195887211 0xbad006b EINVAL Invalid cpu minLimit
VMK_CPU_MAX_INVALID 195887212 0xbad006c EINVAL Invalid cpu max
VMK_CPU_SHARES_INVALID 195887213 0xbad006d EINVAL Invalid cpu shares
VMK_CPU_MIN_OVERFLOW 195887214 0xbad006e EINVAL Cpu min outside valid range
VMK_CPU_MINLIMIT_OVERFLOW 195887215 0xbad006f EINVAL Cpu minLimit outside valid range
VMK_CPU_MAX_OVERFLOW 195887216 0xbad0070 EINVAL Cpu max outside valid range
VMK_CPU_MIN_GT_MINLIMIT 195887217 0xbad0071 EINVAL Cpu min exceeds minLimit
VMK_CPU_MIN_GT_MAX 195887218 0xbad0072 EINVAL Cpu min exceeds max
VMK_CPU_MINLIMIT_LT_RESERVED 195887219 0xbad0073 ENOSPC Cpu minLimit less than cpu already reserved by children
VMK_CPU_MAX_LT_RESERVED 195887220 0xbad0074 ENOSPC Cpu max less than cpu already reserved by children
VMK_CPU_ADMIT_FAILED 195887221 0xbad0075 ENOSPC Admission check failed for cpu resource
VMK_MEM_MIN_INVALID 195887222 0xbad0076 EINVAL Invalid memory min
VMK_MEM_MINLIMIT_INVALID 195887223 0xbad0077 EINVAL Invalid memory minLimit
VMK_MEM_MAX_INVALID 195887224 0xbad0078 EINVAL Invalid memory max
VMK_MEM_MIN_OVERFLOW 195887225 0xbad0079 EINVAL Memory min outside valid range
VMK_MEM_MINLIMIT_OVERFLOW 195887226 0xbad007a EINVAL Memory minLimit outside valid range
VMK_MEM_MAX_OVERFLOW 195887227 0xbad007b EINVAL Memory max outside valid range
VMK_MEM_MIN_GT_MINLIMIT 195887228 0xbad007c EINVAL Memory min exceeds minLimit
VMK_MEM_MIN_GT_MAX 195887229 0xbad007d EINVAL Memory min exceeds max
VMK_MEM_MINLIMIT_LT_RESERVED 195887230 0xbad007e ENOSPC Memory minLimit less than memory already reserved by children
VMK_MEM_MAX_LT_RESERVED 195887231 0xbad007f ENOSPC Memory max less than memory already reserved by children
VMK_MEM_ADMIT_FAILED 195887232 0xbad0080 ENOSPC Admission check failed for memory resource
VMK_NO_SWAP_FILE 195887233 0xbad0081 ENOENT No swap file
VMK_BAD_PARAM_COUNT 195887234 0xbad0082 EINVAL Bad parameter count
VMK_BAD_PARAM_TYPE 195887235 0xbad0083 EINVAL Bad parameter type
VMK_UNMAP_RETRY 195887236 0xbad0084 ENOMEM Dueling unmaps (ok to retry)
VMK_INVALID_IOCTL 195887237 0xbad0085 ENOTTY Inappropriate ioctl for device
VMK_MAPFAULT_RETRY 195887238 0xbad0086 EBUSY Mmap changed under page fault (ok to retry)
VMK_EINPROGRESS 195887239 0xbad0087 EINPROGRESS Operation now in progress
VMK_ADDR_UNMAPPED 195887240 0xbad0088 EFAULT Address temporarily unmapped
VMK_INVALID_BUDDY_TYPE 195887241 0xbad0089 ENOMEM Invalid buddy type
VMK_LPAGE_INFO_NOT_FOUND 195887242 0xbad008a ENOMEM Large page info not found
VMK_LPAGE_INFO_INVALID 195887243 0xbad008b EINVAL Invalid large page info
VMK_SNAPSHOT_DEV 195887244 0xbad008c EIO SCSI LUN is in snapshot state
VMK_IN_TRANSITION 195887245 0xbad008d EIO SCSI LUN is in transition
VMK_TXN_FULL 195887246 0xbad008e ENOSPC Transaction ran out of lock space or log space
VMK_LOCK_NOT_FREE 195887247 0xbad008f EBUSY Lock was not free
VMK_NUM_FILES_EXCEEDED 195887248 0xbad0090 ENOSPC Exceed maximum number of files on the filesystem
VMK_MIGRATE_VMX_FAILURE 195887249 0xbad0091 EINVAL Migration determined a failure by the VMX
VMK_VSI_LIST_OVERFLOW 195887250 0xbad0092 EFBIG VSI GetList handler overflow
VMK_INVALID_WORLD 195887251 0xbad0093 EINVAL Invalid world
VMK_INVALID_VMM 195887252 0xbad0094 EINVAL Invalid vmm
VMK_INVALID_TXN 195887253 0xbad0095 EINVAL Invalid transaction
VMK_FS_RETRY_OPERATION 195887254 0xbad0096 EAGAIN Transient file system condition, suggest retry
VMK_VCPU_LIMIT_EXCEEDED 195887255 0xbad0097 EINVAL Number of running VCPUs limit exceeded
VMK_INVALID_METADATA 195887256 0xbad0098 EINVAL Invalid metadata
VMK_INVALID_PAGE_NUMBER 195887257 0xbad0099 EINVAL Invalid page number
VMK_NOT_EXEC 195887258 0xbad009a ENOEXEC Not in executable format
VMK_NFS_CONNECT_FAILURE 195887259 0xbad009b EHOSTDOWN Unable to connect to NFS server
VMK_NFS_MOUNT_NOT_SUPPORTED 195887260 0xbad009c EINVAL The NFS server does not support MOUNT version 3 over TCP
VMK_NFS_NFS_NOT_SUPPORTED 195887261 0xbad009d EINVAL The NFS server does not support NFS version 3 over TCP
VMK_NFS_MOUNT_DENIED 195887262 0xbad009e EPERM The mount request was denied by the NFS server. Check that the export exists and that the client is permitted to mount it
VMK_NFS_MOUNT_NOT_DIR 195887263 0xbad009f ENOTDIR The specified mount path was not a directory
VMK_NFS_BAD_FSINFO 195887264 0xbad00a0 EACCES Unable to query remote mount point’s attributes
VMK_NFS_VOLUME_LIMIT_EXCEEDED 195887265 0xbad00a1 EINVAL NFS has reached the maximum number of supported volumes
VMK_NO_MEMORY_NICE 195887266 0xbad00a2 ENOMEM Out of nice memory
VMK_MIGRATE_PREEMPTIVE_FAIL 195887267 0xbad00a3 ENOMEM VMotion failed to start due to lack of cpu or memory resources
VMK_CACHE_MISS 195887268 0xbad00a4 EFAULT Cache miss
VMK_STRESS_INDUCED_ERROR 195887269 0xbad00a5 EIO Error induced when stress options are enabled
VMK_TOO_MANY_LOCK_HOLDERS 195887270 0xbad00a6 EUSERS Maximum number of concurrent hosts are already accessing this resource
VMK_NO_JOURNAL 195887271 0xbad00a7 EIO Host doesn’t have a journal
VMK_RANK_VIOLATION 195887272 0xbad00a8 EDEADLK Lock rank violation detected
VMK_MODULE_FAILED 195887273 0xbad00a9 ENODEV Module failed
VMK_NO_MASTER_PTY 195887274 0xbad00aa ENXIO Unable to open slave if no master pty
VMK_NOT_IOABLE 195887275 0xbad00ab EFAULT Not IOAble
VMK_NO_FREE_INODES 195887276 0xbad00ac ENOSPC No free inodes
VMK_NO_MEMORY_FOR_FILEDATA 195887277 0xbad00ad ENOSPC No free memory for file data
VMK_NO_TAR_SPACE 195887278 0xbad00ae ENOSPC No free space to expand file or meta data
VMK_NO_FIFO_READER 195887279 0xbad00af ENXIO Unable to open writer if no fifo reader
VMK_NO_SUCH_DEVICE 195887280 0xbad00b0 EINVAL No underlying device for major,minor
VMK_MEM_MIN_GT_MEMSIZE 195887281 0xbad00b1 EINVAL Memory min exceeds memSize
VMK_NO_SUCH_VT 195887282 0xbad00b2 ENXIO No virtual terminal for number
VMK_TOO_MANY_ELEMENTS 195887283 0xbad00b3 E2BIG Too many elements for list
VMK_SHAREDAREA_MISMATCH 195887284 0xbad00b4 ENOSYS VMM<->VMK shared are mismatch
VMK_EXEC_FAILURE 195887285 0xbad00b5 ESRCH Failure during exec while original state already lost
VMK_VMNIXMOD_NOT_LOADED 195887286 0xbad00b6 ENOSYS vmnixmod kernel module not loaded
VMK_INVALID_MODULE 195887287 0xbad00b7 EINVAL Invalid module
VMK_UNALIGNED_ADDRESS 195887288 0xbad00b8 EINVAL Address is not aligned on page boundary
VMK_NOT_MAPPED 195887289 0xbad00b9 ENOMEM Address is not mapped in address space
VMK_NO_MESSAGE_SPACE 195887290 0xbad00ba ENOMEM No space to record a message
VMK_PDI_STACK_OVERFLOW 195887291 0xbad00bb EFBIG No space left on PDI stack
VMK_EXCEPTION_HANDLER_INVALID 195887292 0xbad00bc EINVAL Invalid exception handler
VMK_EXCEPTION_NOT_HANDLED 195887293 0xbad00bd EINVAL Exception not handled by exception handler
VMK_INVALID_MULTIWRITER_OBJECT 195887294 0xbad00be EDEADLK Can’t open sparse/TBZ files in multiwriter mode
VMK_STORAGE_RETRY_OPERATION 195887295 0xbad00bf EAGAIN Transient storage condition, suggest retry
VMK_HBA_ERROR 195887296 0xbad00c0 EIO Storage initiator error
VMK_TIMER_INIT_FAILED 195887297 0xbad00c1 EINVAL Timer initialization failed
VMK_MODULE_NOT_FOUND 195887298 0xbad00c2 ENOENT Module not found
VMK_NOT_SOCKET_OWNER 195887299 0xbad00c3 EINVAL Socket not owned by cartel
VMK_VSI_HANDLER_NOT_FOUND 195887300 0xbad00c4 ENOENT No VSI handler found for the requested node
VMK_INVALID_MMAPPROTFLAGS 195887301 0xbad00c5 EINVAL Invalid mmap protection flags
VMK_INVALID_MAPCONTIG_SIZE 195887302 0xbad00c6 EINVAL Invalid chunk size for contiguous mmap
VMK_INVALID_MAPCONTIG_MAX 195887303 0xbad00c7 EINVAL Invalid MPN max for contiguous mmap
VMK_INVALID_MAPCONTIG_FLAG 195887304 0xbad00c8 EINVAL Invalid mmap flag on contiguous mmap
VMK_NOT_LAZY_MMINFO 195887305 0xbad00c9 EINVAL Unexpected fault on pre-faulted memory region
VMK_MMINFO_WONT_SPLIT 195887306 0xbad00ca EINVAL Memory region cannot be split (remap/unmap)
VMK_NO_CACHE_INFO 195887307 0xbad00cb ENOENT Cache Information not available
VMK_CANNOT_REMAP_PINNED_MEMORY 195887308 0xbad00cc EINVAL Cannot remap pinned memory
VMK_NO_SUCH_CARTELGROUP 195887309 0xbad00cd ESRCH No cartel group by that name
VMK_SPLOCKSTATS_DISABLED 195887310 0xbad00ce EINVAL SPLock stats collection disabled
VMK_BAD_TAR_IMAGE 195887311 0xbad00cf EINVAL Boot image is corrupted
VMK_BRANCHED_ALREADY 195887312 0xbad00d0 EPERM Branched file cannot be modified
VMK_NAME_RESERVED_FOR_BRANCH 195887313 0xbad00d1 EPERM Name is reserved for branched file
VMK_CANNOT_BRANCH_UNLINKED 195887314 0xbad00d2 EPERM Unlinked file cannot be branched
VMK_MAX_RETRIES_EXCEEDED 195887315 0xbad00d3 EAGAIN Maximum kernel-level retries exceeded
VMK_OPTLOCK_STOLEN 195887316 0xbad00d4 EAGAIN Optimistic lock acquired by another host
VMK_NOT_MMAPABLE 195887317 0xbad00d5 ENODEV Object cannot be mmapped
VMK_INVALID_CPU_AFFINITY 195887318 0xbad00d6 EINVAL Invalid cpu affinity
VMK_DEVICE_NOT_PARTOF_LV 195887319 0xbad00d7 ENXIO Device does not contain a logical volume
VMK_NO_SPACE 195887320 0xbad00d8 ENOSPC No space left on device
VMK_VSI_INVALID_NODE_ID 195887321 0xbad00d9 EINVAL Invalid vsi node ID
VMK_TOO_MANY_USERS 195887322 0xbad00da EUSERS Too many users accessing this resource
VMK_EALREADY 195887323 0xbad00db EALREADY Operation already in progress
VMK_BUF_TOO_SMALL 195887324 0xbad00dc EINVAL Buffer too small to complete the operation
VMK_SNAPSHOT_DEV_DISALLOWED 195887325 0xbad00dd EACCES Snapshot device disallowed
VMK_LVM_DEVICE_UNREACHABLE 195887326 0xbad00de EIO LVM device unreachable
VMK_CPU_INVALID_RESOURCE_UNITS 195887327 0xbad00df EINVAL Invalid cpu resource units
VMK_MEM_INVALID_RESOURCE_UNITS 195887328 0xbad00e0 EINVAL Invalid memory resource units
VMK_ABORTED 195887329 0xbad00e1 ECANCELED IO was aborted
VMK_MEM_MIN_LT_RESERVED 195887330 0xbad00e2 ENOSPC Memory min less than memory already reserved by children
VMK_MEM_MIN_LT_CONSUMED 195887331 0xbad00e3 ENOSPC Memory min less than memory required to support current consumption
VMK_MEM_MAX_LT_CONSUMED 195887332 0xbad00e4 ENOSPC Memory max less than memory required to support current consumption
VMK_TIMEOUT_RETRY 195887333 0xbad00e5 ETIMEDOUT Timeout (ok to retry)
VMK_RESERVATION_LOST 195887334 0xbad00e6 EBUSY Reservation Lost
VMK_FS_STALE_METADATA 195887335 0xbad00e7 ENOENT Cached metadata is stale
VMK_NO_FCNTL_LOCK 195887336 0xbad00e8 ENOLCK No fcntl lock slot left
VMK_NO_FCNTL_LOCK_HOLDER 195887337 0xbad00e9 ENOLCK No fcntl lock holder slot left
VMK_NO_LICENSE 195887338 0xbad00ea EACCES Not licensed to access VMFS volumes
VMK_LVM_RETRY_OPERATION 195887339 0xbad00eb EAGAIN Transient LVM device condition, suggest retry
VMK_SNAPSHOT_LV_INCOMPLETE 195887340 0xbad00ec EAGAIN Snapshot LV incomplete
VMK_MEDIUM_NOT_FOUND 195887341 0xbad00ed EIO Medium not found
VMK_MAX_PATHS_CLAIMED 195887342 0xbad00ee ENOMEM Maximum allowed SCSI paths have already been claimed
VMK_NOT_MOUNTABLE 195887343 0xbad00ef ENODEV Filesystem is not mountable
VMK_MEMSIZE_GT_MEMSIZELIMIT 195887344 0xbad00f0 EINVAL Memory size exceeds memSizeLimit
VMK_GENERIC_LINUX_ERROR 732758016 0x2bad0000 EIO Generic service console error

Using virtual serial ports via named pipes in ESX 3.5

Create a named pipe as you typically would as the server on your first VM.

Image

The corresponding entries in the vmx file:

serial0.present = “true”
serial0.yieldOnMsrRead = “true”
serial0.fileType = “pipe”
serial0.fileName = “/vmfs/volumes/472c028b-dd6c1d22-a8f4-001aa0c0b349/Zangief-Fileserver/Zangief-pipe”
serial0.pipe.endPoint = “server”
serial0.tryNoRxLoss = “true”

Create the same named pipe on your second VM, using the same pipe, but connected as a client, opposed to the server.

Image

The corresponding vmx file entries:
serial0.present = “true”
serial0.yieldOnMsrRead = “true”
serial0.fileType = “pipe”
serial0.fileName = “/vmfs/volumes/472c028b-dd6c1d22-a8f4-001aa0c0b349/Zangief-Fileserver/Zangief-pipe”
serial0.pipe.endPoint = “client”
serial0.tryNoRxLoss = “true”

After you power up the VM, you’ll find it strange that the pipe is not visible in the service console.

ls -l /vmfs/volumes/472c028b-dd6c1d22-a8f4-001aa0c0b349/Zangief-Fileserver/Zangief-pipe
ls: /vmfs/volumes/472c028b-dd6c1d22-a8f4-001aa0c0b349/Zangief-Fileserver/Zangief-pipe: No such file or directory

If you connect to it on the second VM however, you’ll see that it works.

Image

VMware yet again, wins over Parallels…

They did it once with the Apple Mac – Fusion over Parallels. Now again in Linux.
Full details here: http://www.techthrob.com/tech/linux_virtualization.php

Virtualization in Linux: A Review of Four Software Choices
Introduction
This week Canonical, the company behind Ubuntu Linux, announced a partnership with Parallels, maker of the Virtualization products Parallels Workstation and Parallels Desktop for Mac. Consequently, the Parallels Workstation virtualization software is now available to download and install in Ubuntu Linux, completely supported by Canonical, and done entirely through the Add/Remove programs interface. This makes four different virtualization programs — three of which are installable via the package repositories — that run on Ubuntu Linux. (See the Correction: in the Installing VirtualBox section for more information)

This article compares four virtualization products available for Ubuntu Linux: the free, open source x86 emulator Qemu; the closed-but-free versions of VirtualBox and VMware-Server, and the commercial Parallels Workstation.

Installation
Installing Qemu
Installing Qemu is simple, with a twist: Qemu supports the KVM, or the Kernel Virtualization Machine, which enables it to use certain acceleration techniques that the other programs don’t use. As a result, we’re going to install a few extra packages along with the Qemu package itself: sudo apt-get install qemu qemu-launcher kvm kqemu-commonThe qemu-launcher is a graphical front-end to Qemu which we will see later; kvm and kqemu-common are the packages that allow Qemu to work with the Kernel’s Virtualization Machine. As a side note, the KVM will be installed by default and be fully supported in the next version of Ubuntu, Hardy Heron.

Installing Parallels
Installing any of these products is easy, but you may need to enable some extra repositories to install Parallels. To do this, go to your System Menu, and in the Administration submenu select “Software Sources.” Click on the “Third-Party Software” tab, and make sure that the line for “partner” software, “http://archive.canonical.com/ubuntu gusty partner” is selected:

Saving those changes, the package manager will update its lists, and you can now install Parallels, which comes in the logically named “parallels” package: sudo apt-get install parallelsInstalling Parallels will be a fun reminder of the Windows world for those who have become accustomed to Linux licencing – there’s a EULA (End User License Agreement) that must be clicked-past before you can install the program. Finally, once installed, you need to run Parallels and sign up for a 15-day free trial key — or purchase a key — assuming you don’t already have one.

Registration is quick and easy, requiring just a username and an email address; but it is another additional step you must take because of the software’s proprietary and commercial nature.

Installing VMware
To install VMware in Ubuntu, you’ll need to enable the “partner” repositories, just as you do for Parallels. Like Parallels, you’ll need to get a key from the VMware website, which you will be prompted for during installation. You’re required to submit a slew of personal information, but the key is given to you immediately (you don’t have to check your email for it, if you understand what I’m getting at). Unlike Parallels, this key is free for personal use, and does not expire.

Installing vmware can be done either through the graphical package manager (in the Third-Party section), or with the command: sudo apt-get install vmware-serverThe install is a bit lengthy compared to the other programs here, and the files are rather large (on the order of a hundred or so Megabytes), but all-in-all it’s a breeze as long as you have a fast connection.

Installing VirtualBox
Correction: The Open Source Edition (OSE) of VirtualBox is, in fact, available through the Ubuntu repositories, but that is not the version used here. Thanks to Daniel of ibeentoubuntu.blogspot.com for pointing this out!

VirtualBox is the one program that isn’t available via the Ubuntu repositories, but that doesn’t mean that installation is difficult. In fact, it’s as simple as going to the VirtualBox downloads page and downloading the appropriate package for your system. The menu for VirtualBox binaries is extensive, including multiple versions of Ubuntu, Debian, and Fedora, as well as some other distributions. For Ubuntu, select your version and architecture, and open it with the gdebi installer:

The package is a light-weight (compared to VMware) 17MB, and installs, thankfully, like any typical Ubuntu package: without prompting for any registration keys or personal information. This article will be looking the closed (but free) binary version of VirtualBox, not the Open Source Edition copy also available from the downloads page.

One caveat with VirtualBox: it requires that any users who will use the program be added to a special “vboxusers” group, so you’ll probably want to add yourself; and then you’ll have to logout and login for these changes to take affect. A minor annoyance, but an annoyance all the same.

User Interface – Creating and running virtual machines
VMware Server
Upon startup, the VMware Server Console will ask whether you want to connect to a local or remote server; in this test, I am using server on my local machine, but VMware can also be run over a network. Creating a new virtual machine is done via a wizard, which is simple enough for a beginner to use, but has enough customization options that an advanced user won’t feel restricted.

One problem I encountered, however, was that even after selecting Windows 2000 as my guest operating system, the wizard still recommended I use an emulated SCSI drive instead of IDE. I followed its advice, and the Windows 2000 install program wasn’t able to recognize any hard drives; it took me a while, but with the help of some kind people in the Ubuntu IRC chats I was able to correct the problem. Still, I was surprised that VMware made this mistake.

Running a Virtual Machine inside VMware is as simple as selecting the machine you want from the “Inventory” column, and clicking the “power on” button. Unlike its competitors, the Virtual Machine runs inside the VMware Server Console, instead of in a separate window. The Console also has the ability to run in a Kiosk-like mode called “Quick Switch”, which could be useful if you are using a dedicated machine for virtualization.

Adding additional hardware, or editing existing hardware, is simple and easy to do in VMware, and in my case the program auto-detected all of my physical devices correctly, and was able to map them to the guest OS without any problems.

VirtualBox
VirtualBox’s interface is written in QT, so it may look and feel a little out of place on a Gnome desktop. Anyone who’s ever used a KDE application in Gnome knows that it will function perfectly fine, however, even if it doesn’t quite look exactly right. VirtualBox doesn’t add itself to the Gnome menus by default, however, unlike the other three applications here (Parallels and VMware add themselves to the System Tools menu, while Qemu-Launcher places itself in Applications), so I loaded it up using the terminal command “VirtualBox”.

The VirtualBox user interface is the cleanest of all the applications I’ve looked at. Its wizard for adding a new Virtual Machine is elegant and effective, while its menu for editing an existing machine is the most user-friendly of all four programs.

VirtualBox’s own Preferences window is the most minimal of the bunch, allowing you to configure certain basic options such as the key combinations for focus grab/release, and the default language; unlike Parallels and VMware, it does not allow you to set a maximum amount of memory to allocate for the entire application as a whole.

Parallels
Like the other Virtualization clients, Parallels’ interface is sleek, polished, and user-friendly. Like VirtualBox, it’s written in QT, so it will feel at home on KDE, while working just fine in a Gnome environment.

Like the applications we’ve seen already, Parallels comes with a Virtual Machine Wizard which will take you through all the steps to create a new Virtual Machine, from the type of operating system you plan on running, to the amount of memory to allocate, to the size of the virtual hard disk you want to use. Modifying an already existing hardware configuration is as simple and straight-forward as in VMware.

Qemu-Launcher
Note: After writing this review I was told about the Qemulator program, which behaves similarly to the other applications’ interfaces. I will be adding a section on this program soon.

In contrast to the Virtual Machine Wizards and the sleek interfaces of the other programs, the Qemu-Launcher, which is your best chance at a GUI when it comes to using Qemu (another option, especially for KDE users is qtemu), is sorely lacking any user-friendly features, and will surely intimidate the beginner. The Qemu Launcher is divided into five main tabs. The main tab is where you select your Virtual Machine, its hard drive, how much memory to allocate to it, and whether you want to boot off the CD-ROM (for installation of an operating system). The Hardware tab allows you to select things like the type and number of processors to use, what kind of video to emulate, and whether you want to use full-screen or windowed mode.

In the Emulator tab you can enable logging, but most importantly you can enable Acceleration. With the additional packages installed, you want to select “Full Acceleration” for the best performance. You can also set the process priority, which will “nice” the process to give other programs priority (or, optionally, to give the virtual machine priority over other processes). A higher number here means a lower priority, the highest being 19.

Aside from the difficulties in configuring a new virtual machine in Qemu, I’ve found the launcher to be somewhat of a hindrance. Since it is simply a front-end for Qemu’s command-line interface, and it is incomplete at best, there are times when it doesn’t work as expected. For example, if you set amount of RAM to be dedicated to the virtual machine too high and Qemu can’t allocate enough memory, clicking the “Launch” button will do absolutely nothing. It won’t give you an error, but instead, will do nothing at all. The only way to figure out the problem is to launch qemu-launcher in a terminal, and look for the error to be written there.

Performance
Once your virtual machine is setup, the aspect of virtualization that really matters is how well things run. I tested Windows 2000 Professional, using 360MB of RAM and 2GB hard drive files, on a Pentium 4 2.6Ghz host system. To make things as fair as possible, I restarted my computer after each trial, and didn’t use any other functions while testing the virtualizers.

VMware Server
VMware was incredibly impressive in its performance; installing Windows 2000 Professional took only 15 minutes, and booting into the new operating system after a fresh install took under a minute.

Once inside Windows 2000, I found applications to be as quick and responsive as if they were running natively on real hardware. Not once did I hit swap, which would have really slowed things down.

VirtualBox
VirtualBox proved itself as strong a contender as its heavyweight challenger, VMware. Installation took exactly the same time (15 minutes) from start to finish, with a few seconds margin of error for user-interaction.

Once booted, Windows performed like a champion inside VirtualBox, and felt even snappier than in VMware. I did notice some flickering inside the virtualization that wasn’t present in VMware, especially when maximizing/minimizing windows, or doing anything involving transparency (for example, dragging an icon about the desktop), but nothing that would hinder the user experience. VirtualBox is the only application reviewed that allowed me to set a size for video memory, so I left this at its default of 8MB.

Parallels
Surprisingly, the commercial Parallels application did not do as well as its contenders in this part of the test. From beginning to end, installing Windows took twenty-seven minutes, or 180% of the time it took in VirtualBox or VMware. This was surprising and disappointing, and once inside Windows I found its performance to be lacking, as well.

Booting up took considerably longer than in either of the other applications – to be sure, I ran this test several times. Unlike VirtaulBox and VMware, applications were not as responsive one would expect on real hardware; it was obvious that the operating system was running within a virtualized environment. Along with maxing out my CPU, Parallels inexplicably began using my swap partition although there were several hundred megabytes of real memory free on my system. While I can’t necessarily attribute this to a problem in Parallels, it does greatly slow things down, and is rather unexpected. Video performance was lack-luster; menus flicker as they scroll, and there is a noticeable delay when drawing windows. Overall, Parallels wasn’t impressive in its performance, to the point that I wonder if there is a bug in its default configuration on Ubuntu.

Qemu
Note: A few people have mentioned in forums that you should start your Qemu virtual machine (or you can just start the launcher itself) in a terminal, in order to make sure that full KVM support is working. I did that in these tests, and didn’t get any errors from KVM/kqemu so I am assuming that it acceleration was working correctly (set to “Full”).

Qemu was interesting in that, instead of using my physical processor as the processor for the Virtual Machine, it emulated a Pentium II. This may have something to do with the fact that Qemu, unlike the other applications here, is not a true Virtualization platform; it is an x86 emulation platform, capable of full virtualization.

Qemu took just under 25 minutes to install Windows 2000, coming in well behind VirtualBox and VMware, but beating out Parallels. While video performance was acceptable, there was a noticeable lag in opening applications inside the virtualized Windows platform. Qemu also was the only application in which I wasn’t able to get sound to work inside the guest operating system (the other applications set this up out of the box). Lastly, my biggest complaint by far is that Qemu continued to eat up CPU time even when the virtual machine was idle; I didn’t experience this problem with any of the other applications. These problems severely hinder Qemu’s ability to compete.

Conclusions
This article looked at four different products for virtualization in Linux, specifically Ubuntu Linux. The findings were interesting – the only product that requires the purchase of a licence for personal use, Parallels, actually performed the worst of the group. Qemu did well for a completely free-as-in-speech application, although VMware and VirtualBox blew the competition away in terms of performance.

Of these applications, VMware and VirtualBox definitely come out the clear winners. For individual use, where the ability to run a single Windows desktop inside of Linux is all that is needed, VirtualBox turns out to be my preference. It’s much smaller than VMware, which comes packed with extra features that aren’t necesary for the end-user. If your needs are different, however, you’ll probably want to give VMware a closer look. Overall, the maturaty and stability of all four applications was impressive enough to call virtualization on the Linux desktop “complete.” So they should start promoting that big time with buy followers.

[ad#ad-1]

Linux P2V

Here’s a cool link on doing Linux P2Vs.
Taken from: http://conshell.net/wiki/index.php/Linux_P2V

Introduction
P2V Linux migrations are a combination of science, art and luck.

P2V stands for Physical to Virtual. In other words, it is the process or procedure of moving a running system (operating system and everything installed) from a physical machine to a virtual machine.

This page describes some of the usual steps necessary to convert a Linux system into a virtual machine running under VMware ESX Server. The same steps should mostly apply to VMware Server, Workstation or even QEMU.

The focus of this P2V explanation is on Red Hat and CentOS guests as they are not only supported, but benefit from kudzu and rescue disk capability built-in. Other distributions can of course be converted but the exact steps will vary.

So, let’s get started.

What to use (or not)
The following software products claim to do P2V, but in fact do not support Linux, so don’t bother.

Virtual Server Migration Toolkit
EZP2V
These products do support Linux in some way…

VMware Converter
VMware converter will work, however any options such as resizing the disks and post migration configuration are greyed-out. This is due to the fact that it just does a raw block-by-block copy of the source disk. It is most useful if your target for migration is ESX 3.x

–update – VMware Converter 4 will do a live P2V for Linux.

Platespin PowerConvert?
PowerConvert works (somewhat) with Linux but it does not support LVM and in my experience is an unreliable product with lackluster support.

liveview looks promising, however it only runs on Windows (due to dependency on VMDK disk mounter) and works with vmware-server, not ESX server. It has “limited” Linux support.
These products or methods offer full support for Linux…

UltimateP2V appears to be worthy of consideration.
Good ol’ dd + netcat, followed by rescue disk of some kind (to fix the modules and make a new initrd).
Preparation
You will want to have the necessary tools in place as well as some calculations. Consider the follow aspects of your system.

How much physical RAM? Is it over or under-utilized?
How much Swap space and where?
Disk type – IDE or SATA and the disk device will be /dev/hda, SCSI will be /dev/sda. You may also have multiple disks (hdb, sdb, etc).
Disk size – use a command such as sudo sfdisk -s. Blocks are in 1KB units, do the math to figure out the equivalents in MB by dividing by 1024 and in GB by dividing by 1024 again.
Example:
jetson:~> sudo sfdisk -s
/dev/hda: 39070080
total: 39070080 blocks
(39070080/1024) = 38154.375 MB
(38154.375/1024) = 37.260 GB
Partition layout -know exactly the partitions, sizes and FS types. This can be gleaned from the df output and the content of /etc/fstab.
Rescue disk – this may be necessary for the recovery of the system once the disk data has been converted over. Conversion puts the system into a “new” environment of emulated devices, and some cases kudzu will not quite get you there or won’t even be available (kudzu is a Red Hat software, not normally found on other Linux distributions).
Knowledge of destination environment. For instance, see http://www.vmware.com/pdf/GuestOS_guide.pdf for vi3.
ISOs – you will want to have the following ISOs for easy access and to map to the CDROM device in the guest.
Install disc #1 for the Red Hat or CentOS version of the source system
Knoppix (recommended) or System Rescue CD
Preparing the source system
Take the time to consider and perform the following tasks while the source system is still running in its native state.

Disable any services you don’t think will be necessary after the conversion, such as system-management agents (think Dell OMSA or IBM Director) and ntpd.
Purge out old logfiles, scratch files in /tmp and unnecessary software.
Cleanup old/extraneous kernels. You will likely want to end up with just 2 kernels, the latest Non-SMP kernel and a previous one.
Building a new initrd with the mptscsih (RHEL4/CentOS4) or BusLogic (RHEL3/CentOS3, RHEL2/CentOS2) SCSI driver loaded, this may save you from having to boot into linux rescue mode after the conversion.
For RHEL4/CentOS4, add –with=mptscsih For RHEL3/CentOS3 and earlier, use –with=BusLogic

mkinitrd -v -f –with=BusLogic /boot/initrd-`uname -r`.img `uname -r`
Zero-out each of the disk partitions… this can speed up the data transfer later on. e.g.
dd if=/dev/zero of=/usr/bigfile; rm -f /usr/bigfile
Boot your system with Knoppix or System Rescue CD. The state we want is an at-rest hard drive(s) and network connectivity. NOTHING should be running/writing to the hard drive(s).

Optional step: run md5sum /dev/sda and record the resulting hash. Usually the last 6 characters will suffice. This can take awhile but gives you a fingerprint of the hard drive data that you can use later to verify the integrity of the data after transferring to the target system. ‘

Preparing the target system (VM)
Using the MUI or vmware-server-console, create a VM with the following parameters:

Operating System: Linux. You can be more specific on vmware-server or ESX, such as Red Hat Enterprise Linux 4.
Disk: slightly larger than source-system (see below). Create same number of disks as exist on the source system.
Network (NIC): Use vlance if given the choice, can be upgrade to vmxnet later when vmware-tools is installed.
CDROM: assign to either Knoppix ISO or System Rescue CD ISO
Boot the target system (I enter knoppix 2 at the boot prompt) and verify the disk(s) are recognized using sfdisk -s. Also verify the network is up using ifconfig eth0. You should have an IP address assigned to eth0 via DHCP or static. Now try pinging the source system e.g. ping 10.4.1.2

Network Acquisition (Disk Cloning)
This is where we transfer the bits from drive A on the source to drive B on the target. The process is functionally very similar to a network acquisition often used in the field of computer forensics.

For our part, a simple example will show how to clone the bits from a single drive: /dev/sda

You’ll need to know the IP address of your target-system, which can be learned from ifconfig eth0.

These commands can be used to clone the blocks to the target-system disk. I assume you have netcat (nc) installed on the source system.

First, run this on the target system

nc -l -p 9001 | dd of=/dev/sda
Then run this on the source system

dd if=/dev/sda | nc 9001
In the real-world, repeat the above process as necessary for the remaining disks.

This is the slowest part of the process. Unfortunately, dd does not show a progress meter. I have seen a 36GB drive take 40 minutes to transfer over on a gigabit network, where the actual throughput was ~14.3MB/s. Another P2V took just over an hour for the same size drive, albeit on a different gigabit network.

The network transfer speed is an important consideration when planning your scheduled outage. You may want to run some tests before your P2V, with a smaller set of data (1GB?) to get an estimate of your throughput, then run the numbers to figure out how long it will take to do the entire drive(s). This can be done while the system is still online. Also, consider the tip above about zero-filling your disk partitions beforehand.

Once your drive(s) have been bit-copied over the network to the target, shutdown your target system and remove the virtual CDROM or ISO mapping.

Optional step: run md5sum /dev/sda and verify the result matches what you saw earlier.

Extras
This is a perfect time to make some adjustments if you want to be clever about your disk & paritition sizes, the following may come in handy. Verify the partitions

fdisk -l /dev/sda
Check a filesystem.

e2fsck -f /dev/sda1
Align ext[23]–>

resize2fs -p /dev/sda1

First-boot
Assuming you got this far, the next step is to immediately shutdown the system again. You’ll want to re-assign the NIC to vmxnet and assign the vmware-tools ISO to the CDROM (path: /usr/lib/vmware/isoimages/linux.iso). Boot up into single-user mode (at grub prompt hit e, select kernel line, e, append “single” to the line, then hit b). Install the vmware-tools (detailed elsewhere) which should get you the vmxnet driver module. Adjust network settings now! Cleanup and reboot. You should be 98% there. Congratulations!

NOTE: I had to rename /etc/rc3.d/S19vmware-tools to /etc/rc3.d/S09vmware-tools to “fix” my network bootup sequence.

On the second reboot, the kudzu command will run and (may well) deal with the remaining hardware changes.

When kudzu runs, it recognizes that certain devices (Broadcom NICs) are no longer there while others (LSI Logic card, pcnet32 NIC) had been added. Usually it is easiest to just accept what kudzu tells us & fine tune later.

See When things go wrong below if you don’t get back to a login: prompt.

When things go wrong
If kudzu does not get you back to a login: prompt, the next step is to boot with the rescue disk. This entails mapping the install cd#1 ISO file to your CDROM device using the MUI or vmware-server-console. Make sure the VM BIOS is also set to use your CDROM in the boot order before the hard drive(s).

Once booted, type linux rescue at the boot prompt and shortly thereafter you will be able to type chroot /mnt/sysimage to get at your disk partitions, which should automatically be mounted there.

The first thing to look at is /etc/modules.conf (RHEL3/CentOS3) or /etc/modprobe.conf (RHEL4/CentOS4). Make sure the appropriate SCSI driver is listed, either BusLogic or mptscsih (based on what you configured this VM to use and the recommendations above).

alias scsi_hostadapter mptscsih
#or
alias scsi_hostadapter BusLogic
Also, take note of the eth0 setting, which should be either pcnet32 for the vlance device, or vmxnet for the vmxnet device. After you install the vmware-tools with the vmxnet device assigned it should be configured automatically.

alias eth0 pcnet32
#or
alias eth0 vmxnet
If you went the route of cloning individual partitions instead of the entire disk(s), it may be necessary to clone the MBR. This will be evident if you try to boot from the drive and get the message “No operating system found”. The process is described here.

Tying up loose ends
Consider the new state of the system, do you really need to run NTP anymore? (Hint: read VMware’s timekeeping whitepaper, set tools.timeSync=”TRUE” in the .vmx file and add clock=pit to the grub kernel line).

See Also
ESX Server 3 Systems Compatibility Guide (PDF)
ESX Server 2.x Systems Compatibility Guide (PDF)
Hard Disk Cloning
Wonders of ‘dd’ and ‘netcat’: Cloning OS harddrives
The Sleuth Kit Informer
dd_rescue – looks like a GREAT alternative to dd for P2Ving systems with failing hard drives. Available in the CentOS
dcfldd – another dd alternative that can update the user of its progress in terms of the amount of data transferred and how much longer operation will take.

iSCSI naming

Both targets and initiators require names for the purpose of
identification, so that iSCSI storage resources can be managed
regardless of location (address). Note that this means iSCSI names
are independent of location.

Furthermore, iSCSI names are associated with iSCSI nodes instead of
with network adapter cards to ensure the free movement of network
HBAs between hosts without loss of SCSI state information
(reservations, mode page settings etc) and authorization
configuration. An iSCSI node also has one or more addresses.
An iSCSI address specifies a single path to an iSCSI node and consists
of the iSCSI name, plus a transport (TCP) address which uses the following format: [: ] If the is not specified, the
default port 3260, assigned by IANA, will be assumed. For iSCSI
initiators, the is omitted.

The concepts of names and addresses have been carefully separated in
iSCSI:

– An iSCSI Name is a location-independent, permanent identifier for
an iSCSI node. An iSCSI node has one iSCSI name, which stays
constant for the life of the node.

– An iSCSI Address specifies not only the iSCSI name of an iSCSI
node, but also a location of that node. The address consists of a
host name or IP address, a TCP port number (for the target), and
the iSCSI Name of the node. An iSCSI node can have any number of
addresses, which can change at any time.

To assist in providing a more human-readable user interface for
devices that contain iSCSI targets and initiators, a target or
initiator may also provide an alias. The alias strings are communicated
between the initiator and target at login, and can be displayed by a user interface on either end, helping the user tell at a glance whether the
initiators and/or targets at the other end appear to be correct.
The alias is a variable length string, between 0 and 255 characters.

Constructing iSCSI names using the iqn. format.

– The string “iqn.”

– A date code specifying the year and month in which the
organization registered the domain or sub-domain name used as the
naming authority string.

– The organizational naming authority string, which consists of a
valid, reversed domain or subdomain name.

– Optionally, a ‘:’, followed by a string of the assigning
organization’s choosing, which must make each assigned iSCSI name
unique.

The following is an example of an iSCSI qualified name from an
equipment vendor:

Organizational Subgroup Naming Authority
Naming and/or string Defined by
Type Date Auth Org. or Local Naming Authority
+–++—–+ +———+ +——————————–+
| || | | | | |

iqn.2001-04.com.example:diskarrays-sn-a8675309

The following is an example of an iSCSI name string from a storage
service provider:

Organization String
Naming Defined by Org.
Type Date Authority Naming Authority
+-+ +—–+ +————-+ +———————-+
| | | | | | | |
iqn.1995-11.com.example.ssp:customers.4567.disks.107

Note that when reversing these domain names, the first component
(after the “iqn.”) will always be a top-level domain name, which
includes “com”, “edu”, “gov”, “org”, “net”, “mil”, or one of the
two-letter country codes. The use of anything else as the first
component of these names is not allowed.

Constructing iSCSI names using the eui. format

The iSCSI eui. naming format allows a naming authority to use IEEE
EUI-64 identifiers in constructing iSCSI names. The details of
constructing EUI-64 identifiers are specified by the IEEE
Registration Authority (see [EUI64]).

Example iSCSI name:

Type EUI-64 identifier (ASCII-encoded hexadecimal)
+–++————–+
| || |
eui.02004567A425678D

iSCSI Discovery

The goal of iSCSI discovery is to allow an initiator to find the
targets to which it has access, and at least one address at which
each target may be accessed. This should generally be done using as
little configuration as possible. The iSCSI discovery mechanisms
listed here only deal with target discovery and one still needs
to use the SCSI protocol for LUN discovery. In order for an iSCSI
initiator to establish an iSCSI session with an iSCSI target, the
initiator needs the IP address, TCP port number and iSCSI target name information.

iSCSI supports the following discovery mechanisms:

a. Static Configuration: This mechanism assumes that the IP address,
TCP port and the iSCSI target name information are already
available to the initiator. The initiators need to perform no
discovery in this approach. The initiator uses the IP address and
the TCP port information to establish a TCP connection, and it
uses the iSCSI target name information to establish an iSCSI
session. This discovery option is convenient for small iSCSI
setups.

b. SendTargets: This mechanism assumes that the target’s IP address
and TCP port information are already available to the initiator.
The initiator then uses this information to establish a discovery
session to the Network Entity (IP address). The initiator then subsequently issues the SendTargets text command to query
information about the iSCSI targets available at the particular
Network Entity (IP address).

c. Zero-Configuration: This mechanism assumes that the initiator does
not have any information about the target. In this option, the
initiator can either multicast discovery messages directly to the
targets or it can send discovery messages to storage name servers.
Currently, the main discovery frameworks available are
SLP and iSNS. (Not supported in the first release of ESX 3.)]]>

VCB integration

Introduction

This document explains how to use the VCB scripts installed on the proxy as part of the VCB installation to integrate with a backup application.

How VCB Works

VMware Consolidated Backup is a technology that allows users to backup a full image or certain files of a virtual machine while it is running, affording you business continuity and zero downtime. (Currently, file level backups are only available on Windows filesystems.) In order to do this, we leverage VMware’s snapshot technology. In essence, on the backend, the snapshot technology redirects disk I/O from the original vmdk to a delta file so that it frees the lock on the original vmdk and all new writes to disk go onto a new delta file. With the original vmdk free, you can use it read-only and backup your data. (You can only access it read only because since the VM is running, there will be reads from time to time from the original vmdk if necessary from the running VM itself. Your backup will not be the sole user of the vmdk file.)

The instructions for creating the integration are very simple in most cases and only get complex if the default settings won’t work for a given application. Generally, the default settings will work if backup software supports to following features:
1) Relocatable root for backups
2) Ability to associate data with arbitrary hostnames
3) Support for DNS hostnames

If these conditions are not met, there may be a need to customize the VCB scripts.

A VCB backup sequence consists of 7 parts:
1) Optionally quiesce the VM
2) Snapshot the VM
3) Unquiesce the VM (if quiesced)
4) Mount the VMDK
5) Run the backup
6) Unmount the VMDK
7) Remove the snapshot

Backup Vendor Integration Options

The backup vendor has a couple possible integration points: quiesce scripts and/or backup integration. A specific vendor could do either or both. However, without the backup integration, the customer will need some other backup solution.

For quiesce scripts, the backup vendor could provide the scripts needed in steps 1 and 3 to quiesce and unquiesce the applications. This is accomplished by providing scripts to the users and then installing them inside the VM in the as the pre-freeze and post-thaw scripts described on pages 40-41 of the Virtual Machine Backup Guide or here:
http://pubs.vmware.com/vi301/backup/wwh … .4.22.html
Quiescing is important for the integrity of your data. If you don’t quiesce your applications, when you restore from backup, you will end up with the application in your VM as if it had powered down hard. VMware does a quiescing of the filesystem, so that a restore backup doesn’t require a chkdsk or fsck, but it doesn’t do quiescing for applications. Quiescing the applications allow you the opportunity to safely shutdown the applications or commit any logs to databases or do whatever your applications need to do. This way, you can avoid having to replay logs or recover from database logs when you restore. If you do shutdown the application, please note that you can unquiesce the VM immediately after the snapshot is created, so if you do need a window for this, the time should be fairly small. Most applications can be quiesced without being shutdown.

Backup integration is accomplished through the VCB proxy. The backup vendor’s client software is generally recommended to reside on the VCB proxy. This is typically the same or very similar to the client software that would reside on a non-VCB host being backed-up. There are a few hooks into the VCB framework to allow the backup software to mount and unmount the vmdk.

How to Integrate

In order to work with VCB, all a backup client has to do is run a VCB command to snapshot and mount the VM (literally a single command) run its own backup command on the VM disk image or file mount, and then unmount the VM (again a single command). There are some cases where changes to the standard backup client software might be needed, for instance if the backup system can not handle a relocated disk image or file mount by default.

While there are a number of ways to implement the VCB backup process, essentially you just want to create a wrapper around the backup executable to run the extra two commands. You can see examples of the wrappers in the Sample Integrations provided on the VMware website (http://www.vmware.com/download/vi/drivers_tools.html, go down to Consolidated Backup Integration Modules). For instance in the Legato Sample Integration, the wrapper script is called vcb-backup.wsf (which actually runs the main function in vcb-backup.js, where most of the code is). The vcb-backup.js script runs basically the same setup described below, then calls the Networker-specific save command as part of the RunSaveCmd() function, then performs the same cleanup as described below.

You can take a look at the other Sample Integrations to see some different ways of implementing this, though it may be easier to understand and implement something closer to the generic templates.

The generic template script accomplishes all the same steps of the backup integration, but provides a simple and easy to integrate way of creating the wrapper script. Using the generic templates, here’s what you actually need to do to write a VCB integration:

1) Create a directory named after your product under ‘C:\Program Files\VMware Consolidated Backup Framework
2) Copy the content of the generic directory into that directory
3) Make any modifications you need and create your VCB wrapper command in the directory.

Essentially, all you need in the wrapper script is a call to pre-command.wsf, a call to your vendor-specific save command, and a call to post-command.wsf.

In most cases that should be everything you need. If for some reason you need to do something more complex than what the templates let you do, here’s an explanation of how the templates work:

The template files are installed in ‘C:\Program Files\VMware Consolidated Backup Framework’ as part of the standard VCB install. The templates and APIs come from the ‘generic’ directory.
• The generic/glue.js contains API functions for calling the VCB framework (described in more detail below).
• The generic/utils.js scriptfile serves as a library of useful routines.
• The generic/pre-command.wsf file is a template for snapshotting and mounting a VM on the proxy.
• The generic/post-command.wsf scriptfile is a template for cleaning up after a backup.
• The config/config.js file is a user configuration file. The backup vendor should leave the file alone, though they may need to modify it for testing. The file sets some local variables like usernames and passwords that are needed for VCB to run.

The pre-command.wsf script expects 2 arguments, the ID number of the VM to backup (required) and the type of backup (optional and described below). A brief explanation of what the pre-command.wsf command does follows:

1) Loads up an environment from the standard configuration file ($VCBDIR/config/config.js)
1) Loads the API functions from utils.js and glue.js. It uses local copies in the specific integration directory, but you can also load the copies from the generic directory.
2) Makes a call to Util_InitializeConfigVars (part of util.js) to load up the default configuration variables and throw errors if any are not set correctly. Essentially this is verifying that the config.js file (which you already loaded) is correctly formatted and populated. In addition, it sets the Util_vcbPath to the path to the VCB install directory and sets the default mode (which is SAN).
3) Creates a VMInfo object defining the VM to be backed-up. This uses the VMid and the backup type from the command arguments. There is a third argument representing the path within the VM mount directory to be backed-up. This is not used by the template because we are assuming whole VM backups. The legal backup types are vcbBackupTypeUnknown (same as “unknown” on the command line), vcbBackupTypeFile (same as “file” on the command line), and vcbBackupTypeFullVM (same as “fullvm” on the command line).
4) Makes a snapshot of the VM specified and then mounts it using prepare for backup function from glue.js. It’s documented in the script and takes 3 arguments: the VMinfo object representing the VM being backedup, a Boolean representing whether you want VCB to take the snapshot for you, and a Boolean representing whether VCB should discard the snapshot when it is done. The Booleans are generally just some standard global variables documented in the code. It is best to use those. The actual implementation of this uses the vcbmounter command line. In rare cases, you may need to create a new js function to call it if you are trying to do something really unusual. The command syntax is: vcbmounter.exe -h -u -p -a {ipaddr: or name:} -r -t {fullvm,file} -m {mode}

Following the pre-command.wsf file, you would generally call your backup products save command from within the same wrapper file that called pre-command.wsf.

Following that, the post-command.wsf would be called. In the unlikely event you need to change its behavior; but it does the following:

1) Loads up an environment from the standard configuration file
($VCBDIR/config/config.js)
2) Loads the API functions from utils.js and glue.js. It uses local copies in the specific integration directory, but you can also load the copies from the generic directory.
3) Makes a call to Util_InitializeConfigVars (part of util.js) to load up the default configuration variables and throw errors if any are not set correctly. Essentially this is verifying that the config.js file (which you already loaded) is correctly formatted and populated. In addition, it sets the Util_vcbPath to the path to the VCB install directory and sets the default mode (which is SAN).
4) Makes a call to CleanUpAfterBackup (part of glue.js) with the location of the mount point of the VM as the only argument. CleanUpAfterBackup is an API to the command line ‘vcbmounter.exe -U’. If you need to do something crazy, you can access the command line directly using the syntax: vcbmounter.exe -h -u -p -U

Troubleshooting notes:

Hardware requirements: The VCB proxy will need network access to both, the VirtualCenter and ESX servers. It will also need to be presented the same LUNs (LUN numbers need to match) on the storage side that are presented to the ESX hosts (that you’re expecting to backup).

If the vcbMounter command doesn’t work, here are some steps you can go about troubleshooting. You can get additional debug information from the vcbMounter command by appending “-L 6” to end of the command.

If you’re having authentication issues, you can run:
vcbUtil -h -u -p -c ping

If it’s not finding the VM via the name or ip address, you can run:
vcbVmName -h -u -p -s any
This will list all VMs found on that VirtualCenter host. If you don’t have VMware Tools installed inside the guest OS, you will not be able to use ipaddr or name. With this output, you have the opportunity to use moref or uuid.

Looking at the log files will be helpful as well.

Some Log file locations on the VCB proxy server:
vmount service logs – C:\WINDOWS\Temp\vmware-vmount[*]–>vstor log files – C:\WINDOWS\Temp\vmware-vlun[*].log

You can find pre/post script log files under
C:\WINDOWS\Temp\ pre_.log
C:\WINDOWS\Temp\ post_.log
C:\WINDOWS\Temp\ browsestart_.log
C:\WINDOWS\Temp\ browseend_.log

3rd party backup Logs – C:\Documents and Settings\Administrator\Local Settings\Temp

Log files for VirtualCenter:
C:\WINDOWS\Temp\vpx\vpxd-*.log]]>

VMware VI SDK information

The VI SDK allows you to control VMs and machines managed by an ESX or VC instance.

Here’s a link to the documentation: http://www.vmware.com/support/pubs/sdk_pubs.html

1. A good place to start for a tutorial is the VMware SDK Webinar series here: http://act.vmware.com/servlet/website/R … lipghMM_si

2. The most complete VMware Developer resources are http://www.vmware.com/support/developer/ & http://www.vmware.com/support/developer/vc-sdk/ (includes Porting Guide, Programming Guide, Reference Guide, etc)

Here’s a link to the reference guide: http://www.vmware.com/support/developer … index.html

3. VMware Discussion Forum dedicated to the APIs: http://www.vmware.com/community/categor … goryID=114

[ad#ad-1]

More FUD – MSFT vs. VMware

http://www.forbes.com/2007/12/13/micros … artner=msn

I can’t believe people are writing stuff like this. VMware has a product that’s better in VMware Server and it’s free too!

Read this http://www.infoworld.com/article/07/12/ … iew_1.html and see that you should really be using VMware server which is free and better than HyperV!

How to manually build an initrd for ESX 3.5

notes came from here:

http://communities.vmware.com/thread/116768

Hi,

i managed to get my ESX3.5 to boot and run on a HP ML 115.

onboard raid: yes, this “raid” really sucks, because my rescue cd found 2 controllers/disks -> NO RAID

TODO-List to get ESX-3.5 up and running.

1.) install it from the cd (of course)

2.) reboot with a linux live cd of your choice.

and now i hope that there are no typos…because i created this “script” on my laptop during i tried and tested it on my ESX box!

mkdir /mnt/eboot
mkdir /mnt/eroot

1. /boot of ESX box

mount /dev/sda1 /mnt/eboot

1. /root of ESX box

mount /dev/sda2 /mnt/eroot

mkdir /mnt/eroot/tmp/initrd
mkdir /mnt/eroot/tmp/initrd/extracted
mkdir /mnt/eroot/tmp/initrd/extractednew

cp /mnt/eboot/boot/initrd-2.4.21-47.0.1.ELvmnix.img /mnt/eroot/tmp/initrd

cd /mnt/eroot/tmp/initrd
mv initrd-2.4.21-47.0.1.ELvmnix.img initrd-2.4.21-47.0.1.ELvmnix.img.gz
gunzip initrd-2.4.21-47.0.1.ELvmnix.img.gz
mount initrd-2.4.21-47.0.1.ELvmnix.img extracted -o loop

cd extracted
cd etc/vmware
cp simple.map simple.map.org

vi simple.map
2nd go for SED!

search for 037e
double this line
change one 037e to 037f
save

cd ..
cd ..

dd if=dev/zero of=initrd.img bs=1k count=97000
mke2fs -i 1024 -b 1024 -m 5 -F -v initrd.img

mount initrd.img extractednew -t ext2 -o loop

tar -C extracted/ -cmf – . | tar -C extractednew/ -xmf – .

1. umount initrd.img

umount extracted
umount extractednew

gzip -best initrd.img
ls -alh
mv initrd.img.gz initrd.img

cd /mnt/eboot
mv initrd-2.4.21-47.0.1.ELvmnix.img initrd-2.4.21-47.0.1.ELvmnix.img.org
cp /mnt/eroot/tmp/initrd/initrd.img initrd-2.4.21-47.0.1.ELvmnix.img

cd /mnt/eroot
cd etc
cd vmware

cp pci.ids pci.ids.org
vi pci.ids
2nd go for SED!

search for 037e
double this line
change one 037e to 037f
save

cp pci.xml.merged pci.xml.merged.org
vi pci.xml.merged
2nd go for SED!

search for 037e
double this SECTION
change one 037e to 037f
save

cd pciid
cp sata_nv.xml sata_nv.xml.org
vi sata_nv.xml
2nd go for SED!

search for 037e
double this SECTION
change one 037e to 037f
save

reboot from your resuce system into ESX and JUCHEEEEE….

kind regards,

Reinhard

________________________________________________________________________________________

#!/bin/bash

vmware esx initrd changer
#/bin/bash
Reinhard Partmann
date created: 2007-12-17
date modified: 2007-12-17
version: 0.2
echo “creating directories…”
mkdir -p /mnt/eboot
mkdir -p /mnt/eroot

echo “mounting..”
mount /dev/sda1 /mnt/eboot
mount /dev/sda2 /mnt/eroot
mount | grep sda

echo “copying original initrd file…”
mkdir -p /mnt/eroot/tmp/initrd/extracted
cp /mnt/eboot/initrd-2.4.21-47.0.1.ELvmnix.img /mnt/eroot/tmp/initrd/initrd-2.4.21-47.0.1.ELvmnix.img.gz
cd /mnt/eroot/tmp/initrd

echo “unpacking & mounting original initrd file…”
gunzip -f initrd-2.4.21-47.0.1.ELvmnix.img.gz
mount initrd-2.4.21-47.0.1.ELvmnix.img extracted -t ext2 -o loop
cd extracted
cd etc
cd vmware

echo “changing simple.map…”
echo “10de:037f 0000:0000 sata_nv.o” >> simple.map

cd ..
cd ..
cd ..

umount extracted
echo “replacing original initrd file…”
gzip –best initrd-2.4.21-47.0.1.ELvmnix.img
mv /mnt/eroot/tmp/initrd/initrd-2.4.21-47.0.1.ELvmnix.img.gz /mnt/eboot/
cp /mnt/eboot/initrd-2.4.21-47.0.1.ELvmnix.img.gz /mnt/eboot/initrd-2.4.21-47.0.1.ELvmnix.img

echo “patching xml files”

cd /mnt/eroot/etc/vmware/pciid
lines=`wc -l sata_nv.xml | awk ‘ { print $1 } ‘`
echo “lines: $lines”
(( lines -= 2))
echo “subtr lines: $lines”
mv sata_nv.xml sata_nv.xml.org
head -$lines sata_nv.xml.org > sata_nv.xml

echo ” ” >> sata_nv.xml
echo ” ” >> sata_nv.xml
echo ” sata_nv” >> sata_nv.xml
echo ” ” >> sata_nv.xml
echo ” MCP55 SATA Controller” >> sata_nv.xml
echo ” ” >> sata_nv.xml
echo ” ” >> sata_nv.xml
echo “” >> sata_nv.xml

touch /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
echo “#!/bin/bash” >> /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
echo “esxcfg-pciid” >> /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
echo “sleep 5” >> /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
echo “rm /etc/rc3.d/S99rp-esxcfg-pciid-boot” >> /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
chmod a+x /mnt/eroot/etc/init.d/rp-esxcfg-pciid-boot
cd /mnt/eroot/etc/rc3.d/
ln -s ../init.d/rp-esxcfg-pciid-boot S99rp-esxcfg-pciid-boot

echo “cleanup…”
cd /
rm -f -r /mnt/eroot/tmp/initrd
umount /mnt/eboot
umount /mnt/eroot
rm -f -r /mnt/eboot
rm -f -r /mnt/eroot]]>

[ad#ad-1]