查看完整版本: Importing Converted VHD Virtual Disk to Citrix XenServer

chun 2009-12-29 23:20

Importing Converted VHD Virtual Disk to Citrix XenServer

http://kb.acronis.com/content/1815<br><h2>1815: Importing Converted VHD Virtual Disk to Citrix XenServer</h2>                                       
            



      <span class="submitted">Created - Dec 24, 2008; Updated - Nov 19, 2009; Access Level - Public</span>
  
  
    <span class="print-link"><span class="print_html"><a href="http://kb.acronis.com/print/1815" title="Display a printer-friendly version of this page." class="print-page" onclick="window.open(this.href); return false" rel="nofollow"><img src="http://kb.acronis.com/sites/all/modules/Administration/print/icons/print_icon.gif" alt="Printer-friendly version" title="Printer-friendly version" class="print-icon" width="16" height="16"></a></span><span class="print_pdf"><a href="http://kb.acronis.com/printpdf/1815" title="Display a PDF version of this page." class="print-pdf" rel="nofollow"><img src="http://kb.acronis.com/sites/all/modules/Administration/print/icons/pdf_icon.gif" alt="PDF version" title="PDF version" class="print-icon" width="16" height="16"></a></span></span><form action="http://kb.acronis.com/content/1815" accept-charset="UTF-8" method="post" id="fivestar-form-node-1815" class="fivestar-widget fivestar-combo-stars dirtyforms-exclude">
<div><div class="fivestar-form-vote-1815 clear-block"><div class="fivestar-static-form-item"><div class="form-item">
<div class="fivestar-widget-static fivestar-widget-static-vote fivestar-widget-static-5 clear-block"><div class="star star-1 star-odd star-first"><span class="on">4.2</span></div><div class="star star-2 star-even"><span class="on"></span></div><div class="star star-3 star-odd"><span class="on"></span></div><div class="star star-4 star-even"><span class="on"></span></div><div class="star star-5 star-odd star-last"><span class="on" style="width: 20%;"></span></div></div>
<div class="description"><div class="fivestar-summary fivestar-summary-average-count"><span class="average-rating">Average: <span>4.2</span></span> <span class="total-votes">(<span>5</span> votes)</span></div></div>
</div>
</div><input name="content_type" id="edit-content-type" value="node" type="hidden">
<input name="content_id" id="edit-content-id" value="1815" type="hidden">
<div class="fivestar-form-item fivestar-combo-text fivestar-combo-stars fivestar-labels-hover fivestar-processed"><div class="form-item" id="edit-vote-wrapper">
<input name="vote_count" id="edit-vote-count" value="5" type="hidden">
<input name="vote_average" id="edit-vote-average" value="84" type="hidden">
<input name="auto_submit_path" id="edit-auto-submit-path" value="/fivestar/vote/node/1815/vote" class="fivestar-path" type="hidden">
<select style="display: none;" name="vote" class="form-select" id="edit-vote-1"><option value="-">Select rating</option><option value="0" selected="selected">Cancel rating</option><option value="20">Poor</option><option value="40">Okay</option><option value="60">Good</option><option value="80">Great</option><option value="100">Awesome</option></select><div class="fivestar-widget clear-block fivestar-widget-5"><div class="cancel"><a href="http://kb.acronis.com/content/1815#0" title="Cancel rating">Cancel rating</a></div><div class="star star-1 star-odd star-first"><a style="width: 100%;" href="http://kb.acronis.com/content/1815#20" title="Poor">Poor</a></div><div class="star star-2 star-even"><a style="width: 100%;" href="http://kb.acronis.com/content/1815#40" title="Okay">Okay</a></div><div class="star star-3 star-odd"><a style="width: 100%;" href="http://kb.acronis.com/content/1815#60" title="Good">Good</a></div><div class="star star-4 star-even"><a style="width: 100%;" href="http://kb.acronis.com/content/1815#80" title="Great">Great</a></div><div class="star star-5 star-odd star-last"><a style="width: 100%;" href="http://kb.acronis.com/content/1815#100" title="Awesome">Awesome</a></div></div><input name="auto_submit_token" id="edit-auto-submit-token" value="e8f983b9be3daf3b072b2155fafed48a" class="fivestar-token" type="hidden">

<div class="description"><div class="fivestar-summary fivestar-summary-user fivestar-feedback-enabled"><span class="user-rating">Your rating: <span>None</span></span></div></div>
</div>
</div><input name="destination" id="edit-destination" value="node/1815" type="hidden">
<input style="display: none;" name="op" id="edit-fivestar-submit" value="Rate" class="form-submit fivestar-submit" type="submit">
<input name="form_build_id" id="form-6f1ef09238f1f0d2143a7a514c21f4c1" value="form-6f1ef09238f1f0d2143a7a514c21f4c1" type="hidden">
<input name="form_id" id="edit-fivestar-form-node-1815" value="fivestar_form_node_1815" type="hidden">
</div>
</div></form>
<p><em>You can use a special Acronis utility to import a .vhd file to Citrix XenServer</em></p>
<h4 class="kbContents">Introduction</h4>
<p class="p">To import a .vhd file to Citrix XenServer you can use an
interactive command line utility called vhd2xen. The utility is
developed by Acronis.</p>
<p class="p">The vhd2xen utility imports a .vhd file into Citrix
XenServer repository of virtual disks. The utility supports importing
both to local or remote XenServer repository.</p>
<p class="p">The supported systems are:</p>
<ul class="free"><li>Citrix XenServer 4.1</li><li>Citrix XenServer 5</li></ul>
<p class="p">For information on how to convert a .tib file to .vhd disk please see:</p>
<ul><li><a href="http://kb.acronis.com/freelinking/Acronis%2520True%2520Image%2520Echo%253A%2520V2P%2520and%2520P2V%2520Migration" class="freelinking">Acronis True Image Echo: V2P and P2V Migration</a></li><li><a href="http://kb.acronis.com/freelinking/Acronis%2520Backup%2520%2526amp%253B%2520Recovery%252010%253A%2520Converting%2520Backup%2520Archives%2520to%2520Virtual%2520Machines" class="freelinking">Acronis Backup &amp; Recovery 10: Converting Backup Archives to Virtual Machines</a></li></ul>
<h4 class="kbContents">Solution</h4>
<p class="p"><strong>Installation</strong></p>
<ol><li>Download vhd2xen from <a href="http://download.acronis.com/vhd2xen.i686">http://download.acronis.com/vhd2xen.i686</a></li><li>Start the local command shell of Citrix XenServer;</li><li>Copy the installation executable vhd2xen.i686 to a directory;</li><li>Run vhd2xen.i686 to install the utility. It will be installed to <em>/usr/lib/Acronis/VHD2XEN/</em>.</li></ol>
<p class="p"><strong>Usage</strong></p>
<ol><li>
<p>Issue the following command:</p>
<blockquote>
<p class="p"><em>/usr/lib/Acronis/VHD2XEN/vhd2xen.sh [VHD file]</em></p>
</blockquote>
</li><li>
<p>In Citrix XenServer local command shell you will need to specify:</p>
<ul class="free"><li>Repository from the list of available repositories where the .vhd file should be imported to;</li><li>XEN name for imported disk.</li></ul>
<p class="p"><strong>(!)</strong> To import the .vhd file to a local
repository, you should have write permissions to the directory, where
the .vhd file is. Otherwise, vhd2xen will fail to import.</p>
</li></ol>
<p class="p"><strong>Example</strong></p>
<ol><li>
<p>Create a directory on Citrix XenServer to mount the Windows share where the .vhd file is:</p>
<blockquote>
<p class="p"><em>mkdir /mnt/shared</em></p>
</blockquote>
</li><li>
<p>Mount the share to the created directory:</p>
<blockquote>
<p class="p"><em>mount.cifs //windows_host/share /mnt/shared -o username=test</em></p>
</blockquote>
<p class="p"><strong>(!)</strong> In this example the user <em>test </em>should have write permissions to <em>//windows_host/share</em></p>
</li><li>
<p>Issue the import command:</p>
<blockquote>
<p class="p"><em>/usr/lib/Acronis/VHD2XEN/vhd2xen.sh /mnt/shared/disk1.vhd</em></p>
</blockquote>
</li><li>
<p>Go to Citrix XenCenter and connect to your Citrix XenServer;</p>
</li><li>
<p>You will find the imported disk in the repository you have selected.</p>
</li></ol>
<p class="p"><strong>Uninstallation</strong></p>
<p class="p">To uninstall the vhd2xen utility execute the following command:</p>
<blockquote>
<p class="p"><em>./vhd2xen.i686  --uninstall</em></p>
</blockquote>
<h4 class="kbContents">More information</h4>
<p class="p">See also <a href="http://kb.acronis.com/freelinking/Acronis%2520Backup%2520%2526amp%253B%2520Recovery%252010%253A%2520Limitations%2520on%2520Converting%2520TIB%2520to%2520Citrix%2520XenServer%2520VHD" class="freelinking">Acronis Backup &amp; Recovery 10: Limitations on Converting TIB to Citrix XenServer VHD</a>.</p><br>

chun 2013-6-21 07:58

轉完後.如何處理.

1. 新增一台VM. 如. windows 2003 32bit . 新增partition.<div>2. 將匯入成功的VHD, 在storage 內attach 進HDD.&nbsp;</div><div>3. 將原本第一個partition 刪除, &nbsp;並將attach 進去的那個VHD, partition id: 從1改成0.</div><div>4. 看是否可開機. 不行即進行windows 2003 cd 修復.</div>
頁: [1]
查看完整版本: Importing Converted VHD Virtual Disk to Citrix XenServer