[conspire] expect that ... will work with vmdk files

Michael Paoli Michael.Paoli at cal.berkeley.edu
Sun Oct 2 22:13:34 PDT 2016


> Date: Mon, 26 Sep 2016 19:26:18 +0000 (UTC)
> From: Paul Zander <paulz at ieee.org>
> To: Tony Godshall <togo at of.net>
> Cc: conspire <conspire at linuxmafia.com>
> Subject: Re: [conspire] (forw) Re: (forw) Re: VirtualBox
>
> You missed all the past discussion that there is no .iso.
>
> Just a .vmdk file created from the installed windows.
> There is good reason to expect that Virtual box will work with vmdk files.
> Possibly KVM will also work, but ...

Yes, darn good reason to expect that.

Been there, done that.  ;-)

I mentioned earlier, how ... modern.ie (yuck), I'd ... a few years back
grabbed image from there (ew, yuck) ... essentially as proof-of-concept,
to show it could be run (and how friggin' ugly that OS was/is, but I digress).

Anyway, I was thinkin' I still had those bits 'o script stashed somewhere,
as I ran it a couple times or so, for demonstration purposes, to show it
could be done, and was highly reproducible - and relatively
straight-forward (not too complex, anyway).

So, digging and poking around, ... yes, I still have those bits 'o scripts.
My objective was to run it under qemu-kvm - my preference - even if it
would run fine under VirtualBox.  I had both installed.  The one thing that
VirtualBox gave me that I didn't - at least have conveniently with qemu-kvm -
file format was .vmdk - which not only includes disk image, but machine
configuration.  I wanted to use a raw disk image format, but I also wanted to
get the machine configuration information out of the .vmdk.  So ...
launched the .vmdk file under VirtualBox, and inspected the (virtual)
machine's (virtual) hardware configuration under that - I then used that
information in constructing virtual machine under qemu-kvm - wanted to
match the virtual hardware as much as possible - lest certain proprietary
closed source commercial operating system call me a "thief", thinking I'd
copied the OS off of one licensed system and tried to install it onto
some different hardware ... plus also to avoid potential issues if the
hardware was "too different" from that which it was targeted to run on.

Anyway, bits 'o script ... I show here the bits I'd saved ... includes
extracting the .vmdk from the .rar that the commercial vendor provided,
then extracting raw disk image from that .vmdk ... there's only one line
that's especially interesting for the actual conversion, that line
starts with:
qemu-img convert
Anyway, the script bits I'd saved:
# < IE10.Win8.For.LinuxVirtualBox_extract_ova expand -t 4
#!/bin/sh

set -e

cd /var/tmp/modern.ie/files

umask 077

[ -d ../virtualbox ] || mkdir ../virtualbox

rar e -inul IE10.Win8.For.LinuxVirtualBox.part1.sfx 'IE10 - Win8.ova'
chmod go=  'IE10 - Win8.ova'
mv 'IE10 - Win8.ova' ../virtualbox/'IE10 - Win8.ova'
df -k .; df -h .
# < IE10.Win8.For.LinuxVirtualBox_extract_raw expand -t 4
#!/bin/sh

set -e

cd /var/tmp/modern.ie/files

umask 077

[ -d ../qemu-kvm ] || mkdir ../qemu-kvm

rar p -inul IE10.Win8.For.LinuxVirtualBox.part1.sfx 'IE10 - Win8.ova' |
tar -xf - 'IE10 - Win8-disk1.vmdk'
chmod u=rw,go= 'IE10 - Win8-disk1.vmdk'
chown libvirt-qemu:libvirt-qemu 'IE10 - Win8-disk1.vmdk'

qemu-img convert -O raw 'IE10 - Win8-disk1.vmdk'  
../qemu-kvm/IE10_-_Win8-disk1.raw
# df -k .; df -h .
rm 'IE10 - Win8-disk1.vmdk'

chmod go= ../qemu-kvm/IE10_-_Win8-disk1.raw
chown libvirt-qemu:libvirt-qemu ../qemu-kvm ../qemu-kvm/IE10_-_Win8-disk1.raw
#





More information about the conspire mailing list