The Best of Both Worlds
To make the emulated system run faster, I installed kqemu. I downloaded kqemu-1.3.0pre11.tar.gz from the QEMU download page and extracted it inside D:\QEMU\. Then, I clicked kqemu.inf with the right-mouse button and selected Install. Next, I added, in start-linux.bat, the command net start kqemu and added the parameter -kernel-kqemu to qemu.exe. Now, the last two lines of start-linux.bat look like this:
net start kqemu qemu.exe -L . -m 256 -kernel-kqemu -hda \\.\PhysicalDrive0 ↪-soundhw all -localtime
Note: Scientific Linux 4.4 does not work at all with the parameter -kernel-kqemu, and the problem seems to be an incompatibility of the kernel with the BIOS file (which is named bios.bin, and I think that represents the BIOS configuration of the emulated system). When I replaced it with the BIOS of Puppy Linux, it worked. It is strange that the original BIOS is 128KB and Puppy's BIOS is 64KB, which is older as well.
The default QEMU parameters for the network are -net nic -net user. This means that it will emulate a virtual interface on the Windows side and create a network interface eth0 for the emulated Linux system. Both of these interfaces have a virtual connection between them, allowing them to communicate with each other. The IP of the Windows virtual interface is 10.0.2.2/24, and QEMU also creates a virtual DHCP server connected to it. To get an IP for Linux from the QEMU DHCPD, I log in as root and give the command dhclient. Then, the Linux interface gets IP 10.0.2.15/24, gateway 10.0.2.2 and DNS 10.0.2.3. Afterward, Windows and the Internet can be accessed from Linux without a problem.

Figure 2. Network Diagram
To check the network configuration, try the commands ip address ls, ip route ls and cat /etc/resolv.conf in Linux. Here's example output from those commands:
[root@fedora6 ~]# ip address ls
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
3: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
[root@fedora6 ~]# ip route ls
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15
default via 10.0.2.2 dev eth0
[root@fedora6 ~]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 10.0.2.3
To test the network connection, try the commands ping 10.0.2.2 and wget http://www.google.com/.
If you try to ping www.google.com (or any other IP), it won't work. However, the network connection is okay and working, and you can verify it with other tools, such as wget or lftp. It simply means that ping is not working for some reason. This has been very misleading to me, because the usual way to check for network connectivity is to ping something out there.
Because I can ping Windows from Linux as 10.0.2.2, I also can access any service (dæmon) that runs on Windows. In particular, I can access any file-sharing services. Usually, I run Apache as a Web server on Windows. It can be installed easily with EasyPHP. Then, I use wget to retrieve any files that are accessible through the Web server.
Another service I use is FTP. I install and configure it using the FileZilla FTP server. From Linux, I can access the folders (directories) that are shared by the FTP service, using lftp (you can use any other ftp client as well). This is better than using a Web server, because I can transfer files both ways—from Windows to Linux and from Linux to Windows.
I've even used svnserve to run a Subversion service in Windows. From Linux, I could access the Subversion repositories in Windows. Think of it as a way to transfer files between Windows and Linux, as you can access the svn repositories from both Windows and Linux, although it is not a very straightforward way to transfer files.
I tried transferring files between Linux and Windows using a fat32 partition, which can be accessed from both systems. Theoretically, there is no reason why it should not work, and actually it does work; however, it does not work so well. The problem is that the modifications that are done to fat32 from Linux are not “seen” from Windows until it is restarted, and the modifications that are done from Windows are not “seen” from Linux until QEMU is restarted, which makes this solution impractical and unusable.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Introduction to MapReduce with Hadoop on Linux
- RSS Feeds
- info
23 min 30 sec ago - information
26 min 2 sec ago - info
28 min 12 sec ago - Bought photoshop CS5 for developing a website :(
3 hours 40 min ago - What the author describes
5 hours 6 min ago - Reply to comment | Linux Journal
9 hours 17 min ago - Reply to comment | Linux Journal
10 hours 2 min ago - Didn't read
10 hours 12 min ago - Reply to comment | Linux Journal
10 hours 17 min ago - Poul-Henning Kamp: welcome to
12 hours 27 min ago




Comments
Booting Windows from Linux via Qemu
The article is great and I successfully booted my Linux installation via Qemu. I am interested in booting my Windows installation from the Linux side using Qemu. If you have any suggestions please post them.
Thanks,
JPM
I have tried (months ago)
I have tried (months ago) with something like: '-hda /dev/hda' , and I remember that I have failed.
Anyway, a QEMU virtual machine has different "physical" devices compared with your real machine.
So, if the windows partition is booted inside it, I guess that it is going to find "new hardware" etc.
It is something similar to removing the hard disk and booting it inside another machine.
While linux is flexible enough to endure this kind of migration, I am not sure about windows, it has
to be tried.