{"id":16813561,"url":"https://github.com/bmiddha/xva-convert","last_synced_at":"2025-04-11T01:52:10.257Z","repository":{"id":98813873,"uuid":"329946191","full_name":"bmiddha/xva-convert","owner":"bmiddha","description":"Scripts to export and convert XVA Virtual Machine images to qcow2 or img(raw) images.","archived":false,"fork":false,"pushed_at":"2021-01-15T23:47:50.000Z","size":8,"stargazers_count":11,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T23:16:34.563Z","etag":null,"topics":["bash","bash-script","disk-image","kvm","proxmox","qcow2","qemu-img","xenserver"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmiddha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-15T15:13:20.000Z","updated_at":"2024-12-19T12:23:33.000Z","dependencies_parsed_at":"2023-03-13T15:54:23.888Z","dependency_job_id":null,"html_url":"https://github.com/bmiddha/xva-convert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmiddha%2Fxva-convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmiddha%2Fxva-convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmiddha%2Fxva-convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmiddha%2Fxva-convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmiddha","download_url":"https://codeload.github.com/bmiddha/xva-convert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328108,"owners_count":21085258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bash-script","disk-image","kvm","proxmox","qcow2","qemu-img","xenserver"],"created_at":"2024-10-13T10:27:15.132Z","updated_at":"2025-04-11T01:52:10.251Z","avatar_url":"https://github.com/bmiddha.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xva-convert\n\nScripts to export and convert XVA Virtual Machine images to qcow2 or img(raw) images.\n\n## How to use\n\n### Find VM/Snapshot UUID\n\n```bash\n# ssh into xen host\n$ ssh xen.example.com\n# list vms, find vm id that needs to be exported\n$ xe vm-list\nuuid ( RO)           : 5675265a-bdb4-b3d2-05dd-1d03caa0af38\n     name-label ( RW): test-store4\n    power-state ( RO): halted\n\nuuid ( RO)           : 3d7eb6b9-f3ad-dbcd-4034-3c44829e027f\n     name-label ( RW): www1\n    power-state ( RO): running\n\nuuid ( RO)           : 5ab706f0-fec1-2f87-7966-22e9797d5dd9\n     name-label ( RW): nfs_1\n    power-state ( RO): halted\n# xe snapshot-list snapshot-of=\u003cVM_UUID\u003e\n$ xe snapshot-list snapshot-of=6d834684-f97e-0488-1f76-70bf72df34ac # find snapshot of a vm\nuuid ( RO)                : 7f85624c-174e-33fc-5ab6-f8070b8c8f35\n          name-label ( RW): export-snapshot\n    name-description ( RW):\n# if exporting a vm, shut it down\n$ xe vm-shutdown uuid=\u003cuuid\u003e force=true\n# to take a new snapshot use this\n$ xe vm-snapshot vm=\u003cuuid\u003e new-name-label=\u003cvm_snapshot_name\u003e\n```\n\n### Exporting `xva`\n\n#### Using download script\n\n```bash\n$ xva-convert/download-xva.sh -h\nusage: download-xva -x XEN_HOST -u UUID [ -o OUTPUT || -h]\n\n  -x | --xen-host          : XEN Host\n  -u | --uuid              : VM/Snapshot UUID\n  -o | --output            : Output file (Default: uuid.xva)\n  -h | --help              : This message\n# xva-convert/download-xva.sh -x XEN_HOST -u VM_UUID/SNAPSHOT_UUID -o XVA_FILE\n$ xva-convert/download-xva.sh -x xen.example.com -u 5ab706f0-fec1-2f87-7966-22e9797d5dd9 -o nfs_1.xva\n#######################################################\nxen_host    : xen.example.com\nuuid        : 5ab706f0-fec1-2f87-7966-22e9797d5dd9\noutput      : nfs_1.xva\n#######################################################\n\nusername: bharat\npassword:\n\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n100 3253M    0 3253M    0     0  12.0M      0 --:--:--  0:04:31 --:--:--  274k\n\ncurl exit code: 0\n\n```\n\n#### Using `xe` cli\n\n```bash\nxe vm-export vm=\u003cVM_UUID/SNAPSHOT_UUID\u003e filename=vm.xva\n```\n\n### `xva` ➡ `qcow2`\n\n```bash\n$ xva-convert/xva-convert.sh --help\nPlease run as root/sudo\n$ sudo xva-convert/xva-convert.sh --help\nusage: xva-convert -f image_format -x xva_file [-o OUTPUT || -h]\n\n  -x | --xva-file          : XVA file\n  -f | --image-format      : img / qcow2\n  -o | --output            : output image path\n  -h | --help              : This message\n# sudo xva-convert/xva-convert.sh -x XVA_FILE -f FORMAT\n$ sudo xva-convert/xva-convert.sh -x nfs_1.xva -f qcow2\n#######################################################\nxva_file     : nfs_1.xva\nimage_format : qcow2\noutput       : /home/user/nfs_1.qcow2\n#######################################################\n\nExtracting XVA ...\n3.18GiB 0:00:06 [ 539MiB/s] [=====================================================================================================\u003e] 100%\n\nConverting to raw ...\n.xen_convert_tmp/Ref:140\nlast file         : 76812\ndisk image size   : 75.01171875 GB\n\nRW notification every: 1.0GB\nConverting: 1.0GBrw 2.0GBrw 3.0GBrw 4.0GBrw 5.0GBrw 6.0GBrw 7.0GBrw 8.0GBrw 9.0GBrw 10.0GBrw 11.0GBrw 12.0GBrw 13.0GBrw 14.0GBrw 15.0GBrw 16.0GBrw 17.0GBrw 18.0GBrw 19.0GBrw 20.0GBrw 21.0GBrw 22.0GBrw 23.0GBrw 24.0GBrw 25.0GBrw 26.0GBrw 27.0GBrw 28.0GBrw 29.0GBrw 30.0GBrw 31.0GBrw 32.0GBrw 33.0GBrw 34.0GBrw 35.0GBrw 36.0GBrw 37.0GBrw 38.0GBrw 39.0GBrw 40.0GBrw 41.0GBrw 42.0GBrw 43.0GBrw 44.0GBrw 45.0GBrw 46.0GBrw 47.0GBrw 48.0GBrw 49.0GBrw 50.0GBrw 51.0GBrw 52.0GBrw 53.0GBrw 54.0GBrw 55.0GBrw 56.0GBrw 57.0GBrw 58.0GBrw 59.0GBrw 60.0GBrw 61.0GBrw 62.0GBrw 63.0GBrw 64.0GBrw 65.0GBrw 66.0GBrw\n 67.0GBrw 68.0GBrw 69.0GBrw 70.0GBrw 71.0GBrw 72.0GBrw 73.0GBrw 74.0GBrw 75.0GBrw\nSuccessful convert\n\n\nConverting to qcow2\n    (100.00/100%)\n\nimage: /home/user/nfs_1.qcow2\nfile format: qcow2\nvirtual size: 75 GiB (80530636800 bytes)\ndisk size: 2.95 GiB\ncluster_size: 65536\nFormat specific information:\n    compat: 1.1\n    compression type: zlib\n    lazy refcounts: false\n    refcount bits: 16\n    corrupt: false\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmiddha%2Fxva-convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmiddha%2Fxva-convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmiddha%2Fxva-convert/lists"}