Category Archives: VMware

VMware Workstation, ESXi

VMware: PowerCli Scripts in native Powershell

Hi,

when you want to execute your PowerCli script you have to start the “VMware vSphere PowerCLI” shell before. But, for example Schedule Tasks, it whould be nice that the script load the PowerCli environment itself. Then you simply have to start your script like this

%Systemroot%\System32\WindowsPowerShell\v1.0\powershell.exe -File YourPowerCliScript.ps1

To load the PowerCli script Environent in your powershell script add this lines at the top of your script.
Continue reading VMware: PowerCli Scripts in native Powershell

Advertisment to support michlstechblog.info

VMware vSphere: Create a linked clone with Powercli

Hi,

linked clones have some advantages:

  • New virtual machines are rapidly deployed. The initial task is only to reference to a snapshot of an existing virtual machine. No virtual disk file(s) will be copied at this time.
  • They save disk space. Because only the space difference to the origin snapshot is allocated.

I found no option in the vSphere respective the Webclient to create one, but PowerCli provides this. Lets do it.
Connect to vCenter

Connect-VIServer vcenter.subdomain.domain.local

Define the virtual machine which is the origin of the linked clone, and the Snapshotname on which the linked clone based.

$sOriginVM="mastervm"
$sOriginVMSnapshotName="mastervm_linkedclone_snap"

Continue reading VMware vSphere: Create a linked clone with Powercli

VMware ESXi: Setting up NAT with a linux virtual machine

Hi,

other than the Workstation, VMware ESXi does not has the functionality to “NATting” virtual machines network traffic into a public network.

My approach to implement NAT is a virtual machine with a slimmed-down (Debian) Linux.

These virtual machine has two network interfaces. The first interface is connected to a vSwitch called “Public LAN” with access to the public LAN, the second interface is connected to a vSwitch which has no physical adapter attached to and is called “NAT Network”. On the NAT interface a DHCP server is assigning IP Addresses.
Continue reading VMware ESXi: Setting up NAT with a linux virtual machine

VMware ESXi: Error while cloning a Disk to 2gbsparse format

Hi,

since ESXi 5.1 it is no more possible to create or clone a disk by using the 2gbsparse disk format. Because it is not supported as a VMFS vitual disk format. This disk format is only part of the Desktop Products of VMware, like VMware Workstation or VMware Player.

However in earlier version the command line tool vmkfstools could create disks and clone disks in such format. If you try this in ESXi 5.1 or later version a

~ # vmkfstools -i Disk.vmdk clone.vmdk -d 2gbsparse
“The system cannot find the file specified.”

error occurs.
 
Continue reading VMware ESXi: Error while cloning a Disk to 2gbsparse format

VMware ESX, Workstation: Increase screen resolution on Windows Guests

Hi,

to set a higher graphic resolution in Windows guest operating system do the following steps:

Decide which resolution should be available, in this example 1680×1050 and calculate Video RAM size (default Video RAM for Workstation 16777216, for ESX 4194304):
Continue reading VMware ESX, Workstation: Increase screen resolution on Windows Guests