Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
04 (NattyNarwhal)
I needed to migrate my development VM (running Fedora 14) from VirtualBox running on my Mac to my Ubuntu Server (11.04, NattyNarwhal). Don't ask why...I'm a masochist. As with all things virtual, this usually means shaving a few yaks.
independent machine on the network, not some second class NAT-ted citizen) First I need to set up my bridge. A little googling tells me to change my /etc/network/interfaces le from being like so: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces (5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1
to being like so: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces (5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet manual auto br0 iface br0 inet static address 192.168.0.100 network 192.168.0.0 netmask 255.255.255.0 broadcast 192.168.0.255 gateway 192.168.0.1
bridge_ports eth0 bridge_fd 9 bridge_hello 2 bridge_maxage 12 bridge_stp off (thanks mr falko and howtoforge) Next I restart my network (of course this promptly kicks me off my SSH session). /etc/init.d/networking restart
So I download virt-manager: apt-get install virt-manager Despite its best intentions it can't avoid downloading some bloat. Once its up and running I follow Mr. Anonymous' instructions and try to get it launched. It works the rst time, but then it just keeps giving me the infamous "cannot open display error". So I spend a couple of hours trying to x that. Ultimately I resort to the: ssh -X user@myserverip xterm In the xterm: sudo virt-manager This launches the program. I choose to use an existing image for a new VM and choose the qcow I created while dealing with Yak1.
However, when I try to boot it, it gives me a "Not a bootable device" error. Meet Granddaddy Yak!
virsh -c qemu:///session dumpxml VMName > /tmp/VMName.xml From <devices> <emulator>/usr/bin/kvm</emulator> Update the hard drive format in the xml file:
<disk type=file device=disk> <driver name=qemu type=raw/> <source file=/storage/node1.qcow/> <target dev=hda bus=ide/> </disk> To <devices> <emulator>/usr/bin/kvm</emulator> <disk type=file device=disk> <driver name=qemu type=qcow2/> <source file=/storage/node1.qcow/> <target dev=hda bus=ide/> </disk>
Open virt-manager and delete the problem vm but make sure to leave the hard drive image Import in the fixed xml file:
virsh -c qemu:///session define /tmp/VMName.xml The vm will automatically appear in virt-manager. The vm should boot fine now.
Thanks Dev! It works now. The oor is thick with Yak wool, I've exhausted an amount of coffee that my mother would have considered appropriate for consumption over a few months and my mouth tastes of burnt tobacco, but my Virtual Machine is migrated from VirtualBox to KVM. Parting shot: Still easier than installing VMware ESX on an AMD Phenom X6 1090T...with a NIC not on the VMware HCL. Viva Le Open Source