Difference between revisions of "KVM"

From Blue-IT.org Wiki

(Created page with "== Migration from VirtualBox to KVM == This boils down to # converting the images from vbox to qcow # creating and configuring a new kvm-guest # adding some NAT-fu (see next s...")
 
Line 1: Line 1:
 +
== Using VirtualBox and KVM together ==
 +
This is NOT possible!!!
 +
 +
* http://swaeku.github.io/blog/2013/04/04/run-kvm-and-virtualbox-together/
 +
 +
Use VirtualBox
 +
sudo service qemu-kvm stop
 +
sudo service vboxdrv start
 +
 +
OR use KVM
 +
sudo service vboxdrv stop
 +
sudo service qemu-kvm start
 +
 +
Decide!
 +
 
== Migration from VirtualBox to KVM ==
 
== Migration from VirtualBox to KVM ==
 
This boils down to
 
This boils down to
 +
# creating a clone of the vbox-machine (easiest way of getting rid of snapshots for a play vbox-disk)
 
# converting the images from vbox to qcow
 
# converting the images from vbox to qcow
 
# creating and configuring a new kvm-guest
 
# creating and configuring a new kvm-guest
 
# adding some NAT-fu (see next section)
 
# adding some NAT-fu (see next section)
  
 +
* http://serverfault.com/questions/249944/how-to-export-a-specific-virtualbox-snapshot-as-a-raw-disk-image/249947#249947
 +
 +
VBoxManage clonehd -format RAW myOldVM.vbox /home/vm-exports/myNewVM.raw
 +
cd /home/vm-exports/
 +
qemu-img convert -f raw myNewVM.raw -O qcow2 myNewVM.qcow
  
 +
# for a snapshot do (not tested)
 +
cd /to/the/SnapShot/dir
 +
VBoxManage clonehd -format RAW SNAPSHOT_UUID /home/vm-exports/myNewVM.raw
  
  

Revision as of 13:25, 29 October 2013

Using VirtualBox and KVM together

This is NOT possible!!!

Use VirtualBox

sudo service qemu-kvm stop
sudo service vboxdrv start

OR use KVM

sudo service vboxdrv stop
sudo service qemu-kvm start

Decide!

Migration from VirtualBox to KVM

This boils down to

  1. creating a clone of the vbox-machine (easiest way of getting rid of snapshots for a play vbox-disk)
  2. converting the images from vbox to qcow
  3. creating and configuring a new kvm-guest
  4. adding some NAT-fu (see next section)
VBoxManage clonehd -format RAW myOldVM.vbox /home/vm-exports/myNewVM.raw
cd /home/vm-exports/
qemu-img convert -f raw myNewVM.raw -O qcow2 myNewVM.qcow
# for a snapshot do (not tested)
cd /to/the/SnapShot/dir
VBoxManage clonehd -format RAW SNAPSHOT_UUID /home/vm-exports/myNewVM.raw


Accessing services on KVM guests behind a NAT

I am referring to this article:

which ist mentioned in the libvirt wiki:

I installed the qemu-python script of the first articel under ubuntu 12.04 LTS, which worked like expected.

So I can access a port in the virtualmachine-guest with the IP/Port of the host (!). From within the host, it is possible to reach the