This is in various scripts and snippets, but I didn’t see it simply by itself….

People sometimes ask me how to reboot a server and boot it off a remote image via the BMC.

Dell’s BMC (that little chip that runs IPMI and other things) can speak DMTF/WSMAN/etc/etc, like just about all the servers in the world. If you have the wsmancli package installed on Linux (or the equiv on various other systems) you can simply use the wsman command and type this long line (windows users can use winrm, just search for winrm and BootToNetworkISO):

wsman invoke -a BootToNetworkISO 'http://schemas.dell.com/wbem/wscim/1/cim-schema/2/DCIM_OSDeploymentService?CreationClassName=DCIM_OSDeploymentService,SystemName=DCIM:ComputerSystem,Name=DCIM:OSDeploymentService,SystemCreationClassName=DCIM_ComputerSystem' -N root/dcim -u root -p calvin -h 10.0.0.1 -P 443 -v -j utf-8 -y basic -o -m 256 -c dummy -V  -k ShareType=0 -k ShareName=/home/zen -k ImageName=boot.iso -k IPAddress=192.168.0.2

Where:

value meaning
10.0.0.1 IP address of the BMC
-u root The IPMI/BMC username of an admin account
-p calvin The IPMI/BMC password of an admin account
192.168.0.2 IP address of the server hosting the ISO file
/home/zen The NFS or CIFS path leading to the ISO file
boot.iso Name of the ISO file
ShareType=0 0=NFS, 1=TFTP, 2=CIFS

“root” and “calvin” are the default Dell passwords for the BMC, you’ll possibly have to change those as well; 443 probably shouldn’t have to change, that’s the default port for https. The BMC has to be able to connect to the remote server as well, obviously… and you might also have to put in authentication for *that* as well; simply use more -k flags, like “-k Username=fooUser -k Workgroup=’fooGroup’ -k Password=fooPass”. You may or may not want to call DetachISOImage() after done with the boot, I think it remains staged for most of a day.

A few notes – I’ve used AVG Rescue CD, Rescatux, and other disks to good effect, but they may take some modification if your goal is a remote access. You simply need an ISO or image that will boot and mount the server’s disks or execute whatever commands you wish. Reboot again, and (almost!) no trace of what just happened, other than a couple of mins of downtime… by the time the operators notice it’ll long be over.

The way this all works is that the BMC does a normal NFS/CIFS/etc mount of the remote system to the Linux filesystem on the BMC (unless you’re logged into the BMC you can’t see this, but if you’re on the remote ISO server you can see the mount requests by sniffing packets/logs/whatever.) It then uses its USB trick to mount the filesystem as a local USB device; changes the boot order to ensure that the new device is #1 in the boot sequence, and then reboots the host server.

Reference – the Dell(tm) Lifecycle Controller 2 Web Services Interface Guides. This also works for Vflash, via the DownloadISOToVFlash() method. While DMTF is supposed to be fairly general, all the vendors hack theirs up, so everyone has their own way of doing this… if I run across more servers I may doc those as well, but it’s a moving target, blech.

Thanks to some pals who helped me dig up some ISOs to test this out on.

Sorry, the comment form is closed at this time.

   
© 2012 trouble Suffusion theme by Sayontan Sinha