[conspire] VirtualBox

Rick Moen rick at linuxmafia.com
Sun Mar 6 15:14:42 PST 2016


Quoting Paul Zander (paulz at ieee.org):

> So I have a laptop that was factory installed with Win 8.1.  No
> install media came with it.

Yes, the lack of such MS-Windows installation media tends to become a
serious problem for MS-Windows users, either when they want to do
something a little different or when they need to reinstall (e.g.,
following failure of mass storage).  IIRC, the prior merchandising step
before omitting installation media entirely was to provide only a
'recovery' CD that you could boot to overwrite your mass storage with
the original preload, but with no ability to choose installation options
(partitioning, selection of package groups) offered by the real
Microsoft Windows installer.

Trying to boil that down:  MS-Windows preloads have progressively
crippled the user, and IMO such a preload is incomplete until you have
also bought a retail copy of MS-Windows.  People balk at doing that, of
course, because it costs real money.  But an OS you cannot reinstall is
one you don't really own.

> After I get Linux installed, I anticipate that my usage will be 90%
> Linux and 10% Windows.  

Well, personally, I'd want to confine MS-Windows to the VM, because
giving MS-Windows fundamental control of a real machine seems squicky
(and bad security).  The straightforward way of doing that would be to
blow away the preload, install Linux, install VirtualBox, then use your
MS-Windows installation media to install Windows as a guest OS -- except
Microsoft and your hardware OEM have carefully not provided you with
installation media.

So, that sucks.  You should be vexed at your hardware OEM over putting
you in this situation -- and you might want to keep an eye out for a
real retail copy of MS-Windows that you might be able to acquire on the
cheap.

But maybe you can work around the problem.  VMware's P2V (physical to
virtual converter) can image an installed OS to a VMware .vmdk file,
which you can then store on a spare (big external) hard drive while you
blow away the laptop's preload, install Linux, and install VirtualBox.
Then, you copy the (large!) .vmdk file back to one of the Linux-native
filesystems, then tell VirtualBox about the .vmdk file and give it
permission to boot it.

http://www.sysprobs.com/physical-virtual-virtualbox-virtualbox-p2v
http://pjsquared.com/2009/07/08/how-to-convert-a-physical-winxp-machine-to-a-vm-p2v-for-use-in-virtualbox/
http://www.tumfatig.net/20100727/p2v-from-se7en-to-virtualbox/

Or use clonezilla instead of VMware P2V:
http://www.linux.org/threads/physical-to-virtual-p2v-using-virtualbox.7248/

Or use Microsoft's utility disk2vhd.exe:
http://www.sysprobs.com/virtualbox-p2v-disk2vhd-errors-fix

Or follow Oracle's guide: 
https://www.virtualbox.org/wiki/Migrate_Windows

I imagine that _before_ taking the P2V snapshot, you would want to use
one of the popular non-destructive partitioning utilities to make
MS-Windows's NTFS partition a lot smaller.  Otherwise, the .vmdk file
would end up being slightly larger than the size of the entire disk, 
which would defeat the purpose of the effort (i.e., the .vmdk file would
include a bitwise image of a lot of empty space, which would be kinda
dumb).

Back when I worked at Cadence Design Systems in the middle 2000s, they
gave my a nice little IBM ThinkPad T42p with 2GB RAM.  I ran (native)
Debian on it to do the technical parts of my job, but found it expedient
to have a virtual copy of WinXP Pro, in order to have access to
MS-Outlook for the corporate Exchange Server and MS-Internet Explorer
that was required by one or two haplessly ActiveX-dependent corporate
intranet sites.  For this purpose at the time, I used VMware Workstation
v. 5.5, which the firm was happy to pay for, and then loaded the
corporate-maintained image of WinXP Pro into VMware -- thus keeping the
Microsoft disfigurement confined to a little window and an emulated
machine

> After reading the documentation, it appears that what I need to do is:
> * Install VirtualBox on Windows.
> * Create a new partition for the guest OS.

Um, no.  Whoa there.  The guest OS doesn't need, and wouldn't by default
use, a new partition.  Instead, there's a big honkin' 'image' file, the 
.vmdk file, that stores the stuff that the booting guest OS will _see as_ 
a hard disk.  The VirtualBox hypervisor and related utilities operate an
emulation layer that presents the 'image' file to the guest OS as a hard
disk, and the guest OS truly doesn't know the difference.


Anyway, sure you can run Linux as guest OS under a hypervisor, instead.  
You've capably stated (some of) the squicky aspects of doing so.
Perhaps I've pointed out some tricks towards doing it the other way
around.

And, if you do that, just imagine how much easier it would be, if you
had gotten real OS installation media with the laptop, as was done in
the old days.





More information about the conspire mailing list