Disable ESXi CVE-2018-3646 warning

WARNNING: This host is potentially vulnerable to issues described in CVE-2018-3646, please refer to https://kb.vmware.com/s/article/55636 for details and VMware recommendations.

 

Disable ESXi CVE-2018-3646 warning For LAB

When testing things in the homelab, I frequently work with older hardware.

This means that when you use ESXi, you might get the following warning:

This host is potentially vulnerable to issues described in CVE-2018-3646, please refer to https://kb.vmware.com/s/articles/55636 for details and VMware recommendations.

I typically chose to ignore the warning, as this is a lab anyway. And this is fine on a stand alone host, but it is pretty annoying when using vCenter.

So if you are in the same situation, here is how to disable the warning:
Open your host configuration, go to System, Advanced System Settings, click “Edit…”
The key you are looking for is:

UserVars.SuppressHyperthreadWarning

Set this to a value of 1, press “OK” and refresh the host. The warning should now disappear.

Please do keep in mind that the vulnerability is still present, you did not eliminate the risk, you only disabled the warning.

 

Đọc thêm..

XCP - Create Local ISO storage

mkdir -p /var/opt/xen/ISO_Store
xe sr-create name-label=LocalISO type=iso device-config:location=/var/opt/xen/ISO_Store device-config:legacy_mode=true content-type=iso
xe sr-scan uuid=UUID

 

https://umhau.github.io/create-local-ISO-repository-on-xcp-ng/

https://thuanbui.me/category/systems-infrastructure/virtualization/

Đọc thêm..

VMware vCenter SNMP Configuration

 

Commands

Here are the commands I have used for the vCenter SNMP configuration. Note: make sure you have access to the root account to perform the login.

# Step 1: Start an SSH connection with the vCenter Server (use Putty or something equivalent).

# Step 2: Login as the root user

# Step 3: After a successful login you should be in the appliance Shell.

# Step 4: View the current configuration for SNMP
snmp.get

# Step 5: Configure the SNMP Community (in this example I use MySnmpCommunity)
snmp.set --communities MySnmpCommunity

# Step 6: Allow a device to access the SNMP agent (192.168.10.10 = monitoring server)
snmp.set --targets 192.168.10.10@161/MySnmpCommunity,172.0.0.1@161/MySnmpCommunity,localhost@161/MySnmpCommunity

# Step 7: Enable the SNMP Agent
snmp.enable

# Step 7: Verify the SNMP Settings configured
snmp.get

# Step 8: Test the working (in my case it never works... not sure why? Has something to do with my access restrictions?)
snmp.test

# Step 9: Perform a test from the monitoring server (in my case a Linux machine with snmpwalk)
snmpwalk -v2c -c MySnmpCommunity %hostname-vcenter%
Đọc thêm..

Determining how much RAM is installed in each slot on an ESX/ESXi host

To determine how much RAM is installed in each slot on an ESX/ESXi host:
  1. Login to the host using an SSH client.
  2. Run one of these commands as user root:
    • dmidecode|less

      Note: dmidecode|less is not available in 5.x versions.
    • smbiosDump
  3. In the output, locate the blocks of text beginning with Memory Device. Size or Max. Size indicates the amount of memory installed.
    The output for slots that have memory modules installed appears similar to:
    Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: DIMM
    Set: 1
    Locator: DIMM_A1
    Bank Locator: Not Specified
    Type: <OUT OF SPEC>
    Type Detail: Synchronous
    Speed: 1333 MHz (0.8 ns)
    Manufacturer: 80AD009780AD
    Serial Number: 1680125F
    Asset Tag: 0109241D
    Part Number: HMT151R7AFP4C-H9
    The output for slots that are empty appears similar to:
    Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 72 bits
    Data Width: 64 bits
    Size: No Module Installed
    Form Factor: DIMM
    Set: 2
    Locator: DIMM_A4
    Bank Locator: Not Specified
    Type: <OUT OF SPEC>
    Type Detail: Synchronous
    Speed: Unknown
    Manufacturer:
    Serial Number:
    Asset Tag:
    Part Number:
Đọc thêm..

Free tools for VMware ESXi

There are a couple of tools I use with my test ESXi hosts, which are running with free licence and are not managed by vCenter.
    1.WebUI
This nice package comes from VMware labs and allows you to acces some features of the host from web interface, which is great as there is no desktop vsphere client for Linux.
The package can be downloaded from here. The installation is pretty straightforward. After the installation you can access this UI from https://<esxhost>/ui/. Nice thing – it’s a little big faster the vsphere Web client and doesn’t use plugins.
    2.ghettoVCB
I use this tool(github) to create occasional backups and move VMs from one host to another, which is much faster than using secure copy as it uses vStorage API (VCB). All you need is to:
  • put it on your ESXi host with scp
  • unzip it (unzip tool is preinstalled on the host) to a datastore (if you unzip it to / it will be erased after reboot).
unzip ghettoVCB-master.zip -d /vmfs/volumes/datastore1
  • edit/vmfs/volumes/datastore1/ghettoVCB-master/ghettoVCB.conf
VM_BACKUP_VOLUME- the place the to put backups, usually it’s a folder on a remote datastore, mounted to the host
DISK_BACKUP_FORMAT – disk format, during the backup disk format can be changed from thin to thick and from eager zeroed to lazy zeroed.
VM_BACKUP_ROTATION_COUNT – number of backups
POWER_VM_DOWN_BEFORE_BACKUP- combined with vmware tools on a guest systems this option allows graceful shutdowm of a VM.
ENABLE_HARD_POWER_OFF – forces shutdown.
  • create vms_to_backup file and list names of necessary VMs, each on a separate line
  • run backup with
# ./ghettoVCB.sh -f ./vms_to_backup  -g ./ghettoVCB.conf
Restoration is also very simple
  • create a file vms_to_restore like this:
"/vmfs/volumes/remote_datastore/backups/folder_with_VM1/;/vmfs/volumes/datastore1;4;VM1-test"
"/vmfs/volumes/remote_datastore/backups/folder_with_VM2/;/vmfs/volumes/datastore1;4;VM2-test"
where each line specifies path to backup (the folder with vmdk file), destination on a host where the machine would run, disk format type (4 for eagerzeroedthick) and a new name.
  • run restore scipt
# ./ghettoVCB-restore.sh -c vms_to_restore
The script will clone and register the VM on the destination host. You can power it up from the client later, and client will ask you whether you moved it (uuid and MAC will stay the same) or copied (uuids and MAC would be regenerated and ruin MAC-bonded licences on your VM).
Full documentation on ghettoVCB can be found here(backup) and here(restore).
Đọc thêm..

GhettoVCB Backup/Restore Vsphere VM

- Backup VMs stored in a list:

[root@databom ~]# ./ghettoVCB.sh -f vms_to_backup
File vms_to_backup:

Vm1
VM2
...

- Backup All VMs residing on specific ESX(i) host

[root@databom ~]# ./ghettoVCB.sh -a

- Backup All VMs residing on specific ESX(i) host and exclude the VMs in the exclusion list:

[root@databom ~]# ./ghettoVCB.sh -a -e vm_exclusion_list

- Restore VM stored in a list:

[root@himalaya ~]# ./ghettoVCB-restore.sh -c vms_to_restore -d 2
File: vms_to_restore
[root@himalaya ~]# cat vms_to_restore
#"<DIRECTORY or .TGZ>;<DATASTORE_TO_RESTORE_TO>;<DISK_FORMAT_TO_RESTORE>;<OPTIONAL_RESTORED_VM_DISPLAY_NAME>"
# DISK_FORMATS
# 1 = zeroedthick
# 2 = 2gbsparse
# 3 = thin
# 4 = eagerzeroedthick
# e.g.
# "/vmfs/volumes/dlgCore-NFS-bigboi.VM-Backups/WILLIAM_BACKUPS/VCAP/VCAP-2009-08-18--1;/vmfs/volumes/himalaya-local-SATA.RE4-GP:Storage;1""/vmfs/volumes/mini-local-datastore-2/backups/VCSA-5.1/VCSA-5.1-2012-12-25_01-30-36;/vmfs/volumes/mini-local-datastore-1;3"
"/vmfs/volumes/mini-local-datastore-2/backups/VCSA-5.1/VCSA-5.1-2012-12-25_01-30-36;/vmfs/volumes/mini-local-datastore-1;1;VCSA-RESTORE" 
VM to restoreDatastore to restore toVMDK formatRestore VM Name
/vmfs/volumes/mini-local-datastore-2/backups/VCSA-5.1/VCSA-5.1-2012-12-25_01-30-36/vmfs/volumes/mini-local-datastore-1thinVCSA-5.1
/vmfs/volumes/mini-local-datastore-2/backups/VCSA-5.1/VCSA-5.1-2012-12-25_01-30-36/vmfs/volumes/mini-local-datastore-zeroedthickVCSA-RESTORE

 

 

 

Đọc thêm..

vSphere 5.5 – Enable SNMP

I am going through setting up Solarwinds Virtual Manager and needed to enable SNMP on my vSphere 5.5 hosts. So the service set to automatically start but it will not start without generating an error when attempting to start the service as seen below.
14-28-44
So in case you run into the same thing it is as simple as running the following commands on your individual hosts from a console session. Replace YOUR_STRING with the community string that you would like to use. The last command sets the firewall to allow all to poll SNMP.
esxcli system snmp set --communities YOUR_STRING
esxcli system snmp set --enable true
esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true
esxcli network firewall ruleset set --ruleset-id snmp --enabled true
/etc/init.d/snmpd restart
You can change the firewall rule to only allow a specific subnet or host if you would like to.
esxcli network firewall ruleset set --ruleset-id snmp --allowed-all false
esxcli network firewall ruleset allowedip add --ruleset-id snmp --ip-address 10.0.101.0/24
esxcli network firewall ruleset set --ruleset-id snmp --enabled true
/etc/init.d/snmpd restart
So you are thinking well that is great but I have more than just a few hosts and would like to run this using PowerCLI. So here you go, a bit of PowerCLI to set your SNMP up on each of your hosts in vCenter.
# PowerCLI Script for adding syslogserver to hosts
# @mrlesmithjr
# EverythingShouldBeVirtual.com
# Change the following to match your environment
# vi_server is your vCenter
$vi_server = “vcenterservername”
$vcuser = "vcenterserverusername"
$vcpass = "vcenterserverpassword"
$communities = "public"
$syslocation = "Atlanta"

Connect-VIServer -Server $vi_server -User $vcuser -Password $vcpass

# Setup variable to use in script for all hosts in vCenter
$vmhosts = @(Get-VMHost)

# Configure syslog on each host in vCenter
foreach ($vmhost in $vmhosts) {
Write-Host ‘$vmhost = ‘ $vmhost
$esxcli = Get-EsxCli -VMHost $vmhost
$esxcli.system.snmp.set($null,$communities,"true",$null,$null,$null,$null,$null,$null,$null,$null,$null,$syslocation)
$esxcli.system.snmp.get()
}

Disconnect-VIServer * -Confirm:$false
So there you have it. You are good to go now. Have fun SNMP’ing away!
Enjoy!
Đọc thêm..

ESXi cron jobs


#Edit corn jobs
vi /var/spool/cron/crontabs/root


# Check crond pross id
cat /var/run/crond.pid


# Kill old crond
/bin/kill $(cat /var/run/crond.pid)


 Restart cron jobs (for 5.0 or older)
/bin/busybox crond

 Restart cron jobs (for 5.1)
/usr/lib/vmware/busybox/bin/busybox crond 


# Check again crond pross id (Should not be above id)
cat /var/run/crond.pid


Đọc thêm..

XenServer 6 autostart VMs or vApps

In XenServer 5.6 there was the autostart feature on VMs. When the autostart checkbox on the VM was enabled, the VMs would start automatically after the XenServer host environment was powered up. In XenServer 6, this feature is removed from the XenCenter console. There are multiple blogposts that describe how to re-enable the autostart feature from the commandline. But that is not needed. You can use the new vApp feature. With vApps you can accomplish the same, but better. vApps is a logical grouping of multiple VMs. For example you can create a vApp “core infrastructure”, put your domaincontroller and licenseserver in it and some additional servers. In a vApp you can also define the order in which VMs are started and also a delay time between the startup sequence. So vApps is much more flexible than autostart. You can find vApp in XenCenter under Pool –> Manage vApps.
  • Create a new vApp
  • Assign VMs. A VM can be added to only one vApp at a time
  • Change VM startup sequence. Add delays between sequences.
That’s it. This is a Pool feature, but it will also work with just one stand-alone XenServer. The automatic starting of a vApp only works for a paid version of XenServer. Although the administrators guide mentions vApps in combination with HA (High Availability) or DR (Disaster Recovery), you don’t need the platinum edition for vApps. In fact, you don’t need HA. I have it running with the Advanced Edition without HA enabled. If you want automatic starting of a vApp with the free version of XenServer you have to use the following commands:
List the vApps: xe appliance-list
Start a vApp: xe appliance-start uuid=<appliance-uuid>
Add above command to /etc/rc.local
So forget the autostart feature, use vApps. Even with the free version of XenServer you can use it.
Đọc thêm..

Start/Stop VM on Esxi by commands


Start/Stop command:
  • List all VMs registered to this host (This reveals the Vmid needed for other commands)
    vim-cmd /vmsvc/getallvms
  • Unregister a VM
    vim-cmd /vmsvc/unregister <Vmid>
  • Register a VM
    vim-cmd /solo/register /path/to/file.vmx
  • Get power state of a VM
    vim-cmd /vmsvc/power.getstate <Vimid>
  • Power off a VM
    vim-cmd /vmsvc/power.off <Vmid>
  • Power on a VM
    vim-cmd /vmsvc/power.on <Vmid>
Or Stop VM:

  1. Open a console session where the esxcli tool is available, either in the ESXi Shell, the vSphere Management Assistant (vMA), or the location where the vSphere Command-Line Interface (vCLI) is installed.
  2. Get a list of running virtual machines, identified by World ID, UUID, Display Name and path to the .vmx configuration file, using this command:

    esxcli vm process list
  3. Power off one of the virtual machines from the list using this command:

    esxcli vm process kill --type=[soft,hard,force] --world-id=WorldNumber

    Note: Three power-off methods are available. Soft is the most graceful, hard performs an immediate shutdown, and force should be used as a last resort.
Đọc thêm..

Add cron Job to VMware ESX/ESXi

This explains how to add a cron job to VMware in such a way that it will still be there after reboots.

Having
enabled ssh access to your ESX/ESXi server, ssh in as root.

Firstly, add the cron job to the root crontab:

  1. Edit /var/spool/cron/crontabs/root
  2. Add the line (all on one line)
    5 0 * * * /full/path/to/script arguments/with/full/path > /full/path/to/logfile 2>&1
  3. Run the command "cat /var/run/crond.pid"
    That will print the process number of the running crond, such as 12345
  4. Run the command "kill 12345"
    where "12345" should be replaced with the number output by the previous command

For details of the meaning of "5 0 * * *" (5 minutes past midnight every day) read the man page for crontab(5) on any Unix/Linux server, or else
on the web.

Now, add a command to
/etc/rc.local to re-generate the cron job when ESX/ESXi reboots
  1. Edit /etc/rc.local, using a command such as "vi /etc/rc.local".
  2. At the end of the file, add 3 lines (using "G" then "O" in vi). The first kills crond, the second adds the new cron job to the root crontab file, ad the third restarts crond:
    /bin/kill $(cat /var/run/crond.pid)
    /bin/echo '5 0 * * * /full/path/to/script arguments/with/full/path > /full/path/to/logfile 2>&1' >> /var/spool/cron/crontabs/root
    /bin/busybox crond
  3. Save and exit the editor (Press the "Esc" key then ":wq" then press "Return" in vi)
  4. Run the command "auto-backup.sh" so that the change to /etc/rc.local survives a reboot.

Every time you change the cron job, remember to update
/etc/rc.local as well and run the "auto-backup.sh" command to backup the new /etc/rc.local file.
Đọc thêm..

ESXi enabling SNMP

Last night I wrote an article about how to monitor the health of an ESXi server (link here) and I wanted to explain a bit more about my findings with SNMP on an ESXi host.
My goal with the monitoring was to use the check_dell and check_hp commands I have found for Nagios/Opsview to monitor the hardware that ESX is running on. The ESXi installs I am working with are using the Dell and HP management agents installed so I thought that everything would work out of the box and enabling SNMP would let me query the different aspects of the hardware.
The official line from VMWare was that SNMP is not enabled on ESXi and with no console cant be enabled. I knew however, having read a recent post on theTechHead blog (link here) that you could see the snmp.xml file and this shows that it is not enabled which made me think it must be possible to enable it. I was right.
A quick google came up with this article and I had a look and this was a fairly simple process to run:
First you need to enter the “unsupported” console on your ESXi server. To do this press Ctrl+Alt+F1 at your ESX console, now type the wordunsupported (N.B. you will not see the text on your screen) and press Enter. If all goes well you should see a password prompt, enter your root password here and you should get a warning you are entering a mode that should only be enabled with VMWare support and be presented with a console.
type the following command to enter the VI text editor and start to modify the snmp.xml file:
vi /etc/vmware/snmp.xml
You should see a single line of text at the top of the screen which is the contents of the xml file. Press i to enter Insert mode and change
<enabled>false</enabled>
to
<enabled>true</enabled>
Then scroll across and add the community name you want the SNMP agent to respond on and place this between the following tags
<communities></communities>
so it should look like
<communities>public</communities>
I wasnt interested in setting up SNMP traps so left this blank and quit the VI editor by press Esc to exit insert mode and then :wq to write the file and quit the editor.
Finally we need to restart the services on the esx host which can be done with the following command
/sbin/services.sh restart
Great, SNMP is now enabled so I should be able to get the information from the HP/Dell management agents that I want. Wrong. My snmpwalk of the host provided little to no useful information about what I was trying to unlock.
Đọc thêm..

Using Windows Services for Unix NFS Sever to backup VMWare ESXi Virtual Machines

Using Windows Services for Unix NFS Sever to backup VMWare ESXi
Virtual Machines
The main steps in this process are:
1. Installing Windows Services for UNIX (WSFU)
2. Copying the ESXi Server password and group files to Windows
3. Configuring WSFU for accepting ESX Server connections
4. Sharing the Windows folder for NFS compatibility
5. Configuring the ESXi Server to mount the Window NFS Share as Datastore.
6. Setup Backup Script
1. Installing Windows Services for UNIX (WSFU)
 Download windows services for UNIX at:
http://www.microsoft.com/windowsserversystem/sfu/downloads/default.mspx
 Install WSFU on the desired machine
 Add in the following options
o NFS + Server for NFS
o Authentication tools for NFS + user name mapping
 After installation, open services control panel applet and change the service ‘User Name
Mapping’ to startup automatically and then start the service
 Windows XP Firewall Enable the following ports:
o Portmapper TCP, UDP 111
o Status TCP, UDP 1039
o Nlockmgr TCP, UDP 1047
o Mountd TCP, UDP 1048
o NFS server TCP, UDP 2049
2. Copy the ESX Server password and group files to Windows
 Enable ssh on ESXi –
o Go to the ESXi console and press alt+F1
o Type: unsupported
o Enter the root password
o At the prompt type “vi /etc/inetd.conf”
o Look for the line that starts with “#ssh” (you can search with pressing “/”)
o Remove the “#” (press the “x” if the cursor is on the character)
o Save “/etc/inetd.conf” by typing “:wq!”
o At the prompt type “kill -HUP `ps | grep inetd`”
o Restart the management service “/sbin/services.sh restart”
o (optional: Restart ESXi Server)
o Nice tutorial - http://www.vm-aware.com/2008/07/17/enable-ssh-for-esxi/

 Use a program like WinSCP or similar process to copy the following files to your local system
where WSFU is installed
o You can get WinSCP from the fowling location.
o http://winscp.net/eng/download.php#download2

 Transfer the file /ect/password and the file /ect/group to C:\SFU or to the location where you
installed WSFU
3. Configure WSFU to accepting ESX Server connections
 Click Start, Programs, Windows Services for UNIX, Services for UNIX Administration
 Go to user name mappings then configuration
 Click password and group files
 Then browse for the password and group files that you copied, from the browse dialog box for
both the password and group fields
 Click apply
 Then go to maps
 Click show maps
 List windows users and list Unix users
 Then select a local administrator user on the left that will be mapped to the root account and
the root user on the right.
 Click the add button (should now be in the list)
 Then click apply (upper right)
 My path is \\myserver.mydomain.int\NFS-VMFS01 for the windows share and NFS share on the
windows host with WSU installed.
4. Sharing the Windows folder for NFS compatibility
 Right click the local folder you wish to share via NFS
 Share the folder by clicking NFS sharing
 Type in the name for the share i.e. NFS-VMFS01
 Remove allow anonymous access
 Click permissions
 Now Change type of access to “Read+Write” then check allow root access.
5. Configure the ESX Server to mount the Window NFS Share as VMFS
 Open the VC client and highlight the Vi3 host
 In the Configure tab choose Networking
 Check to see if there exist a VMKernel (should be as the management by default)
o IF NOT Add networking, VMKernel then pick a vSwitch, then give the VMkernel an IP
that is accessible via the NFS host.
 Now open the storage option for this host
 Click add storage, > Network File System
 In the Server Field enter in myserver.mydomain.int
 In the Folder field enter /NFS-VMFS01
 For the Datastore I also used NFS-VMFS01
6. Setup Backup Script
 On the WSFU Machine
 Install VMware Infrastructure Remote Command Line (RCLI)
o http://www.vmware.com/download/vi/drivers_tools.html
 Copy the plink.exe to the bin dir of RCL
o Download plink.exe -
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
o Or copy from PuTTy directory
 Configure the following script to match your information
o Note this assumes that your vm files have the same name as the directory

@echo off
SET ESXHOST=
SET USER=
SET PASS=
SET DATASTOREPATH=/vmfs/volumes/%ESXHOST%2LD1
SET SNAPSHOTPATH=/vmfs/volumes/Snapshots
c:
cd "c:\program files\vmware\vmware vi remote cli\bin"
if "%3" == "" (
echo.
echo Missing parameters (hostname username password)
echo.
goto end
SET ESXHOST=%1
SET USER=%2
SET PASS=%3
)
echo.
echo ESX: %1 (%TIME%)
echo.

FOR /F %%A IN ('plink %USER%@%ESXHOST% -pw %PASS% ls %DATASTOREPATH%/') do call
:SNAPSHOT %%A
goto end

:SNAPSHOT
if "%1" == "ISO" goto end

echo.
echo VM: %1 (%TIME%)
echo Create VM Snapshot directory
plink %USER%@%ESXHOST% -pw %PASS% mkdir %SNAPSHOTPATH%/%1

echo.
echo Copy VMX file
plink %USER%@%ESXHOST% -pw %PASS% cp %DATASTOREPATH%/%1/%1.vmx
%SNAPSHOTPATH%/%1

echo.
echo Remove existing Snapshots
plink %USER%@%ESXHOST% -pw %PASS% rm %SNAPSHOTPATH%/%1/%1.vmdk
plink %USER%@%ESXHOST% -pw %PASS% rm %SNAPSHOTPATH%/%1/%1_1.vmdk

REM echo.
REM echo Stop VM %1
REM vmware-cmd.pl -H %ESXHOST% -U %USER% -P %PASS% %DATASTOREPATH%/%1/%1.vmx
stop soft

echo.
echo Take snapshot of %1
vmware-cmd.pl -H %ESXHOST% -U %USER% -P %PASS% %DATASTOREPATH%/%1/%1.vmx
createsnapshot "SS1" "Nightly Snapshot" 1 1

REM echo.
REM echo Startup %1
REM vmware-cmd.pl -H %ESXHOST% -U %USER% -P %PASS% %DATASTOREPATH%/%1/%1.vmx
start soft

echo.
echo Copy VM disk %1-flat.vmdk
vmkfstools.pl --server %ESXHOST% --username %USER% --password %PASS% -a lsilogic -d thin -i
%DATASTOREPATH%/%1/%1.vmdk %SNAPSHOTPATH%/%1/%1.vmdk
vmkfstools.pl --server %ESXHOST% --username %USER% --password %PASS% -a lsilogic -d thin -i
%DATASTOREPATH%/%1/%1_1.vmdk %SNAPSHOTPATH%/%1/%1_1.vmdk

echo.
echo remove snapshot
vmware-cmd.pl -H %ESXHOST% -U %USER% -P %PASS% %DATASTOREPATH%/%1/%1.vmx
removesnapshots
echo.
:end
Sources:
http://vmblog.com/archive/2007/01/23/using-windows-based-nfs-in-vi3.aspx by Jason Mattox from
Vizioncore (direct copy of his work, I just added more information to make it work in Windows XP)
http://support.microsoft.com/kb/891760 (NFS Server port information)
http://communities.vmware.com/thread/162418?tstart=0 by robink (The backup script)
http://www.yellow-bricks.com/2008/08/10/howto-esxi-and-ssh/ (ssh on ESXi)
Đọc thêm..

Cpuunits & Cpulimit

There are two parameters controlling fair CPU scheduler in OpenVZ: cpuunits and cpulimit.

cpuunits

Cpuunits are set via
vzctl set 101 --cpuunits 1000 --save
For example. If you set a cpuunit for one container to a value and set a cpuunit on another container to a different value, the time allotted to each of the containers will be the ratio of the two units. Let's use a real example.
We did the following:
vzctl set 101 --cpuunits 1000 --save
vzctl set 102 --cpuunits 2000 --save
vzctl set 103 --cpuunits 3000 --save
If we started a CPU intensive application on each CT, then 103 would be given 3 times as much cpu time as 101 and 102 would get twice as much as 101, but some fraction of what 103 got. Here's how to determine what the real ratios are.
Add the three units, 1000+2000+3000 = 6000
101 gets 1000/6000 or 1/6th of the time. (16%) 102 gets 2000/6000 or 1/3rd of the time. (34%) 103 gets 3000/6000 or 1/2 of the time. (50%)

cpulimit

The cpulimit parameter sets the absolute maximum limit for a container to a percent value. For instance:
vzctl set 101 --cpulimit 25 --save
says that container 101 cannot ever have more than 25 percent of a CPU even if the CPU is idle for the other 75% of the time. The limit is calculated as a percentage of a single CPU, not as a percentage of the server's CPU resources as a whole. In other words, if you have more than one CPU, you can set a cpulimit > 100. In a quad-core server, setting cpulimit to 100 permits a container to consume one entire core (and not 100% of the server).
CPU limits are only available in rhel5-based and rhel6-based kernels and they behave a bit differently in them.
In the rhel5 kernel the limit has a container-wide meaning. That said if you have e.g. a container of 2 CPUS with the 100% cpulimit set, this container's usage of CPUs can be 100%/0% or 50%/50% or any other values, whose sum is 100%.
In the rhel6 kernel the applied limit is divided between onlince CPUs proportionally and a busy CPU cannot borrow time from an idle one. I.e. with a 2 CPUs container and 100% limit set the usage of each CPU cannot exceed 50% in any case

(http://wiki.openvz.org/Resource_shortage)
Đọc thêm..

Setup Vmware trên Centos 5

rpm -ivh VMware-server-1.0.5-80187.i386.rpm
yum install libXtst-devel libXrender-devel
yum install libXtst-devel
yum install xinetd
vmware-config.pl
tar -zxvf VMware-mui-1.0.4-56528.tar.gz
cd VMware-mui-1.0.4-56528.tar.gz
cd vmware-mui-distrib/
./vmware-install.pl
Đọc thêm..

Setup citrix xenserver


  1. Setup Xenserver từ source ISO bình thường. (link http://www.citrix.com/tv/#videos/103 hoặc http://www.citrix-tips.com/438/citrix-xenserver-installation-guide-2/ )
Đọc thêm..