Category Archives: Virtualisation

All about virtualisation. VirtualBox, VMware Workstation, ESXi and vCenter, qemu

VMware: Virtual maschine LAN Interface disconnected

Last week a customer had the problem that a virtual machine uses a NAT Network connection but the NIC Adapter in the virtual machine is in disconnected state.

C:\Users\Administrator>ipconfig

Windows IP Configuration

Ethernet adapter LAN-Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : localdomain

Continue reading VMware: Virtual maschine LAN Interface disconnected

Advertisment to support michlstechblog.info

VMware: Changing network settings in VMware Player 5

In previous version of VMware Player the NAT and the “Host only” network settings could be change by vmnetcfg.exe.

Since VMware Player 5 this tools is no longer a part of the installation, but vmnetui.dll is available. You can start the virtual network editor using the Windows rundll32.exe.

Open a command line and change  to the VMWare Player installation directory. This command bring the virtual network editor back:

rundll32.exe vmnetui.dll VMNetUI_ShowStandalone

Michael

VMware: A (incomplete) list with some PowerCLI Scripts for vSphere

Hi,

for VMware vSphere a very powerfull Scripting engine is available which is called PowerCLI. PowerCLI based on, the also very powerfull, Microsoft powershell.

The Basics

Get the PowerCLI package from the VMware website and install it on your Windows Computer or on the VMware vCenter Server. Ok, lets start.

Open  PowerCLI Command prompt by clicking “VMware vSphere PowerCLI (32-Bit)” Icon. Note: The 64Bit Version(both the 32Bit and 64Bit versions were installed) did support all commands. For example when you clone a computer by the New-VM Command-Let and specifiy the OSCustomizationSpec parameter the follwing error was thrown.

New-VM -VM "ComputerTemplate" -Location "Windows Clients" -ResourcePool Resources -OSCustomizationSpec "Windows XP Client"  -Datastore esxdatastore0 -Name "COMPUTER1"
New-VM : 26.06.2013 23:37:42    New-VM         is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

However start the 32Bit Version :-). First you have to connect to your vCenter. If your Windows Account, with which you logged on, have the appropriate rights to connect to vCenter simply call

Connect-VIServer NameOfYourvCenter.domain.com

If logon successeds 2 global object variables are set to which all following commands refers to.

global:DefaultVIServer         NameOfYourvCenter.domain.com
global:DefaultVIServers        {NameOfYourvCenter.domain.com}

Alternatively you can assign the vCenter Object to a variable and append the -Server <VIServer[]> parameter to each command. This is usefull if you have multiple instances of vCenter.

$oSecondVCenter=Connect-VIServer NameOfYourvCenter.domain.com
Set-Vm -VM "OldName" -name "New-Name" -Server $oSecondVCenter

By default, all command are executed synchronous. This means the command prompt returned not until the tasks is finished. To start jobs asynchronus append the -RunAsync parameter to each command line.

Lets start with some example scripts
Continue reading VMware: A (incomplete) list with some PowerCLI Scripts for vSphere

VMware ESXi: A (incomplete) list of host commands Part 3

Hi,

part 3 of my (incomplete) list of the esx cli.

ESXi Advanced Kernel Settings/Parameters

Get all

esxcli system settings advanced list

Set one, i.e. disable the shell respectively ssh warnings

esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1

ESXi Kernel modules

List loaded kernel modules

vmkload_mod  -l

Get a list of all enabled kernel modules

esxcfg-module -q
Continue reading VMware ESXi: A (incomplete) list of host commands Part 3

VMware ESXi: A (incomplete) list of host commands Part 2

Hi,

here is part 2 of my (incomplete) list of ESXi shell commands

Managing virtual machines

First get the VMID of the vm you want to manage, you need this ID in the following commands

vim-cmd vmsvc/getallvms

Vmid  Name File Guest OS  Version  Annotation
36 .......................................

Power On
vim-cmd vmsvc/power.on 36

Power Off (Soft)

vim-cmd vmsvc/power.off 36

Power Off (Hard)

get the world ID of the virtual machine

esxcli vm process list

TestComputer

World ID: 1625788
Process ID: 0
VMX Cartel ID: 1625786
UUID: 56 4d 9e d3 8b ce ab 59-9b 22 ac 87 40 6c 48 c3
Display Name: TestComputer

And kill them

esxcli vm process kill -t [soft,hard,force] -w

esxcli vm process kill -t hard -w
1625788

Reboot a virtual machine
Continue reading VMware ESXi: A (incomplete) list of host commands Part 2