Mark Husted (hustedm | 27 Aug 14:47 2014
Picon

Error: No Host Found

Hello Rich,

 

You helped me with a libguestfs issue last week.  The good news is that I have progressed beyond that.  Unfortunately, I have found another issue which I cannot seem to get past.  It deals with OpenStack PackStack as described on the RDO setup site.  It is hosted in an Oracle VirtualBox running CentOS 6.5.  It appears to be running, I can use the Horizon interface.  I have figured out how to get the HEAT Orchestration up and running.

 

I am not sure that libguestfs is the correct list.  If not, could you please forward to the correct list?

 

I cannot create an instance, either through HEAT or Horizon.  I am getting an Error: No Host Found.  I have done some digging.  At first, I thought I did not have any VCPUs.  I was looking through Nova.conf and that line was commented out.  So, I put it back in and restarted all of the Nova services.   Then I determined that I was not using a big enough flavor.  So, I changed that.  Still, I get the error.

 

I have attached the appropriate (I hope) log files.  I am unsure what I have done wrong at this point, especially since the Horizon interface is failing too.

 

Thank you for your time,

Mark Husted

 

 

 

Mark Husted
ENGINEER.SOFTWARE ENGINEERING
Service Provider Video Technology Group
hustedm <at> cisco.com
Phone: +1 770 236 1242

Bldg 2.1.238
5030 Sugarloaf Parkway
Lawrenceville, GA 30044
United States
Cisco.com

 

Think before you print.

This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html

 

 

_______________________________________________
Libguestfs mailing list
Libguestfs <at> redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
Priyanka Ranjan | 27 Aug 12:18 2014
Picon

latest libguestfs repo for CentOS 6.4

Hello Experts,

I am using CentOS 6.4. I have libguestfs 1.16 installed on my system (CentOS 6.4). I want to use iscsi and for that I want to install libguestfs > = 1.21. Is libguestfs 1.21 is available for CentOS 6.4?

Many Thanks in advance.
_______________________________________________
Libguestfs mailing list
Libguestfs <at> redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
Richard W.M. Jones | 27 Aug 00:02 2014
Picon

When updating to HEAD today ...


... you may get a link failure until you run the following command:

  make -C v2v link.sh

Rich.

PS: Can someone explain why:

$ pkg-config --libs libvirt
-lvirt -ldl -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic 

?

--

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
Pino Toscano | 26 Aug 16:29 2014
Picon

[PATCH 0/3] fix setting lvm filter with newer lvm2

Hi,

newer lvm2 releases don't have have uncommented "filter" lines, so the
current way to edit lvm.conf doesn't work anymore.
Instead, switch to augeas (with a "custom" len) for a cleaner and
working way to set the lvm filter.

Pino Toscano (3):
  daemon: add add_sprintf
  daemon: move AUGEAS_ERROR to the common header
  daemon: lvm-filter: use augeas for setting the filter

 appliance/Makefile.am          |   6 +-
 appliance/guestfs_lvm_conf.aug |  74 +++++++++++++++++
 daemon/augeas.c                |  17 ----
 daemon/daemon.h                |  19 +++++
 daemon/guestfsd.c              |  20 +++++
 daemon/lvm-filter.c            | 183 +++++++++++++++++++++--------------------
 6 files changed, 211 insertions(+), 108 deletions(-)
 create mode 100644 appliance/guestfs_lvm_conf.aug

--

-- 
1.9.3
Shahar Havivi | 26 Aug 16:19 2014
Picon

[PATCH 1/3] v2v: add xmlXPathRegisterNs for libxml2 binding

Signed-off-by: Shahar Havivi <shaharh <at> redhat.com>
---
 v2v/xml-c.c | 15 +++++++++++++++
 v2v/xml.ml  |  1 +
 v2v/xml.mli |  2 ++
 3 files changed, 18 insertions(+)

diff --git a/v2v/xml-c.c b/v2v/xml-c.c
index 4c9bc77..aea62ae 100644
--- a/v2v/xml-c.c
+++ b/v2v/xml-c.c
 <at>  <at>  -141,6 +141,21  <at>  <at>  v2v_xml_xpath_new_context (value docv)
 }

 value
+v2v_xml_xpath_register_ns (value xpathctxv, value prefix, value uri)
+{
+  CAMLparam3 (xpathctxv, prefix, uri);
+  xmlXPathContextPtr xpathctx;
+  int r;
+
+  xpathctx = Xpathctx_val (xpathctxv);
+  r = xmlXPathRegisterNs (xpathctx, BAD_CAST String_val (prefix), BAD_CAST String_val (uri));
+  if (r == -1)
+      caml_invalid_argument ("xpath_register_ns: unable to register namespace");
+
+  CAMLreturn (Val_unit);
+}
+
+value
 v2v_xml_xpath_eval_expression (value xpathctxv, value exprv)
 {
   CAMLparam2 (xpathctxv, exprv);
diff --git a/v2v/xml.ml b/v2v/xml.ml
index 78cb022..fea8784 100644
--- a/v2v/xml.ml
+++ b/v2v/xml.ml
 <at>  <at>  -31,6 +31,7  <at>  <at>  type node = doc * node_ptr
 external parse_memory : string -> doc = "v2v_xml_parse_memory"
 external xpath_new_context : doc -> xpathctx = "v2v_xml_xpath_new_context"
 external xpath_eval_expression : xpathctx -> string -> xpathobj = "v2v_xml_xpath_eval_expression"
+external xpath_register_ns : xpathctx -> string -> string -> unit = "v2v_xml_xpath_register_ns"

 external xpathobj_nr_nodes : xpathobj -> int = "v2v_xml_xpathobj_nr_nodes"
 external xpathobj_get_node_ptr : xpathobj -> int -> node_ptr = "v2v_xml_xpathobj_get_node_ptr"
diff --git a/v2v/xml.mli b/v2v/xml.mli
index 38bb9cd..8eefecc 100644
--- a/v2v/xml.mli
+++ b/v2v/xml.mli
 <at>  <at>  -29,6 +29,8  <at>  <at>  val xpath_new_context : doc -> xpathctx
 (** xmlXPathNewContext *)
 val xpath_eval_expression : xpathctx -> string -> xpathobj
 (** xmlXPathEvalExpression *)
+val xpath_register_ns : xpathctx -> string -> string -> unit
+(** xmlXPathRegisterNs *)

 val xpathobj_nr_nodes : xpathobj -> int
 (** Get the number of nodes in the node set of the xmlXPathObjectPtr. *)
--

-- 
1.9.3
Shahar Havivi | 26 Aug 08:34 2014
Picon

Segmentation fault when trying to add binding

Hi,

I am trying to add xmlXPathRegisterNs() to v2v/xml-c.c but I get a seg fault,
the signature should be:
http://xmlsoft.org/html/libxml-xpathInternals.html#xmlXPathRegisterNs

I think I am wrong in CAMLparam and CAMLlocal...,
Following is the patch:

===================================================================================
diff --git a/v2v/xml-c.c b/v2v/xml-c.c
index 4c9bc77..a917c24 100644
--- a/v2v/xml-c.c
+++ b/v2v/xml-c.c
 <at>  <at>  -141,6 +141,16  <at>  <at>  v2v_xml_xpath_new_context (value docv)
 }

 value
+v2v_xml_xpath_register_ns (value prefix, value uri, value xpathctx)
+{
+  CAMLparam3 (prefix, uri, xpathctx);
+  CAMLlocal1 (retval);
+  retval = xmlXPathRegisterNs (BAD_CAST String_val (prefix), BAD_CAST String_val (uri), xpathctx);
+
+  CAMLreturn (retval);
+}
+
+value
 v2v_xml_xpath_eval_expression (value xpathctxv, value exprv)
 {
   CAMLparam2 (xpathctxv, exprv);
diff --git a/v2v/xml.ml b/v2v/xml.ml
index 78cb022..2e4d222 100644
--- a/v2v/xml.ml
+++ b/v2v/xml.ml
 <at>  <at>  -31,6 +31,7  <at>  <at>  type node = doc * node_ptr
 external parse_memory : string -> doc = "v2v_xml_parse_memory"
 external xpath_new_context : doc -> xpathctx = "v2v_xml_xpath_new_context"
 external xpath_eval_expression : xpathctx -> string -> xpathobj = "v2v_xml_xpath_eval_expression"
+external xpath_register_ns : string -> string -> xpathctx -> int = "v2v_xml_xpath_register_ns"

 external xpathobj_nr_nodes : xpathobj -> int = "v2v_xml_xpathobj_nr_nodes"
 external xpathobj_get_node_ptr : xpathobj -> int -> node_ptr = "v2v_xml_xpathobj_get_node_ptr"
diff --git a/v2v/xml.mli b/v2v/xml.mli
index 38bb9cd..cab4395 100644
--- a/v2v/xml.mli
+++ b/v2v/xml.mli
 <at>  <at>  -29,6 +29,8  <at>  <at>  val xpath_new_context : doc -> xpathctx
 (** xmlXPathNewContext *)
 val xpath_eval_expression : xpathctx -> string -> xpathobj
 (** xmlXPathEvalExpression *)
+val xpath_register_ns : string -> string -> xpathctx -> int
+(** xmlXPathRegisterNs *)

 val xpathobj_nr_nodes : xpathobj -> int
 (** Get the number of nodes in the node set of the xmlXPathObjectPtr. *)
===================================================================================
Shahar Havivi | 25 Aug 11:39 2014
Picon

do we have support for xmlns in xml for v2v?

Hi,

I need to parse xml (vmware ovf) which have a namespace.
Attached the ovf file.

Thanks,
Shahar.
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by VMware ESX Server, User: root, UTC time: 2014-08-12T13:33:20.142834Z-->
<Envelope vmw:buildId="build-1623387" xmlns="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
xmlns:vmw="http://www.vmware.com/schema/ovf"
xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <References>
    <File ovf:href="First-disk1.vmdk" ovf:id="file1" ovf:size="349405696" />
  </References>
  <DiskSection>
    <Info>Virtual disk information</Info>
    <Disk ovf:capacity="32" ovf:capacityAllocationUnits="byte * 2^30" ovf:diskId="vmdisk1"
ovf:fileRef="file1"
ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized"
ovf:populatedSize="1008926720" />
  </DiskSection>
  <NetworkSection>
    <Info>The list of logical networks</Info>
    <Network ovf:name="VM Network">
      <Description>The VM Network network</Description>
    </Network>
  </NetworkSection>
  <VirtualSystem ovf:id="First">
    <Info>A virtual machine</Info>
    <Name>First</Name>
    <OperatingSystemSection ovf:id="74" vmw:osType="windows7_64Guest">
      <Info>The kind of installed guest operating system</Info>
    </OperatingSystemSection>
    <VirtualHardwareSection>
      <Info>Virtual hardware requirements</Info>
      <System>
        <vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
        <vssd:InstanceID>0</vssd:InstanceID>
        <vssd:VirtualSystemIdentifier>First</vssd:VirtualSystemIdentifier>
        <vssd:VirtualSystemType>vmx-08</vssd:VirtualSystemType>
      </System>
      <Item>
        <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
        <rasd:Description>Number of Virtual CPUs</rasd:Description>
        <rasd:ElementName>1 virtual CPU(s)</rasd:ElementName>
        <rasd:InstanceID>1</rasd:InstanceID>
        <rasd:ResourceType>3</rasd:ResourceType>
        <rasd:VirtualQuantity>1</rasd:VirtualQuantity>
      </Item>
      <Item>
        <rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
        <rasd:Description>Memory Size</rasd:Description>
        <rasd:ElementName>2048MB of memory</rasd:ElementName>
        <rasd:InstanceID>2</rasd:InstanceID>
        <rasd:ResourceType>4</rasd:ResourceType>
        <rasd:VirtualQuantity>2048</rasd:VirtualQuantity>
      </Item>
      <Item>
        <rasd:Address>0</rasd:Address>
        <rasd:Description>SCSI Controller</rasd:Description>
        <rasd:ElementName>SCSI Controller 0</rasd:ElementName>
        <rasd:InstanceID>3</rasd:InstanceID>
        <rasd:ResourceSubType>lsilogicsas</rasd:ResourceSubType>
        <rasd:ResourceType>6</rasd:ResourceType>
        <vmw:Config ovf:required="false" vmw:key="slotInfo.pciSlotNumber" vmw:value="160" />
      </Item>
      <Item>
        <rasd:Address>1</rasd:Address>
        <rasd:Description>IDE Controller</rasd:Description>
        <rasd:ElementName>VirtualIDEController 1</rasd:ElementName>
        <rasd:InstanceID>4</rasd:InstanceID>
        <rasd:ResourceType>5</rasd:ResourceType>
      </Item>
      <Item>
        <rasd:Address>0</rasd:Address>
        <rasd:Description>IDE Controller</rasd:Description>
        <rasd:ElementName>VirtualIDEController 0</rasd:ElementName>
        <rasd:InstanceID>5</rasd:InstanceID>
        <rasd:ResourceType>5</rasd:ResourceType>
      </Item>
      <Item ovf:required="false">
        <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
        <rasd:ElementName>VirtualVideoCard</rasd:ElementName>
        <rasd:InstanceID>6</rasd:InstanceID>
        <rasd:ResourceType>24</rasd:ResourceType>
        <vmw:Config ovf:required="false" vmw:key="enable3DSupport" vmw:value="false" />
        <vmw:Config ovf:required="false" vmw:key="enableMPTSupport" vmw:value="false" />
        <vmw:Config ovf:required="false" vmw:key="use3dRenderer" vmw:value="automatic" />
        <vmw:Config ovf:required="false" vmw:key="useAutoDetect" vmw:value="false" />
        <vmw:Config ovf:required="false" vmw:key="videoRamSizeInKB" vmw:value="8192" />
      </Item>
      <Item ovf:required="false">
        <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
        <rasd:ElementName>VirtualVMCIDevice</rasd:ElementName>
        <rasd:InstanceID>7</rasd:InstanceID>
        <rasd:ResourceSubType>vmware.vmci</rasd:ResourceSubType>
        <rasd:ResourceType>1</rasd:ResourceType>
        <vmw:Config ovf:required="false" vmw:key="allowUnrestrictedCommunication" vmw:value="false" />
        <vmw:Config ovf:required="false" vmw:key="slotInfo.pciSlotNumber" vmw:value="33" />
      </Item>
      <Item ovf:required="false">
        <rasd:AddressOnParent>0</rasd:AddressOnParent>
        <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
        <rasd:ElementName>CD-ROM 1</rasd:ElementName>
        <rasd:InstanceID>8</rasd:InstanceID>
        <rasd:Parent>4</rasd:Parent>
        <rasd:ResourceSubType>vmware.cdrom.iso</rasd:ResourceSubType>
        <rasd:ResourceType>15</rasd:ResourceType>
      </Item>
      <Item>
        <rasd:AddressOnParent>0</rasd:AddressOnParent>
        <rasd:ElementName>Hard Disk 1</rasd:ElementName>
        <rasd:HostResource>ovf:/disk/vmdisk1</rasd:HostResource>
        <rasd:InstanceID>9</rasd:InstanceID>
        <rasd:Parent>3</rasd:Parent>
        <rasd:ResourceType>17</rasd:ResourceType>
        <vmw:Config ovf:required="false" vmw:key="backing.writeThrough" vmw:value="false" />
      </Item>
      <Item ovf:required="false">
        <rasd:AddressOnParent>0</rasd:AddressOnParent>
        <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
        <rasd:Description>Floppy Drive</rasd:Description>
        <rasd:ElementName>Floppy 1</rasd:ElementName>
        <rasd:InstanceID>10</rasd:InstanceID>
        <rasd:ResourceSubType>vmware.floppy.remotedevice</rasd:ResourceSubType>
        <rasd:ResourceType>14</rasd:ResourceType>
      </Item>
      <Item>
        <rasd:AddressOnParent>7</rasd:AddressOnParent>
        <rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
        <rasd:Connection>VM Network</rasd:Connection>
        <rasd:Description>E1000 ethernet adapter on "VM Network"</rasd:Description>
        <rasd:ElementName>Ethernet 1</rasd:ElementName>
        <rasd:InstanceID>11</rasd:InstanceID>
        <rasd:ResourceSubType>E1000</rasd:ResourceSubType>
        <rasd:ResourceType>10</rasd:ResourceType>
        <vmw:Config ovf:required="false" vmw:key="slotInfo.pciSlotNumber" vmw:value="32" />
        <vmw:Config ovf:required="false" vmw:key="wakeOnLanEnabled" vmw:value="true" />
      </Item>
      <vmw:Config ovf:required="false" vmw:key="cpuHotAddEnabled" vmw:value="false" />
      <vmw:Config ovf:required="false" vmw:key="cpuHotRemoveEnabled" vmw:value="false" />
      <vmw:Config ovf:required="false" vmw:key="firmware" vmw:value="bios" />
      <vmw:Config ovf:required="false" vmw:key="virtualICH7MPresent" vmw:value="false" />
      <vmw:Config ovf:required="false" vmw:key="virtualSMCPresent" vmw:value="false" />
      <vmw:Config ovf:required="false" vmw:key="memoryHotAddEnabled" vmw:value="false" />
      <vmw:Config ovf:required="false" vmw:key="nestedHVEnabled" vmw:value="false" />
      <vmw:Config ovf:required="false" vmw:key="powerOpInfo.powerOffType" vmw:value="soft" />
      <vmw:Config ovf:required="false" vmw:key="powerOpInfo.resetType" vmw:value="soft" />
      <vmw:Config ovf:required="false" vmw:key="powerOpInfo.standbyAction" vmw:value="checkpoint" />
      <vmw:Config ovf:required="false" vmw:key="powerOpInfo.suspendType" vmw:value="hard" />
      <vmw:Config ovf:required="false" vmw:key="tools.afterPowerOn" vmw:value="true" />
      <vmw:Config ovf:required="false" vmw:key="tools.afterResume" vmw:value="true" />
      <vmw:Config ovf:required="false" vmw:key="tools.beforeGuestShutdown" vmw:value="true" />
      <vmw:Config ovf:required="false" vmw:key="tools.beforeGuestStandby" vmw:value="true" />
      <vmw:Config ovf:required="false" vmw:key="tools.syncTimeWithHost" vmw:value="false" />
      <vmw:Config ovf:required="false" vmw:key="tools.toolsUpgradePolicy" vmw:value="manual" />
    </VirtualHardwareSection>
  </VirtualSystem>
</Envelope>             
_______________________________________________
Libguestfs mailing list
Libguestfs <at> redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
Mark Husted (hustedm | 21 Aug 21:45 2014
Picon

libguest-test-tool error report

Hello,

 

I am trying to use virt-resize.  It does not work.  I set the debug environment variables and ran libguestfs-test-tool.  The following is its output.  I am running RHEL 6.5 desktop with kernel:

Linux hustedm-lnx4 2.6.32-431.5.1.el6.x86_64 #1 SMP Fri Jan 10 14:46:43 EST 2014 x86_64 x86_64 x86_64 GNU/Linux

 

Please let me know what I have missed.

 

Thanks,

Mark

 

 

 

bash-4.1$ libguestfs-test-tool

     ************************************************************

     *                    IMPORTANT NOTICE

     *

     * When reporting bugs, include the COMPLETE, UNEDITED

     * output below in your bug report.

     *

     ************************************************************

libguestfs: trace: set_verbose true

libguestfs: trace: set_verbose = 0

libguestfs: trace: set_verbose true

libguestfs: trace: set_verbose = 0

LIBGUESTFS_DEBUG=1

LIBGUESTFS_TRACE=1

PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin

SELinux: Disabled

libguestfs: trace: add_drive "/tmp/libguestfs-test-tool-sda-SLEdMd" "format:raw"

libguestfs: trace: add_drive = 0

libguestfs: trace: version

libguestfs: trace: version = <struct guestfs_version *>

library version: 1.20.11rhel=6,release=2.el6

libguestfs: trace: get_append

libguestfs: trace: get_append = "NULL"

guestfs_get_append: (null)

libguestfs: trace: get_attach_method

libguestfs: trace: get_attach_method = "appliance"

guestfs_get_attach_method: appliance

libguestfs: trace: get_autosync

libguestfs: trace: get_autosync = 1

guestfs_get_autosync: 1

libguestfs: trace: get_cachedir

libguestfs: trace: get_cachedir = "/var/tmp"

guestfs_get_cachedir: /var/tmp

libguestfs: trace: get_direct

libguestfs: trace: get_direct = 0

guestfs_get_direct: 0

libguestfs: trace: get_memsize

libguestfs: trace: get_memsize = 500

guestfs_get_memsize: 500

libguestfs: trace: get_network

libguestfs: trace: get_network = 0

guestfs_get_network: 0

libguestfs: trace: get_path

libguestfs: trace: get_path = "/usr/lib64/guestfs"

guestfs_get_path: /usr/lib64/guestfs

libguestfs: trace: get_pgroup

libguestfs: trace: get_pgroup = 0

guestfs_get_pgroup: 0

libguestfs: trace: get_qemu

libguestfs: trace: get_qemu = "/usr/libexec/qemu-kvm"

guestfs_get_qemu: /usr/libexec/qemu-kvm

libguestfs: trace: get_recovery_proc

libguestfs: trace: get_recovery_proc = 1

guestfs_get_recovery_proc: 1

libguestfs: trace: get_selinux

libguestfs: trace: get_selinux = 0

guestfs_get_selinux: 0

libguestfs: trace: get_smp

libguestfs: trace: get_smp = 1

guestfs_get_smp: 1

libguestfs: trace: get_tmpdir

libguestfs: trace: get_tmpdir = "/tmp"

guestfs_get_tmpdir: /tmp

libguestfs: trace: get_trace

libguestfs: trace: get_trace = 1

guestfs_get_trace: 1

libguestfs: trace: get_verbose

libguestfs: trace: get_verbose = 1

guestfs_get_verbose: 1

host_cpu: x86_64

Launching appliance, timeout set to 600 seconds.

libguestfs: trace: launch

libguestfs: trace: get_tmpdir

libguestfs: trace: get_tmpdir = "/tmp"

libguestfs: launch: attach-method=appliance

libguestfs: launch: tmpdir=/tmp/libguestfs98LK1f

libguestfs: launch: umask=0022

libguestfs: launch: euid=172990

libguestfs: command: run: febootstrap-supermin-helper

libguestfs: command: run: \ --verbose

libguestfs: command: run: \ -f checksum

libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d

libguestfs: command: run: \ x86_64

supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = (null), initrd = (null), appliance = (null)

supermin helper [00000ms] inputs[0] = /usr/lib64/guestfs/supermin.d

checking modpath /lib/modules/2.6.32-358.0.1.el6.x86_64 is a directory

picked vmlinuz-2.6.32-358.0.1.el6.x86_64 because modpath /lib/modules/2.6.32-358.0.1.el6.x86_64 exists

checking modpath /lib/modules/2.6.32-279.el6.x86_64 is a directory

picked vmlinuz-2.6.32-279.el6.x86_64 because modpath /lib/modules/2.6.32-279.el6.x86_64 exists

checking modpath /lib/modules/2.6.32-431.5.1.el6.x86_64 is a directory

picked vmlinuz-2.6.32-431.5.1.el6.x86_64 because modpath /lib/modules/2.6.32-431.5.1.el6.x86_64 exists

supermin helper [00000ms] finished creating kernel

supermin helper [00000ms] visiting /usr/lib64/guestfs/supermin.d

supermin helper [00000ms] visiting /usr/lib64/guestfs/supermin.d/base.img

supermin helper [00000ms] visiting /usr/lib64/guestfs/supermin.d/daemon.img

supermin helper [00000ms] visiting /usr/lib64/guestfs/supermin.d/hostfiles

supermin helper [00019ms] visiting /usr/lib64/guestfs/supermin.d/init.img

supermin helper [00020ms] visiting /usr/lib64/guestfs/supermin.d/udev-rules.img

supermin helper [00020ms] adding kernel modules

supermin helper [00045ms] finished creating appliance

libguestfs: checksum of existing appliance: 7b8750ee421097e06adfcd48c6a7fbefc3ab131ff84819e41c15d770fef8702b

libguestfs: trace: get_cachedir

libguestfs: trace: get_cachedir = "/var/tmp"

libguestfs: [00047ms] begin testing qemu features

libguestfs: command: run: /usr/libexec/qemu-kvm

libguestfs: command: run: \ -nographic

libguestfs: command: run: \ -help

libguestfs: command: run: /usr/libexec/qemu-kvm

libguestfs: command: run: \ -nographic

libguestfs: command: run: \ -version

libguestfs: qemu version 0.12

libguestfs: command: run: /usr/libexec/qemu-kvm

libguestfs: command: run: \ -nographic

libguestfs: command: run: \ -machine accel=kvm:tcg

libguestfs: command: run: \ -device ?

libguestfs: [00074ms] finished testing qemu features

libguestfs: accept_from_daemon: 0xdd3cf0 g->state = 1

[00075ms] /usr/libexec/qemu-kvm \

    -global virtio-blk-pci.scsi=off \

    -nodefconfig \

    -nodefaults \

    -nographic \

    -machine accel=kvm:tcg \

    -cpu host,+kvmclock \

    -m 500 \

    -no-reboot \

    -kernel /var/tmp/.guestfs-172990/kernel.9600 \

    -initrd /var/tmp/.guestfs-172990/initrd.9600 \

    -device virtio-scsi-pci,id=scsi \

    -drive file=/tmp/libguestfs-test-tool-sda-SLEdMd,cache=none,format=raw,id=hd0,if=none \

    -device scsi-hd,drive=hd0 \

    -drive file=/var/tmp/.guestfs-172990/root.9600,snapshot=on,id=appliance,if=none,cache=unsafe \

    -device scsi-hd,drive=appliance \

    -device virtio-serial \

    -serial stdio \

    -device sga \

    -chardev socket,path=/tmp/libguestfs98LK1f/guestfsd.sock,id=channel0 \

    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \

    -append 'panic=1 console=ttyS0 udevtimeout=600 no_timer_check acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm'

kvm_create_vm: Device or resource busy

failed to initialize KVM: Operation not permitted

Back to tcg accelerator.

Unknown cpu model: host

Unable to support requested x86 CPU definition

libguestfs: child_cleanup: 0xdd3cf0: child process died

libguestfs: sending SIGTERM to process 9610

libguestfs: error: /usr/libexec/qemu-kvm exited with error status 1, see debug messages above

libguestfs: error: guestfs_launch failed, see earlier error messages

libguestfs: trace: launch = -1 (error)

libguestfs-test-tool: failed to launch appliance

libguestfs: trace: close

libguestfs: closing guestfs handle 0xdd3cf0 (state 0)

libguestfs: command: run: rm

libguestfs: command: run: \ -rf /tmp/libguestfs98LK1f

bash-4.1$

 

 

 

 

 

Mark Husted
ENGINEER.SOFTWARE ENGINEERING
Service Provider Video Technology Group
hustedm <at> cisco.com
Phone: +1 770 236 1242

Bldg 2.1.238
5030 Sugarloaf Parkway
Lawrenceville, GA 30044
United States
Cisco.com

 

Think before you print.

This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html

 

 

_______________________________________________
Libguestfs mailing list
Libguestfs <at> redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
Richard W.M. Jones | 21 Aug 14:50 2014
Picon

[PATCH] v2v: adding input -i ova

Shahar:

This is the same patch as you posted, but I have rebased it on top of
current HEAD.

You'll have to do save the next email to a file, and do:

  git reset --hard HEAD^
  git pull
  git am /path/to/saved_email

There are no changes in this patch, except what is needed to make it
compile.  Will follow-up with comments.

Rich.
Shahar Havivi | 21 Aug 14:29 2014
Picon

[PATCH] v2v: adding input -i ova

Hi,
This is a partial patch, for now extracting the ova file and verify the SHA1 sum,
TODO: parse vmware ovf to Types.source

Comments will be appreciated,
Thanks,
Shahar Havivi.

Signed-off-by: Shahar Havivi <shaharh <at> redhat.com>
---
 v2v/Makefile.am    |  2 ++
 v2v/cmdline.ml     | 13 ++++++--
 v2v/source_ova.ml  | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 v2v/source_ova.mli | 22 ++++++++++++++
 v2v/types.ml       |  1 +
 v2v/types.mli      |  3 +-
 v2v/utils.ml       | 17 +++++++++++
 v2v/v2v.ml         |  4 ++-
 8 files changed, 146 insertions(+), 4 deletions(-)
 create mode 100644 v2v/source_ova.ml
 create mode 100644 v2v/source_ova.mli

diff --git a/v2v/Makefile.am b/v2v/Makefile.am
index c4ed313..960cda8 100644
--- a/v2v/Makefile.am
+++ b/v2v/Makefile.am
 <at>  <at>  -32,6 +32,7  <at>  <at>  SOURCES_MLI = \
 	lib_linux.mli \
 	source_disk.mli \
 	source_libvirt.mli \
+	source_ova.mli \
 	target_libvirt.mli \
 	target_local.mli \
 	target_RHEV.mli \
 <at>  <at>  -49,6 +50,7  <at>  <at>  SOURCES_ML = \
 	cmdline.ml \
 	source_disk.ml \
 	source_libvirt.ml \
+	source_ova.ml \
 	convert_linux.ml \
 	convert_windows.ml \
 	target_libvirt.ml \
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
index c2d586a..34788e7 100644
--- a/v2v/cmdline.ml
+++ b/v2v/cmdline.ml
 <at>  <at>  -54,6 +54,7  <at>  <at>  let parse_cmdline () =
     | "disk" | "local" -> input_mode := `Disk
     | "libvirt" -> input_mode := `Libvirt
     | "libvirtxml" -> input_mode := `LibvirtXML
+    | "ova" -> input_mode := `OVA
     | s ->
       error (f_"unknown -i option: %s") s
   in
 <at>  <at>  -105,7 +106,7  <at>  <at>  let parse_cmdline () =
   let argspec = Arg.align [
     "--bridge",  Arg.String add_bridge,     "in:out " ^ s_"Map bridge 'in' to 'out'";
     "--debug-gc",Arg.Set debug_gc,          " " ^ s_"Debug GC and memory allocations";
-    "-i",        Arg.String set_input_mode, "disk|libvirt|libvirtxml " ^ s_"Set input mode (default: libvirt)";
+    "-i",        Arg.String set_input_mode, "disk|libvirt|libvirtxml|ova " ^ s_"Set input mode (default: libvirt)";
     "-ic",       Arg.Set_string input_conn, "uri " ^ s_"Libvirt URI";
     "-if",       Arg.Set_string input_format,
                                             "format " ^ s_"Input format (for -i disk)";
 <at>  <at>  -231,7 +232,15  <at>  <at>  read the man page virt-v2v(1).
         | [filename] -> filename
         | _ ->
           error (f_"expecting a libvirt XML file name on the command line") in
-      InputLibvirtXML filename in
+      InputLibvirtXML filename
+    | `OVA ->
+      (* -i ova: Expecting an ova filename (tar file). *)
+      let filename =
+        match args with
+        | [filename] -> filename
+        | _ ->
+          error (f_"expecting a libvirt XML file name on the command line") in
+      InputOVA filename in

   (* Parse the output mode. *)
   let output =
diff --git a/v2v/source_ova.ml b/v2v/source_ova.ml
new file mode 100644
index 0000000..f268de0
--- /dev/null
+++ b/v2v/source_ova.ml
 <at>  <at>  -0,0 +1,88  <at>  <at> 
+(* virt-v2v
+ * Copyright (C) 2009-2014 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+open Printf
+
+open Common_gettext.Gettext
+open Common_utils
+
+open Types
+open Utils
+
+let contains =
+  true
+
+let parse_ovf dir ovf =
+  let source = {
+    s_dom_type = "kvm";
+    s_name = "";
+    s_orig_name = "";
+    s_memory = 0L;
+    s_vcpu = 1;
+    s_arch = "";
+    s_features = [""];
+    s_display = None;
+    s_disks = [];
+    s_removables = [];
+    s_nics = [];
+  } in
+  source
+
+let create ova =
+  (* get ova directory *)
+  let dir = Filename.dirname (absolute_path ova) in
+  (* extract ova (tar) file *)
+  let cmd = sprintf ("tar -xf %s -C %s") (ova) (dir) in
+
+  if Sys.command (cmd) <> 0 then
+    error (f_"error running command: %s") cmd
+    exit 1;
+
+  let files = Sys.readdir(dir) in
+  let mf = ref "" in
+  let ovf = ref "" in
+  (* search for the ovf file *)
+   Array.iter (fun file ->
+      let len = String.length file in
+      if len >= 4 && String.lowercase (String.sub file (len-4) 4) = ".ovf" then
+          ovf := file
+      else if len >= 3 && String.lowercase (String.sub file (len-3) 3) = ".mf" then
+          mf := file
+        ) files;
+
+  (* verify sha1 from manifest file *)
+  let mf = dir // !mf in
+  let rex = Str.regexp "SHA1(\\(.*\\))= *\\(.*?\\).*$" in
+  let lines = read_file mf in
+  List.iter (
+    fun line -> 
+      if Str.string_match rex line 0 then
+        let file = Str.matched_group 1 line in
+        let sha1 = Str.matched_group 2 line in
+
+        let cmd = sprintf "sha1sum %s" (dir // file) in
+        let out = external_command ~prog cmd in
+        if List.exists (fun line -> string_contains line sha1) out == false then
+          error (f_"Checksum of %s does not match manifes sha1 %s") (file) (sha1)
+          exit 1;
+      else
+        error (f_"error cant parse mf: %s, line: %s") (mf) (line)
+        exit 1;
+  ) lines;
+
+  parse_ovf dir ovf
diff --git a/v2v/source_ova.mli b/v2v/source_ova.mli
new file mode 100644
index 0000000..6b5f831
--- /dev/null
+++ b/v2v/source_ova.mli
 <at>  <at>  -0,0 +1,22  <at>  <at> 
+(* virt-v2v
+ * Copyright (C) 2009-2014 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+(** [-i ova] source. *)
+
+val create : string -> Types.source
+(** [create_from_ova filename] reads the source ovf from vmware ova file. *)
diff --git a/v2v/types.ml b/v2v/types.ml
index ffc99ce..6eff7f8 100644
--- a/v2v/types.ml
+++ b/v2v/types.ml
 <at>  <at>  -24,6 +24,7  <at>  <at>  type input =
 | InputDisk of string option * string
 | InputLibvirt of string option * string
 | InputLibvirtXML of string
+| InputOVA of string

 type output =
 | OutputLibvirt of string option * string
diff --git a/v2v/types.mli b/v2v/types.mli
index 09af68e..9342721 100644
--- a/v2v/types.mli
+++ b/v2v/types.mli
 <at>  <at>  -22,6 +22,7  <at>  <at>  type input =
 | InputDisk of string option * string   (* -i disk: format + file name *)
 | InputLibvirt of string option * string (* -i libvirt: -ic + guest name *)
 | InputLibvirtXML of string         (* -i libvirtxml: XML file name *)
+| InputOVA of string         (* -i ova: OVA file name *)
 (** The input arguments as specified on the command line. *)

 type output =
 <at>  <at>  -90,7 +91,7  <at>  <at>  val string_of_source : source -> string
 val string_of_source_disk : source_disk -> string

 type overlay = {
-  ov_overlay : string;       (** Local overlay file (qcow2 format). *)
+  ov_overlay : string;       (** Local overlgy file (qcow2 format). *)
   ov_target_file : string;   (** Destination file. *)
   ov_target_format : string; (** Destination format (eg. -of option). *)
   ov_sd : string;            (** sdX libguestfs name of disk. *)
diff --git a/v2v/utils.ml b/v2v/utils.ml
index b541b1d..c4a370b 100644
--- a/v2v/utils.ml
+++ b/v2v/utils.ml
 <at>  <at>  -90,3 +90,20  <at>  <at>  let remove_duplicates xs =
     | x :: xs -> Hashtbl.add h x true; x :: loop xs
   in
   loop xs
+
+let string_contains s1 s2 =
+  let re = Str.regexp_string s2 in
+  try ignore (Str.string_match re s1 0); true
+  with Not_found ->
+    false
+
+let read_file filename =
+  let lines = ref [] in
+  let chan = open_in filename in
+  try
+    while true; do
+      lines := input_line chan :: !lines
+        done; []
+  with End_of_file ->
+    close_in chan;
+  List.rev !lines
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 63bc162..de11fe3 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
 <at>  <at>  -46,7 +46,9  <at>  <at>  let rec main () =
     | InputLibvirt (libvirt_uri, guest) ->
       Source_libvirt.create libvirt_uri guest
     | InputLibvirtXML filename ->
-      Source_libvirt.create_from_xml filename in
+      Source_libvirt.create_from_xml filename
+    | InputOVA filename ->
+      Source_ova.create filename in

   (* Print source and stop. *)
   if print_source then (
--

-- 
1.9.3
Pino Toscano | 20 Aug 17:30 2014
Picon

[PATCH] appliance: add cdrkit-isotools and mtools for Mageia

- cdrkit-isotools provides isoinfo, used by the daemon
- mtools is used by syslinux without being a dependency
---
 appliance/packagelist.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/appliance/packagelist.in b/appliance/packagelist.in
index b0a713a..5c93a9a 100644
--- a/appliance/packagelist.in
+++ b/appliance/packagelist.in
 <at>  <at>  -211,6 +211,7  <at>  <at>  ifelse(MAGEIA,1,
   chkconfig /* for /etc/init.d */
   e2fsprogs
   cdrkit-genisoimage
+  cdrkit-isotools
   extlinux
   gfs2-utils
   grub
 <at>  <at>  -219,6 +220,8  <at>  <at>  ifelse(MAGEIA,1,
   iproute2
   iputils
   libcap
+  dnl syslinux uses mtools without depending on it
+  mtools
   nilfs-utils
   ntfsprogs
   ntfs-3g
--

-- 
1.9.3

Gmane