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 1229262 - virt-p2v doesn't work under no GUI mode
Summary: virt-p2v doesn't work under no GUI mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.2
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: P2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-08 10:40 UTC by tingting zheng
Modified: 2015-11-19 07:01 UTC (History)
6 users (show)

Fixed In Version: virt-p2v-1.28.1-1.49.1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1229340 1229385 1229386 (view as bug list)
Environment:
Last Closed: 2015-11-19 07:01:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot of virt-p2v client info (2.36 MB, image/jpeg)
2015-06-10 11:04 UTC, tingting zheng
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2183 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-11-19 08:18:42 UTC

Description tingting zheng 2015-06-08 10:40:51 UTC
Description of problem:
virt-p2v doesn't work under no GUI mode

Version-Release number of selected component (if applicable):
libguestfs-1.28.1-1.37.el7.x86_64
virt-v2v-1.28.1-1.37.el7.x86_64
livecd-p2v-201505191242.iso

How reproducible:
100%

Steps to Reproduce:
1.Prepare pxe to boot virt-p2v client.Add virt-p2v options in the APPEND field in the pxelinux.cfg file.
eg:
APPEND rootflags=loop initrd=initrd0.img root=live:/livecd-p2v-201505191242.iso p2v.server=10.66.6.62 p2v.password=redhat p2v.name=p2v-test-nogui p2v.vcpus=1  p2v.memory=1024M p2v.disks=sda p2v.removable=sr0 p2v.o=libvirt p2v.oa=sparse p2v.of=raw p2v.os=default rootfstype=auto ro rd.live.image quiet console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH net.ifnames=0 rhgb rd.luks=0 rd.md=0 rd.dm=0 

2.Boot host from pxe,choose the profile created by step 1.

3.Host boot into console mode with root shell directly,but the conversion is not started.

Actual results:
As description.

Expected results:
virt-p2v works well under no GUI mode.

Additional info:

Comment 2 Richard W.M. Jones 2015-06-08 13:51:00 UTC
To save anyone else lots of trouble, here is how I reproduced
this bug, using only Fedora, qemu, and non-root access.

(1) Grab the pxeboot subdirectory.  I have now uploaded this to:
http://tick.home.annexia.org/virt-p2v/RHEL-7.2-preview/

(2) Unpack it into /tmp (so it will appear as /tmp/tftpboot/)

(3) Edit /tmp/tftpboot/pxelinux.cfg/default as described in the
bug report.

(4) Copy some extra files required to boot:

  cp /usr/share/syslinux/{pxelinux.0,ldlinux.c32) /tmp/tftpboot/

(5) If you don't have one already, create a test image that you want
to convert.  eg:

  virt-builder centos-6 --output /tmp/centos-6.img

(6) Boot virt-p2v using PXE:

  qemu-system-x86_64 \
    -m 4096 \
    -hda /tmp/centos-6.img \
    -boot n -netdev user,id=usernet,tftp=/tmp/tftpboot,bootfile=/pxelinux.0 \
    -device virtio-net-pci,netdev=usernet \
    -serial stdio

Because the emulated tftp server inside qemu is very slow, this takes
quite a long time.  In particular it appears to hang after pxelinux.0 is
loaded (but it's still doing something - give it time).

Even after booting Linux and dropping me into the root shell, it still
took quite a long time (many minutes) before virt-p2v started running.  Use:

  systemctl status p2v -l

to see if it has started yet.

Comment 3 Richard W.M. Jones 2015-06-09 14:33:27 UTC
I think in fact virt-p2v does work.  I have done a couple of
test conversions here.  It does however take quite a long time
before the conversion starts, and the conversion isn't "visible"
to the user (bug 1229386) while it is happening.

So while the current situation isn't that great, this is probably
not a bug.

Tingting, can you try one of the later ISOs in this directory?

http://oirase.annexia.org/virt-p2v/RHEL-7.2-preview/

When it boots, and after auto-login, and after waiting (eg) 5 minutes,
use the following command to follow the status of the virt-p2v:

journalctl -u p2v --follow

Comment 4 tingting zheng 2015-06-10 11:01:18 UTC
Tried with:
livecd-p2v-201506091319.iso 
libguestfs-1.28.1-1.38.el7.x86_64
virt-v2v-1.28.1-1.38.el7.x86_64

1.Prepare pxe to boot virt-p2v client.Add virt-p2v options in the APPEND field in the pxelinux.cfg file.
eg:
APPEND rootflags=loop initrd=initrd0.img root=live:/livecd-p2v-201505191242.iso p2v.server=10.66.6.62 p2v.password=redhat p2v.name=p2v-test-nogui p2v.vcpus=1  p2v.memory=1024M p2v.disks=sda p2v.removable=sr0 p2v.o=libvirt p2v.oa=sparse p2v.of=raw p2v.os=default rootfstype=auto ro rd.live.image quiet console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH net.ifnames=0 rhgb rd.luks=0 rd.md=0 rd.dm=0 
2.Boot host from pxe.
3.Host boot into console mode with root shell directly,run:
# journalctl -u p2v --follow

It shows something about remote virt-v2v output supported and "virt-v2v:cannot parse p2v.memory from kernel command line".Details see the screenshot.

For the above issue,is it a new bug?

If I remove p2v.memory=1024M or p2v.memory=1G from kernel command line,virt-p2v client will fail to boot into console mode(I can only see the mouse cursor in the dark screen).If I press "Ctrl+alt+F1",console mode can be entered.The conversion indeed starts,as I can see logs and images in conversion server.

Comment 5 Richard W.M. Jones 2015-06-10 11:04:26 UTC
(In reply to tingting zheng from comment #4)
> p2v.memory=1024M
[...]
> It shows something about remote virt-v2v output supported and
> "virt-v2v:cannot parse p2v.memory from kernel command line".Details see the
> screenshot.
> 
> For the above issue,is it a new bug?

That p2v.memory setting should be supported, so yes, that is a new bug.

> If I remove p2v.memory=1024M or p2v.memory=1G from kernel command
> line,virt-p2v client will fail to boot into console mode(I can only see the
> mouse cursor in the dark screen).If I press "Ctrl+alt+F1",console mode can
> be entered.The conversion indeed starts,as I can see logs and images in
> conversion server.

This is bug 1229386.

Comment 6 tingting zheng 2015-06-10 11:04:54 UTC
Created attachment 1037215 [details]
Screenshot of virt-p2v client info

Comment 7 Richard W.M. Jones 2015-06-10 13:09:43 UTC
(In reply to Richard W.M. Jones from comment #5)
> (In reply to tingting zheng from comment #4)
> > p2v.memory=1024M
> [...]
> > It shows something about remote virt-v2v output supported and
> > "virt-v2v:cannot parse p2v.memory from kernel command line".Details see the
> > screenshot.
> > 
> > For the above issue,is it a new bug?
> 
> That p2v.memory setting should be supported, so yes, that is a new bug.

I've already fixed this one upstream:
https://github.com/libguestfs/libguestfs/commit/bb5b23c1519a3901909a5ed51ce2f88e0904cb85

Comment 9 Richard W.M. Jones 2015-07-22 10:37:05 UTC
The 201507220606 build here should contain the fix:
http://oirase.home.annexia.org/virt-p2v/RHEL-7.2-preview/

Comment 10 tingting zheng 2015-07-23 02:37:15 UTC
(In reply to Richard W.M. Jones from comment #9)
> The 201507220606 build here should contain the fix:
> http://oirase.home.annexia.org/virt-p2v/RHEL-7.2-preview/

Thanks,I will test it later,need this bug be added in libguestfs erratum?

Comment 11 Richard W.M. Jones 2015-07-23 07:29:08 UTC
I don't know.  I was hoping we'd get a virt-p2v erratum
(see bug 1168626).

Comment 13 tingting zheng 2015-08-20 10:10:39 UTC
Tested with:
virt-p2v-1.28.1-1.49.1.el7
virt-v2v-1.28.1-1.49.el7.x86_64

When I configure the pxelinux.cfg file as comment 4 shows,after launch virt-p2v client,try "#journalctl -u p2v --follow",no such error shows as below:
"virt-v2v:cannot parse p2v.memory from kernel command line".

So the bug has been fixed on the above virt-p2v version,move this bug to VERIFIED.

Comment 15 errata-xmlrpc 2015-11-19 07:01:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2183.html


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