GB
  
You are currently viewing the United Kingdom version of the site.
Would you like to switch to your local site?
12 MIN READ TIME

Answers

Got a burning question about open source or the kernel? Whatever your level, email it to answers@linuxformat.com

Neil Bothwick believes he

was a supercomputer in a former life.

Q Going virtual

I have a WinXP SP3 installation with all the updates on a hard disk from a PC that has broken down. Is it possible somehow to import that installation into a virtual machine on VirtualBox?

Of course, I could reinstall WinXP and SP3 in a virtual machine, but the above solution would benefit from having all updates (and settings) in place.

A It is possible to boot a virtual machine from a real hard drive. VirtualBox expects to find virtual disks in VMDK or VDI files, so you have to create a special one of these to point to the real hard disk. Assuming the Windows disk is connected as /dev/sdb, run this command: $ VBoxManage createmedium disk --filename /path/to/winxp.vmdk --format=VMDK --variant RawDisk --property RawDrive=/dev/sdb

The --filename option gives the name of the VMDK file to be created – this must be an absolute path. Then add this disk to your list of virtual disks from the Media submenu of the Tools button in the left pane of VirtualBox. Now you can create a WinXP virtual machine in VirtualBox using this ‘virtual disk’. It should work whether the XP disk is internally connected to a SATA port on your computer’s motherboard or put into an enclosure and plugged in externally via USB or eSATA.

You should be able to boot, but there are some potential issues. First, Windows will see that the drive is in a different PC and will probably require re-registration, which should still be possible via the phone option. You may also find you’re missing drivers for some of the virtual hardware. As long as your display and network are available, you can install anything else you need. The display should be fine as it falls back to VESA if nothing else is supported, and the VirtualBox network card is based on generic kit.

If you don’t want to keep a second hard drive connected to your computer, or if you decide to install Windows from scratch and copy over your data and settings, it is possible to mount a virtual drive outside of the virtual machine and copy over any files you want. You first need to install the qemu package; this contains utilities to access virtual disk files. Then run these commands: $ sudo rmmod nbd $ sudo modprobe nbd max_part=8 $ sudo qemu-nbd --connect /dev/nbd0 / path/to/image/vmdk $ sudo partprobe /dev/nbd0 $ sudo mount /dev/nbd0p1 /mount/point

Unlock this article and much more with
You can enjoy:
Enjoy this edition in full
Instant access to 600+ titles
Thousands of back issues
No contract or commitment
Try for 99p
SUBSCRIBE NOW
30 day trial, then just £9.99 / month. Cancel anytime. New subscribers only.


Learn more
Pocketmags Plus
Pocketmags Plus

This article is from...


View Issues
Linux Format
January 2023
VIEW IN STORE

Other Articles in this Issue


WELCOME
MEET THE TEAM
This issue, we’re helping people escape Windows again and use Elementary OS instead. What would you suggest a newbie should try out in the open source world?
It just works!
It’s a phrase I’ve seen used steadily for
REGULARS AT A GLANCE
Newsdesk
THIS ISSUE: Funding programmes Google’s secure OS Godot goes independent Torvalds interview Arm case aids RISC-V
Kernel Watch
Jon Masters keeps an eye out for all the latest happenings in the Linux kernel, so you don’t have to.
ONGOING DEVELOPMENT
The Asahi Linux project posted a lengthy update
Mailserver
Hmm, MX Linux has been the number one
A Photo Tool Libre
Version: 1.0.4-3 Web: https://github.com/ aphototool/A-Photo-Tool-Libre Many desktop distributions
Shutter Encoder
MULTIMEDIA CONVERTER
Passy
OFFLINE PASSWORD MANAGER
Open-Typer
TYPING TUTOR
Qtexttospeech
TEXT TO SPEECH
Thorium
WEB BROWSER
Ásbrú Connection Manager
SESSION MANAGER
ET: Legacy
FIRST-PERSON SHOOTER
Cro-Mag Rally
RACING GAME
Nvtop
GPU PROCESS MONITOR
Stretchly
BREAK REMINDER
LINUX FORMAT
The #1 open source mag Future Publishing Limited,
REVIEWS
Samsung 990 Pro 2TB
Return of the king? Yes, Jeremy Laird is back.
Phrozen Sonic 8K
Bigger prints, finer details, Linux support – is
AntiX-22
Nate Drake discovers there’s lots to love about the fast, lightweight and stable operating system that is AntiX.
Voyager Live 22.10
Nate Drake explores the glorious union of Gnome and Xfce in a single OS. You’ll never look at your desktop the same way again.
Ubuntu Unity 22.10
Nate Drake takes you on a trip down memory lane as the Unity Desktop makes its official comeback to Ubuntu.
ROUNDUP
ROUNDUP
Trilium 0.56 CherryTree 0.99 Zim 0.75 Joplin 2.8.8 QOwnNotes 22.10.3
ESCAPE WINDOWS
Looking for a practical alternative to Windows? Nick Peers reveals how to set up and use the extremely user-friendly Elementary OS.
You’ve made your choice – it’s time to install Linux alongside Windows.
Install Elementary OS alongside Windows
Take the desktop tour
The big selling point of Elementary OS is its desktop – here’s what you need to know.
Installing new apps
Finding and installing apps in Elementary OS is easy, but you’ll need more than the default app store provided.
Take a deeper dive
Your new operating system is up and running, and your journey into Linux has begun. Here’s where to focus your efforts next.
Pi USER
TWEET DREAMS ARE MADE OF THIS
Les Pounder is an editor at Tom’s Hardware
Pis to be fully stocked by autumn 2023
Eben Upton tells us we can expect shelves to be groaning with Raspberry Pis again later in 2023.
3, 2, 1, Make!
More projects!
EsPiFF
A new microcontroller.
PiKISS v1.10.0
Les Pounder is getting to an age where things need to be simple, so when someone said “Keep It Simple, Stupid”, he took no offence.
Build your own bespoke USB device
Les Pounder uses his snake charming skills again to prove how easy it is to make USB devices with Python and the cheapest of Pis.
Design and build your dream Pi robot
In his latest series, Les Pounder explains how to plan, design and build your very own Raspberry Pi robot from the basics up.
Monitor and graph your system metrics
Graphs make Matt Holder happy, so he spent his weekend storing system statistics in a database and pumping out graphs so you can, too!
The Audacity of it
We chat with Martin Keary about the new features of Audacity, managing a community and the pitfalls of telemetry.
TUTORIALS
Improve your typing
Years ago, when Shashank Sharma had more hair on his scalp than cheeks, he decided to master touch-typing. With these tools, so can you.
Take full control of your passwords
Nick Peers reveals how to get started with Buttercup, a password manager that puts you firmly in control of your sensitive data.
ReactOS: the open source Windows
Open source OS
Create videos from time-lapse photos
Time-lapse videos
Explore a box full of distributions
Containers
Get started photo editing with GIMP
Photo editing
IN DEPTH
Open source RAW photography
Linux offers all the pro-level tools you could possibly need for better photos. Karsten Günther is your top-tips guide.
CODING ACADEMY
Using eBPF to monitor filesystems
Mihalis Tsoukalos explains how to use eBPF to track filesystems.
Code an admin back-end in Django
Continuing with our magazine cataloguing application, Matt Holder explains how to create admin controls and basic view functions
Chat
X
Pocketmags Support