Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: [OT] Windows VMs under Linux for running Perl.

by duelafn (Vicar)
on Dec 17, 2016 at 22:50 UTC ( #1177996=note: print w/replies, xml ) Need Help??

in reply to [OT] Windows VMs under Linux for running Perl.

I use Windows in a VM on Linux a lot. We have some old vb6 code that I get to maintain (lucky me). I run winXP in KVM/QEMU (Debian package qemu-kvm). Example command-line (kvm manpage):

truncate -s 50G winXP.img # create an image kvm -hda winXP.img -m 2048 -monitor stdio -net nic,model=rtl8139 -net +user -usb -cdrom /dev/cdrom

I run a samba share on the host ( by default) for sharing files between host and VM. Never had any problem with speed or reliability of the VM or the file sharing.

I keep my images as plain "raw" images (which will generally be sparse in Linux) so that I can occasionally re-sparse them using partclone and ddrescue when they get too big. If you use the qcow2 file format, the files will keep growing to the size of the virtual disk since TRIM isn't handled by the VM filesystem code (I believe this is still true; though it wouldn't be issued by winXP anyway).

I also will often use a temporary image with a "backing file". The temporary image will only store files changed (so is quick to create and doesn't get too large) and the backing file will not be modified. The temporary file should be in qcow2 format. After setting up winXP.img, you can try out experimental stuff using (qemu-img manpage):

qemu-img create -b winXP.img -f qcow2 temp.img kvm -hda temp.img ... rm -f temp.img

Update: punctuation and minor wording

Good Day,

Replies are listed 'Best First'.
Re^2: [OT] Windows VMs under Linux for running Perl.
by BrowserUk (Pope) on Dec 18, 2016 at 07:12 UTC

    Thank you! That's exactly the type of information -- and more -- that I was hoping for.

    A lot of the information you've given is over my head at the moment, but it gives me a great starting place for things I need to look up and understand before I start doing this. Thanks.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1177996]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2021-02-26 17:05 GMT
Find Nodes?
    Voting Booth?

    No recent polls found