[kwlug-disc] Unique VM Installation
opengeometry at yahoo.ca
Fri Apr 8 16:05:19 EDT 2011
On Fri, Apr 08, 2011 at 01:41:10PM -0400, John Van Ostrand wrote:
> ----- Original Message -----
> > Not sure what you mean by "installing from the system partition into
> > a VM". But, if it's copying a partition to another partition (be it
> > real or inside VM), then you might try copying over net, assuming of
> > course the host and VM can talk over the net. I've never done that.
> Lenovo desktops arrive with a small partition that holds a Windows PE
> install, diagnostic tools, recovery tools and the actual image of
> Windows including drivers that is installed on the system. This is a
> bootable O/S entirely separate from the proper install.
> There is a boot option to boot from the system partition where the
> user can access these tools and if needed perform a fresh install of
> the O/S.
> My computer never ran Windows, although it came pre-installed. Now I
> have to run windows for some banking software and I want to install a
> virtual Windows system using KVM on my Linux box. I'd like to use the
> license that came with my PC rather than send any more money to
> Redmond. I may be able to get another copy of Windows and use the same
> activation code, but there has always been so many different
> "versions" of the same release of windows and codes seem to only work
> with the version they were intended to. For example: an OEM key won't
> work with a corporate disc.
Hmm... I just tried VirtualBox (I rarely use KVM, because mouse is so
slow and also I don't want 2 sets of VMs), and both "network copy" and
"shared folder" works.
1. Network copy:
- set network to "Host-only". Host is already 192.168.56.1, and VM
will be 192.168.56.101.
- boot into a Linux VM, and copy the real partition to virtual
partition over the net,
nc -l -p 9999 > /dev/sda2 # from VM
cat /dev/sda2 > /dev/tcp/192.168.56.101/9999 # from host
Here, I think you want to use tar or something, that is, "tar"
from host and "untar" from guest.
- boot into Windows VM, and the virtual partition now has what
Windows expects. Here, I assume harddisk format doesn't change
from VM to VM.
2. Shared folder:
- mount the real partition in host, say /mnt/hd.
- set "shared folder" to /mnt/hd (the name tag will be "hd").
- boot into a Linux VM, and mount it manually under /mnt/hd,
mount -f vboxsf hd /mnt/hd
so /mnt/hd under both host and guest shows the same content.
- copy /mnt/hd directory tree to virtual partition, say /dev/sda2.
- boot into Windows and the virtual partition now has what Windows
You can set the "shared folder" to "auto-mount". It shows up under
/mnt/sf_xxx in Linux VM. I don't know where it shows up for Windows,
and probably wouldn't work for "installation", because "shared folder"
is normally for after Windows is up and running.
As long as host's /dev/sda2 content ends up in guest's /dev/sda2, I
think it's doable.
More information about the kwlug-disc