RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1141663 - Remote RHEL 5 Xen has no <os><type arch='...'> attribute when guest is running
Summary: Remote RHEL 5 Xen has no <os><type arch='...'> attribute when guest is running
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-15 07:46 UTC by Richard W.M. Jones
Modified: 2014-09-17 09:13 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1141145
Environment:
Last Closed: 2014-09-17 09:13:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2014-09-15 07:46:21 UTC
Tested with:
virt-v2v-1.27.45-1.1.el7.x86_64
libguestfs-1.27.45-1.1.el7.x86_64

# virt-v2v -ic xen+ssh://10.66.106.64 -os default  xen-pv-rhel5.8-x86_64 -v -x 
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 xen-pv-rhel5.8-x86_64
libvirt: Remote Driver error : unknown procedure: 212
virt-v2v: error: in the libvirt XML metadata, <os><type arch='...'> is 
missing or empty

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]
libvirt xml is:
<domain type='xen' id='5'>
  <name>xen-pv-rhel5.8-x86_64</name>
  <uuid>a25c918c-d838-6323-1944-6ae214992d5d</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <bootloader>/usr/bin/pygrub</bootloader>
  <os>
    <type>linux</type>
    <kernel>/var/lib/xen/boot_kernel.r5G2qO</kernel>
    <initrd>/var/lib/xen/boot_ramdisk.w1Y-8E</initrd>
    <cmdline>ro root=/dev/VolGroup00/LogVol00 rhgb quiet</cmdline>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <disk type='file' device='disk'>
      <driver name='tap' type='aio'/>
      <source file='/var/lib/xen/images/xen/xen-pv/xen-pv-rhel5.8-x86_64.img'/>
      <target dev='xvda' bus='xen'/>
    </disk>
    <interface type='bridge'>
      <mac address='00:16:3e:f0:6c:2e'/>
      <source bridge='xenbr0'/>
      <script path='vif-bridge'/>
      <target dev='vif5.0'/>
    </interface>
    <console type='pty' tty='/dev/pts/1'>
      <source path='/dev/pts/1'/>
      <target port='0'/>
    </console>
    <input type='mouse' bus='xen'/>
    <graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
  </devices>
</domain>

Comment 2 tingting zheng 2014-09-15 08:47:31 UTC
The bug only occurs when I converting xen hvm/pv guest which is running.
For shutdown guest,no such error shows.

Comment 3 Richard W.M. Jones 2014-09-15 09:39:37 UTC
I think this is a bug in libvirt.  Unfortunately in this case
I think that it will turn out to be a bug in libvirt *on RHEL 5*
which is what generates the XML in this case, and therefore this
is going to be difficult to fix.

Unfortunately virt-v2v really needs to know the arch of the guest,
and we cannot realistically guess it, especially in this case where
we are talking to a remote host.

Comment 4 tingting zheng 2014-09-15 10:51:43 UTC
(In reply to Richard W.M. Jones from comment #3)
> I think this is a bug in libvirt.  Unfortunately in this case
> I think that it will turn out to be a bug in libvirt *on RHEL 5*
> which is what generates the XML in this case, and therefore this
> is going to be difficult to fix.
> 
> Unfortunately virt-v2v really needs to know the arch of the guest,
> and we cannot realistically guess it, especially in this case where
> we are talking to a remote host.

Why doesn't virt-v2v firstly check whether the xen guest is running,as Bug 1138586 shows,an error info should show.

Comment 5 Richard W.M. Jones 2014-09-15 10:55:38 UTC
(In reply to tingting zheng from comment #4)
> (In reply to Richard W.M. Jones from comment #3)
> > I think this is a bug in libvirt.  Unfortunately in this case
> > I think that it will turn out to be a bug in libvirt *on RHEL 5*
> > which is what generates the XML in this case, and therefore this
> > is going to be difficult to fix.
> > 
> > Unfortunately virt-v2v really needs to know the arch of the guest,
> > and we cannot realistically guess it, especially in this case where
> > we are talking to a remote host.
> 
> Why doesn't virt-v2v firstly check whether the xen guest is running,as Bug
> 1138586 shows,an error info should show.

TBH I'm not sure.  It *should* be checking the running state of
the guest first, followed by parsing the XML.

Is the guest really running?  What is the output of:

virsh -c xen+ssh://10.66.106.64 list --all

Comment 6 tingting zheng 2014-09-16 01:28:28 UTC
Detailed info:
# virt-v2v -ic xen+ssh://10.66.106.64 -os default  xen-pv-rhel5.8-x86_64 
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 xen-pv-rhel5.8-x86_64
libvirt: Remote Driver error : unknown procedure: 212
virt-v2v: error: in the libvirt XML metadata, <os><type arch='...'> is 
missing or empty

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

The status of the guest is idle.
# virsh -c xen+ssh://10.66.106.64 list
 Id    Name                           State
----------------------------------------------------
 0     Domain-0                       running
 9     xen-pv-rhel5.8-x86_64          idle
 10    rhel6.6-i386-hvm               idle
 12    xen-hvm-rhel4.8-i386           idle

Comment 7 Richard W.M. Jones 2014-09-16 15:49:51 UTC
(In reply to tingting zheng from comment #6)
> Detailed info:
> # virt-v2v -ic xen+ssh://10.66.106.64 -os default  xen-pv-rhel5.8-x86_64 
> [   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64
> xen-pv-rhel5.8-x86_64
> libvirt: Remote Driver error : unknown procedure: 212
> virt-v2v: error: in the libvirt XML metadata, <os><type arch='...'> is 
> missing or empty
> 
> If reporting bugs, run virt-v2v with debugging enabled and include the 
> complete output:
> 
>   virt-v2v -v -x [...]
> 
> The status of the guest is idle.
> # virsh -c xen+ssh://10.66.106.64 list
>  Id    Name                           State
> ----------------------------------------------------
>  0     Domain-0                       running
>  9     xen-pv-rhel5.8-x86_64          idle
>  10    rhel6.6-i386-hvm               idle
>  12    xen-hvm-rhel4.8-i386           idle

One change which I have made in libguestfs >= 1.27.47 is to stop
you trying to convert idle guests.  idle == running, so converting
them is actually dangerous.

This should prevent this error from being manifested in virt-v2v, and
TBH if it does work, then we should just close this bug since I don't
see any value in trying to fix this in libvirt.

So let me know if 1.27.47 fixes this.

Comment 8 tingting zheng 2014-09-17 03:24:42 UTC
Tested with:
libguestfs-1.27.47-1.1.el7.x86_64
virt-v2v-1.27.47-1.1.el7.x86_64

# virsh -c xen+ssh://10.66.106.64 list
 Id Name                 State
----------------------------------
  0 Domain-0             running
 16 xen-pv-rhel5.8-i386  paused
 17 xen-pv-rhel5.8-x86_64 idle

# virt-v2v -ic xen+ssh://10.66.106.64 -os default  xen-pv-rhel5.8-x86_64
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 xen-pv-rhel5.8-x86_64
virt-v2v: error: internal error: invalid argument: libvirt domain 
'xen-pv-rhel5.8-x86_64' is running or paused.  It must be shut down in 
order to perform virt-v2v conversion

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

# virt-v2v -ic xen+ssh://10.66.106.64 -os default  xen-pv-rhel5.8-i386 
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 xen-pv-rhel5.8-i386
virt-v2v: error: internal error: invalid argument: libvirt domain 
'xen-pv-rhel5.8-i386' is running or paused.  It must be shut down in order 
to perform virt-v2v conversion

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

So for running/pause/idle guests,virt-v2v will firstly print a error info.

Comment 9 Richard W.M. Jones 2014-09-17 09:13:30 UTC
Good, in that case I think we can close this.


Note You need to log in before you can comment on or make changes to this bug.