13 Replies Latest reply: Aug 14, 2012 12:42 PM by Alan3 RSS

    VM 2.1.2 to VM 3.0.3

      I have a couple of VMs still running in 2.1.2 that I need to get moved into 3.0.3.
      I was reading this thread with interest... Move OVM 2.2 guests to 3.11 OVM
      I have never attempted to create a VM template - I've only built VMs fresh from install media.
      In reading that thread I get the idea that a VM can be used as a template... ?
      Is there a write-up on this? Any links someone can share?

        • 1. Re: VM 2.1.2 to VM 3.0.3
          Ok... well, nevermind.
          I see now...
          Just t-z'd the .img and the .cfg file together, copied it into my local PC's XAMPP htdocs folder and passed that URL on to OVM3's template import...
          From there cloned the template into a VM... which is in process as I type.
          Pretty slick actually - I never realized it was that easy...
          I thought I would have to use the template creator tool to do such a thing...
          I have been schooled... :)
          • 2. Re: VM 2.1.2 to VM 3.0.3
            Ok... well... not so fast...
            After the clone and attempting to start the new VM I'm getting the error below... where would I have gone wrong here??

            exceptions.RuntimeError:Command ['xm', 'create', '/OVS/Repositories/0004fb0000030000ccaa3caacd1900c0/VirtualMachines/0004fb0000060000fc5bc758ea063ca3/vm.cfg'] failed (1): stderr: Error: Boot loader didn't return any data!
            • 3. Re: VM 2.1.2 to VM 3.0.3
              I modified the vm.cfg to be similar to my other VM's in 3.0.3.. now the server is at least 'attempting' to boot.
              It finds the boot loader and starts to load - but it can't find any of the mount volumes and goes to kernel panic...
              This just gets better and better...
              • 4. Re: VM 2.1.2 to VM 3.0.3
                Make sure you're correctly setting the virtulzation method on the VM - e.g. hvm, PV-HVM, PV OPS-Kernel, etc.etc.
                • 5. Re: VM 2.1.2 to VM 3.0.3
                  The 2.1.2 VM is 'Fully Virtualized' which I assume is equivalent to 'HVM' in 3.0.3... ?
                  • 6. Re: VM 2.1.2 to VM 3.0.3
                    Yep, fully virtulized = HVM.

                    You can always try connecting to the console via the command line, this will tell you what it's trying to load on boot time.

                    cd into the directory that has the correct vm.cfg file for the vm (check in the GUI the UUID of the VM for it's location) then you can:

                    xm create -c ./vm.cfg

                    and it will immediately connect to the console. This may help you figure out why it's not working.
                    • 7. Re: VM 2.1.2 to VM 3.0.3
                      Actually - now that I've blown it away... I think I know my issue... me...
                      I asked the question in a previous thread here... OVM 3.0.3 - New VM loses filesystem after OS install
                      I must be getting senile...
                      Will try the import again this evening and see how it goes...
                      • 8. Re: VM 2.1.2 to VM 3.0.3
                        Ok! That was the issue with the volume mounts.
                        Now... on to the network issues...
                        Seems my VNIC isn't getting picked up and I get errors trying to configure a network device on the VM... ?
                        "ImportError: cannot import name CTC"
                        I'm sure I've seen this before...
                        • 9. Re: VM 2.1.2 to VM 3.0.3
                          Only way I found to recover from this was to 'yum erase system-config-network*'
                          Then 'yum install system-config-network*'
                          That allowed me to actually open the net config.
                          From there, I deleted the eth0 device and configured a eth1 device - which finally connected and worked.
                          I haven't been able to determine why eth0 will not work... but I at least have a usable workaround...
                          A clone/upgrade/migration should not be this difficult...
                          • 10. Re: VM 2.1.2 to VM 3.0.3
                            Much easier way is to just copy the disks of the vm's to the VirtualDisks folder.
                            Then Create a new vm in OVM Manager 3.0.3 with the disks from the original VM in the correct order.

                            no need for zipping, downloading, unpacking and no need of a http/ftp server setup.

                            Edited by: user11981649 on Aug 14, 2012 6:04 AM
                            • 11. Re: VM 2.1.2 to VM 3.0.3
                              I've found that to be true as well, but it still doesn't fix the problems I've had with the vnic configurations.
                              I still had to delete the old nic and configure a new one...
                              For whatever reason, the new vnic shows up as 'eth1' and the original 'eth0' is simply useless...
                              I thought surely this would have occurred to someone before me, but looks like it's pretty unique to my particular install...
                              Regardless, I've got all my 2.x VMs moved into 3.0.3 and working well now...
                              • 12. Re: VM 2.1.2 to VM 3.0.3
                                Could it be that your network config inside the vm includes the HWADDR line?
                                Check /etc/sysconfig/network-scripts/ifcfg-eth0

                                in the new vm, the vnic has a different mac address so linux doesn't detect it as eth0.
                                Before migrating, best to remove these lines or make sure the mac of the vnic is the same.
                                • 13. Re: VM 2.1.2 to VM 3.0.3
                                  I'm not sure. I didn't specifically remove just the HWADDR line.
                                  I did try removing eth0 completely and then importing into VM3 and the vnic still attaches as eth1.
                                  It isn't affecting performance... at this point it is more of a curiosity than anything.
                                  Right now all I have is eth1 - no eth0 appears.

                                  I've already taken down the VM2 environment - those servers are now off-lease and getting ready to ship out.