Right now I don't think there is a way to get the BIOS boot drive setting with the SDK. The other issue is do you want the Boot Disk or the OS Partition/Disk? For the OS Partition/Disk, you will have to query the GuestOS through VIX or other interface and then correlate that to the SCSI Disk Device in your Virtual Inventory.
If you just need the boot drive, you can make the assumption that it is SCSI 0:0. This would only be changed by manual user intervention through the VM BIOS (F2 at startup). While this assumption isn't guaranteed, it's likely to be accurate most of time. I vaguely recall some talk around adding features to control the device boot order of the VM's BIOS through automation. If this gets added it would be possible to detect and modify the boot order through a script or program.
Something like the following would let you determine the device node and vmdk file location:
use strict;use warnings;use VMware::VIRuntime;Opts::parse();Opts::validate();Util::connect();my $vm_views = Vim::find_entity_views( view_type => "VirtualMachine",properties => [ 'name', 'config.hardware.device' ] );foreach my $vm ( @{$vm_views} ) {my $vmname = $vm->name;my $vm_devices = $vm->{'config.hardware.device'};foreach my $vm_disk ( grep $_->isa('VirtualDisk'), @{$vm_devices} ) {my $controller_key = eval { $vm_disk->controllerKey };my $unit_number = eval { $vm_disk->unitNumber };my $controller_bus_number = get_controller_bus_number( controller_key => $controller_key,vm_devices => $vm_devices );my $vm_disk_file_name = eval { $vm_disk->backing->fileName };my $vm_disk_label = eval { $vm_disk->deviceInfo->label };my $vm_device_node = sprintf("SCSI (%s:%s) %s", $controller_bus_number,$unit_number, $vm_disk_label );printf("%s: %s, %s\n", $vmname, $vm_device_node, $vm_disk_file_name);}}sub get_controller_bus_number {my (%args) = @_;my $controller_key = delete($args{controller_key});my $vm_devices = delete($args{vm_devices});my @controllers = grep $_->key eq $controller_key, @{$vm_devices};# Should only be one controller since it is a key value in the VI SDKmy $bus_number = eval { $controllers[0]->busNumber };return $bus_number;}perl vm-scsinode.pl --username=administrator --server=172.16.110.10Test: SCSI (0:0) Hard disk 1, [datastore1] Test/Test.vmdkTest: SCSI (1:0) Hard disk 2, [datastore1] Test/Test_1.vmdkIn my test output, I'd make the assumption that Hard disk 1 is the boot disk based on the SCSI Bus and Logical Unit (0:0). If you had to correlate that back to the GuestOS's view of the disks, it would be the same SCSI Bus and Logical Unit values.
You'll notice this basically recreates the same string you'd see in "Edit Settings" on a VM when looking at its disk labels through vCenter's UI.