0553.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Export Proxmox VE VM for Use With VirtualBox</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  7. <script type="text/javascript">
  8. $(function(){
  9. $('textarea').each(function(i,e){
  10. theTextarea = $(this);
  11. theTextarea.height((theTextarea[0].scrollHeight-5) +'px');
  12. });
  13. $('li').each(function(i,e){
  14. var uuid = 'li_' + Math.floor(Math.random() * Math.floor(1000000)).toString() + '_' + i.toString();
  15. $(this).contents().wrap('<span id="'+ uuid +'"><label for="cb_'+ uuid +'"></label></span>');
  16. $(this).prepend('<input type="checkbox" class="completeBox" id="cb_' + uuid +'" rel="'+ uuid +'" />')
  17. });
  18. $('code,div.codeBlock,textarea.codeBlock').each(function(i,e){
  19. theElement = $(this);
  20. var lines = theElement.html().split("\n");
  21. theElement.empty();
  22. for(l=0;l<lines.length;l++){
  23. if($.trim(lines[l]) != '' && $.trim(lines[l]).substr(0,1) != '#' && $.trim(lines[l]).indexOf(' #') == -1 && lines[l].substr(0, 4).toUpperCase() != 'REM '){
  24. theElement.append('<input type="image" src="images/clipboard.png" value="" class="copy-text" rel="copy_'+ i +'_'+ l +'" data-clipboard-text="'+ lines[l].replace(/"/g, '&quot;') +'" /><span id="copy_'+ i +'_'+ l +'">'+ lines[l] +'</span>');
  25. } else {
  26. theElement.append(lines[l]);
  27. }
  28. }
  29. });
  30. $(document).on('click','input.copy-text',function(){
  31. theButton = $(this);
  32. $('input.copy-text').attr('src','images/clipboard.png');
  33. $('span.copy-animation,span.copy-animation-ps').removeClass('copy-animation copy-animation-ps');
  34. try {
  35. if($('#'+ theButton.attr('rel')).parent('div').hasClass('PS')){
  36. $('#'+ theButton.attr('rel')).addClass('copy-animation-ps');
  37. } else if($('#'+ theButton.attr('rel')).parent('div').hasClass('CMD')){
  38. $('#'+ theButton.attr('rel')).addClass('copy-animation-cmd');
  39. } else {
  40. $('#'+ theButton.attr('rel')).addClass('copy-animation');
  41. }
  42. navigator.clipboard.writeText(theButton.data('clipboard-text').replace(/<[^>]*>?/gm, ''));
  43. theButton.attr('src','images/clipboard_active.png');
  44. } catch(err) {
  45. }
  46. return false;
  47. });
  48. $(document).on('click','input.completeBox',function(){
  49. theBox = $(this);
  50. $('#'+ theBox.attr('rel')).addClass('strikethrough');
  51. theBox.prop('disabled',true);
  52. theBox.parent('li').prevAll().each(function(i,e){
  53. theLI = $(this);
  54. if(theLI.find('input[type=checkbox]').not(':checked')){
  55. $('#'+ theLI.find('input[type=checkbox]').attr('rel')).addClass('strikethrough');
  56. theLI.find('input[type=checkbox]').prop('checked',true).prop('disabled',true);
  57. }
  58. });
  59. });
  60. if(window.self !== window.top){
  61. window.parent.$('iframe.stepsFrame').height((this['scrollingElement']['scrollHeight']+20) +'px');
  62. }
  63. });
  64. </script>
  65. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  66. </head>
  67. <body>
  68. <div id="gridContainer">
  69. <div class="topMargin"></div>
  70. <div id="listName" class="topMargin">
  71. <h1>Export Proxmox VE VM for Use With VirtualBox</h1>
  72. </div>
  73. <div></div>
  74. <div id="content">
  75. <p>NOTE: In this tutorial I&#39;ll be backing up the VM to an existing network share. For details on how to add a network share to Proxmox, check out this tutorial <a href="https://youtu.be/hkrFZoiYX_0?t=47" target="_blank">https://youtu.be/hkrFZoiYX_0?t=47</a></p>
  76. <h2>Export the VM from Proxmox VE</h2>
  77. <ol>
  78. <li>Log into the Proxmox VE web UI</li>
  79. <li>Select the VM from the left navigation menu</li>
  80. <li>Select Backup from the left sub-navigation menu</li>
  81. <li>Click the Backup now button towards the top of the page</li>
  82. <li>Set the destination location, the Mode to Stop and the Compression to none &gt; Click Backup</li>
  83. <li>After the backup operation has completed, select the Proxmox node from the left navigation menu</li>
  84. <li>Select Shell from the left sub-navigation menu</li>
  85. <li>Change directory to the location of the vma backup file, this will vary based on your specific setup
  86. <div class="codeBlock CMD"># change directory to view mounted shares<br />
  87. cd /mnt/pve<br />
  88. # list mounted shares<br />
  89. ls<br />
  90. # cd into dump directory on the specific share, ISOs in this example<br />
  91. cd ISOs/dump<br />
  92. # list the files in the share<br />
  93. ls</div>
  94. </li>
  95. <li>The backup .vma file and a .log file should be displayed</li>
  96. <li>Extract the .vma file using the vma command line tool
  97. <div class="codeBlock CMD"># extract the .vma<br />
  98. # usage: vma extract -v &lt;vzdump-filename.vma&gt; &lt;destination directory&gt;<br />
  99. vma extract -v filename.vma ./export</div>
  100. </li>
  101. <li>Wait for the .vma to be extracted, resulting in a .raw disk image</li>
  102. </ol>
  103. <h2>Converting and Importing the Disk to VirtualBox</h2>
  104. <ol>
  105. <li>Launch VirtualBox Manager</li>
  106. <li>Create a new VM, using the same/similar hardware specifications as the Proxmox VM</li>
  107. <li>Choose to not create a virtual hard disk</li>
  108. <li>With the VM created, right click the VM in the left navigation menu &gt; Show in Explorer</li>
  109. <li>Copy the exported .raw disk image to the VirtualBox VM folder</li>
  110. <li>Hold the SHIFT key and right click in the white space &gt; Open PowerShell window here...</li>
  111. <li>Run the following command to convert the .raw disk image to .vdi
  112. <div class="codeBlock PS"># list .raw files<br />
  113. Get-ChildItem -File -Filter *.raw |Select Directory, Name, Extension<br />
  114. # usage: vboxmanage.exe convertfromraw &lt;input-filename.raw&gt; &lt;output-filename.vdi&gt;<br />
  115. Invoke-Expression (&#39;&amp; &quot;&#39;+ $Env:Programfiles +&#39;\Oracle\VirtualBox\VBoxManage.exe&quot; convertfromraw &quot;.\input-filename.raw&quot; &quot;.\output-filename.vdi&quot;&#39;)</div>
  116. </li>
  117. <li>Back in VirtualBox Manager, select the VM and Click Settings</li>
  118. <li>Select Storage from the left navigation menu</li>
  119. <li>Click Add Storage Attachment &gt; Add Hard Disk &gt; Choose existing disk</li>
  120. <li>Click Add and browse to the newly converted .vdi file</li>
  121. <li>Click OK to all open VirtualBox dialog windows</li>
  122. <li>Right click the VM &gt; Select Start &gt; Normal</li>
  123. </ol>
  124. </div>
  125. </div>
  126. </body>
  127. </html>