From: Jun C. P. <jun...@gm...> - 2010-12-15 21:39:31
|
It turned out that, when I used "virsh start mfskvm1," it simply worked well, no network issue any more. Interestingly enough, when I manually invoked qemu-kvm with the same options, I got all weird problems (network issue, udev fails, and so on...). So in my tentative conclusion, "virsh start domain" does internally something more than invoking the qemu-kvm process. Anyway, it seems that there is a way to successfully create a KVM VM on the native MFS although virt-manger and virt-install still do not work well on MFS for me. -Jun On Tue, Dec 14, 2010 at 3:13 PM, Jun Cheol Park <jun...@gm...> wrote: > Hi, > > I have been trying to create a KVM guest VM on the native MFS. But it > has not been quite successful although I getting closer.... Before > delving into the problems, I would like to clarify some relevant > issues. When I used a loop device on top of MFS using sparse files > (For instance, mount -o loop /mnt/mfs/mfs_sparse_200g > /mnt/mfs/loop0/), I didn't have any problems in using KVM on > /mnt/mfs/loop0/). > > The problems that I am experiencing now are from the cases where I try > to create KVM guest VMs directly on the native MFS. Here I hope to get > any successful story as to how to **manually** setup a KVM guest OS on > the native MFS without using virt-manager or virt-install because > those tools didn't work on the native MFS. > > The following are the details of the problems. > > First I made an MFS mountpoint on a KVM node (and MFS client) as follows. > # mfsmount -H $metadata_server_ip -o suid -o dev -o rw -o exec /mnt/mfs > # mount > ... > mfs#$metadata_server_ip:9421 on /mnt/mfs type fuse > (rw,allow_other,default_permissions) > > Then, create a disk image file for the guest storage. > # qemu-img create -f qcow2 /mnt/mfs/mfskvm1.img 10G > # virt-install --name CentOS5 --ram 1000 --disk > path=/mnt/mfs/mfskvm1.img,size=10 --network network:default > --accelerate --vnc --cdrom /mnt/mfs/CentOS-5.5-x86_64-bin-DVD-1of2.iso > --os-type=linux > > Then, I got the following error: > > Starting install... > ERROR internal error unable to start guest: qemu: could not open > disk image /mnt/mfs/mfsvkm1.img > > So it seems that the given KVM management tools including virt-install > and virt-manager are not working well directly on the native MFS > because (I guess) there are some incompatible options used by those > tools, which conflicts with MFS. > > Then, I tried to manually create a KVM on the naitve MFS as follows > via qemu-kvm. > > # /usr/libexec/qemu-kvm -M rhel5.4.0 -m 1024 -smp 1 -name mfskvm1 > -uuid af1be3ae-daab-d450-293b-dc03ff7c3c35 -no-kvm-pit-reinjection > -monitor pty -pidfile /var/run/libvirt/qemu/mfskvm1.pid -no-reboot > -boot d -drive file=/mnt/mfs/mfskvm1.img,if=virtio,index=0,format=qcow2,cache=writethrough > -drive file=/mnt/mfs/CentOS-5.5-x86_64-bin-DVD-1of2.iso,if=ide,media=cdrom,index=2,format=raw,cache=writethrough > -net nic,macaddr=12:01:77:99:00:20,vlan=0,model=e1000 -net > tap,fd=33,script=,vlan=0,ifname=vnet0 -serial pty -parallel none -usb > -usbdevice tablet -vnc :10 & > > Then, it worked well! The differences from virt-manager or > virt-install are here I use 'cache=writethrough' rather than 'none' > and don't use '-S' as opposed to the options generated by virt-manager > virt-install. So I could successfully installed CentOS.iso on > mfskvm1.img, and then rebooted it, which resulted in the qemu-kvm > process gone due to the option of -no-reboot. > > Then, I invoked the qemu-kvm process in order to boot up mfskvm1 using > the installed image on mfskvm1.img as follows: > > # /usr/libexec/qemu-kvm -M rhel5.4.0 -m 1024 -smp 1 -name mfskvm1 > -uuid af1be3ae-daab-d450-293b-dc03ff7c3c35 -no-kvm-pit-reinjection > -monitor pty -pidfile /var/run/libvirt/qemu/mfskvm1.pid -boot c -drive > file=/mnt/mfs/mfskvm1.img,if=virtio,index=0,boot=on,format=qcow2,cache=writethrough > -drive file=,if=ide,media=cdrom,index=2 -net > nic,macaddr=12:01:77:99:00:20,vlan=0,model=e1000 -net > tap,fd=34,script=,vlan=0,ifname=vnet0 -serial pty -parallel none -usb > -usbdevice tablet -vnc :10 & > > Everything works fine except for the problem that the ip determination > for eth0 fails. As I mentioned, when I used virt-install on the MFS > **loop** device, the IP determination worked well, which means my dhcp > server properly responded. > > I would like to get some information how to resolve this network setup > issue on the native MFS. > > Thanks in advance, > > -Jun > |