Richard W.M. Jones
2019-Sep-02 16:47 UTC
[Libguestfs] [PATCH] v2v: Set DISKTYPE=2 in RHV and VDSM meta files
I was trying to find some documentation for this field and the best I could find is: https://github.com/oVirt/vdsm/blob/master/lib/vdsm/storage/constants.py What do the numbers mean? The comments in the file indicate that strings are valid too (eg. DISKTYPE=OVFS). Also this patch as written will affect -o vdsm mode too (another deprecated-ish mode where we write directly to the Storage Domain). I don't know if that's right or not. Rich.
Richard W.M. Jones
2019-Sep-02 16:47 UTC
[Libguestfs] [PATCH] v2v: Set DISKTYPE=2 in RHV and VDSM meta files (RHBZ#1746699).
From: Nir Soffer <nirsof@gmail.com> --- v2v/create_ovf.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml index 91ff5198d..9aad5dd15 100644 --- a/v2v/create_ovf.ml +++ b/v2v/create_ovf.ml @@ -501,7 +501,7 @@ let create_meta_files output_alloc sd_uuid image_uuids overlays bpf "CTIME=%.0f\n" time; bpf "MTIME=%.0f\n" time; bpf "IMAGE=%s\n" image_uuid; - bpf "DISKTYPE=1\n"; + bpf "DISKTYPE=2\n"; bpf "PUUID=00000000-0000-0000-0000-000000000000\n"; bpf "LEGALITY=LEGAL\n"; bpf "POOL_UUID=\n"; -- 2.23.0
Nir Soffer
2019-Sep-02 19:17 UTC
Re: [Libguestfs] [PATCH] v2v: Set DISKTYPE=2 in RHV and VDSM meta files
On Mon, Sep 2, 2019 at 7:47 PM Richard W.M. Jones <rjones@redhat.com> wrote:> I was trying to find some documentation for this > field and the best I could find is: > > https://github.com/oVirt/vdsm/blob/master/lib/vdsm/storage/constants.py > > What do the numbers mean? The comments in the file indicate > that strings are valid too (eg. DISKTYPE=OVFS). >This may make it more clear: https://github.com/oVirt/vdsm/blob/48ab4a8e1931d527086192983599946b7bd1e87a/lib/vdsm/storage/constants.py#L116 You can see that "1" is considered as "DATA" disk. However this is wrong, based on incorrect documentation in vdsm, which may explain why the value "1" sneaked into v2v. The concept of disk type was never used by engine and it always sent the value "2" until 4.2, when we actually started to use disk types and converted the values to strings. When writing to export domain, you should use the value "2". Also this patch as written will affect -o vdsm mode too (another> deprecated-ish mode where we write directly to the Storage Domain). > I don't know if that's right or not. >Writing to data domain is even more evil, since the format depends on the storage domain version, but "2" will work for any ovirt version. Nir
Nir Soffer
2019-Sep-02 19:19 UTC
Re: [Libguestfs] [PATCH] v2v: Set DISKTYPE=2 in RHV and VDSM meta files (RHBZ#1746699).
On Mon, Sep 2, 2019 at 7:47 PM Richard W.M. Jones <rjones@redhat.com> wrote:> From: Nir Soffer <nirsof@gmail.com> > > --- > v2v/create_ovf.ml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml > index 91ff5198d..9aad5dd15 100644 > --- a/v2v/create_ovf.ml > +++ b/v2v/create_ovf.ml > @@ -501,7 +501,7 @@ let create_meta_files output_alloc sd_uuid image_uuids > overlays > bpf "CTIME=%.0f\n" time; > bpf "MTIME=%.0f\n" time; > bpf "IMAGE=%s\n" image_uuid; > - bpf "DISKTYPE=1\n"; > + bpf "DISKTYPE=2\n"; > bpf "PUUID=00000000-0000-0000-0000-000000000000\n"; > bpf "LEGALITY=LEGAL\n"; > bpf "POOL_UUID=\n"; > -- > 2.23.0 >
Reasonably Related Threads
- [PATCH] v2v: Set DISKTYPE=2 in RHV and VDSM meta files (RHBZ#1746699).
- [PATCH] v2v: Rename OVF module to Create_ovf.
- [PATCH v2] v2v: Rename RHEV to RHV throughout.
- [PATCH v2 0/2] v2v: machine type for oVirt
- [PATCH v2 0/3] Make generated OVF more conforming to standard