On Tue, Feb 09, 2016 at 12:20:35AM -0800, Joshua Pincus wrote:> Hi Rich, > > Thanks for the pointer. It looks like add_viostor_to_driver_database() is > the routine that I need to mimic. I'll try that out in the morning. I've > been staring at this problem for so long that my eyes are crossing.I should note that any doubled \\ that appear in the strings are really single \, they are just escaped OCaml strings. It might help to fire up the OCaml interpreter: $ rlwrap ocaml OCaml version 4.02.3 # open Printf;; # printf "PCI\\VEN_1AF4&DEV_1001&REV_00\n";; PCI\VEN_1AF4&DEV_1001&REV_00 - : unit = () # let oem_inf = "oem1.inf";; val oem_inf : string = "oem1.inf" # printf "@%s,%%rhelscsi.devicedesc%%;Red Hat VirtIO SCSI controller\n" oem_inf;; @oem1.inf,%rhelscsi.devicedesc%;Red Hat VirtIO SCSI controller - : unit = () Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Hi Rich, Thanks, again, for the pointer. I'm still slowly going through the registry making my changes. I noticed what may be a small bug in your code. Please look at https://github.com/libguestfs/libguestfs/blob/master/v2v/windows_virtio.ml#L230-L231. I think you meant to have those two compat ids be: "PCI\\CC_010000"; "PCI\\CC_0100"; The current IDs in your code try to associate the viostor driver with devices from vendor http://pcidatabase.com/vendor_details.php?id=406, which I don't believe was your intent. JP On Tue, Feb 9, 2016 at 12:35 AM, Richard W.M. Jones <rjones@redhat.com> wrote:> On Tue, Feb 09, 2016 at 12:20:35AM -0800, Joshua Pincus wrote: > > Hi Rich, > > > > Thanks for the pointer. It looks like add_viostor_to_driver_database() > is > > the routine that I need to mimic. I'll try that out in the morning. > I've > > been staring at this problem for so long that my eyes are crossing. > > I should note that any doubled \\ that appear in the strings are > really single \, they are just escaped OCaml strings. It might help > to fire up the OCaml interpreter: > > $ rlwrap ocaml > OCaml version 4.02.3 > > # open Printf;; > # printf "PCI\\VEN_1AF4&DEV_1001&REV_00\n";; > PCI\VEN_1AF4&DEV_1001&REV_00 > - : unit = () > # let oem_inf = "oem1.inf";; > val oem_inf : string = "oem1.inf" > # printf "@%s,%%rhelscsi.devicedesc%%;Red Hat VirtIO SCSI controller\n" > oem_inf;; > @oem1.inf,%rhelscsi.devicedesc%;Red Hat VirtIO SCSI controller > - : unit = () > > Rich. > > > -- > Richard Jones, Virtualization Group, Red Hat > http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > virt-top is 'top' for virtual machines. Tiny program with many > powerful monitoring features, net stats, disk stats, logging, etc. > http://people.redhat.com/~rjones/virt-top >
On Tue, Feb 09, 2016 at 01:50:37PM -0800, Joshua Pincus wrote:> Hi Rich, > > Thanks, again, for the pointer. I'm still slowly going through the > registry making my changes. > > I noticed what may be a small bug in your code. Please look at > https://github.com/libguestfs/libguestfs/blob/master/v2v/windows_virtio.ml#L230-L231. > I think you meant to have those two compat ids be: > > "PCI\\CC_010000"; > "PCI\\CC_0100";Yes - you are quite correct. I went back to the original Windows guest that I used for getting the registry changes, and found that I had transcribed these two strings incorrectly. Here is the fix: https://github.com/libguestfs/libguestfs/commit/938f48f08a37791e8ebd6245d19b53f9660b30d2 Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/