VMware Cloud Community
shunewae
Contributor
Contributor
Jump to solution

ESXi5 installed in storage

When i'm installing ESXi5 on deivce connected to storage, the OS is the older one after the installation and reboot finished. At beginning, i doubt its the problem of hard disk, but then, i installed successfully if i disconnected the storage from device accidentally.

So i'm much sure that the ESXi5 is intalled in storage but not in hard disk. But how to slove this problem beside to disconnect storage from device?

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

In this case you may need to adjust your script to make sure the correct disk is selected for installation. If you have trouble finding a solution, you may attach the script to your next post. In addition to this please provide the details of your local disks/RAID controller as well as the storage you are using (vendor/model).

André

View solution in original post

0 Kudos
4 Replies
a_p_
Leadership
Leadership
Jump to solution

Do you install ESXi interactively from the CD? In this case the installer should ask you to select the disk on which to install ESXI. Do you get this selection? If not, what kind of storage system do you use and how is it connected to the ESXi host?

André

0 Kudos
shunewae
Contributor
Contributor
Jump to solution

No, I use DHCP+TFTP+NFS(script installation) and the device  is connected to storage by FC.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

In this case you may need to adjust your script to make sure the correct disk is selected for installation. If you have trouble finding a solution, you may attach the script to your next post. In addition to this please provide the details of your local disks/RAID controller as well as the storage you are using (vendor/model).

André

0 Kudos
shunewae
Contributor
Contributor
Jump to solution

Thanks, my question has been resloved by using following script in pre user-script.

%include /tmp/installdiskconfig

%pre --interpreter=busybox

## Set the the disk information where the OS installed on
drive_id=$(esxcfg-mpath --list-paths | sed -n "/^[^ ]/p" | grep -v "Fibre Channel" | grep -v "CD-ROM" | awk -F'(' '{print $2}' | awk -F')' '{print $1}' | sort | sed -n '1p')
if [ -n $drive_id ] ; then
     cat > /tmp/installdiskconfig <<EOF
# Install on the first local disk available on machine
clearpart --drives=$drive_id --overwritevmfs
install --drive=$drive_id --overwritevmfs
EOF
else
     cat > /tmp/installdiskconfig <<EOF
# Install on the first disk available on machine
clearpart --firstdisk --overwritevmfs
install --firstdisk --overwritevmfs
EOF
fi

0 Kudos