Search in sources :

Example 1 with VirtualFloppyDeviceBackingInfo

use of com.vmware.vim25.VirtualFloppyDeviceBackingInfo in project photon-model by vmware.

the class ClientUtils method createFloppy.

public static VirtualDeviceConfigSpec createFloppy(VirtualDevice sioController, int unitNumber) {
    VirtualFloppy floppy = new VirtualFloppy();
    floppy.setControllerKey(sioController.getKey());
    floppy.setUnitNumber(unitNumber);
    VirtualDeviceConnectInfo info = new VirtualDeviceConnectInfo();
    info.setAllowGuestControl(true);
    info.setConnected(true);
    info.setStartConnected(true);
    floppy.setConnectable(info);
    VirtualFloppyDeviceBackingInfo backing = new VirtualFloppyDeviceBackingInfo();
    backing.setDeviceName(String.format("floppy-%d", unitNumber));
    floppy.setBacking(backing);
    VirtualDeviceConfigSpec spec = new VirtualDeviceConfigSpec();
    spec.setDevice(floppy);
    spec.setOperation(VirtualDeviceConfigSpecOperation.ADD);
    return spec;
}
Also used : VirtualDeviceConfigSpec(com.vmware.vim25.VirtualDeviceConfigSpec) VirtualFloppy(com.vmware.vim25.VirtualFloppy) VirtualFloppyDeviceBackingInfo(com.vmware.vim25.VirtualFloppyDeviceBackingInfo) VirtualDeviceConnectInfo(com.vmware.vim25.VirtualDeviceConnectInfo)

Aggregations

VirtualDeviceConfigSpec (com.vmware.vim25.VirtualDeviceConfigSpec)1 VirtualDeviceConnectInfo (com.vmware.vim25.VirtualDeviceConnectInfo)1 VirtualFloppy (com.vmware.vim25.VirtualFloppy)1 VirtualFloppyDeviceBackingInfo (com.vmware.vim25.VirtualFloppyDeviceBackingInfo)1