Each sub-resource in a virtual machine (such as disk, cdrom, sata_adapter....) is also called a VirtualDevice. i.e, VirtualDevice = VirtualDisk, VirtualCdrom, VirtualController, VirtualEtherne...
See more...
Each sub-resource in a virtual machine (such as disk, cdrom, sata_adapter....) is also called a VirtualDevice. i.e, VirtualDevice = VirtualDisk, VirtualCdrom, VirtualController, VirtualEthernetCard, VirtualFloppy, VirtualKeyboard, VirtualMachineVideoCard, VirtualPCIPassthrough, VirtualSerialPort, VirtualSoundCard, VirtualTPM, VirtualUSB , .... and more Every VirtualDevice has a unique "key" that distinguishes this device from other devices in the same virtual machine. i.e, Key( integer ) = A unique key that distinguishes this device from other devices in the same virtual machine. Keys are immutable but may be recycled; that is, a key does not change as long as the device is associated with a particular virtual machine. However, once a device is removed, its key may be used when another device is added.
This property is not read-only, but the client cannot control its value. Persistent device keys are always assigned and managed by the server, which guarantees that all devices will have non-negative key values.
When adding new devices, it may be necessary for a client to assign keys temporarily in order to associate controllers with devices in configuring a virtual machine. However, the server does not allow a client to reassign a device key, and the server may assign a different value from the one passed during configuration. Clients should ensure that existing device keys are not reused as temporary key values for the new device to be added (for example, by using unique negative integers as temporary keys).
When editing or deleting a device, clients must use the server-provided key to refer to an existing device. Virtualdevice Keys: device[100] = VirtualPCIController device[200] = VirtualIDEController device[300] = VirtualPS2Controller device[400] = VirtualSIOController device[500] = VirtualMachineVideoCard device[600] = VirtualKeyboard . . device[3000] = VirtualCdrom device[2000] = VirtualDisk . . . Eg: Multiple disks in a VM with device keys Hard Disk 1 = device[2000] = VirtualDisk Hard Disk 2 = device[2001] = VirtualDisk Hard Disk 3 = device[2002] = VirtualDisk For more info refer : - Data Object - VirtualDevice(vim.vm.device.VirtualDevice) - Data Object - VirtualDisk(vim.vm.device.VirtualDisk)