15.04.2013 Views

Guia do usuário do HP iLO 4 - Business Support Center - HP

Guia do usuário do HP iLO 4 - Business Support Center - HP

Guia do usuário do HP iLO 4 - Business Support Center - HP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• servername — Obrigatório. O nome de host ou o endereço IP <strong>do</strong> servi<strong>do</strong>r Web.<br />

• port — Opcional. Um servi<strong>do</strong>r Web em uma porta não padrão.<br />

• path — Obrigatório. O arquivo de imagem que está sen<strong>do</strong> acessa<strong>do</strong>.<br />

• helper-script — Opcional. O local <strong>do</strong> script auxiliar nos servi<strong>do</strong>res Web <strong>do</strong> IIS.<br />

Para obter informações detalhadas sobre os coman<strong>do</strong>s INSERT_VIRTUAL_MEDIA, consulte o<br />

<strong>HP</strong> <strong>iLO</strong> 4 Scripting and Command Line Guide (<strong>Guia</strong> de linha de coman<strong>do</strong> e de script <strong>do</strong> <strong>HP</strong> <strong>iLO</strong> 4).<br />

Aplicativo auxiliar de amostra de Mídia virtual<br />

O seguinte script Perl é um exemplo de um aplicativo auxiliar CGI que permite gravações de<br />

disquete em servi<strong>do</strong>res Web que não podem realizar gravações parciais. Um aplicativo auxiliar<br />

pode ser usa<strong>do</strong> junto com o coman<strong>do</strong> INSERT_VIRTUAL_MEDIA para montar um disco gravável.<br />

Quan<strong>do</strong> o aplicativo auxiliar é usa<strong>do</strong>, o firmware <strong>do</strong> <strong>iLO</strong> lança uma solicitação para esse aplicativo<br />

usan<strong>do</strong> os seguintes parâmetros:<br />

• O parâmetro file contém o nome <strong>do</strong> arquivo forneci<strong>do</strong> na URL original.<br />

• O parâmetro range contém um intervalo inclusivo (em hexadecimal) que designa onde gravar<br />

os da<strong>do</strong>s.<br />

• O parâmetro data contém uma cadeia de caracteres hexadecimal que representa os da<strong>do</strong>s<br />

a serem grava<strong>do</strong>s.<br />

O script auxiliar deve transformar o parâmetro file em um caminho relativo a esse diretório de<br />

trabalho. Isso pode envolver prefixar esse parâmetro com "../" ou transformar um caminho de<br />

URL com alias no caminho real <strong>do</strong> sistema de arquivos. O script auxiliar exige acesso de gravação<br />

ao arquivo de destino. Arquivos de imagem de disquete devem ter as permissões apropriadas.<br />

Exemplo:<br />

#!/usr/bin/perl<br />

use CGI;<br />

use Fcntl;<br />

#<br />

# The prefix is used to get from the current working directory to the<br />

# location of the image file that you are trying to write<br />

#<br />

my ($prefix) = "c:/inetpub/wwwroot";<br />

my ($start, $end, $len, $decode);<br />

my $q = new CGI(); # Get CGI data<br />

my $file = $q->param('file'); # File to be written<br />

my $range = $q->param('range'); # Byte range to be written<br />

my $data = $q->param('data'); # Data to be written<br />

#<br />

# Change the file name appropriately<br />

#<br />

$file = $prefix . "/" . $file;<br />

#<br />

# Decode the range<br />

#<br />

if ($range =~ m/([0-9A-Fa-f]+)-([0-9A-Fa-f]+)/) {<br />

$start = hex($1);<br />

$end = hex($2);<br />

$len = $end - $start + 1;<br />

}<br />

Usan<strong>do</strong> a Mídia Virtual <strong>do</strong> <strong>iLO</strong> 175

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!