Lievenvw’s Weblog

Entries tagged as ‘vmware’

VMware Server.msi is not permitted due to an error in software restriction policy processing. The object cannot be trusted.

June 2, 2009 · 1 Comment

You try to install a Vmware Server 2, and get an error claiming that software restriction policies prohibit this installation.

In the eventvwr (application log) you find an entry like this :

The installation of C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\{AF08C71F-F822-4416-87A9-2BBF5A8A5F12}~setup\VMware Server.msi is not permitted due to an error in software restriction policy processing. The object cannot be trusted.

Solution : KB9253326

http://support.microsoft.com/kb/925336

Categories: Windows · vmware
Tagged: ,

How to configure VMWARE networking from the Service console command line.

January 28, 2009 · 2 Comments

How to configure VMWARE networking from the command line.

see vmware KB 1000258
1.
Ensure the network adapter you want to use is currently connected

[root@server root]#  esxcfg-nics –l
Name    PCI      Driver      Link Speed    Duplex Description
vmnic0  06:00.00 tg3         Up   1000Mbps Full   Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet
vmnic1  07:00.00 tg3         Up   1000Mbps Full   Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet

Up indicates that the network adapter is available and functioning.

2.
List the current virtual switches

[root@server root]# esxcfg-vswitch –l
Switch Name    Num Ports   Used Ports  Configured Ports  Uplinks
vSwitch0       32          3           32                vmnic0

PortGroup Name      Internal ID    VLAN ID  Used Ports  Uplinks
VM Network          portgroup2     0        0           vmnic0

In the above example, there exists a virtual machine network named “VM Network” and no Service Console portgroup. For illustration, we will create a new virtual switch and place the service console portgroup on it.

3.
Create a new virtual switch:

[root@server root]# esxcfg-vswitch –a vSwitch1

4.
Create the Service Console portgroup on this new virtual switch:

[root@server root]# esxcfg-vswitch –A “Service Console” vSwitch1

Because there is a space in the name we chose (Service Console), we must enclose it in quotation marks.

5.
Uplink vmnic1 to the new virtual switch:

[root@server root]# esxcfg-vswitch –L vmnic1 vSwitch1

6.
If you need to assign a VLAN, use the command:

[root@server root]# esxcfg-vswitch -v <VLAN> -p “Service Console” vSwitch0

where <VLANID> is the VLAN number. A zero here specifies no VLAN.

7.
Verify the new virtual switch configuration:

[root@server root]# esxcfg-vswitch –l

Switch Name    Num Ports   Used Ports  Configured Ports  Uplinks
vSwitch0       32          3           32                vmnic0

PortGroup Name      Internal ID    VLAN ID  Used Ports  Uplinks
Service Console     portgroup5     0        1           vmnic0

Switch Name    Num Ports   Used Ports  Configured Ports  Uplinks
vSwitch1       64          1           64                vmnic1

PortGroup Name      Internal ID    VLAN ID  Used Ports  Uplinks
Service Console     portgroup14    0        1           vmnic1

8.
Create the vswif (Service Console) interface. For example:

[root@server root]# esxcfg-vswif –a vswif0 –i 192.168.1.10 –n 255.255.255.0 –p “Service Console”
[‘Vnic’ warning] Generated New Mac address, 00:50:yy:yy:yy:yy for vswif0

Nothing to flush.

9.
Verify the configuration:

[root@esx]# esxcfg-vswif –l
Name     Port Group          IP Address    Netmask          Broadcast      Enabled   DHCP
vswif0   Service Console     192.168.1.10  255.255.255.0    192.168.1.255  true      false

10.
Verify the networking configuration on the ESX Server host. See Verifying ESX Server host networking configuration on the service console (1003796) .

Categories: vmware
Tagged:

power on virtual machine hangs at 0%

October 7, 2008 · Leave a Comment

What if a task submitted from the Virtual infrastructure client hangs ?  Reboot the vmware management service with this command :

service mgmt-vmware restart

Categories: vmware
Tagged:

howto resize a disk in Vmware ESX

October 7, 2008 · 2 Comments

There are multiple ways to resize or enlarge a disk in Vmware ESX.

One way would be by using the vmware converter.  Easy!  This enlarges your disk both on the ESX as on Windows.

If you’re using ESX 3.5, you can resize the disk using the VI client, while the VM is online!  After this, you still have to resize the disk in Windows.  (or *nix.)

If you’re using a previous version of ESX, you can resize the disk with this command.

  • vmkfstools –X 20000M /vmfs/volumes/volumename/machinename/xxx.vmdk
    where 20000M is the new size, not the amount you’re adding!

After this you still have to resize the volume by using a disk management / partition utility.  You could also boot with Bartpe and use diskpart, or add the disk to another VM, and run diskpart from there.

  • diskpart
  • list volume
  • select volume X (x being the volume)
  • extend

However you cannot resize the active boot volume.  In this case, boot with a BartPE cd of add the disk to another machine).

Another way is to resize the disk with vmkfstools, as described above, and then resize the disk in windows using extpart (tool from dell).  works on VM’s http://ftp.dell.com/app/ExtPart.exe

Another solution, would be to resize the disk with vmkfstools, and then resize the disk with Gparted.  You can download a bootcd here : http://gparted.sourceforge.net/

Doesn’t matter how you do it, just always take a good backup!!!!

Categories: vmware
Tagged: , ,

Howto get a list of port groups in VMWARE

October 7, 2008 · Leave a Comment

I recently added an article on how to change the ipaddress of the service console.

But what if the service console has another name then service console?

you can get a list of all port groups by typing this command :

esxcfg-vswitch -l

Categories: vmware
Tagged: , ,

enable SSH on ESXi

October 3, 2008 · Leave a Comment

  • On the ESXi console press alt F1
  • you will see no prompt or whatever, just type unsupported
  • Enter your root password
  • at the prompt type vi /etc/inetd.conf
  • search with pressing / for a line that starts with #ssh
  • remove the #.  This can be done by pressing x when you’re on the character #
  • save the file by typing :wq!
  • restart the server

with thanks to the great post on yellow-bricks.com

Categories: vmware
Tagged:

vmware converter needs the eventlog service to be running

September 24, 2008 · Leave a Comment

I was P2Ving a Windows 2000 machine (yes, i know), and the Vmware Converter tool kept on asking to push the vmware converter agent.

Turned out, my client had disabled the eventlog service.  Just make sure the eventlog service is running before you do a P2V with the vmware converter.

According to Vmware only the following services need to be running for a P2V :

  • Workstation
  • Server
  • TCP/IP NetBIOS Helper

Categories: vmware
Tagged: , ,

Unable to determine Guest Operating System in vmware converter

September 22, 2008 · Leave a Comment

If you’re trying to restore / import a virtual machine with the vmware converter, and you get the error

“Unable to determine Guest Operating System”, have a look at your vmware converter logs.

if you can find something like this in your logs

[#7] [2008-09-22 10:42:15.816 'App' 632 verbose] [,0] DISKLIB-LINK  : “scsi0-0-0-nameofyourvmdk.vmdk” : failed to open (The system cannot find the file specified).
[#7] [2008-09-22 10:42:15.816 'App' 632 verbose] [,0] DISKLIB-CHAIN : “scsi0-0-0-nameofyourvmdk” : failed to open (The system cannot find the file specified).

then an easy fix is just to rename your vmdk file, append scsi0-0-0- to the beginning of the filename.

Categories: vmware
Tagged:

howto change the ipaddress of an ESX server from the server console

September 21, 2008 · Leave a Comment

from the service console

  • login with or su to root
  • esxcfg-vswif -d vswif0
    this will delete the existing vswif0, will give an error about nothing to flush
  • esxcfg-vswif -a vswif0 -p Service\ Console -i xx.xx.xx.xx -n 255.255.255.0 -b xx.xx.xx.255
    replace the xx after -i with the new ipaddress, and the xx after -b with the broadcast address.  So not the default gateway, but the broadcast address!
    example: esxcfg-vswif -a vswif0 -p Service\ Console -i 192.168.1.22 -n 255.255.255.0 -b 192.168.1.255
  • for the default gateway
    edit the file /etc/sysconfig/network .  You can edit this file with vi or nano (I prefer nano).
  • after that, reboot the ESX.  You can already connect to the ESX without rebooting, but virtual center reacts funny without a reboot.  Or connect to virtual center and check the network configuration :)

Categories: vmware
Tagged: , ,

troubleshoot P2VError SNAPSHOT_FAILURE(-1) when doing a P2V with vmware converter

September 16, 2008 · Leave a Comment

Possible fixes for Windows XP and Windows 2003

  • XP and Windows 2003 : check the volume shadow copy service in services

Possible fixes for Windows 2000

  • Upgrade vmware converter to latest version
  • try not resizing the disks
  • run a chkdsk
  • install the converter with a local admin account on the host you want to P2V
  • defragment
  • ignore pagefile or do not ignore pagefile
  • deinstall other imaging tools (ultraback, acronis,…)
  • if all else fails, use another imaging tool

investigate the logfiles on both the server running vmware converter as on the target!!!

for example i found this in a failled converter log :

[#2] [2008-09-24 14:29:53.625 'App' 2824 verbose] [snapshotVolumeFactory,148] Creating snapshot using vsnap
[#2] [2008-09-24 14:29:53.625 'App' 2824 verbose] [snapshotVolumeVSNAPWin32,124] Vsnap does not have admin rights

=> in this case, uninstalling the converter, and pushing it again with a local admin fixed this.

Categories: vmware
Tagged: ,

vmware announced virtual datacenter os

September 15, 2008 · Leave a Comment

The virtual datacenter OS enables a dramatically simpler and more efficient model of computing that meet customers’ needs. In this new model customers define the desired outcomes and the computing infrastructure guarantees these outcomes precisely. For example, IT professionals would like to   provision an application, specify the application service levels, response time, security protection, and availability level– and the infrastructure should deliver and assure these service levels, at the lowest possible cost with minimal maintenance effort required.

There is a nice post about it @ yellowbrick.com

  1. Synchronization and a single-console view of inventory, configuration, roles and permissions between multiple vCenter instances with vCenter Linked Mode.
    So no more maintaining and configuring several VC’s, just link ‘em up!
  2. Monitoring and automated remediation of VMware ESX physical host configurations for compliance with standard baseline profiles.
    This is the future, real plug and play, define your ESX host once and just roll it out! I’m starting to see the big picture with ESXi… no more installing at all, just plug it in!
  3. Paravirtualized storage device enables over 200,000 i/o operations per second.
    High i/o servers? No problem…
  4. Distributed Switch simplifies the setup and change of virtual machine networking.
    A single point of administration for your vSwitches, or should I say dSwitches in this case…
  5. Network VMotion enables network statistics and history to travel with a virtual machine as it moves from host to host for better monitoring and security.
  6. Third party virtual switches plug into virtual networks and deliver value added network monitoring, security and QoS.
    So this would be that Cisco vSwitch that everybody was talking about these last couple of days?
  7. VMware Fault Tolerance, a groundbreaking new product provides zero downtime, zero data loss and availability to all applications against x86 hardware failures without the cost and complexity of hardware or software clustering solutions.
    No more need for any  other way of clustering, zero data loss, no more down time!
  8. vStorage Thin Provisioning enables users to reduce storage required for virtual environments by up to 50% by allocating storage only as required while providing the reporting and alerting capabilities needed to track actual usage.
    Besides power, rack space and cooling, save on storage as well!
  9. vStorage Linked Clones reduce the storage required for virtual machines by sharing common OS images while still retaining user specific profile and application data.
    Think about rapid deploying a 1000 VDI desktops… and saving on disk space.
  10. Virtual machines increase in size from 4 way to 8 way SMP, from 64 GB to 256GB of RAM, enabling even the largest, most resource intensive applications to run on  VMware.
  11. Hot add of virtual CPU, memory and network devices enables applications to scale seamlessly without disruption or downtime.
    No more downtime.
  12. vCenter Data Recovery provides quick, simple and cost effective backup and recovery for all applications through:
    Agentless disk based back up and recovery of virtual machines, Incremental backups and dedupe to save disk space, vCenter – integrated virtual machine level or file level restore.
    Doing backups and restores from the same console you are already used to, VirtualCenter!
  13. vApp turns new and existing applications into self-describing and self-managing entities. vApp leverages OVF, an open industry standard, to specify and encapsulate all components of a multi-tier application as well as the operational policies and service levels associated with it. Just like the UPC bar code contains all information about a product, the vApp gives application owners a standard way to describe operational policies for an application which the Virtual Datacenter OS can automatically interpret and execute.

So basicly, downtime is a thing of the past?

Categories: vmware
Tagged: , ,

choosing a blocksize when creating VMFS datastores

September 9, 2008 · Leave a Comment

When you create a VMFS datastore on your VMware ESX servers many administrators select the default 1MB block size without knowing when or why to change it. The block size determines the minimum amount of disk space that any file will take up on VMFS datastores. So an 18KB log file will actually take up 1MB of disk space (1 block) and a 1.3MB file will take up 2MB of disk space (2 blocks). But the block size also determines the maximum size that any file can be, if you select a 1MB block size on your data store the maximum file size is limited to 256GB. So when you create a VM you cannot assign it a single virtual disk greater then 256GB. There is also no way to change the block size after you set it without deleting the datastore and re-creating it, which will wipe out any data on the datastore.

Because of this you should choose your block size carefully when creating VMFS datastores. The VMFS datastores mainly contain larger virtual disk files so increasing the block size will not use all that much more disk space over the default 1MB size. You have the following choices when creating a datastore:

• 1MB block size – 256GB maximum file size
• 2MB block size – 512GB maximum file size
• 4MB block size – 1024GB maximum file size
• 8MB block size – 2048GB maximum file size

Besides having smaller files use slightly more disk space on your datastore there are no other downsides to using larger block sizes. There is no noticeable I/O performance difference by using a larger block size. When you create your datastore, make sure you choose your block size carefully. 1MB should be fine if you have a smaller datastore (less than 500GB) and never plan on using virtual disks greater then 256GB. If you have a medium (500GB – 1TB) datastore and there is a chance that you may need a VM with a larger disk then go with a 2MB or 4MB block size. For larger datastores (1TB – 2TB) go with a 4MB or 8MB block size. In most cases you will not be creating virtual disks equal to the maximum size of your datastore (2TB) so you will usually not need a 8MB block size.

So remember, choose carefully, once you create your datastore there is no changing it later.

read more here

Categories: vmware
Tagged: ,

how to change the blocksize of a vmfs file system

September 9, 2008 · Leave a Comment

vmkfstools --createfs vmfs3 --blocksize 8M vmhba0:0:0:3

however this will destroy all data, so you might just recreate the volume

Categories: vmware
Tagged: ,