Jump to content
Sign in to follow this  
alfredo_2020

RESOLVED: VM Doesnt Boot 1st Time, 2nd Time Yes??

9 posts in this topic Last Reply

Recommended Posts

Hello, i finally got a VM with passthrough GPU, but now im getting wierd error. The first time i launch the VM it doesnt boot up. I get the Tiano screen than goes to black and VM is shut down. 2nd Time i run it, it starts up ok. I dont understand what this line means. which is what i get in the VM log when it crashes. When it doesnt it stop at the first line. What does line 2 mean? If this is not enough information, please let me know if you need my VM-XML code.

 

1. 2019-01-29T01:09:14.165034Z qemu-system-x86_64: -chardev pty,id=charserial0: char device redirected to /dev/pts/1 (label charserial0) 
2. 2019-01-29T01:09:28.356293Z qemu-system-x86_64: terminating on signal 15 from pid 10324 (/usr/sbin/libvirtd)
3. 2019-01-29 01:09:30.580+0000: shutting down, reason=shutdown

Share this post


Link to post
18 minutes ago, alfredo_2020 said:

please let me know if you need my VM-XML code.

That and your diagnostics

Share this post


Link to post
<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='2'>
  <name>Windows 10</name>
  <uuid>dea96215-624f-6a42-6120-a80215734cba</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>3</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='2'/>
    <vcpupin vcpu='2' cpuset='3'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.10'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/dea96215-624f-6a42-6120-a80215734cba_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='3' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:91:aa:07'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-2-Windows 10/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <rom file='/mnt/user/domains/vbios/NVIDIA_GTX970_4096_140826_modified.rom'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
      </source>
      <boot order='1'/>
      <alias name='hostdev3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>

 

 

 

Thank you so much, i been searching online for days, and cant find anything to my case. Alot of help on the forum, so i was able to piece part my solution, just have this last hurdle.

Edited by alfredo_2020

Share this post


Link to post

Is this where your VM is hosted? WDS250G2X0C-00L350_182687801217

 

It looks like you've got it passed through to the VM, and also have Unassigned Devices attempting to mount it.  Probably because of the conflict, the VM won't start until UD gives up trying to mount.

Share this post


Link to post

YES, WDS250G2X0C-00L350_182687801217 is the pcie nvme drive i'm passing through. Im 99% sure, the nvme drive is NOT mounted when i try to launch the WIN10 VM. I have auto-mount set to NO. Ill double check this, to make sure the drive is not mounted when i launch the VM, see if i keep getting this error.

 

When the VM does bootup correctly, the nvme drive disappears from the UnAssigned list. (This is expected behavior since host, and guest can't control at same time)

 

Ill report back when i get home tonight.

Share this post


Link to post
7 minutes ago, alfredo_2020 said:

I have auto-mount set to NO.

UD is trying to mount it.

Jan 28 17:08:49 Tower unassigned.devices: Successfully mounted '/dev/nvme0n1p2' on '/mnt/disks/WDS250G2X0C-00L350_182687801217-part2'.
Jan 28 17:08:49 Tower unassigned.devices: Disk with serial 'WDS250G2X0C-00L350_182687801217', mountpoint 'WDS250G2X0C-00L350_182687801217-part2' is not set as sharable and will not be shared...
Jan 28 17:08:49 Tower unassigned.devices: Adding disk '/dev/nvme0n1p3'...
Jan 28 17:08:49 Tower unassigned.devices: No filesystem detected on '/dev/nvme0n1p3'.
Jan 28 17:08:49 Tower unassigned.devices: Partition 'WDS250G2X0C-00L350_182687801217-part3' could not be mounted...
Jan 28 17:08:49 Tower unassigned.devices: Adding disk '/dev/nvme0n1p4'...
Jan 28 17:08:49 Tower unassigned.devices: Mount drive command: /sbin/mount -t ntfs -o auto,async,noatime,nodiratime,nodev,nosuid,umask=000 '/dev/nvme0n1p4' '/mnt/disks/WDS250G2X0C-00L350_182687801217-part4'
Jan 28 17:08:49 Tower ntfs-3g[2109]: Version 2017.3.23 integrated FUSE 27
Jan 28 17:08:49 Tower ntfs-3g[2109]: Mounted /dev/nvme0n1p4 (Read-Only, label "", NTFS 3.1)
Jan 28 17:08:49 Tower ntfs-3g[2109]: Cmdline options: rw,noatime,nodiratime,nodev,nosuid,umask=000
Jan 28 17:08:49 Tower ntfs-3g[2109]: Mount options: rw,nodiratime,nodev,nosuid,allow_other,nonempty,noatime,ro,default_permissions,fsname=/dev/nvme0n1p4,blkdev,blksize=4096
Jan 28 17:08:49 Tower ntfs-3g[2109]: Global ownership and permissions enforced, configuration type 1
Jan 28 17:08:49 Tower unassigned.devices: Mount error: Windows is hibernated, refused to mount. The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Falling back to read-only mount because the NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting.) 
Jan 28 17:08:49 Tower unassigned.devices: Successfully mounted '/dev/nvme0n1p4' on '/mnt/disks/WDS250G2X0C-00L350_182687801217-part4'.
Jan 28 17:08:49 Tower unassigned.devices: Disk with serial 'WDS250G2X0C-00L350_182687801217', mountpoint 'WDS250G2X0C-00L350_182687801217-part4' is not set as sharable and will not be shared...
Jan 28 17:08:51 Tower unassigned.devices: Unmounting disk 'Recovery'...
Jan 28 17:08:51 Tower unassigned.devices: Unmounting '/dev/nvme0n1p1'...
Jan 28 17:08:51 Tower unassigned.devices: Unmount cmd: /bin/umount '/dev/nvme0n1p1' 2>&1
Jan 28 17:08:51 Tower ntfs-3g[1867]: Unmounting /dev/nvme0n1p1 (Recovery)
Jan 28 17:08:51 Tower unassigned.devices: Successfully unmounted '/dev/nvme0n1p1'
Jan 28 17:08:51 Tower unassigned.devices: Disk with serial 'WDS250G2X0C-00L350_182687801217', mountpoint 'Recovery' removed successfully.
Jan 28 17:08:52 Tower unassigned.devices: Unmounting disk 'WDS250G2X0C-00L350_182687801217-part2'...
Jan 28 17:08:52 Tower unassigned.devices: Unmounting '/dev/nvme0n1p2'...
Jan 28 17:08:52 Tower unassigned.devices: Unmount cmd: /bin/umount '/dev/nvme0n1p2' 2>&1
Jan 28 17:08:52 Tower unassigned.devices: Successfully unmounted '/dev/nvme0n1p2'
Jan 28 17:08:52 Tower unassigned.devices: Disk with serial 'WDS250G2X0C-00L350_182687801217', mountpoint 'WDS250G2X0C-00L350_182687801217-part2' removed successfully.
Jan 28 17:08:52 Tower unassigned.devices: Disk with serial 'WDS250G2X0C-00L350_182687801217', mountpoint 'WDS250G2X0C-00L350_182687801217-part3' is not mounted and cannot be unmounted...
Jan 28 17:08:52 Tower unassigned.devices: Unmounting disk 'WDS250G2X0C-00L350_182687801217-part4'...
Jan 28 17:08:52 Tower unassigned.devices: Unmounting '/dev/nvme0n1p4'...
Jan 28 17:08:52 Tower unassigned.devices: Unmount cmd: /bin/umount '/dev/nvme0n1p4' 2>&1
Jan 28 17:08:52 Tower ntfs-3g[2109]: Unmounting /dev/nvme0n1p4 ()
Jan 28 17:08:52 Tower unassigned.devices: Successfully unmounted '/dev/nvme0n1p4'
Jan 28 17:08:52 Tower unassigned.devices: Disk with serial 'WDS250G2X0C-00L350_182687801217', mountpoint 'WDS250G2X0C-00L350_182687801217-part4' removed successfully.

 

Share this post


Link to post

Ok, thank you for pointing that out i was messing with mounting/unmounting that drive because i accidentatly delete a partion that was0B and the VM wouldnt boot, it HUNG the server. So i restored it from a copy which brought back the 0B partion. But i will look at it again tonight to make sure when i do boot it up it is not mounted. 

 

Also another note, why would my windows vdisk image have that 0B 3rd partion? I used the dd command to convert from my vdisk.img to the entire drive and thats when it appeared, and wasnt sure what it was for becuase windows doesnt see that 3rd partion. just 3 partions. (Recovery, EFI, C Drive)

Share this post


Link to post

So, i have confirmed that the NVME drive is not mounted and i even turned desctructive mode to OFF on the UD plugin to see if that would help. I still get the same problem the VM only starts up every other time. 

 

So i decided to stub-out the 3 devices i'm passing through to the VM, the GPU Video+GPU Audio+PCI USB Controller+PCI NVME Drive. and the first time i ran the VM on a clean server restart it worked. then second time same crash it would show the TIanno screen then when the windows circle thing would pop up the screen goes blank. Next time i run it again it worked fine. So its back to starting up every other time.

 

Additonal Testing i did...

if i shut down the VM from unraid (shut down) not the destroy option (Windows shows shutting down, then the VM seems to always boot up the subequent time with no problem. So problem is when i shut down the VM from windows itself... i tried the shutdown and reboot from unraid about 4 times and it worked just fine. So something isnt working right when i shut down from the VM from within Windows Shutdown option.


 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this