Tag Archives: Linux - Page 2

How to Setup Port Forwarding in VMware Workstation 9

This small walkthrough explains how to configure a port forwarding in VMware Workstation 9. The same procedure should also work for VMware Workstation 8, 7 and 6.

Why do you need port forwarding in VMware Workstation? The main purpose is to make virtual machines available on the network. You could simply use bridged networking, but sometimes NAT fits better to your requirements. If you want your virtual machine to be available no matter what network you are connected to or if you are limited in IP addresses you might have a valid use case for using NAT and thus port forwarding. Read more »

Migrate E1000 Adapter to vmxnet3 with Linux Virtual Machines

When you select Debian or Ubuntu as Operating System during the creation of virtual machines the wizard automatically selects E1000 as virtual network adapter. To get better network performance it is a best practice to change this to vmxnet3. But what if the virtual machine is already installed and running? The Adapter Type is grayed out, even when the virtual machine is powered off. How to change the Adapter Type later? Read more »

VMware vCenter Server Appliance 5.1 (vCSA) Limitations

One of my favorite developments by VMware is the vCenter Server Virtual Appliance (vCSA) as I want to get rid of as much Windows Machines as possible in my environments. It also simplifies the administration because you do not to have to configure and patch another operating system. Unfortunately the vCSA is really rare in a production environment. In my opinion this is caused by the fact that the vCenter Server Appliance always has some limitations, which are often not completely understood.

Here are the limitations from the current version of VMware vCenter Server Appliance 5.1: Read more »

Using SSH Public Key Authentication with vMA

If you are using the vSphere Management Assistant (vMA) on a daily bases you might want to simplify the login process. Public Key authentication is an authentication method that relies on a generated public/private keypair and enables the login without entering a password.

What do you need?

  • PuTTY (The well known SSH Client)
  • PuTTYgen (To genereate your SSH Key)
  • Pagent (The SSH authenticatien Agent, required for key authentication)

Read more »

Free Active Directory for your VMware Lab using Samba 4 (UCS 3.1)

Are you looking for a free alternative for a Windows based Active Directory controller? The recently published version 4 allows Samba to be an Active Directory domain controller, participating fully in a Windows Active Directory Domain. This is a great replacement for a Windows based AD Controller if you want to use Active Directory features in your Lab.

With the new release of the Univention Corporate Server 3.1 (UCS) you can deploy your Samba 4 Controller in a few minutes. The quickest way is to use the preinstalled VMware Images. Read more »

Filesystem consistent Linux Backups with VMware

Life is easy if you are running Windows because if you want to create image-based VMware Backups with Veeam Backup & Replication, Quest vRanger, PHD Virtual or any other VADP using competitor you can use VSS. Backing up Linux is much more complex as there is no equivalent. What you get are crash consistent copys from your virtual disks. After some research i couldn't find any established solution. This is the backup vendors answer (I am not talking about application aware backups as this is another problem):

veeam Backup & Replication v6
Veeam refers to the "Enable VMware tools quiescence" option. But is this true? Yes, there is this option and you can enable it. But the vmsync driver inside you virtual machine is disabled by default. So if you activate "Quiesce", nothing actually happens. The backup succeeds but all you get is an inconsistent state.
Source: User Guide

Quest vRanger 5.3.1
The solution Quest provides is only a small hint: Install VMware Tools, create freeze Scripts and enable Guest Quiescing. But who will support my custom script?
Source: Quest Solution SOL84967

PHD Virtual Backup
PHD Virtual does not provide any information about consistent linux backup. The only thing i could find was a note "Quiesce? Windows only!"

Possible Solution?

So, how to create a filesystem consistent linux backup with veeam, vRanger or PHD virtual? As every vendor is doing the same -triggering the VMware API-  the answer is identical. But first let's have a look at the basics. What do i have to do to get a consistent state? And how can i determine that my backup is consistent?

An inconsistent filesystem has to be recovered prior to mount. Using dmesg you can determin whether is was consistent or not:

Consistent filesystem mount:

root@ubuntu:~# dmesg |grep EXT
 [3.711991] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
 [7.685314] EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro

Inconsistent filesystem mount:

 root@ubuntu:~# dmesg |grep EXT
 [3.780568] EXT4-fs (dm-0): INFO: recovery required on readonly filesystem
 [3.780855] EXT4-fs (dm-0): write access will be enabled during recovery
 [4.153234] EXT4-fs (dm-0): recovery complete
 [4.178622] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
 [8.058018] EXT4-fs (dm-0): re-mounted. Opts: errors=remount-roThis test was made with the current Ubuntu 12.04 LTS.

Solution 1: Custom fsfreeze Script

The fsfreeze command suspends and resumes the access to an filesystem. After suspendig the access, the volume is in an consistent state and can be copied. Please note that fsfreeze is a recently published tool and not available on older systems.
1. Install VMware Tools

2. Create custom scripts:

root@ubuntu:~# touch /usr/sbin/pre-freeze-script
root@ubuntu:~# touch /usr/sbin/post-thaw-script

3. Edit both scripts and add your mountpoints. Your file should look like (Only one mount):

root@ubuntu:~# cat /usr/sbin/pre-freeze-script
 fsfreeze -f /
 root@ubuntu:~# cat /usr/sbin/post-thaw-script
 fsfreeze -u /

4. Make both files executable:

root@ubuntu:~# chmod 755 /usr/sbin/pre-freeze-script
root@ubuntu:~# chmod 755 /usr/sbin/post-thaw-script

5. Activate "Quiesce" Option in your backup client

During backup the backup client triggers the vCenter server to make a snapshot with the "quiesce" option. This involves both scripts to freeze and unfreeze the write IOs on the filesystem during the snapshot creation.

Solution 2: vmsync

As mentioned above VMware has created a sync driver that allows to create consistent backups. Unfortunately i couldn't find any information about this driver and it is disabled by default, giving a small explanation:

[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
creates backups of virtual machines. Please refer to the VMware Knowledge Base
for more details on this capability. Do you wish to enable this feature?

This comment emphasizes that this feature is not supported at the moment. I also couldn't find this Knowledge Base details.

To enable vmsync driver you have to enable it during the installation, or run vmware-config-tools.pl later:

root@ubuntu12:~# vmware-config-tools.pl

Making sure services for VMware Tools are stopped.

vmware-tools stop/waiting

[EXPERIMENTAL] The VMware FileSystem Sync Driver (vmsync) is a new feature that
 creates backups of virtual machines. Please refer to the VMware Knowledge Base
 for more details on this capability. Do you wish to enable this feature?
 [no] yes

After activating vmsync and "quiesce" option in your backup client you can create consistent backups. I have tested both solutions in testing environments with Ubuntu 12 and RHEL6 systems and was able to create consistent backups. But please note that this is not supported by VMware or any Backup Vendor. So please test it out before you roll it out into production.