98 Commits

Author SHA1 Message Date
Brian Cain
3d4d0be58f
Attach disk to next available port to avoid port fragmentation
This commit ensures that vagrant attaches a new disk to the _next
available_ port, rather than the last one "used". This can occur if a
disk has been removed in a previous run, leaving a port open
2020-02-10 12:58:11 -08:00
Brian Cain
c0fb8af1a3
Fix NUMBER typo 2020-02-10 12:58:11 -08:00
Brian Cain
2db81b049b
Only look at SATA Controller disk images 2020-02-10 12:58:11 -08:00
Brian Cain
f6a5a3ae41
Simplify determining next port to use 2020-02-10 12:58:11 -08:00
Brian Cain
98a81aac6b
Move show_vm_info call 2020-02-10 12:58:11 -08:00
Brian Cain
8407fb28cb
Add more code comments for configuring disk class 2020-02-10 12:58:11 -08:00
Brian Cain
6376962209
Simplify obtaining port and device number info 2020-02-10 12:58:11 -08:00
Brian Cain
c049dd9211
Rename method to match functionality
This method now only returns the next available port, as virtualbox
guests can only have 1 device controller.
2020-02-10 12:58:11 -08:00
Brian Cain
6676fe6f7f
Remove stale TODOs 2020-02-10 12:58:11 -08:00
Brian Cain
524d98fe5c
Add comment about MAX_DISK_SIZE const 2020-02-10 12:58:11 -08:00
Brian Cain
cb3cc42dce
Determine primary disk through vm_info rather than list_hdds 2020-02-10 12:58:11 -08:00
Brian Cain
2176216bf8
Add error for when disks defined are greater than the max limit 2020-02-10 12:58:11 -08:00
Brian Cain
1e2570a599
Add methods for controller attaching 2020-02-10 12:58:11 -08:00
Brian Cain
a3b07a884a
Add way to configure disk extension 2020-02-10 12:58:11 -08:00
Brian Cain
4a4a48b69c
More descriptive name for disk data 2020-02-10 12:58:11 -08:00
Brian Cain
91e9de79a9
Add warning for currently unsupported disk types 2020-02-10 12:58:11 -08:00
Brian Cain
b388b34846
Update todos and method docs 2020-02-10 12:58:11 -08:00
Brian Cain
e31b013df8
Ensure vmdk disks that are resized stay in original format 2020-02-10 12:58:11 -08:00
Brian Cain
16c38ed9f4
Fix params for attach_disk driver call 2020-02-10 12:58:11 -08:00
Brian Cain
4d4844fdef
Simplify params for virtualbox driver attach_disk 2020-02-10 12:58:11 -08:00
Brian Cain
c2e6b5ae78
Ensure disks that go unchanged still get written into disk metadata file 2020-02-10 12:58:11 -08:00
Brian Cain
ec350861cd
Write down metadata for disk configs after configuring disks 2020-02-10 12:58:11 -08:00
Brian Cain
ff77e6279b
Remove todo comment 2020-02-10 12:58:11 -08:00
Brian Cain
831b39f9e0
Use correct variable for disk name 2020-02-10 12:58:11 -08:00
Brian Cain
b8bf424678
Only grab provider disk config if it exists 2020-02-10 12:58:11 -08:00
Brian Cain
2600178d18
Move UI messages into methods 2020-02-10 12:58:11 -08:00
Brian Cain
a75630e274
Enable experimental flag for virtualbox disk configs 2020-02-10 12:58:11 -08:00
Brian Cain
f076ee4708
Add method docs 2020-02-10 12:58:11 -08:00
Brian Cain
616f8e4bd6
Add experimental flags 2020-02-10 12:58:11 -08:00
Brian Cain
0dfde12e9a
Add clone_disk method to virtualbox driver 2020-02-10 12:58:11 -08:00
Brian Cain
d1ccb6536f
Add note about attaching device 2020-02-10 12:58:11 -08:00
Brian Cain
91a274416a
Improve disk messages to user 2020-02-10 12:58:11 -08:00
Brian Cain
7486fe5931
Add ability to resize vmdk disks by converting to vdi 2020-02-10 12:58:11 -08:00
Brian Cain
dec145b8f9
Add additional note about resizing a disk that might be a primrary 2020-02-10 12:58:11 -08:00
Brian Cain
56cc23cdec
Remove prys 2020-02-10 12:58:11 -08:00
Brian Cain
fcc9c55fa0
Begin to add code for resizing VMDK type disks 2020-02-10 12:58:11 -08:00
Brian Cain
4df346c5c6
Add resize for disks
Also add warnings in case disk resize request is smaller than original
disk size.
2020-02-10 12:58:11 -08:00
Brian Cain
7e686e6f70
Attach harddisk after creation 2020-02-10 12:58:11 -08:00
Brian Cain
1c87351c94
Begin to add method for determining the proper port and device 2020-02-10 12:58:11 -08:00
Brian Cain
2a3f9dad29
Remove uuid from params
No need to pass in machine uuid as it is a class variable already for the driver
2020-02-10 12:58:11 -08:00
Brian Cain
259cb5fcca
Attempt to create and attach disk to guest 2020-02-10 12:58:11 -08:00
Brian Cain
9b83e2ac30
Move around pry 2020-02-10 12:58:11 -08:00
Brian Cain
35c8db56ec
Add handling for configuring and creating disks with vbox provider 2020-02-10 12:58:11 -08:00
Brian Cain
5be7989f2d
Add basic driver methods for disk operations 2020-02-10 12:58:11 -08:00
Brian Cain
16cccd504a
Add virtualbox driver method for obtaining vm information 2020-02-10 12:58:11 -08:00
Brian Cain
9bf41d34ba
Add some basic driver methods for configuring disks 2020-02-10 12:58:11 -08:00
Brian Cain
55cb8d1f0a
Add configure_disk blank unit test file and some method docs 2020-02-10 12:58:11 -08:00
Brian Cain
fc54996ba8
Add beginning of ConfigureDisks capability to VirtualBox provider 2020-02-10 12:58:11 -08:00