XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Cannot export VM in .ova file

    Scheduled Pinned Locked Moved Solved Development
    31 Posts 8 Posters 18.6k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      dan2462
      last edited by dan2462

      Ok, using XCP-ng Center 7.6.1 x64 to perform an export from a system. The .xva is presently stored on USB, thus portable.

      Core system is 7.6, fully patched (not sure how i can find out if otherwise).

      Error message is simple "Failed to Export".

      The reason why I need .ova is because i need to check a few things on that VM, and usually do it via oracle, thus the end conversion is .vdi, however, virtualbox easily converts .ova file, so for me more important how i can format to .ova from .xva, and why the system doesnt do it itself as intended.

      ***Update:

      So just updated the XCP-ng Center to the newest version of 20.03.00, and still get the same error on export of .ova

      P 1 Reply Last reply Reply Quote 0
      • D Offline
        dan2462 @olivierlambert
        last edited by

        @olivierlambert

        How can I export VM disks in VHD? This is the first time I'm hearing about that option. Please explain.

        1 Reply Last reply Reply Quote 0
        • P Offline
          peder @dan2462
          last edited by

          @dan2462 said in Cannot export VM in .ova file:

          ***Update:

          So just updated the XCP-ng Center to the newest version of 20.03.00, and still get the same error on export of .ova

          You still haven't posted what that error is.

          When you export to OVA you need to make sure to configure the network correctly in the export wizard.
          If you have multiple vlans on the server you have to select the correct one and so on.

          D 1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            In XO it's trivial, just clicking on VM disk button called "export". You can also do it with xe CLI.

            D 1 Reply Last reply Reply Quote 0
            • D Offline
              dan2462 @peder
              last edited by

              @peder

              This is the error sting from the log:

              2020-03-19 09:20:01,261 ERROR XenAdmin.Actions.AsyncAction [27] - System.Exception: Failed to export. ---> System.Exception: Failed to transfer virtual disk I:\xx\d7e6a6e0-f362-4c26-8df7-de9fea5fc1ca.vhd. ---> System.Exception: Failed to start the Transfer VM. ---> XenAPI.Failure: There was a failure communicating with the plug-in.

              P E 2 Replies Last reply Reply Quote 0
              • D Offline
                dan2462 @olivierlambert
                last edited by

                @olivierlambert

                Sure, but why cant you guys make it "trivial" in XCP-ng Center? You praise XO so much, but one, it comes with limitations, 2nd its another 3rd party software and 3rd to get full capability it has to be paid, and lastly in order for it to be up to date you need it to have internet access given the license etc.

                In short, when you build a closed end system its best to take in what you know or can open and double check. I like XCP-ng and I think you guys have done great job and will hire your system admin in the future but for now certain things have to be achieved and I prefer less systems and those few to work as stated.

                Thus, when you mention xe CLI export, it there a tutorial one can view to see the steps?

                olivierlambertO 1 Reply Last reply Reply Quote 1
                • P Offline
                  peder @dan2462
                  last edited by peder

                  @dan2462 Don't know what's causing the error but you can export the VHD by ssh:ing to your server or selecting "Local Command shell" on the console and running the following

                  xe vdi-list 
                  xe vdi-export uuid=the-uuid-of-your-VM filename=filename.vhd format=vhd 
                  

                  Make sure the location you're saving to has enough space for the file.

                  If you have curl installed on your VirtualBox machine you can run

                  curl -u root:your-xcpng-root-password -X GET "server-name-or-IP/export_raw_vdi?vdi=your-vdi-uuid&format=vhd" -o filename.vhd
                  

                  on it.

                  D 2 Replies Last reply Reply Quote 1
                  • D Offline
                    dan2462 @peder
                    last edited by

                    @peder

                    Thank you. I will be exporting the file remotely from a machine in datacenter to a local machine via network.

                    In the past, as I used XCP-ng Center, I just plugged a USB and export .xva to USB directly.

                    Now, what would be the line command for the above but .ova.

                    I got the xe-list and xe export, but what would be the next line to command. I'm not very good a command line on cent/redhat. Would I need to mount remote storage usb etc. Please advice, meanwhile thank you much for assistance so far.

                    P 1 Reply Last reply Reply Quote 0
                    • D Offline
                      dan2462 @peder
                      last edited by

                      @peder

                      About the error, to you knowledge does the system utilize any ports different from the one it uses for .xva? Could be a networking issue as its quite tight.

                      Or perhaps, can it be some form of limitation of the memory and power allocated to machine itself.

                      Would really like to find out if i'm the only one that has the same issue, or to be exact to find the root of it.

                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        peder @dan2462
                        last edited by

                        @dan2462
                        I don't think you can do a CLI export to ova.
                        You couldn't in 2015, at least
                        https://discussions.citrix.com/topic/361151-how-to-export-to-ovaovf-with-command-line/

                        If you absolutely need ova you have to try and figure out why there's a communication failure.
                        My guess would be something network related, like a firewall between the XCP-ng server and your XCP-ng Center PC.
                        Or you're not using the correct setting on the Network page.

                        Someone said "To solve it I simply had to choose an unused static IP on the same subnet as the Network Management Console where the server pool resides."

                        I don't know what ports the transfer uses and a quick google search didn't show anything either.

                        D 1 Reply Last reply Reply Quote 0
                        • D Offline
                          dan2462 @peder
                          last edited by dan2462

                          @peder

                          wait... vhd would work too, doesnt have to be just ova.

                          I tried running a sniffer on the network and saw no requests on any ports from the system other than whats in use, thus same networking layers are used as for .xva.

                          So i just drilled ssh access to the machine, so would like to do it via cli, if you can perhaps just share with me the rest of command line to move it to remote storage location such as usb, would greatly appreciate it.

                          xe vdi-list 
                          xe vdi-export uuid=the-uuid-of-your-VM filename=filename.vhd format=vhd 
                          ......?
                          
                          P 1 Reply Last reply Reply Quote 0
                          • olivierlambertO Offline
                            olivierlambert Vates 🪐 Co-Founder CEO @dan2462
                            last edited by olivierlambert

                            Hi!

                            Let me clear some things.

                            @dan2462 said in Cannot export VM in .ova file:

                            @olivierlambert

                            Sure, but why cant you guys make it "trivial" in XCP-ng Center? You praise XO so much, but one, it comes with limitations, 2nd its another 3rd party software and 3rd to get full capability it has to be paid, and lastly in order for it to be up to date you need it to have internet access given the license etc.

                            Because XCP-ng Center is not maintained by Vates, it's only community maintained. We discourage usage of it because there's only one person maintaining it on his freetime, @borzel : he's kind to do this, but he's alone. If you want to assist him and improve XCP-ng Center, go ahead.

                            It's far less 3rd party than XCP-ng Center which is mainly a clone of XenCenter for Citrix.

                            Also, Xen Orchestra is fully Open Source. So your statement about licensing is just plain wrong 3 times: If you don't want to pay, you can. If you have a paid license, it works offline too. You can also use XOA Free.

                            In short, when you build a closed end system its best to take in what you know or can open and double check. I like XCP-ng and I think you guys have done great job and will hire your system admin in the future but for now certain things have to be achieved and I prefer less systems and those few to work as stated.

                            I strongly recommend Xen Orchestra for a lot of reasons: XCP-ng team is working closely with Xen Orchestra, allowing new features to be added both in server and client. We can test it extensively interactions between those two. It's also completely independent from Citrix choices, which is far better.

                            We have plans for a XO Lite client that will be embed on XCP-ng, so we can remove the last use case for XCP-ng Center.

                            1 Reply Last reply Reply Quote 0
                            • P Offline
                              peder @dan2462
                              last edited by

                              @dan2462
                              Plug the USB stick into your XCP-ng server and run

                              dmesg | tail 
                              # You should see "sdb: sdb1" or something similar at the bottom of the screen
                              mount /dev/sdb1 /mnt
                              cd /mnt
                              # Make sure you've mounted the correct device and partition :
                              df -h . 
                              # You should see that it's the expected USB size
                              

                              If that's the case run the xe commands to save on the USB.
                              When that's done you run

                              cd /root
                              sync
                              umount /mnt
                              

                              Then it's safe to remove the USB

                              D 1 Reply Last reply Reply Quote 0
                              • D Offline
                                dan2462 @peder
                                last edited by

                                @peder

                                Thank you. Unfortunately, that machine is in datacenter so dont have physical usb access.

                                Nevertheless, I found a way to do the conversion. Seems as XenConvert 2.3.1 is capable of doing it, however, its only that version that does it, the rest are all different.

                                Therefore, issue resolved for conversion, but i'm still wondering if im the only one that had that issue or is it quite common given the system version I have to xcp and the center.

                                1 Reply Last reply Reply Quote 0
                                • E Offline
                                  Edwardwsr
                                  last edited by

                                  Hi Dan2462, I would like you to go for the following steps. In the star just choose the virtual machine and pick the option that says File > Export to OVF. Now add a name for the OVF file and mention a directory in which you need to save it. Here mention if you want to export the virtual machine as an OVF, a folder with individual files, or as an OVA, a single-file archive. At the end press Export to start the procedure of OVF export. This step will take some time and a status bar lets you know about the progress of the export process. Apart from that, https://appuals.com/export-import-vm-oracle/ this website would be really helpful for you in getting to know much more about it. I hope that by following these steps you would be able to resolve this issue.

                                  1 Reply Last reply Reply Quote 0
                                  • E Offline
                                    EdRoxter 0 @dan2462
                                    last edited by

                                    Sorry for grave digging here, but since this answer ranks pretty high in the Google results, I thought I might add a possible solution:

                                    During the export wizard in XCP-ng Center, you're being asked for the network configuration of the Transfer VM. As for my observations, two things are pretty vital here:

                                    1. The network you choose to place the Transfer VM's virtual interface in must be reachable from your computer/XCP-ng center.
                                    2. Enter a static IP configuration, DHCP has never worked for me, even though a DHCP server is running in the selected network.

                                    Hope this helps some!

                                    1 Reply Last reply Reply Quote 0
                                    • ? Offline
                                      A Former User
                                      last edited by olivierlambert

                                      Dear,
                                      with a brand-new 8.2 xcp-ng server installation I was able to export ova from XCP-NG Center.
                                      After upgrading it with latest patches (yum update) I'm not able to to export back ova.
                                      I've done this test both on my production server and also installing it in a new system from scratch.

                                      I've tried using both DHCP and static IP. no luck.

                                      Thanks in advance for any feedback.

                                      The log reports is the following:

                                      2022-02-27 20:40:18,971 INFO  Audit [Main program thread] - Operation started: ExportApplianceAction: xcpserver: VM bdc057c5-d2c4-a3ff-e307-fe510de32146 (VM1): Pool 0bc5c93d-6cfc-811a-cf85-0b72732ca6e5 (xcpserver): Host 7314e7fb-cd5f-481b-a464-86b3acc3ae5c (xcpserver): 
                                      2022-02-27 20:40:24,867 ERROR XenOvfTransport.iSCSI [30] - Failed to start Transfer VM.
                                      There was a failure communicating with the plug-in.
                                      2022-02-27 20:40:24,868 ERROR XenOvfTransport.Export [30] - Failed to transfer virtual disk C:\Backup\VM1\6ad97f18-51e4-45ed-b088-bfa2affc1b87.vhd
                                      System.Exception: Failed to start the Transfer VM. ---> XenAPI.Failure: There was a failure communicating with the plug-in.
                                         at XenAPI.JsonRpcClient.Rpc[T](String callName, JToken parameters, JsonSerializer serializer)
                                         at XenAPI.Host.call_plugin(Session session, String _host, String _plugin, String _fn, Dictionary`2 _args)
                                         at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only)
                                         --- End of inner exception stack trace ---
                                         at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only)
                                         at XenOvfTransport.iSCSI.Connect(Session xenSession, String vdiuuid, Boolean read_only)
                                         at XenOvfTransport.Export._copydisks(EnvelopeType ovfEnv, String label, String targetPath)
                                      2022-02-27 20:40:24,877 ERROR XenOvfTransport.Export [30] - Export failed
                                      System.Exception: Failed to transfer virtual disk C:\Backup\VM1\6ad97f18-51e4-45ed-b088-bfa2affc1b87.vhd. ---> System.Exception: Failed to start the Transfer VM. ---> XenAPI.Failure: There was a failure communicating with the plug-in.
                                         at XenAPI.JsonRpcClient.Rpc[T](String callName, JToken parameters, JsonSerializer serializer)
                                         at XenAPI.Host.call_plugin(Session session, String _host, String _plugin, String _fn, Dictionary`2 _args)
                                         at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only)
                                         --- End of inner exception stack trace ---
                                         at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only)
                                         at XenOvfTransport.iSCSI.Connect(Session xenSession, String vdiuuid, Boolean read_only)
                                         at XenOvfTransport.Export._copydisks(EnvelopeType ovfEnv, String label, String targetPath)
                                         --- End of inner exception stack trace ---
                                         at XenOvfTransport.Export._copydisks(EnvelopeType ovfEnv, String label, String targetPath)
                                         at XenOvfTransport.Export._export(Session xenSession, String targetPath, String ovfname, String vmUuid)
                                      2022-02-27 20:40:24,877 ERROR XenAdmin.Actions.AsyncAction [30] - System.Exception: Failed to export. ---> System.Exception: Failed to transfer virtual disk C:\Backup\VM1\6ad97f18-51e4-45ed-b088-bfa2affc1b87.vhd. ---> System.Exception: Failed to start the Transfer VM. ---> XenAPI.Failure: There was a failure communicating with the plug-in.
                                         at XenAPI.JsonRpcClient.Rpc[T](String callName, JToken parameters, JsonSerializer serializer)
                                         at XenAPI.Host.call_plugin(Session session, String _host, String _plugin, String _fn, Dictionary`2 _args)
                                         at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only)
                                         --- End of inner exception stack trace ---
                                         at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only)
                                         at XenOvfTransport.iSCSI.Connect(Session xenSession, String vdiuuid, Boolean read_only)
                                         at XenOvfTransport.Export._copydisks(EnvelopeType ovfEnv, String label, String targetPath)
                                         --- End of inner exception stack trace ---
                                         at XenOvfTransport.Export._copydisks(EnvelopeType ovfEnv, String label, String targetPath)
                                         at XenOvfTransport.Export._export(Session xenSession, String targetPath, String ovfname, String vmUuid)
                                         --- End of inner exception stack trace ---
                                         at XenOvfTransport.Export._export(Session xenSession, String targetPath, String ovfname, String vmUuid)
                                         at XenOvfTransport.Export.Process(String targetPath, String ovfname, String[] vmUuid)
                                         at XenAdmin.Actions.OVFActions.ExportApplianceAction.Run()
                                         at XenAdmin.Actions.AsyncAction.RunWorkerThread(Object o)
                                      2022-02-27 20:40:24,878 WARN  Audit [30] - Operation failure: ExportApplianceAction: xcpserver: VM bdc057c5-d2c4-a3ff-e307-fe510de32146 (VM1): Pool 0bc5c93d-6cfc-811a-cf85-0b72732ca6e5 (xcpserver): Host 7314e7fb-cd5f-481b-a464-86b3acc3ae5c (xcpserver): Disconnecting virtual disk 6ad97f18-51e4-45ed-b088-bfa2affc1b87.vhd ...
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • olivierlambertO Offline
                                        olivierlambert Vates 🪐 Co-Founder CEO
                                        last edited by

                                        I wouldn't rely on XCP-ng Center for that. Xen Orchestra will have OVA export in the April release. VMDK export is already there 🙂

                                        ? rowieR 2 Replies Last reply Reply Quote 0
                                        • ? Offline
                                          A Former User @olivierlambert
                                          last edited by

                                          @olivierlambert thanks, OVA export in april will be a very great feature that complitely allow me to forget xcp-ng center

                                          1 Reply Last reply Reply Quote 0
                                          • olivierlambertO Offline
                                            olivierlambert Vates 🪐 Co-Founder CEO
                                            last edited by

                                            Indeed, we are close to finish it, maybe even March release 🙂 Hang on!

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post