Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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 (10.0.2.2 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,
    Dean


In reply to Re: [OT] Windows VMs under Linux for running Perl. by duelafn
in thread [OT] Windows VMs under Linux for running Perl. by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-25 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found