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 .
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 .
SSH in ESXi 4.0 is by default disabled. The following steps illustrate how to enable the SSH service in ESXi 4.0 server. Steps 1-3 are needed ONLY if you just want to access the ESXi console and whereas, steps 4-6 additionally show you how to enable SSH in ESXi server.
1.) On the ESXi server keyboard, press ALT-F1 to access the console window.
2.) Enter unsupported and press Enter. Note that you will not see the text typed in.
3.) If the unsupported text was typed in correctly, you should see the Tech Support Mode warning and a password prompt. Enter the root password and press Enter
4.) You should now be able to see the prompt ~#. Type vi /etc/inetd.conf in the console to edit the file.
5.) Search in the file for line that begin with #ssh and remove the #. Save the file afterwards. Just in case you’re new to the vi editor, move the cursor down to the lines that begin with #ssh and press “i” key for insert. Move the cursor over one space and then hit the backspace to delete the #. Press the ESC key to escape the insert mode. Type :wq and Enter to save the file and exit vi editor.
6.) You can either restart the host or restart the inetd process after closing the vi editor. To restart inetd process, type ps | grep inetd on the console to determine the inetd process ID. The output should look like this:
1234 1234 ZeusBox inetd (This clearly shows that the process ID is 1234).
Then, run kill -HUP
i.e. kill -HUP 1234 as in our example. Thereafter, you should be able to access the host via SSH.
Note: With some applications like WinSCP, the default encryption cipher used is AES. You will see significantly faster transfers if you change that to Blowfish.
Changing the port for SSH
To change the port for SSH, edit the file /etc/services and change the SSH port listed in the file. Save the file and repeat the step 6 above.
While it is NOT generally recommended to enable Telnet, there may be circumstances whereby it is necessary. If this is the case, the steps are the same with SSH by removing the # from the two telnet entries in /etc/inetd.conf.
You can also download an oem.tgz file which will enable SSH (and FTP). Copy the file to a datastore with the VI client and then to bootbank with the command cp /vmfs/volumes//oem.tgz /bootbank/oem.tgz and then reboot.
Enable SSH access for a non-root account
Use the following process to enable SSH access for a non-root account
1.) Login to the ESXi server using SSH or directly the console with the root account
2.) Create a new account with the following command: useradd -M -d/. This will set the home directory to / instead of /home.
3.) Set the new user password using passwd .
4.) Edit the passwd file with vi /etc/passwd. On the line for the new user, change the /bin/sh at the end of the line to /bin/ash. Save the file and exit. The example below illustrates how the file should look like after editing:
nfsnobody:x:65534:65534:Anonymous NFS User:/:/sbin/nologin
Now, you should be able to connect with SSH using the new account.
Disable SSH access for the root account
If you have created non-root accounts for SSH access you can disable root access via SSH. Edit the /etc/inetd.conf file using the initial procedure described earlier on this page and add the option -w after the -i option. The line in inetd.conf will appear similar to the one below.
ssh stream tcp nowait root /sbin/dropbearmulti dropbear ++min=0,swap,group=shell -i -w -K60
Once you have made the change, save the file and run the kill -HUP command as described above to restart the inetd process. You will now be able to login with a non-root account, but will get access denied if you use a root account. Once you have established a SSH session with your non-root account you can issue the command su – to switch to the root account.
Posted in ESX, ESXi, Linux, VMware and tagged Enabling SSH, esx, esxi, SSH, vmware by Stan with .