18.08.2013 Views

Virtual Disk API Programming Guide - Documentation - VMware

Virtual Disk API Programming Guide - Documentation - VMware

Virtual Disk API Programming Guide - Documentation - VMware

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.

<strong>Virtual</strong> <strong>Disk</strong> <strong>Programming</strong> <strong>Guide</strong><br />

When performing a proxy backup of an RDM disk, you must present the same LUN ID to both the ESXi host<br />

and the proxy server. (This restriction does not apply to VMFS disk because the virtual disk library reads the<br />

VMFS header and matching UUID. But for RDM the host and proxy require the same LUN ID.)<br />

Restoring RDM disks is appropriate if the original virtual machine’s VMX file and disk mapping is no longer<br />

available, but the LUN containing the RDM is still available. In this case, the RDM image on the LUN might<br />

still be valid, so it does not need to be restored. If this is true, do not make changes to the RDM configuration<br />

during your restore operations. Instead, complete the restore process in two phases:<br />

Restore the virtual machine configuration (VMX) and system disk. This restores the virtual machine, but<br />

does not restore the RDM.<br />

Add the RDM disk to the virtual machine. After doing so, you can complete normal restore operations on<br />

the RDM disk.<br />

Alternatively, it is possible to create a virtual machine that can host the RDM disk and access its contents. After<br />

you create the virtual machine, restore its virtual machine configuration (VMX) from backup, and then restore<br />

any selected disks.<br />

Restoring the <strong>Virtual</strong> BIOS or UEFI<br />

The .nvram file stores the BIOS or UEFI customizations of a virtual machine. Usually the only important items<br />

in this file are the boot drive setting and the boot order (in the case of multiple virtual disks).<br />

Newer releases of vSphere can change the boot order using extended attribute settings, so boot order no longer<br />

must be stored in the .nvram file. However some users want to preserve a virtual machine’s serial port settings<br />

in the .nvram file, and possibly other items, so applications should back up and restore this information.<br />

To back up and restore NVRAM<br />

1 For each virtual machine, make a separate copy of the .nvram file.<br />

2 Back up each virtual machine using standard methods.<br />

3 If necessary, restore the virtual machine using standard methods.<br />

4 Overwrite the virtual machine’s .nvram file with the saved copy of the original .nvram file.<br />

IMPORTANT <strong>VMware</strong> now recommends saving the .nvram file as part of virtual machine backup, a change<br />

in recommendation since vSphere 4.1.<br />

Interfacing With <strong>VMware</strong> vSphere<br />

This section provides pointers to other vSphere programming interfaces.<br />

The VIX <strong>API</strong><br />

The VIX <strong>API</strong> is a popular, easy‐to‐use developer interface for <strong>VMware</strong> Workstation, other hosted products,<br />

and ESX/ESXi. See the <strong>VMware</strong> developer documentation for information about the VIX <strong>API</strong>:<br />

http://www.vmware.com/support/developer/vix‐api<br />

The VIX <strong>API</strong> Reference guide includes function reference pages for C++, Perl, and COM (component object<br />

model) for Microsoft C#, VBScript, and Visual Basic. Most reference pages include helpful code examples.<br />

Additionally, the vix‐api Web guide includes examples for power on and off, suspending a virtual machine,<br />

taking a snapshot, guest operations, virtual machine discovery, and asynchronous callbacks.<br />

Virus Scan all Hosted <strong>Disk</strong><br />

Suppose you want to run the antivirus software presented in “Scan VMDK for Virus Signatures” on page 49<br />

for all virtual machines hosted on a <strong>VMware</strong> Workstation. Here is the high‐level algorithm for an VIX‐based<br />

application that would scan hosted disk on all virtual machines.<br />

54 <strong>VMware</strong>, Inc.

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

Saved successfully!

Ooh no, something went wrong!