<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Dear Vui,<br>
      <br>
      Thank you very much for your information.<br>
      <br>
      > After obtaining a sparse ide vmdk from "qemu-img convert",
      due to a bug in the <br>
      > VMware nova driver, you need to convert the vmdk to a thin or
      preallocated disk. <br>
      <br>
      We tested it based on your information by using the ide. <br>
      The preallocated option works. Thin didn't work, any idea?<br>
      <br>
      > You can do this one of the following tools: <br>
      > - vmkfstools.pl referenced in the DeveloperGuide Appendix <br>
      > - vmkfstools directly if you can ssh into an ESX machine <br>
      <br>
      The above 2 didn't work.<br>
      <br>
      > - vmware-vdiskmanager (comes bundled with VMware Fusion or
      VMware Workstation) <br>
      > (e.g. '/Applications/VMware
      Fusion.app/Contents/Library/vmware-vdiskmanager' -r >
      our_sparse_ide.vmdk -t 4 converted.vmdk <br>
      <br>
      This works for pre-allocated. <br>
      <br>
      Is there an option to reduce the disk size of the converted vmdk?
      <br>
      <br>
      We were using vmware-vdiskmanager -r <source.vmdk> -t 0
      <target.vmdk> to reduced the disk size but it didn't work,
      OS couldn't be booted.<br>
      <br>
      Thanks in advance!<br>
      <br>
      Best regards,<br>
      <br>
      Jason<br>
      <br>
      <meta charset="utf-8">
      <br>
      On 9/16/13 1:13 AM, Vui Chiap Lam wrote:<br>
    </div>
    <blockquote
      cite="mid:961639435.59750241.1379319181061.JavaMail.root@vmware.com"
      type="cite">
      <div style="font-family: times new roman, new york, times, serif;
        font-size: 12pt; color: #000000">
        <div>Hi Jason,<br>
        </div>
        <div><br>
        </div>
        <div>What happens if you forgo the converting to lsilogic, and
          instead upload the disk to glance as an ide disk (using
          --property vmware_adaptertype=ide)?<span style="font-family:
            monospace;" data-mce-style="font-family: monospace;"><br>
          </span></div>
        <div><br>
        </div>
        <div>Also, just reiterating the docs and Dan's comments,</div>
        <div><br>
        </div>
        <div>After obtaining a sparse ide vmdk from "qemu-img convert",
          due to a bug in the VMware nova driver, you need to convert
          the vmdk to a thin or preallocated disk.</div>
        <div>You can do this one of the following tools:</div>
        <div>- vmkfstools.pl referenced in the DeveloperGuide Appendix</div>
        <div><span style="font-size: 12pt;">- vmkfstools directly if you
            can ssh into an ESX machine</span></div>
        <div><span style="font-size: 12pt;">- vmware-vdiskmanager (comes
            bundled with VMware Fusion or VMware Workstation)</span><span
            style="font-size: 12pt;"><br>
          </span></div>
        <div><span style="font-size: 12pt;"> 
            (e.g. '/Applications/VMware
            Fusion.app/Contents/Library/vmware-vdiskmanager' -r
            our_sparse_ide.vmdk -t 4 converted.vmdk</span></div>
        <div>After this step you should have a <em>converted</em>.vmdk
          and a <em>converted</em>-flat.vmdk.</div>
        <div>At this point <em>converted</em>-flat.vmdk (not the
          descriptor file <em>converted</em>.vmdk) can be uploaded to
          with --property vmware_adaptertype=ide as an ide image</div>
        <div><br>
        </div>
        <div>If this works, we can worry about converting the disk to
          SCSI next.</div>
        <div><br>
        </div>
        <div>Regards,</div>
        <div>Vui</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <hr id="zwchr">
        <blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From:
          </b>"Jason Zhang" <a class="moz-txt-link-rfc2396E" href="mailto:bearovercloud@gmail.com"><bearovercloud@gmail.com></a><br>
          <b>To: </b>"OpenStack Development Mailing List"
          <a class="moz-txt-link-rfc2396E" href="mailto:openstack-dev@lists.openstack.org"><openstack-dev@lists.openstack.org></a><br>
          <b>Sent: </b>Friday, September 13, 2013 4:09:47 PM<br>
          <b>Subject: </b>Re: [openstack-dev] How to create vmdk for
          openstack usage<br>
          <div><br>
          </div>
          <div class="moz-cite-prefix"><tt>Hi Dan,<br>
              <br>
              Thank you very much for your reply.<br>
              
<br>
              We tested again and it still does not work, can you give
              more information about how the vmdk's were created?<br>
              
I.e the tool used to create the debian and trend vmdk's
              listed here<br>
              <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://wiki.openstack.org/wiki/NovaVMware/DeveloperGuide#Glance_Initial_Setup"
                target="_blank">https://wiki.openstack.org/wiki/NovaVMware/DeveloperGuide#Glance_Initial_Setup</a><br>
              
<br>
              Using qemu-img convert to convert a qcow2 or raw image to
              vmdk doesn't seem to work, for example, by using

<br>
              qemu-img convert -f qcow2 -O vmdk <input-file.qcow2>
              <output-file.vmdk><br>
              

The command always converts to a vmdk which is of
              adapter type 'ide' other than lsilogic.
<br>
              <br>
              We modified the adapter type to lsilogic and uploading it
              to glance by using,<br>
              <br>
              glance image-create --name=<name> --disk-format=vmdk
              --container-format=bare --is-public=true --property
              vmware_adaptertype=lsiLogic --property
              vmware_disktype=thin --property
              vmware_ostype=ubuntu64Guest < output-file.vmdk<br>
              or<br>
              glance image-create --name=<name> --disk-format=vmdk
              --container-format=bare --is-public=true --property
              vmware_adaptertype=lsiLogic  --property
              vmware-disktype="preallocated" --property
              vmware_disktype=thin --property
              vmware_ostype=ubuntu64Guest < output-file.vmdk<br>
              <br>
              doesn't seem to work. Even after tying the steps
              under <a moz-do-not-send="true"
                class="moz-txt-link-freetext"
href="https://wiki.openstack.org/wiki/NovaVMware/DeveloperGuide#Appendix%3F%3F"
                target="_blank">https://wiki.openstack.org/wiki/NovaVMware/DeveloperGuide#Appendix

</a><br>
              <br>
              It seems the patch to convert into a scsi disk, has not
              been merged yet: <a moz-do-not-send="true"
                class="moz-txt-link-freetext"
                href="https://bugs.launchpad.net/qemu/+bug/545089"
                target="_blank">https://bugs.launchpad.net/qemu/+bug/545089</a><br>
              
<br>
              Thanks in advance!<br>
              <br>
              Best regards,<br>
              <br>
              Jason<br>
              <br>
            </tt><tt><br>
              On 9/12/13 12:48 PM, Dan Wendlandt wrote:</tt><tt><br>
            </tt></div>
          <blockquote
cite="mid:CA+0XJm9ZYW1oXifnOB96TSMLH9etOEzOTcOeY+qGGpJyEdt84w@mail.gmail.com">
            <div dir="ltr"><tt>Hi Jason,</tt>
              <div><tt><br>
                </tt></div>
              <div><tt>The best place to look is the official openstack
                  compute documentation that covers vSphere in Nova: </tt><tt><a
                    moz-do-not-send="true"
href="http://docs.openstack.org/trunk/openstack-compute/admin/content/vmware.html"
                    target="_blank">http://docs.openstack.org/trunk/openstack-compute/admin/content/vmware.html</a></tt></div>
              <div><tt><br>
                </tt></div>
              <div style=""><tt>In particular, check out the section
                  titled "Images with VMware vSphere" (pasted below).
                   As that text suggests, the most likely issue with
                  your VMDK not booting is that you may have passed the
                  wrong vmware_adaptertype to glance when creating the
                  image.  Also note the statement indicating that all
                  VMDK images must be "flat" (i.e., single file),
                  otherwise Glance will be confused.</tt></div>
              <div style=""><tt><br>
                </tt></div>
              <div style=""><tt>Dan</tt></div>
              <div style=""><tt><br>
                </tt></div>
              <div style=""><tt><br>
                </tt></div>
              <div style="">
                <div class="" style="color: rgb(0, 0, 0); font-size:
                  12px;">
                  <h3 class=""><tt><a moz-do-not-send="true"
                        id="VMWare_images" class="mceItemAnchor"> </a></tt><tt>Images
                      with VMware vSphere</tt></h3>
                </div>
                <p style="font-size: 10pt; color: rgb(0, 0, 0);"><tt>When

                    using either VMware driver, images should be
                    uploaded to the OpenStack Image Service in the VMDK
                    format. Both thick and thin images are currently
                    supported and all images must be flat (i.e.
                    contained within 1 file). For example</tt></p>
                <p style="font-size: 10pt; color: rgb(0, 0, 0);"><tt>To
                    load a thick image with a SCSI adaptor:</tt></p>
                <pre class="" style="color: rgb(35, 48, 45); width: 1052px; border-bottom: 1px solid rgb(222, 222, 222) ! important; border-top: 1px solid rgb(222, 222, 222) ! important; font-size: 12px; padding: 0.5em ! important;">$ glance image-create name="ubuntu-thick-scsi" disk_format=vmdk container_format=bare \
is_public=true --property vmware_adaptertype="lsiLogic" \
--property vmware_disktype="preallocated" \
--property vmware_ostype="ubuntu64Guest" < ubuntuLTS-flat.vmdk</pre>
                <p style="font-size: 10pt; color: rgb(0, 0, 0);"><tt>To
                    load a thin image with an IDE adaptor:</tt></p>
                <pre class="" style="color: rgb(35, 48, 45); width: 1052px; border-bottom: 1px solid rgb(222, 222, 222) ! important; border-top: 1px solid rgb(222, 222, 222) ! important; font-size: 12px; padding: 0.5em ! important;">$ glance image-create name="unbuntu-thin-ide" disk_format=vmdk container_format=bare \
is_public=true --property vmware_adaptertype="ide" \
--property vmware_disktype="thin" \
--property vmware_ostype="ubuntu64Guest" < unbuntuLTS-thin-flat.vmdk</pre>
                <p style="font-size: 10pt; color: rgb(0, 0, 0);"><tt>The
                    complete list of supported vmware disk properties is
                    documented in the Image Management section. It's
                    critical that the adaptertype is correct; In fact,
                    the image will not boot with the incorrect
                    adaptertype. If you have the meta-data VMDK file the
                    the ddb.adapterType property specifies the
                    adaptertype. The default adaptertype is "lsilogic"
                    which is SCSI.</tt></p>
                <p style="font-size: 10pt; color: rgb(0, 0, 0);"><tt><br>
                  </tt></p>
                <p style="font-size: 10pt; color: rgb(0, 0, 0);"><tt><br>
                  </tt></p>
              </div>
              <div style=""><tt><br>
                </tt></div>
              <div style=""><tt><br>
                </tt> </div>
            </div>
            <div class="gmail_extra"><tt><br>
              </tt><tt><br>
              </tt>
              <div class="gmail_quote"><tt>On Thu, Sep 12, 2013 at 11:29
                  AM, Jason Zhang </tt><tt><span dir="ltr"><<a
                      moz-do-not-send="true"
                      href="mailto:bearovercloud@gmail.com"
                      target="_blank">bearovercloud@gmail.com</a>></span></tt><tt>
                  wrote:</tt><tt><br>
                </tt>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div>
                    <div style="text-indent: 0px; letter-spacing:
                      normal; font-variant: normal; text-align: start;
                      font-style: normal; font-weight: normal;
                      line-height: normal; color: rgb(34, 34, 34);
                      text-transform: none; font-size: 12.8px;
                      white-space: normal; word-spacing: 0px;">
                      <div><tt><br>
                        </tt>
                        <div><tt><big>Hi Dears,<br>
                              <br>
                              In the document<a moz-do-not-send="true"
                                href="https://wiki.openstack.org/wiki/NovaVMware/DeveloperGuide"
                                style="color:rgb(17,85,204)"
                                target="_blank">
                                https://wiki.openstack.org/wiki/NovaVMware/DeveloperGuide</a><span> 
                              </span>under the<span><span> </span>'Get
                                an initial VMDK to work with</span>', <br>
                              its said, 'There are a lot of “gotchas”
                              around what VMDK disks work with OpenStack
                              + vSphere,'. <br>
                              The appendix section lists one of the
                              gotchas. Are there any more gotchas?<br>
                              <br>
                              During our testing, the vmdk instance on
                              boot-up gives a 'Operating System not
                              found' error, <br>
                              I am not sure whether this is a already
                              known issue or not.</big></tt><tt> </tt><tt><span></span></tt><tt><big><span><br>
                                <br>
                                Thanks in advance!<br>
                                <br>
                                Best regards,<br>
                                <br>
                                Jason<br>
                              </span></big></tt></div>
                      </div>
                      <tt><span style="text-indent: 0px; letter-spacing:
                          normal; font-variant: normal; text-align:
                          start; font-style: normal; display: inline !
                          important; font-weight: normal; float: none;
                          line-height: normal; color: rgb(34, 34, 34);
                          text-transform: none; font-size: 12.8px;
                          white-space: normal; word-spacing: 0px;"></span></tt>
                    </div>
                    <blockquote><tt><big> </big></tt></blockquote>
                    <tt><br>
                    </tt> </div>
                  <tt><br>
                  </tt><tt>_______________________________________________</tt><tt><br>
                  </tt><tt> OpenStack-dev mailing list</tt><tt><br>
                  </tt> <tt><a moz-do-not-send="true"
                      href="mailto:OpenStack-dev@lists.openstack.org"
                      target="_blank">OpenStack-dev@lists.openstack.org</a></tt><tt><br>
                  </tt> <tt><a moz-do-not-send="true"
                      href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev"
                      target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></tt><tt><br>
                  </tt> <tt><br>
                  </tt></blockquote>
              </div>
              <tt><br>
              </tt><tt><br clear="all">
              </tt>
              <div><tt><br>
                </tt></div>
              <tt>-- </tt><tt><br>
              </tt><tt>~~~~~~~~~~~~~~~~~~~~~~~~~~~</tt><tt><br>
              </tt><tt>Dan Wendlandt </tt>
              <div><tt>Nicira, Inc: </tt><tt><a moz-do-not-send="true"
                    href="http://www.nicira.com" target="_blank">www.nicira.com</a></tt><tt><br>
                </tt>
                <div><tt>twitter: danwendlandt</tt><tt><br>
                  </tt><tt> ~~~~~~~~~~~~~~~~~~~~~~~~~~~</tt><tt><br>
                  </tt></div>
              </div>
            </div>
            <tt><br>
            </tt>
            <fieldset class="mimeAttachmentHeader"></fieldset>
            <tt><br>
            </tt>
            <pre>_______________________________________________
OpenStack-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
          </blockquote>
          <tt><br>
          </tt> <br>
          _______________________________________________<br>
          OpenStack-dev mailing list<br>
          <a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
        </blockquote>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>