Difference between revisions of "BlockDeviceConfig"
Line 35: | Line 35: | ||
* Delete | * Delete | ||
* Preserve | * Preserve | ||
+ | |||
+ | Boot order | ||
+ | |||
+ | * Index | ||
In addition to the above parameters, it is neccesary to support a "disk path" parameter, to allow the user to request a specific block device path in the guest eg /dev/sda. In general this cannot be supported by all hypervisors and thus its usage should be discouraged in favour of allowing the guest OS / hypervisor to choose paths. For the sake of compatibility with existing tools / APIs though, it must be supported | In addition to the above parameters, it is neccesary to support a "disk path" parameter, to allow the user to request a specific block device path in the guest eg /dev/sda. In general this cannot be supported by all hypervisors and thus its usage should be discouraged in favour of allowing the guest OS / hypervisor to choose paths. For the sake of compatibility with existing tools / APIs though, it must be supported | ||
Line 45: | Line 49: | ||
Key off the device type: | Key off the device type: | ||
− | * -cdrom type=glance,id=XXXXXXXXX,bus=ide | + | * -cdrom type=glance,id=XXXXXXXXX,bus=ide,bootindex=2 |
− | * -disk type=cinder,id=XXXXXXXXX,bus=ide | + | * -disk type=cinder,id=XXXXXXXXX,bus=ide,bootindex=1 |
* -mmc type=ephemeral,format=swap,size=50,dev=/dev/sda | * -mmc type=ephemeral,format=swap,size=50,dev=/dev/sda | ||
Or a totally generic arg: | Or a totally generic arg: | ||
− | * -block type=glance,id=XXXXXXX | + | * -block type=glance,id=XXXXXXX,bus=ide,bootindex=2 |
− | * -block type=cinder,id=XXXXXXX,bus=ide,device=cdrom | + | * -block type=cinder,id=XXXXXXX,bus=ide,device=cdrom,bootdex=1 |
* -block type=ephemeral,format=swap,size=50,bus=ide,device=floppy | * -block type=ephemeral,format=swap,size=50,bus=ide,device=floppy | ||
+ | |||
+ | The only compulsory argument ought to be the type + id, eg the glance or cinder ID. Everything else should have sane defaults filled in by the hypervisor driver in Nova. | ||
== Data Format for Nova Compute APIs == | == Data Format for Nova Compute APIs == | ||
TBD | TBD |
Revision as of 12:57, 29 January 2013
Block Device Configuration
Controls for block device configuration
There are a variety of independent attributes that it is desirable to control when configuring block devices for a virtual machine in OpenStack
Source type
- Glance image
- Cinder volume
- Ephemeral file
Guest format
- ext4 (or other FS formats)
- ISO
- Swap (different format per guest OS)
- None
Device type
- Disk
- CDROM
- Floppy
- Flash (MMC)
Disk bus
- USB
- IDE
- VirtIO
- SCSI
Shutdown action
- Delete
- Preserve
Boot order
- Index
In addition to the above parameters, it is neccesary to support a "disk path" parameter, to allow the user to request a specific block device path in the guest eg /dev/sda. In general this cannot be supported by all hypervisors and thus its usage should be discouraged in favour of allowing the guest OS / hypervisor to choose paths. For the sake of compatibility with existing tools / APIs though, it must be supported
Command line syntax for block config
The 'nova boot' command currently uses a combination of the '-image' and '-block-device-mapping' command line args to configure storage. The latter is mostly a clone of the same named arg from the EC2 commands, and is not a very well designed syntax from the POV of extensibility.
Given the extra features to be supported, it is desirable to introduce a new syntax for 'nova boot' and friends which is more expressive
Key off the device type:
- -cdrom type=glance,id=XXXXXXXXX,bus=ide,bootindex=2
- -disk type=cinder,id=XXXXXXXXX,bus=ide,bootindex=1
- -mmc type=ephemeral,format=swap,size=50,dev=/dev/sda
Or a totally generic arg:
- -block type=glance,id=XXXXXXX,bus=ide,bootindex=2
- -block type=cinder,id=XXXXXXX,bus=ide,device=cdrom,bootdex=1
- -block type=ephemeral,format=swap,size=50,bus=ide,device=floppy
The only compulsory argument ought to be the type + id, eg the glance or cinder ID. Everything else should have sane defaults filled in by the hypervisor driver in Nova.
Data Format for Nova Compute APIs
TBD