This cmdlet returns physical disk objects like basic disks and partitioned drive partitions. Dynamic disks can span multiple pieces of physical media, so they will not be returned by Get-Disk. For more information, see Basic and Dynamic Disks.
Apologies for the length, I thought it useful to include the original C struct as a comment. Also, I'm pretty new to both the fcntl and struct modules, so I may be doing something unidomatic. In anycase, run from the command-line (with root privelidges) it looks like this (I've redacted my exact serial for privacy):
In order to be able to understand what is going on here, you need to look at the #include in the original C program. This include imports the HDIO_GET_IDENTITY constant and the struct hd_driveid. I've copied the struct as a comment into the python sourcecode above, so I won't repeat it here. To find out what is going on with HDIO_GET_IDENTITY, grep the source-code for it (on Ubuntu this is at /usr/include/linux/hdreg.h. You should find something like this:
The nominal method used within scsi_id command to obtain this information is to use the output from scsi INQUIRY command to fetch VPD (vital product data) information from either page 83 (device identification) or, if that is not available, page 80 (unit serial number). In the case of vmdk based virtual disks provided to the RHEL guest, these pages are not be available until the `disk.UUID` feature is enabled within the hypervisor. So the root cause when blank output is generated from `scsi_id` for virtual disks is the lack of appropriate VPD information being provided from the hypervisor. To correct this, enable the disk.UUID feature within the VMware hypervisor by following the [steps outlined above](#STEPS).
The scsi_id code does a standard INQUIRY (A) command. This is followed by an INQUIRY of page 00 (B) which returns all available pages supported by this device. The returned list of pages includes page 80, where the serial number is located as well as page 83 where the WWID is located. Then and INQUIRY of page 80 (C) is performed, and finally INQUIRY of page 83 (D). All those complete successfully, and the WWID retrieved from the device is displayed (E) and scsi_id exits with status of 0. The WWID itself is "60060160dfc02c00ce7fabaf69999999", the "3" take leads that string is added by scsi_id to identify the source and type of scsi identifier being output. See "How are SCSI ID generated?" for more information on prefix characters and how SCSI identifiers are created.
Here the INQUIRY of page 00 (B) response as seen in data= is the same standard inquiry data as seen in the output of (A) instead of the list of pages happened with device sdb. This means this device does not support any inquiry pages at all and therefore scsi_id cannot retrieve a serial number or a WWID from the device -- the required inquiry pages that scsi_id needs are not supported by the hypervisor for these devices. No identifier is output and scsi_id exists with a status of 1. The storage configuration for this vm guest within the hypervisor needs to changed to correct this behavior such that it provides the data upon an INQUIRY IO sent to the device to retrieve pages 00, 80, and 83 is completed successfully with the expected and required data.
Serial ATA interface disk drives are designed for easy installation. With a Serial ATA interface, each disk drive has its own cable that connects directly to a Serial ATA host adapter or a Serial ATA port on your motherboard. Unlike Parallel ATA, there is no master-slave relationship between drives that use a Serial ATA interface. Because of this, there is no jumper to set to make a Serial ATA drive a master or slave on its cable, as it will be the only drive connected to that data cable.
You can use a Serial ATA drive in the same system with Parallel ATA drives as long as both interfaces are supported on the motherboard or with a host adapter. This makes it easy to add Serial ATA compatibility to your existing system without removing existing Parallel ATA disk drives.
Refer to your computer system documentation to see if your system supports Serial ATA on the motherboard and to locate the Serial ATA connector. If your system does not have a Serial ATA connector on the motherboard, you must purchase a Serial ATA host adapter that is compatible with your computer and operating system and install it with the appropriate device driver according to the host adapter manufacturer's installation instructions.
For detailed information about installing a Microsoft operating system on your new Seagate drive, refer to the Microsoft Knowledgebase Article references below:Windows 8 / 8.1Windows 7Windows Vista
A new drive is often an upgrade to an existing system. It could be additional storage or a replacement for an existing drive. In either case, the physical procedures are the same as described above. Since the operating system does not require a fresh installation, preparing your drive for use is easier. For additional storage in Windows, you can use the Disk Management utility. If you need to transfer your data (sometimes called data migration or clone) you can use the Seagate utility DiscWizard.
This section describes the XML format used to represent domains, there arevariations on the format based on the kind of domains run and the options usedto launch them. For hypervisor specific details consult the driverdocs
The root element required for all virtual machines is named domain. It hastwo attributes, the type specifies the hypervisor used for running thedomain. The allowed values are driver specific, but include "xen", "kvm","hvf" (since 8.1.0 and QEMU 2.12), "qemu"and "lxc". The second attribute is id which is a unique integer identifierfor the running guest machine. Inactive machines have no id value.
The content of the type element specifies the type of operating system tobe booted in the virtual machine. hvm indicates that the OS is onedesigned to run on bare metal, so requires full virtualization. linux(badly named!) refers to an OS that supports the Xen 3 hypervisor guest ABI.There are also two optional attributes, arch specifying the CPUarchitecture to virtualization, and machine referring to the machinetype. The Capabilities XML provides details on allowedvalues for these. If arch is omitted then for most hypervisor drivers,the host native arch will be chosen. For the test, ESX and VMWarehypervisor drivers, however, the i686 arch will always be chosen even onan x86_64 host. Since 0.0.1
Since 8.5.0, it's possible for the element to have type attribute(accepts values file, block and network) in that case the NVRAMstorage is described by a sub-element with the same syntax asdisk's source. See Hard drives, floppy disks, CDROMs.
The dev attribute takes one of the values "fd", "hd", "cdrom" or"network" and is used to specify the next boot device to consider. Theboot element can be repeated multiple times to setup a priority list ofboot devices to try in turn. Multiple devices of the same type are sortedaccording to their targets while preserving the order of buses. Afterdefining the domain, its XML configuration returned by libvirt (throughvirDomainGetXMLDesc) lists devices in the sorted order. Once sorted, thefirst device is marked as bootable. Thus, e.g., a domain configured to bootfrom "hd" with vdb, hda, vda, and hdc disks assigned to it will boot from vda(the sorted list is vda, vdb, hda, hdc). Similar domain with hdc, vda, vdb,and hda disks will boot from hda (sorted disks are: hda, hdc, vda, vdb). Itcan be tricky to configure in the desired way, which is why per-device bootelements (see Hard drives, floppy disks, CDROMs, Network interfaces,and Host device assignment sections below) were introduced and they arethe preferred way providing full control over booting order.The boot element and per-device boot elements are mutually exclusive.Since 0.1.3, per-device boot since 0.8.8
Up till here the BIOS/UEFI configuration knobs are generic enough to beimplemented by majority (if not all) firmwares out there. However, from now onnot every single setting makes sense to all firmwares. For instance,rebootTimeout doesn't make sense for UEFI, useserial might not be usablewith a BIOS firmware that doesn't produce any output onto serial line, etc.Moreover, firmwares don't usually export their capabilities for libvirt (orusers) to check. And the set of their capabilities can change with every newrelease. Hence users are advised to try the settings they use before relying onthem in production. 2b1af7f3a8