QEMU

Iz projekta Ubuntu-RS Wiki
Idi na: navigacija, pretraga
Linija 1: Linija 1:
== Running Windows Under Ubuntu 7.04 ==
+
== Pokretanje virtuelne mašine pod Ubuntuom 7.04 ==
  
 
[http://fabrice.bellard.free.fr/qemu/ QEmu] vam omogućava da pokrenete OS unutar drugog OS-a - na primer, Windows pod Linuxom. ''QEmu koristi kqemu, acceleration drajver iz Ubuntu 7.04 Feisty Fawn-a da bi pokrenuo Windows na pristojnoj brzini.
 
[http://fabrice.bellard.free.fr/qemu/ QEmu] vam omogućava da pokrenete OS unutar drugog OS-a - na primer, Windows pod Linuxom. ''QEmu koristi kqemu, acceleration drajver iz Ubuntu 7.04 Feisty Fawn-a da bi pokrenuo Windows na pristojnoj brzini.
Linija 106: Linija 106:
  
  
== Networking ==
+
== Mreža ==
  
 
QEmu provides two modes of networking. In both modes, a virtual network adapter is created inside Windows XP guest.  
 
QEmu provides two modes of networking. In both modes, a virtual network adapter is created inside Windows XP guest.  
  
=== User mode networking ===
+
=== User mode mreža ===
  
 
In user mode networking, QEmu manages network interface internally in the user mode emulator application. QEmu provides DHCP host which assigns a dynamic IP for the guest OS. TCP and UDP ports can be redirected from the host OS to the guest OS using QEmu command line parameters.
 
In user mode networking, QEmu manages network interface internally in the user mode emulator application. QEmu provides DHCP host which assigns a dynamic IP for the guest OS. TCP and UDP ports can be redirected from the host OS to the guest OS using QEmu command line parameters.
Linija 135: Linija 135:
 
* Incoming connections must be configured beforehand
 
* Incoming connections must be configured beforehand
  
=== TAP network ===
+
=== TAP mreža ===
  
 
In TAP networking, QEmu connects the guest OS ethernet to the host OS using TAP network bridge. Linux creates a virtual network interface (tap0) which appears in ifconfig listing as other network interfaces. Further, it is possible to bridge network traffic to the guest OS using normal Linux network bridging functionalities.
 
In TAP networking, QEmu connects the guest OS ethernet to the host OS using TAP network bridge. Linux creates a virtual network interface (tap0) which appears in ifconfig listing as other network interfaces. Further, it is possible to bridge network traffic to the guest OS using normal Linux network bridging functionalities.
Linija 155: Linija 155:
 
* Difficult to set up. The set-up is especially cumbersome if you try to run QEmu without root priviledges
 
* Difficult to set up. The set-up is especially cumbersome if you try to run QEmu without root priviledges
  
== Additional Options ==
+
== Dodatne opcije ==
  
=== Sharing Files With XP and Networking ===
+
=== Deljenje datoteka sa Windows XP-om ===
  
 
It's not much use having an XP installation if you can't transfer files between Ubuntu and XP. Fortunately, QEMU sets up a virtual LAN and DHCP server for you. You can transfer files to and from XP just as if it was on a real LAN. You can also browse the net and download files and do all the network stuff you would do on a real networked XP box.
 
It's not much use having an XP installation if you can't transfer files between Ubuntu and XP. Fortunately, QEMU sets up a virtual LAN and DHCP server for you. You can transfer files to and from XP just as if it was on a real LAN. You can also browse the net and download files and do all the network stuff you would do on a real networked XP box.
  
==== Sharing Files between the Host and VM ====
+
==== Deljenje datoteka između Domaćina i VM-e ====
  
 
QEmu supports file sharing between the VM and host if you have [:SettingUpSamba:Samba configured on the host system]. The following assumes you have a share called 'qemu_share' in your home directory intended to transfer files between Ubuntu and Windows.
 
QEmu supports file sharing between the VM and host if you have [:SettingUpSamba:Samba configured on the host system]. The following assumes you have a share called 'qemu_share' in your home directory intended to transfer files between Ubuntu and Windows.
Linija 177: Linija 177:
 
The IP address of Ubuntu will always be 10.0.2.2. If you have running servers on your Ubuntu box, they can also be accessed at this IP address (e.g. ftp:\\10.0.2.2)
 
The IP address of Ubuntu will always be 10.0.2.2. If you have running servers on your Ubuntu box, they can also be accessed at this IP address (e.g. ftp:\\10.0.2.2)
  
=== Mounting A Virtual Drive ===
+
=== Priključenje virtuelnog diska ===
  
 
You can also mount the QEmu virtual disk just like any other drive. QCOW images cannot be mounted. If the drive was created in qcow format you'll need to convert it first, see [#convertimg2raw below].
 
You can also mount the QEmu virtual disk just like any other drive. QCOW images cannot be mounted. If the drive was created in qcow format you'll need to convert it first, see [#convertimg2raw below].
Linija 185: Linija 185:
 
To mount the drive, create a directory '/media/qemu'. Then run
 
To mount the drive, create a directory '/media/qemu'. Then run
  
  sudo mount -o loop,offset=32256 windows.img /media/qemu
+
  sudo mount -o loop,offset=32256 test.img /media/qemu
  
  
=== Saving and Restoring the State of the VM ===
+
=== Snimanje i kasnije pozivanje stanja VM-e ===
  
 
You can quickly save and restore the state of your Windows System using QEmu's 'overlay images'. Once you have done your initial install, you can create an overlay image and run QEMU off this. The overlay image is very much smaller that the original image and will only contain changes made since the original install. If you trash your XP installation, you can simply delete the overlay image and create a new one from the original image.  
 
You can quickly save and restore the state of your Windows System using QEmu's 'overlay images'. Once you have done your initial install, you can create an overlay image and run QEMU off this. The overlay image is very much smaller that the original image and will only contain changes made since the original install. If you trash your XP installation, you can simply delete the overlay image and create a new one from the original image.  
  
To create an overlay image, use the qemu-image program. To create an image windows.ovl from windows.img, issue the following  
+
To create an overlay image, use the qemu-image program. To create an image test.ovl from test.img, issue the following  
  
  qemu-img create -b windows.img -f qcow windows.ovl
+
  qemu-img create -b test.img -f qcow test.ovl
  
  
 
To run Windows, you would now use
 
To run Windows, you would now use
  
  qemu windows.ovl -enable-audio -user-net -localtime -smb qemu_share
+
  qemu test.ovl -enable-audio -user-net -localtime -smb qemu_share
  
  
If the winxp.ovl installation is ruined, you can delete it, and start QEmu using the winxp.img file. But you will lose changes made since the original install.
+
If the test.ovl installation is ruined, you can delete it, and start QEmu using the test.img file. But you will lose changes made since the original install.
  
 
QEmu also accepts commands from the shell while it is running. To do this, though, you need to press CTRL+ALT+2 with the QEmu window active. This brings up the QEmu Monitor. From here, you can swap CDs, send keypresses to the emulator, suspend to disk and so on. See the [http://fabrice.bellard.free.fr/qemu/qemu-doc.html official documentation] for full details.
 
QEmu also accepts commands from the shell while it is running. To do this, though, you need to press CTRL+ALT+2 with the QEmu window active. This brings up the QEmu Monitor. From here, you can swap CDs, send keypresses to the emulator, suspend to disk and so on. See the [http://fabrice.bellard.free.fr/qemu/qemu-doc.html official documentation] for full details.
Linija 210: Linija 210:
 
=== Converting a qcow image to a raw file ===
 
=== Converting a qcow image to a raw file ===
  
To convert a qcow image, 'windows.img', to a raw 'windows.raw' file , run
+
To convert a qcow image, 'test.img', to a raw 'test.raw' file , run
  
  qemu-img convert windows.img -O raw windows.raw
+
  qemu-img convert test.img -O raw test.raw
  
  
=== Converting a raw drive to qcow format ===
+
=== Konverzija raw virtuelnog disk u qcow format ===
  
To convert a raw 'windows.img' file to a qcow formatted 'windows.qcow', run
+
To convert a raw 'test.img' file to a qcow formatted 'test.qcow', run
  
  qemu-img convert windows.img -O qcow windows.qcow
+
  qemu-img convert test.img -O qcow test.qcow
  
  
Linija 234: Linija 234:
  
 
[[Category:Virtuelizacija]]
 
[[Category:Virtuelizacija]]
 +
[[Category:7.04]]

Izmena od 9. septembar 2007. u 00:33

Lični alati
Imenski prostori
Varijante
Akcije
Navigacija
alati
Linkovi