virtual grind thoughts from the virtual world

2Mar/110

vCloud Director 1.0.1 Upgrade Fails with “cpio: chown failed – Operation not permitted”

VMware requires that the vCloud Director installation .bin file is executed as root. This file is run to perform a new installation or upgrade to an existing vCloud Director cell. I have recently run into an issue with NFS's "root squashing" feature, which prevents the upgrade from completing.

As the NFS Sourceforge page states:

Default NFS server behavior is to prevent root on client machines from having privileged access to exported files. Servers do this by mapping the "root" user to some unprivileged user (usually the user "nobody") on the server side. This is known as root squashing. Most servers, including the Linux NFS server, provide an export option to disable this behaviour and allow root on selected clients to enjoy full root privileges on exported file systems.

Unfortunately, an NFS client has no way to determine that a server is squashing root. Thus the Linux client uses NFS Version 3 ACCESS operations when an application is running on a client as root. If an application runs as a normal user, a client uses it's own authentication checking, and doesn't bother to contact the server.

If you are not using the "no_root_squash" option on your NFS exports on your NFS server, you will receive the error "cpio: chown failed - Operation not permitted". This option is needed since the /opt/vmware/cloud-director/data/transfer directory on the vCloud Director cell is actually mounted to your NFS server.

Once you enable the no_root_squash option on your NFS exports, such as:

/export/dir hostname(rw,no_root_squash)

...you will be able to write to the directory as root and the upgrade will complete.