:::: MENU ::::

Manage VM snapshots with PowerCLI

Install PowerCLI module:

# Install-Module VMware.PowerCLI -Scope CurrentUser

Connect to vCenter server:

# Connect-VIServer vcenter.web.url

Create snapshot:

# Get-VM vmname | New-Snapshot -Name SnapshotName -Description YourString

List all snapshots:

# Get-VM vmname | Get-Snapshot | Format-List name,created

Restore from snapshot:

# Set-VM vmname -Snapshot SnapshotName

Delete single snapshot:

# Get-VM vmname | Get-Snapshot -Name SnapshotName | Remove-Snapshot

Delete all snapshots:

# Get-VM -Name vmname | Get-Snapshot | Remove-Snapshot -RemoveChildren

Modifying ESXi I/O queue for ALUA enabled storage

esxcli system settings kernel set -s terminateVMonPDL -v Yes
esxcli system settings advanced set -o "/Disk/AutoremoveOnPDL" -i 1
das.maskCleanShutdownEnabled = True
esxcli system module parameters set -m iscsi_vmk -p iscsivmk_LunQDepth=255
esxcli iscsi adapter param set –A vmhbaXX –k LoginTimeout –v 5


How to move vCenter Server to another Datacenter

  • make a clone of the vCenter VM, export it and import into the target Datacenter storage
  • edit the properties of the new VM so it’s MAC address is the same as the old VM (only if using DHCP)
  • shutdown vCenter from web interface
  • with vSphere client connected to the source host, shutdown the Guest OS of the old VM
  • with vSphere client connected to the destination host, register and power-up the new VM

How to delete an iSCSI target

First, to disable target:
# iscsiadm -m node -T iqn.2007-06.com.test.cluster1:storage.cluster1 --portal group_ip_addrr:3260 -u

Second, to delete the target’s record:
# iscsiadm -m node -o delete -T iqn.2007-06.com.test.cluster1:storage.cluster1 --portal group_ip_addrr:3260


How to install Dell OMSA on XenServer 6.5

This tutorial describes how to install the Dell OMSA (OpenManage Server Administrator) on Citrix XenServer 6.5

1. Temporarily disable the Citrix yum repository.

mv /etc/yum.repos.d/Citrix.repo /root/Citrix.repo

2. Clear yum cache:

yum clean all

3. Install the Dell OMSA Repository.

wget -q -O - http://linux.dell.com/repo/hardware/Linux_Repository_14.12.00/bootstrap.cgi | bash
Czytaj dalej


Enable IPMITOOL on XenServer

You can access IPMI information of your XenServer by enabling following modules:

modprobe ipmi_devintf
modprobe ipmi_msghandler
modprobe ipmi_si

You can use this utility to perform IPMI functions with a kernel device driver or over a LAN interface. IPMItool enables you to manage system hardware components, monitor system health, and monitor and manage the system environment, independent of the operating system.

List of helpful ipmitool commands:
Czytaj dalej


Easily Resize a XenServer Storage Repository

Steps (7 total)

1. Extend the volume/LUN from the SAN management console
2. xe sr-list name-label= (note the uuid of the SR)
3. pvscan | grep [SR UUID] ““ Note the device name (e.g. PV /dev/sdj )
4. echo 1 > /sys/block/device/device/rescan (e.g. echo 1 > /sys/block/sdj/device/rescan )
5. pvresize (eg: pvresize /dev/sdj)
6. xe sr-scan uuid=[SR UUID]
7. Verify that the XE host sees the larger physical disk: pvscan | grep [SR UUID]


Removing Orphaned Domains from Active Directory

1) Determine the domain controller that holds the Domain Flexible Single Master Operations (FSMO) role. To identify the server holding this role:
1.1) Start the Active Directory Domains and Trusts Microsoft Management Console (MMC) snap-in from the Administrative Tools menu.
1.2) Right-click the root node in the left pane titled Active Directory Domains and Trusts, and then click Operations Master.
1.3) The domain controller that currently holds this role is identified in the Current Operations Master frame. NOTE: If this changed recently, not all computer may have received this change yet due to replication.
2) Verify that all servers for the domain have been demoted.
3) Open Command Prompt.
Czytaj dalej


„Control domain on host” po migracji VM

Nie od dziś wiadomo, że XenServer pozbywa się technologii StorageLink. Ta swoista integracja macierzy SAN z hostami XEN okazała się piętą achillesową XenServer’a.

Przy migracji wirtalnych maszyn ze StorageLink na LVM zauważyłem dziwną przypadłość. O ile w trakcie migracji, każdy VDI jest przenoszony przy udziale dom0, to po zakończonym kopiowaniu powinien ten „uchwyt” zwolnić. Tak się jednak nie dzieje i każdemu dyskowi zostaje przypisany kolejny VBD (Virtual Block Device) wskazujący na hosta, który się zajmował jego migracją.

Na źródłowym i docelowym SR w zakładce „Storage” zauważyłem dyski, których wirtualnymi maszynami były „nazwa_VM” (oczywiste) oraz „Control domain on host hostname„.

Jak sobie radzić z tą sytuacją ?

Czytaj dalej