https://github.com/rubiojr/diskid
https://github.com/rubiojr/diskid
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rubiojr/diskid
- Owner: rubiojr
- License: mit
- Created: 2011-10-27T12:54:59.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-11-17T18:21:13.000Z (over 13 years ago)
- Last Synced: 2025-03-28T00:05:25.772Z (2 months ago)
- Language: Ruby
- Size: 105 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# DiskID
Get info from a virtual disk file.$ diskid micro-frameos.vmdk
diskid.frameos.org
file name: micro-frameos.vmdk
file format: vmdk
virtual size: 1.2G (1287651328 bytes)
disk size: 274M (287593984 bytes)## Installation
gem install diskid
diskid needs curl and head commands available in your system.
Internet access is also required, as diskid sends a few bytes to http://diskid.frameos.org to identify the disk.
## Usage
diskid --help
### EXAMPLESIdentify a VMDK:
$ diskid ubuntu64-1104.vmdk
diskid.frameos.org
file name: ubuntu64-1104.vmdk
file format: vmdk
virtual size: 9.0G
variant: streamOptimized
disk size: 319MPROTIP: You don't need to install diskid to use the service
head -n 20 ubuntu64-1104.vmdk > /tmp/dchunk && curl -X POST -F chunk=@/tmp/dchunk http://diskid.frameos.org/?format=text
Identify a VMDK and print JSON output:
$ diskid --format json ubuntu64-1104.vmdkdiskid.frameos.org
{"file_name":"ubuntu64-1104.vmdk","format":"vmdk", "variant":"streamOptimized", "virtual_size":"9.0G","disk_size":"319M"}
Valid output formats:
* json
* text
* xmlIdentify a virtual disk without using the diskid.frameos.org web service (needs qemu-img installed locally):
$ diskid --local ubuntu64-1104.vmdk
file_name: ubuntu64-1104.vmdk
format: vmdk
variant: monolithicSparse
virtual_size: 9.0G
disk_size: 319M## NERD STUFF
DiskID Webservice is a thin wrapper around the bleeding edge version of qemu-img from the QEMU project: http://qemu.org
All the magic happens there!
Copyright (c) 2011 Sergio Rubio. See LICENSE.txt for
further details.