I tried to install webmin by following the instructions on http://www.webmin.com/rpm.html but I got the following error messages:
# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.730-1.noarch.rpm
# wget http://www.webmin.com/jcameron-key.asc
# rpm -Uvh webmin-1.730-1.noarch.rpm
Preparing… ################################# [100%]
Unable to identify operating system
error: %pre(webmin-1.730-1.noarch) scriptlet failed, exit status 2
error: webmin-1.730-1.noarch: install failed
To fix the problem, I did the following (thanks to kayvan):
# mv /etc/redhat-release /etc/redhat-release.bak
# echo “Fedora release 20 (Heisenbug)” > /etc/redhat-release
# rpm -Uvh webmin-1.730-1.noarch.rpm Preparing…
# ################################ [100%]
Operating system is Fedora Linux
Updating / installing…
# ################################# [100%]
Webmin install complete. You can now login to http://pidora.local:10000/
as root with your root password.
# mv -f /etc/redhat-release.bak /etc/redhat-release
Webmin should work fine. It will only report the version to be “Fedora Linux 20”
You should be able to live with that!
You may want to use the current version of webmin:
Using the Webmin YUM repository is another alternative to keep things clean and automatically updated.
If you like to install and update Webmin via RPM, create the /etc/yum.repos.d/webmin.repo file containing :
name=Webmin Distribution Neutral
You should also fetch and install my GPG key with which the packages are signed, with the commands :
rpm –import jcameron-key.asc
You will now be able to install with the command :
yum install webmin
All dependencies should be resolved automatically.
Posted in Linux, pidora, Raspberry Pi, Recent Posts and tagged Linux, pidora, Raspberry Pi by Stan with .
# ex40.sh (burn-cd.sh)
# Script to automate burning a CDR.
SPEED=10 # May use higher speed if your hardware supports it.
# DEVICE=/dev/cdrom For older versions of cdrecord
DEFAULTDIR=/opt # This is the directory containing the data to be burned.
# Make sure it exists.
# Exercise: Add a test for this.
# Uses Joerg Schilling’s “cdrecord” package:
# If this script invoked as an ordinary user, may need to suid cdrecord
#+ chmod u+s /usr/bin/cdrecord, as root.
# Of course, this creates a security hole, though a relatively minor one.
if [ -z “$1” ]
# Default directory, if not specified on command-line.
# Create a “table of contents” file.
ls -lRF $IMAGE_DIRECTORY > $IMAGE_DIRECTORY/$CONTENTSFILE
# The “l” option gives a “long” file listing.
# The “R” option makes the listing recursive.
# The “F” option marks the file types (directories get a trailing /).
echo “Creating table of contents.”
# Create an image file preparatory to burning it onto the CDR.
mkisofs -r -o $IMAGEFILE $IMAGE_DIRECTORY
echo “Creating ISO9660 file system image ($IMAGEFILE).”
# Burn the CDR.
echo “Burning the disk.”
echo “Please be patient, this will take a while.”
wodim -v -isosize dev=$DEVICE $IMAGEFILE
# In newer Linux distros, the “wodim” utility assumes the
#+ functionality of “cdrecord.”
echo “Exit code = $exitcode”
Posted in Linux, Recent Posts and tagged Burning iso image by Stan with .
I have chosen to use VsFTPD instead of ProFTP for it’s simple configuration but robust high load capability.
This steps can be implemented on any debian based linux systems like ubuntu, Rasbian and very many others. I have RaspBMC (an XBMC Media Centre) running on my Rasberry Pi.
STEP 1: Installation
As in any other debian based Linux systems, the installation of the FTP server can be done simply by executing the following command:
$ sudo apt-get install vsftpd
This command installs and start the ftp server automatically.
This is an example of the VsFTPD configuration file (/etc/vsftpd.conf):
——– start ———–
ftpdbanner=Raspbmc FTP Server
——– stop —————
STEP 2: Configuration
The ftp server can either be configured in stand-alone or normal mode. By default the VsFTPD automatically configured as stand-alone. This means that the server have its own startup scripts called daemon. In that case, the VsFTPD daemon can be started by executing “/etc/init.d/vsftpd start”. The server in stand-alone mode can further be managed with stop, restart, status and reload.
The other approach to configure the VsFTPD server is to use “xinetd” to start the FTP service in normal mode. This helps to keep the FTP service alive. In order to achieve this objective, we first need to install the “xinetd” super server by executing the following command:
$ sudo apt-get install xinetd
The above command will install and start the xinetd super server on your system automatically. However, there is the chance that “xinetd” is already installed on your system. In that case, please skip the step above.
Next, create a file called vsftpd in /etc/xinetd.d/ with the following content:
disable = no
sockettype = stream
wait = no
user = /usr/sbin/vsftpd
persource = 5
instances = 200
noaccess = 192.168.1.0/24 #use this to block any connections from this network
onlyfrom = 192.168.1.0/24 #use this to allow connections only from this network
bannerfail = /etc/vsftpd.busy
logonsuccess += PID HOST DURATION
logon_failure += HOST
Pleas alter any of these options to match your system configurations.
- server – to get the correct path to enter here, type “which vsftpd” on the terminal
- noaccess – this will block any host or hosts defined here
- bannerfail – this should the path to the file with the text to show to any blocked IP address
STEP 3: /etc/vsftpd.conf Configuration
Open the file /etc/vsftpd.conf and change
This instructs the FTP server not to open any ports but let “xinetd” control and manage the entire ports and services. In order for the normal mode to run smoothly, we need to first stop the vsftpd service by executing the following command:
$ sudo service vsftpd stop
$ sudo service xinetd reload
We have to test and confirm that the FTP server have been started in normal mode and that the port 21 is open by the following command:
$ sudo netstat -ant | grep 21
You should see this:
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
Posted in FTP, Linux, Linux Installation, VsFTP and tagged FTP Configuration, Raspberry Pi, VsFTP by Stan with .
I am NOT the original author of this article. You can find the original article here!
I recently ran into this error while trying to install Windows 2008 R2 Server 64 Bit on my corporate virtual network. Windows 2003 server standard was initially installed on this same configuration. The aim of the project was to remove the Windows 2003 server and install windows 2008 R2 server on it the system. Well, I completely forgot before starting that I had to change the guest operating system type. this eventually lead to this error.
After searching a while on google, I came accross the above mentioned article. It saved my day! The question is why repeat the same thing here? Well, I decided to repeat this here for my personal reference only. It might be useful for someone else too.
Posted in Linux, Linux Installation, VMware and tagged 0x0000005d Error, linux installation, vmware by Stan with .
I sometimes want to monitor the progress of a copy or backup job on the console. The trick to do that is as follows:
while true; do something…; sleep 10; clear; done;
[tom@ns2 ~]# while true; do df- h /media/usr; sleep 10; clear; done;
What this is, it display the size of /usr partition, the used space, available space and the progress of the job in percentage. The “clear” command will make sure all these informations are shown on a single line by clearing the screen. The clear command is very cool 😉
It hope someone find this useful
Posted in Linux, Rsync and tagged copy, rsync by Stan with .
The easiert way to do this is to use ssh (Putty).
Run all commands in these steps from the ESX/ESXi command line with root access.
Ensure that you can ping and vmkping the NFS server address.
Ensure that any firewalls between the ESX host and NFS Server do not block the connection.
Ensure the access on the NFS server is set to Anonymous user, Root Access (norootsquash), and Read/Write.
Try to restore the mount with this command:
# esxcfg-nas -r
Check to see if the datastore has mounted after trying to restore it with:
# esxcfg-nas -l
If it is not mounted, try remounting it using this command:
# esxcfg-nas -a <datastore name> -o <nfs server hostname/ip> -s <mount point>
Alternatively try to add the datastore again using the vSphere client:
For security reasons RPC protocol filtering is enabled and the connection is refused. Open firewall ports on the network for RPC protocol and check the physical switch for any RPC protocol filtering.
On ESX hosts only (Does not apply to ESXi hosts):
Check ESX firewall open ports with this command:
# esxcfg-firewall -q
Note: Check the output for NFSClient. If it is not listed, proceed to step 9.
Open the NFS client firewall ports 111 and 2049 on UDP and TCP protocol either on vCenter Server or on ESX with the command:
# esxcfg-firewall –enableService nfsClient
Alternatively, modify the security policy in vSphere Client. Click Configuration > Security Profile > Properties, select NFS Client and click OK.
Note : Ensure that the ports 111 and 2049 are also open on the NFS server.
Unable to connect to NAS volume NFS4exports: Unable to mount, no VMkernel TCP stack found
Note: Do not set up NFS datastores through the vSphere Client on the ESX Server system. Unlike VMFS datastores, NFS datastores created through the vSphere Client are not recognized by Lab Manager. Such datastores conflict with the creation of NFS datastores through the Lab Manager Web console.
- Ensure the NFS server supports NFSv3 over TCP
- The NFS server must be accessible in read-write mode by all Managed Server (ESX) systems
- The NFS server must allow read-write access for the root system account
- The NFS export must be set for either no_root_squash, or chmod 1777
- Ensure NFS daemons are running on the server (“rpcinfo -p localhost” or “service nfs status” )
VMKernel must be able to mount share
- Check the VMkernel IP address:
- Using the vSphere Client, select the ESX server
- Select the Configuration tab
- Click Networking
- View the Networking diagram for the VMkernel (or click Properties, and click VMkernel in the Ports tab. If VMkernel is not listed, you must add it)
- Ensure this IP is allowed to mount the NFS share by inspecting the export list
This issue may also occur if EtherChannel is configured and an incorrect NIC teaming policy is used.
Posted in Linux, NFS and tagged network shares, nfs by Stan with .
Posted in CentOS, Linux, Linux Installation and tagged CentOS, Linux, Netinstall by Stan with .
You may want to mount a USB device (Key or media) on an ESX server to export or import files (e.g. vmdk). The problem is the USB devices shows up with “lsusb” but is not mounted properly.
The reason for this behaviour is that the ESX/ESXi 4.1 is designed for passthrough to any virtual machine on the system. As such, the usbarbitrator service will always claim external devices plug into the host using the passthrough technology to make it available for the virtual machines. To resolve this issue, the usbarbitrator must be stopped first before the external device can successfully be mounted. In the following steps, I will explain how it’s been done:
- SSH server must be running on the host (ESX/ESXi)
- PuTTY or the console of another UNIX/Linux system
1.) Stop the usbarbitrator service by running this command
2.) Disconnect and reconnect the usb device. The device might be automatically mounted under
/vmfs/volumes/NO NAME/ (just navigate here to export or import your files)
**) If not automatically mounted, use the following commands to find out where the device is connected to (e.g. /dev/sda1)
To mount the device, first create a folder
mount the device with
mount -t ext3 /dev/sda1 /ExtUSB/
3.) After using the device, run the following command to start the usbarbitrator service
We are done!
Posted in ESX, ESXi, Linux, VMware and tagged esx, esxi vmware, Linux by Stan with .
We recently updated our hardware (old ESX server) and had to export and import the virtual machines to the new server
In achieving this goal, we had to use an external USB drive to backup and transfer VMDK files from an old ESX server to the new one.
- External USB drive with enough capacity
- The drive has to be formated (preferably ext3 or ext4)
- Coffee, cigarett or anything but no alcohol 😉
Format and Mount the Drive:
- Connect the external drive to the ESX server
- Login to the server console using ssh connection (e.g putty)
- To find out where the device is connected, enter “fdisk -l” (without the quotes ” “)
Note: As seen above, a partition has been created and only need to be formated
- Format the new drive by typing these commands
mkfs.ext3 -m 1 /dev/sdb1
e2label /dev/sdb1 /ExtUSB (optional)
where sdb1 is the partition shown above and 1 for 1% of the partition for administrative purposes
for more information, type man mkfs.ext3
- Create a folder (mount point) where you want to mount the new drive (Example: mkdir /ExtUSB)
- mount -t ext3 /dev/sdb1 /ExtUSB
To make this permanet, type vi /etc/fstab and enter:
LABEL=/ExtUSB1 /ExtUSB ext3 defaults 0 0
Save the file (type :wq and press ENTER)
- mount the partition
- Check the to see that the new partition is mounted as expected by typing
Export the VM files and Logs to the external USB drive:
Vmktools is the VMware ESX Server file system management tool we used for this task. It is a program for creating and manipulating virtual disks, files systems, logical volumes and physical storage devices on the VMware ESX Server. To export or import VMDK (virtual disk) files, the command to use is ‘vmkstools’.
- Enter the following comands as it is to export the VMDK files
vmkfstools -i /vmfs/volumes/[datastore_name]/[vm_name]/[vm_name].vmdk /mnt/usb/[vm_name].vmdk -d 2gbsparse
- To also export the configuration files for the virtual machine, just copy all those files with the following extentions: *.vmx, /.log, *.nvram, *.vmxf and *.vmsd. The best way to do this, is to first zip the files in tar.gz format and then copy to the external USB drive as follows:
tar -czvf [vm_name].tar.gz *.vmx *.log *.nvram *.vmxf *.vmsd
cp [vm_name].tar.gz /mnt/usb/
Prior to importing the exported files, make sure you have created a new virtual machine (name it whatever you want). The VMDK and other files in the newly created virtual machine must be deleted to avoid conflicts with the ones to be imported. Take a look at these images to get an idea where to find these files:
Browse the Data Storage
Delete all files from the VM folder as shown above
- Enter the following comands to import the VMDK files
vmkfstools -i /[path_to_USB_mount]/[vm_name].vmdk /vmfs/volumes/[datastore_name]/[vm_name]/[vm_name].vmdk
- To also import the configuration files for the virtual machine, first extract [vm_name].tar.gz file to a folder (should be created first) and just copy all those files with the following extentions: *.vmx, /.log, *.nvram, *.vmxf and *.vmsd to /vmfs/volumes/[datastore_name]/[vm_name]/. The following comands should take care of this task:
cd ~ (change to home directory)
cp /ExtUSB/[vm_name].tar.gz VMK-Files/
tar -xzvf [vm_name].tar.gz
rm -rf [vm_name].tar.gz
cp * /vmfs/volumes/[datastore_name]/[vm_name]/
You can check to see if all files are imported as shown below:
Now, go ahead and start your VM machine. If carefully done, it should work as expected.
Posted in ESX, ESXi, Linux, VMware and tagged esx, esxi, Linux, vmware by Stan with .
Posted in Linux and tagged cd, disable, dvd, Linux, usb by Stan with .