| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
it is entirely unavoidable (for example libc/*/exec.c), because any erroneous
size controlled by an attacker turns into a known-location object placement
in a very dangerous region. So use malloc() instead.
|
|
|
|
|
|
| |
This way they are in the appropriate place and code can be shared with vmd.
Ok ori@ mlarkin@ ccardenas@
|
|
|
|
|
|
|
| |
This turns most warn + returns that should never happen into hard failures,
and improves the user directed error messages.
ok @mlarkin, @reyk
|
|
|
|
|
|
|
|
|
|
|
| |
We used to truncate the disk end by anding it with a 32 bit value.
The 32 bit value was not sign extended, which causes the disk size
to wrap at 4 gigabytes:
disk->end = (disk->end + disk->clustersz - 1) & ~(disk->clustersz - 1);
This change converts the clustersz to an off_t in order to remove the
class of errors by avoiding type conversions entirely.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The -i option to vmctl create (eg. vmctl create output.qcow2 -i input.img)
lets you create a new image from an input file and convert it if it is a
different format. This allows to convert qcow2 images from raw images,
raw from qcow2, or even qcow2 from qcow2 and raw from raw to re-optimize
the disk.
This re-uses Ori's vioqcow2.c from vmd by reaching into it and
compiling it in. The API has been adjust to be used from both vmctl
and vmd accordingly.
OK mlarkin@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works is from Ori Bernstein, committing on his behalf:
Add support to vmd for external snapshots. That is, snapshots that are
derived from a base image. Data lookups start in the derived image,
and if the derived image does not contain some data, the search
proceeds ot the base image. Multiple derived images may exist off of
a single base image.
A limitation of this format is that modifying the base image will
corrupt the derived image.
This change also adds support for creating disk derived disk images to
vmctl. To use it:
vmctl create derived.qcow2 -s 16G -b base.qcow2
From Ori Bernstein
OK mlarkin@ reyk@
|
|
|
|
|
|
| |
qc2_open() calls qc2_close() on error which already frees diskp.
OK ccardenas@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the "-d qcow2:" and "format qcow" arguments optional as vmctl
and vmd will read the magic bytes at the beginning of a file to guess if
it is a raw or a qcow image file.
The "vmctl create" command has been changed by removing the -f qcow2 option
and replacing it with the same syntax as -d: "vmctl create qcow2:foo.img".
In a slightly ununixy but intended way, the create command now also
considers the file extension for the format as "vmctl create foo.qcow2"
creates a qcow2 disk and not a raw image file.
Ok mlarkin@ (and ccardenas@ on an earlier version of the diff)
|
|
|
|
| |
OK mlarkin@
|
|
|
|
|
|
|
| |
Please avoid tabs and excessive multi-line information with log_debug
as it also goes to syslog.
No functional change.
|
|
|
|
|
|
|
|
|
|
|
| |
- qcow2: general cleanup
- vioraw: check malloc
- virtio: add function to sync disks
- vm: call virtio_shutdown to sync disks when vm is finished executing
Thanks to Ori Bernstein.
Ok miko@
|
|
|
|
| |
While here, minor cleanup on logging.
|
|
Users are able to declare disk images as 'raw' or 'qcow2' using either
vmctl and vm.conf. The default disk image format is 'raw' if not specified.
Examples of using disk format:
vmctl start bsd -Lc -r cd64.iso -d qcow2:current.qc2
or
vmctl start bsd -Lc -r cd64.iso -d raw:current.raw
is equivalent to
vmctl start bsd -Lc -r cd64.iso -d current.raw
in vm.conf
vm "current" {
disable
memory 2G
disk "/home/user/vmm/current.qc2" format "qcow2"
interface { switch "external" }
}
or
vm "current" {
disable
memory 2G
disk "/home/user/vmm/current.raw" format "raw"
interface { switch "external" }
}
is equivlanet to
vm "current" {
disable
memory 2G
disk "/home/user/vmm/current.raw"
interface { switch "external" }
}
Tested by many.
Big Thanks to Ori Bernstein.
|