Bug 1264594 - Virt-install hangs after connected to the domain
Summary: Virt-install hangs after connected to the domain
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: s390x
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-18 23:16 UTC by Lei
Modified: 2015-09-23 18:24 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-23 18:24:47 UTC
Embargoed:


Attachments (Terms of Use)

Description Lei 2015-09-18 23:16:22 UTC
Description of problem:
I was using virt-install to install vm to a local disk, the command used is:

"sudo virt-install --name sles12_lei_disk --ram 1024 --disk path=/dev/dasdi1 --vcpus 1 --os-type linux --os-variant generic --network bridge=virbr0 --graphics none --location /home/lzh/guest_images/SLE-12-SP1-Server-DVD-s390x-Beta3-DVD1.iso"

The installation was alright. But after the installation and the reboot, the program just hangs with following output. 

"
....

Initializing virtual console...

Found a PuTTY terminal on /dev/console (80 columns x 30 lines).
*** Starting YaST2 ***
Couldn't get a file descriptor referring to the console
umount: /var/lib/nfs/rpc_pipefs: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
reboot: Restarting system

Domain creation completed.
Restarting guest.
Connected to domain sles12_lei_disk
Escape character is ^]"

This issue doesn't appear if i just install the vm to a storage file, saying "path=/path/name.img".

Version-Release number of selected component (if applicable):

I used the virt-install obtained from the master repo on git https://github.com/virt-manager/virt-manager.git

How reproducible:

Although my target platform is s390x, but the similar issue appeared on my x86_64 machine. So I would say it is highly reproducible.

Steps to Reproduce:
1. Using the command provided, install a vm to a local disk. 

Actual results:
The program hangs, and unable to log into the vm through the virsh console.

Expected results:
Should return to log in page after rebooting. 

Additional info:
When using virsh list, the status of the vm shows crashed.

Comment 1 Cole Robinson 2015-09-19 00:33:22 UTC
Please provide the full output of the command when running with the --debug flag

Is that media publically available anywhere?

Comment 2 Lei 2015-09-21 19:16:40 UTC
(In reply to Cole Robinson from comment #1)
> Please provide the full output of the command when running with the --debug
> flag
> 
> Is that media publicly available anywhere?

Hi Cole, the media from our internal ftp server, however, it is simply a SUSE 12 SP1 server beta 3 for s390x edition, which should be accessible publicly.  

Please also see the debug output below:

[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (cli:254) Launched with command line: /usr/share/virt-manager/virt-install --name sles12_lei_disk --ram 1024 --disk path=/dev/dasdi1 --vcpus 1 --os-type linux --os-variant generic --network bridge=virbr0 --graphics none --location /home/lzh/guest_images/SLE-12-SP1-Server-DVD-s390x-Beta3-DVD1.iso
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (cli:264) Requesting libvirt URI default
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (cli:268) Received libvirt URI qemu:///system
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (virt-install:357) Requesting virt method 'default', hv type 'default'.
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (virt-install:591) Received virt method 'kvm'
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (virt-install:592) Hypervisor name is 'hvm'
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (virt-install:269) Distilled --network options: ['bridge=virbr0']
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (virt-install:182) Distilled --disk options: ['path=/dev/dasdi1']
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (guest:238) Setting Guest.os_variant to 'generic'
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] WARNING (virt-install:528) No 'console' seen in --extra-args, a 'console=ttyS0' kernel argument is likely required to see text install output from the guest.
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (virt-install:746) Guest.has_install_phase: True
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:53) Using scratchdir=/var/lib/libvirt/boot
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:219) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.gIQ50u
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:229) mount cmd: ['/bin/mount', '-o', 'ro,loop', '/home/lzh/guest_images/SLE-12-SP1-Server-DVD-s390x-Beta3-DVD1.iso', '/var/lib/libvirt/boot/virtinstmnt.gIQ50u']
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:409) Finding distro store for location=/home/lzh/guest_images/SLE-12-SP1-Server-DVD-s390x-Beta3-DVD1.iso
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:196) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.gIQ50u/.treeinfo
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:101) Fetching URI: /var/lib/libvirt/boot/virtinstmnt.gIQ50u/content
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:112) Saved file to /var/lib/libvirt/boot/virtinst-content.K1QXII
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:101) Fetching URI: /var/lib/libvirt/boot/virtinstmnt.gIQ50u/boot/s390x/linux
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:112) Saved file to /var/lib/libvirt/boot/virtinst-linux.cQyICM
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:101) Fetching URI: /var/lib/libvirt/boot/virtinstmnt.gIQ50u/boot/s390x/initrd
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:112) Saved file to /var/lib/libvirt/boot/virtinst-initrd.VBhptK
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (distroinstaller:271) Have access to preferred scratchdir so nothing to upload
[Mon, 21 Sep 2015 10:11:26 virt-install 137065] DEBUG (urlfetcher:243) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.gIQ50u
[Mon, 21 Sep 2015 10:11:27 virt-install 137065] DEBUG (guest:480) .................AFTER PREPARE INSTALL
[Mon, 21 Sep 2015 10:11:27 virt-install 137065] DEBUG (guest:395) Generated install XML: 
<domain type="kvm">
  <name>sles12_lei_disk</name>
  <uuid>6fc7a6ea-5f73-4296-a3fc-c1294569243b</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch="s390x" machine="s390-ccw-virtio">hvm</type>
    <kernel>/var/lib/libvirt/boot/virtinst-linux.cQyICM</kernel>
    <initrd>/var/lib/libvirt/boot/virtinst-initrd.VBhptK</initrd>
  </os>
  <clock offset="utc"/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type="block" device="disk">
      <driver name="qemu" type="raw" cache="none" io="native"/>
      <source dev="/dev/dasdi1"/>
      <target dev="vda" bus="virtio"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/lzh/guest_images/SLE-12-SP1-Server-DVD-s390x-Beta3-DVD1.iso"/>
      <target dev="sda" bus="scsi"/>
      <readonly/>
    </disk>
    <interface type="bridge">
      <source bridge="virbr0"/>
      <mac address="52:54:00:21:d5:c6"/>
    </interface>
    <console type="pty"/>
  </devices>
</domain>

[Mon, 21 Sep 2015 10:11:27 virt-install 137065] DEBUG (guest:396) Generated boot XML: 
<domain type="kvm">
  <name>sles12_lei_disk</name>
  <uuid>6fc7a6ea-5f73-4296-a3fc-c1294569243b</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch="s390x" machine="s390-ccw-virtio">hvm</type>
    <boot dev="hd"/>
  </os>
  <clock offset="utc"/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type="block" device="disk">
      <driver name="qemu" type="raw" cache="none" io="native"/>
      <source dev="/dev/dasdi1"/>
      <target dev="vda" bus="virtio"/>
    </disk>
    <disk type="block" device="cdrom">
      <target dev="sda" bus="scsi"/>
      <readonly/>
    </disk>
    <interface type="bridge">
      <source bridge="virbr0"/>
      <mac address="52:54:00:21:d5:c6"/>
    </interface>
    <console type="pty"/>
  </devices>
</domain>

[Mon, 21 Sep 2015 10:11:27 virt-install 137065] DEBUG (guest:426) XML fetched from libvirt object:
<domain type='kvm' id='22'>
  <name>sles12_lei_disk</name>
  <uuid>6fc7a6ea-5f73-4296-a3fc-c1294569243b</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
    <kernel>/var/lib/libvirt/boot/virtinst-linux.cQyICM</kernel>
    <initrd>/var/lib/libvirt/boot/virtinst-initrd.VBhptK</initrd>
    <boot dev='hd'/>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/dasdi1'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/home/lzh/guest_images/SLE-12-SP1-Server-DVD-s390x-Beta3-DVD1.iso'/>
      <backingStore/>
      <target dev='sda' bus='scsi'/>
      <readonly/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='scsi' index='0'>
      <alias name='scsi0'/>
      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0003'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:21:d5:c6'/>
      <source bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
    </interface>
    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target type='virtio' port='0'/>
      <alias name='console0'/>
    </console>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0004'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='selinux' relabel='yes'>
    <label>system_u:system_r:svirt_t:s0:c704,c1008</label>
    <imagelabel>system_u:object_r:svirt_image_t:s0:c704,c1008</imagelabel>
  </seclabel>
</domain>

[Mon, 21 Sep 2015 10:11:27 virt-install 137065] DEBUG (guest:504) ................... self.domain
[Mon, 21 Sep 2015 10:11:27 virt-install 137065] DEBUG (guest:507) ................... installer.cleanup
[Mon, 21 Sep 2015 10:11:27 virt-install 137065] DEBUG (installer:187) Removing /var/lib/libvirt/boot/virtinst-linux.cQyICM
[Mon, 21 Sep 2015 10:11:27 virt-install 137065] DEBUG (installer:187) Removing /var/lib/libvirt/boot/virtinst-initrd.VBhptK
[Mon, 21 Sep 2015 10:11:27 virt-install 137065] DEBUG (cli:434) Connecting to text console
[Mon, 21 Sep 2015 10:11:27 virt-install 137065] DEBUG (cli:410) Running: virsh --connect qemu:///system console sles12_lei_disk
[Mon, 21 Sep 2015 10:18:53 virt-install 137065] DEBUG (cli:434) Connecting to text console
[Mon, 21 Sep 2015 10:18:53 virt-install 137065] DEBUG (cli:410) Running: virsh --connect qemu:///system console sles12_lei_disk

Comment 3 Cole Robinson 2015-09-22 21:33:45 UTC
From that log it doesn't look like virt-install is doing anything wrong.

Figuring that the install completes successfully but then the VM fails to restart, I'm guessing this is an issue in the guest OS, especially since it seems to be that you are using not publicly available sles 12 sp1 beta media. So I suggest filing a bug with suse.

If it turns out virt-install is doing something wrong, feel free to reopen this bug

Comment 4 Lei 2015-09-23 17:58:58 UTC
(In reply to Cole Robinson from comment #3)
> From that log it doesn't look like virt-install is doing anything wrong.
> 
> Figuring that the install completes successfully but then the VM fails to
> restart, I'm guessing this is an issue in the guest OS, especially since it
> seems to be that you are using not publicly available sles 12 sp1 beta
> media. So I suggest filing a bug with suse.
> 
> If it turns out virt-install is doing something wrong, feel free to reopen
> this bug

I used a publicly accessible Fedora media (http://dl.fedoraproject.org/pub/fedora-secondary/releases/22/Server/s390x/iso/Fedora-Server-DVD-s390x-22.iso) for test again. This time it complained "could not find IPL device" during the installation, but allowed me to ignore. However, after the installation, it still halts. 

Seems the lacking of IPL device is causing the issue. Does virt-install require the device to be installed? I'm wondering if there are any requirements on the disk device for virt-install to work properly.

Thanks.

Comment 5 Cole Robinson 2015-09-23 18:24:47 UTC
My understanding is that qemu doesn't even advertise the necessary support to get fedora s390x to work, so this is not going to work no matter what qemu/libvirt/virt-install options you pass

You need to talk with suse and see if their s390 distribution is even expected to work with kvm. Prove that it can work with kvm, and if so, then maybe there's some device or default that we aren't setting correctly in virt-install. But until then let's please keep this bug closed


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