forked from terra-farm/go-virtualbox
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathstorage.go
56 lines (47 loc) · 1.55 KB
/
storage.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package virtualbox
// StorageController represents a virtualized storage controller.
type StorageController struct {
SysBus SystemBus
Ports uint // SATA port count 1--30
Chipset StorageControllerChipset
HostIOCache bool
Bootable bool
}
// SystemBus represents the system bus of a storage controller.
type SystemBus string
const (
SysBusIDE = SystemBus("ide")
SysBusSATA = SystemBus("sata")
SysBusSCSI = SystemBus("scsi")
SysBusFloppy = SystemBus("floppy")
)
// StorageControllerChipset represents the hardware of a storage controller.
type StorageControllerChipset string
const (
CtrlLSILogic = StorageControllerChipset("LSILogic")
CtrlLSILogicSAS = StorageControllerChipset("LSILogicSAS")
CtrlBusLogic = StorageControllerChipset("BusLogic")
CtrlIntelAHCI = StorageControllerChipset("IntelAHCI")
CtrlPIIX3 = StorageControllerChipset("PIIX3")
CtrlPIIX4 = StorageControllerChipset("PIIX4")
CtrlICH6 = StorageControllerChipset("ICH6")
CtrlI82078 = StorageControllerChipset("I82078")
)
// StorageMedium represents the storage medium attached to a storage controller.
type StorageMedium struct {
Port uint
Device uint
DriveType DriveType
Medium string // none|emptydrive|<uuid>|<filename|host:<drive>|iscsi
}
// DriveType represents the hardware type of a drive.
type DriveType string
const (
DriveDVD = DriveType("dvddrive")
DriveHDD = DriveType("hdd")
DriveFDD = DriveType("fdd")
)
// Clone virtual harddrive
func CloneHD(input, output string) error {
return vbm("clonehd", input, output)
}