VMWare ESX: Extend Windows Server 2008 Basic volume hard disk

30 09 2008

Last week I run into free disk space problem on my Windows Server 2003 virtual machine and today on another virtual machine running Windows Server 2008 I encountered same thing again. The virtual disk was sized for 10GB and only 80MB was free.

The virtual machine is running Windows Server 2008 and Microsoft enhanced the feature for extending basic disk volumes on the fly. In my previous post I needed to add the virtual disk to another server; assign a drive letter and than run the extend option in diskpart. Within VI client extend the "Hard Disk" in the properties of the virtual machine to desired and planned size ;-) and goto Computer Management / Storage / Disk Management, right-click and Refresh.

 

2008-09-30_121633

The additional defined disk space will be shown as "Unallocated". Right-click on the C:\ volume and choose "Extend Volume". Follow the wizard and within seconds the basic volume has been extended. Thanks to VMWare ESX and Microsoft Server 2008 our lives as System Engineers is becoming easier.

As lesson learned size your virtual environment appropriate and especially the Hard Disk configuration.

 

Related links:



VMWare ESX: Virtual Hard Disk FULL

28 09 2008

I am working to prepare my virtual machine to move it from test network to production. Before bringing this virtual machine to production I wanted to run the latest updates and during the process my virtual hard disk went full ;-(. I sized the vm with 6GB of disk space and yes I run into disk space problem. 

image

VMWare ESX allows you to extend the virtual disk size on a running virtual machine. How to extend the virtual disk size? Right click the virtual machine in the VI cleint; choose settings and go to “Hard Disk 1″ and type new disk size. Click OK.

image

Example of my new  Disk Configuration in “Disk Management”. To extend the virtual disk we need to go to diskpart and extent the volume.

image 

I opened command prompt and opened diskpart; selected the volume and run extend.

The volume you selected may not be extended.
Please select another volume and try again.

My virtual hard disk was full and I was not able to extend my basic disk with the additional 2GB I added to this configuration.

image

Thanks to Kalpesh Prajapati post I was able to find a solution to my problem.

Follow these steps to extend your virtual machine basic hard disk:

  • Shutdown the virtual machine
  • Extend the virtual disk size
  • Add the harddisk to another virtual machine and start it up (second virtual machine)
  • Open command prompt and start diskpart.exe
  • list volumes and select the volume with the disk problem
  • extend the disk

image

Make sure the volume has a drive letter assigned otherwise same warning will be returned. Virtual machine was started again without any problems and two additional gigs of disk space.

Links:



VMWare ESX: Service Console IP address

12 09 2008

There are couple command line tools that VMWare ESX offers when the server has been installed with the “Service Console” mode (without i). In the following example I will explain and show how to create new vSwitch; link a physical network interface and assign a IP address for your “Service Console” management interface.

[root@LAB-ESX-01 root]# esxcfg-vswitch -a vSwitch0 –> This will create new virtual switch

[root@LAB-ESX-01 root]# esxcfg-vswitch -L vmnic0 vSwitch0 –> This will link my first physical network interface to vSwitch0

Result of the two commands:

image

As you can see vmnic0 with 1000Mbps has been associated with vSwitch0. Now I would like to have a “Service Console” port group sitting on this virtual switch.

[root@LAB-ESX-01 root]# esxcfg-vswitch -A Service\ Console vSwitch0 –> This will create new port group named Service Console. Creating new port group on a virtual switch is nothing more than assigning or defining a interface on a switch. Now I would like to assign a L3 IP address on this interface/portgroup.

[root@LAB-ESX-01 root]# esxcfg-vswif -a vswif2 -p “Service Console” -i 192.168.1.2 -n 255.255.255.0 -b 192.168.1.255 –> This will create new L3 interface which is linked to the Service Console port group with an static IP address. ESX server will generate new L2 mac address and assign this to the vswif2 interface.

[2008-09-12 13:22:21 'Vnic' warning] Generated New MAC address, 00:50:56:40:49:f4 for vswif2

Target result:

image

Just using two built-in esx configuration command line tools I was able to create and assign new service console ip address on a special physical management network interface.

Summary:

  • esxcfg-vswitch -a switch_name
  • esxcfg-vswitch -L physical_nic switch_name
  • esxcfg-vswitch -A Service\ Console switch_name
  • esxcfg-vswif -a vswif2 -p “Service Console” -i 192.168.1.2 -n 255.255.255.0 -b 192.168.1.255

Related links:



VMware ESX: SSH remote management

12 09 2008

After installing VMWare ESX 3.5 hypervisor host server I would like to manage this system with SSH remotely. Server is manufactured by Dell and the DRAC mgmt card interface is available but I prefer to use SSH. SSH is enabled by default but disallows access for root.

See my work log and screenshots how to enable this feature:

  • Login with root from the console
  • Change directory with “cd /etc/ssh”
  • Open sshd_config with “vi sshd_config”

image

  • Locate Authentication section and change “PermitRootLogin no” to “PermitRootLogin yes”; for going into edit mode type i; press ESC to exit

image

  • Type “:wq!” to save and exit the file
  • Restart the SSH deamon with “service sshd restart”

image

  • Start putty.exe or any of you favorite SSH remote management tools to connect to your ESX 3.5 server.

image

This procedure also applies to version 3.x. With this procedure I achieved to manage my ESX server remotely so I don’t need to use my remote management access card. SSH daemon also support secure file copy protocol which can be used to connect with WinSCP and download or upload any file/virtual machine to your VMFS file system.

image

Please be aware of any security implications! I enabled this kind of access because the management interface is sitting in a different VLAN than the vSwitch networks within virtual machine which are trunked amongst different networks.



CactiEZ password reset

4 09 2008

While ago I installed CactiEZ 4.0 as a virtual machine on my Hyper-V server and forget the admin password to login into the web interface. I installed the system and didn’t to finish the configuration. When you install CactiEZ and logon for the first time with username ‘admin’ you are required to change the password.

Now my access was blocked.
image 

To reset the admin password logon on the appliance console and run the following command lines:

  • mysql cacti
  • update user_auth set password(md5)=’admin’ where username=’admin’;

image

This will reset the admin password and allow you to login into the webinterface.

Related links: