
| This forum is proudly powered by Scientific Linux 6 | SL website Download SL Help Search Members |
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| theNADS |
Posted: Aug 9 2011, 11:25 PM
|
|
|
SLF Junior ![]() ![]() Group: Members Posts: 25 Member No.: 637 Joined: 9-August 11 |
I am attempting to get KVM working on SL6.1. I have installed KVM and installed an Centos5.6 guest.
The Guest install seemed to go ok but when i try to start the guest i get the following error: [root@kvm-sl6x ~]# virsh -c qemu:///system start vmcentos56 error: Failed to start domain vmcentos56 error: operation failed: cannot restore domain 'vmcentos56' uuid 65bb2106-5295-5253-2400-f2d0b56836e2 from a file which belongs to domain 'vmcentos56' uuid e6949ba4-86c3-d092-1caf-eee8ec8dc36d Can anyone assist when this issue. The guest install script i used is as follows: virt-install \ -n vmcentos56 \ -r 1024 \ --os-type=linux \ --os-variant=rhel5.4 \ --disk path=/dev/VolGroupGuests/LogVolvmCentos56,device=disk,bus=virtio,sparse=true,format=raw \ -w bridge=br0,model=virtio \ --nographics \ -x console=ttyS0 \ --location http://mirror.ox.ac.uk/sites/mirror.centos.org/5.6/os/x86_64/ The storage is as follows: [root@kvm-sl6x ~]# pvdisplay --- Physical volume --- PV Name /dev/cciss/c0d0p3 VG Name VolGroupGuests PV Size 435.92 GiB / not usable 3.15 MiB Allocatable yes PE Size 4.00 MiB Total PE 111595 Free PE 106475 Allocated PE 5120 PV UUID Z4ddMr-B9VT-f3CI-uqxS-EZUa-sYJg-QxxXpU --- Physical volume --- PV Name /dev/cciss/c0d0p2 VG Name vg_kvmsl6x PV Size 29.30 GiB / not usable 4.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 7499 Free PE 124 Allocated PE 7375 PV UUID FYH9nI-5L2q-IOo2-verX-6rKr-YA2i-UdNLti [root@kvm-sl6x ~]# lvdisplay VolGroupGuests --- Logical volume --- LV Name /dev/VolGroupGuests/LogVolvmCentos56 VG Name VolGroupGuests LV UUID fSN3H7-FpOP-tbBD-1yVC-yVYL-AXFq-0PMCcq LV Write Access read/write LV Status available # open 0 LV Size 20.00 GiB Current LE 5120 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:2 Any assistance, pointers or suggestions for a possible solution to this issue would be much appreciated. jk |
|
| theNADS |
Posted: Aug 10 2011, 09:15 AM
|
|
|
SLF Junior ![]() ![]() Group: Members Posts: 25 Member No.: 637 Joined: 9-August 11 |
I have found some SELinux related stuff on chapter 16 of the Red Hat Virtualization guide, that i did not know about.
Having the virtualization host mount guest machine LVM's used to be a disaster with Xen / Xen and SELinux, but it looks as though it might be required now with SELinux and KVM! I'll read the relevant Red Hat guide before i post next time. jk |
|
| theNADS |
Posted: Aug 24 2011, 05:46 PM
|
|
|
SLF Junior ![]() ![]() Group: Members Posts: 25 Member No.: 637 Joined: 9-August 11 |
I'm not sure if anyone is interested in this, but i eventually reinstalled the server and got KVM working.
The stuff on Chapter 16 of the Red Hat guide did not seem to be required either it just worked after the second install. On the second install I created the seperate Physical Vol / Vol Group / LogVol with installer, and unmounted the guest virtual machine's LogVol in /etc/fstab. When i rebooted the server and installed the KVM virtual machine everything working fine. The difference between the first and second attempt at Scientific Linux and KVM - was that on the first attempt I did not set up the seperate Physical Vol / Vol Group / Log Vol for the virtual machine with the OS installer. I used fdisk, pvcreate, vgcreate, lvcreate. So i must have messed something up at the commend line. jk |
|
| redman |
Posted: Aug 25 2011, 05:47 AM
|
|
![]() SLF Admin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admins Posts: 1669 Member No.: 2 Joined: 8-April 11 |
Thanks for the update
-------------------- What is SL? - Forum Rules - Info on 3rd Party Repos - How to post images - How to post large text / config files
Desktop: Asus P5QPL-AM, Intel Dual-Core E6500, 4GB DDR2, Asus GeForce GT 430 1GB, SL6.4 x86_64 Test box: Intel S5000PSL, 2x Intel Xeon E5310, 8GB ECC DDR2 FB-Dimm, Asus GeForce GT 220 1GB, SL6.4 x86_64 |
|
| theNADS |
Posted: Aug 30 2011, 03:29 PM
|
|
|
SLF Junior ![]() ![]() Group: Members Posts: 25 Member No.: 637 Joined: 9-August 11 |
I'm still having issues with Scientific Linux 6.1 and KVM.
The reinstall did not do anything to solve this issue. When i tried to install a second virtual machine i got the same error. I eventually found the time to look into this a bit more over the bank holiday weekend and it seems that i needed to setup an LVM storage pool in accordance with chapter 26 of the Red Hat Virtualization guide. Once i setup up this storage pool i could install more than one centos vm without any issues. I have not tried any sl5.x or sl6.x installs, but i am working on the assumption that they will not give my any trouble! However, i need to get debian installed as a virtual machine. I have tried about 6 or 7 installs and whatever adjustments i make i get the same error that i intitally got tried to install the centos vm. Once the install finishes i get the following error: Requesting system reboot [ 2263.456698] Restarting system. Guest installation complete... restarting guest. ERROR operation failed: cannot restore domain 'vmsqueeze' uuid b1968849-8b0b-5a9a-356d-f5dc2e991062 from a file which belongs to domain 'vmsqueeze' uuid 2b9f511e-c782-44ef-a59e-1e3e037a453c Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh --connect qemu:///system start vmsqueeze otherwise, please restart your installation. [root@kvm-sl6x ~]# The script i am using to install the vm is as follows: virt-install \ --name=vmsqueeze \ --ram=1024 \ --vcpus=1 \ --os-type=linux \ --os-variant=debiansqueeze \ --disk path=/dev/libvirt_lvm/volume3,device=disk,bus=virtio,sparse=true,format=raw \ -w bridge=br0,model=virtio \ --nographics \ -x console=ttyS0 \ --location http://mirror.ox.ac.uk/debian/dists/Debian6.0.2/main/installer-amd64/ I have been fairly maticulous setting up the storage and i am even using the same vg and lv names that are used in the Red Hat Virtualization guide. [root@kvm-sl6x ~]# virsh pool-list --all Name State Autostart ----------------------------------------- guest_images_lvm active yes [root@kvm-sl6x ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert volume1 libvirt_lvm -wi-a- 20.00g volume2 libvirt_lvm -wi-a- 20.00g volume3 libvirt_lvm -wi-a- 20.00g LogVolDevShm vg_kvmsl6x -wi-a- 500.00m LogVolHome vg_kvmsl6x -wi-ao 1.95g LogVolRoot vg_kvmsl6x -wi-ao 4.88g LogVolSwap vg_kvmsl6x -wi-ao 6.84g LogVolTmp vg_kvmsl6x -wi-ao 2.93g LogVolVar vg_kvmsl6x -wi-ao 4.88g LogVolVarLog vg_kvmsl6x -wi-ao 6.84g Does anyone know how to resolve this issue, or is it even possible to get a debian based distro on a SL6 kvm install, as i am now starting to run out of ideas? jk |
|
| theNADS |
Posted: Aug 30 2011, 07:42 PM
|
|
|
SLF Junior ![]() ![]() Group: Members Posts: 25 Member No.: 637 Joined: 9-August 11 |
I have finally managed to solve this issue with the following commands:
# virsh --connect qemu:///system undefine vmsqueeze # virsh --connect qemu:///system vol-delete /dev/libvirt_lvm/volume3 # reboot # virsh --connect qemu:///system vol-create-as guest_images_lvm volume3 20G I then ran the install script and Squeeze installed. It seems that full 'virsh --connect qemu:///system' command has to be used to do anything think KVM and SL6.1! My mistake must have be using 'virsh undefine vmsqueeze' and not deleting and then recreating volume3 with the virsh/libvirt stuff. I did not have any of this pain when i tested Debian as a KVM host. Everything just seemed to work first time - no virsh storage pool was required (vgcreate etc worked fine) and no need to use virsh to create the LVM's for each virtual machine. Anyway, KVM is working and hopefully this post might save someone else from having to scratch their head for a couple of days (or perhaps I am just "$%^ at linux!). jk |
|
| rudischmitz |
Posted: Sep 17 2011, 02:46 AM
|
|
|
SLF Newbie Group: Members Posts: 11 Member No.: 29 Joined: 11-April 11 |
If you continue to have issues in VM creation I'd almost suggest a "Desktop" installation, because the GUI VM creation process just works. It eats a little RAM but people like me that type horribly can create a VM in about 30 seconds. Also KVM should be able to host just about any modern x86 OS.
|
|
| serodores |
Posted: Nov 16 2011, 02:09 AM
|
|
|
SLF Newbie Group: Members Posts: 2 Member No.: 1035 Joined: 16-November 11 |
I had a similar issue. I tried changing /etc/libvirt/qemu/<MyVM>.xml's UUID to match the UUID it said it should be, but it doesn't seem to pick it up there. Kindof seems like some stupid file has to be changed to make the UUID match.
|
|
| serodores |
Posted: Nov 16 2011, 02:11 AM
|
|
|
SLF Newbie Group: Members Posts: 2 Member No.: 1035 Joined: 16-November 11 |
virsh managedsave-remove <VMname>
seemed to work for me! |
|
| helikaon |
Posted: Nov 16 2011, 09:25 AM
|
|||
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 514 Member No.: 4 Joined: 8-April 11 |
Good work! Thanks for the info cheers, -------------------- |
|||
| Bodanel |
Posted: Dec 12 2011, 11:46 AM
|
|||
|
SLF Newbie Group: Members Posts: 4 Member No.: 118 Joined: 2-May 11 |
Also for me.Stupid error. |
|||
![]() |
![]() ![]() ![]() |