diff options
author | ccardenas <ccardenas@cvs.openbsd.org> | 2018-09-09 04:09:33 +0000 |
---|---|---|
committer | ccardenas <ccardenas@cvs.openbsd.org> | 2018-09-09 04:09:33 +0000 |
commit | 9f2c0e3fb65afa1963763a3a22dd2774e36dc916 (patch) | |
tree | e66ae6aff2b0227618e488358a821fb7e5c88c0d /usr.sbin/vmd/virtio.h | |
parent | 7d42cfcc16b5d221c1973708cc2354bac29244e5 (diff) |
Add initial qcow2 image support.
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.
Diffstat (limited to 'usr.sbin/vmd/virtio.h')
-rw-r--r-- | usr.sbin/vmd/virtio.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/vmd/virtio.h b/usr.sbin/vmd/virtio.h index 84a7e2af6a5..86ee6d21f9f 100644 --- a/usr.sbin/vmd/virtio.h +++ b/usr.sbin/vmd/virtio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: virtio.h,v 1.27 2018/08/25 04:16:09 ccardenas Exp $ */ +/* $OpenBSD: virtio.h,v 1.28 2018/09/09 04:09:32 ccardenas Exp $ */ /* * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> @@ -270,10 +270,11 @@ void viornd_update_qa(void); int viornd_notifyq(void); int virtio_init_raw(struct virtio_backing *dev, off_t *sz, int fd); +int virtio_init_qcow2(struct virtio_backing *dev, off_t *sz, int fd); int virtio_blk_io(int, uint16_t, uint32_t *, uint8_t *, void *, uint8_t); int vioblk_dump(int); -int vioblk_restore(int, struct vm_create_params *, int *); +int vioblk_restore(int, struct vmop_create_params *, int *); void vioblk_update_qs(struct vioblk_dev *); void vioblk_update_qa(struct vioblk_dev *); int vioblk_notifyq(struct vioblk_dev *); |