Re: virt-install doesn't reboot rhel6/7 VMs after install

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28/07/14 12:02 PM, Cole Robinson wrote:
On 07/28/2014 11:37 AM, Digimer wrote:
Hi all,

   I've noticed that, for reasons I am not entirely sure of (though may exist
and be valid), newly provisioned EL6 and EL7 VMs stay off after pressing
"reboot" at the end of the OS install (--os-variant rhel*). I've seen this
behaviour on RHEL/CentOS 6.x and various recent Fedoras. Note that when I
install other OSes, the VM reboots properly.

   Why would this be? Is this designed behaviour? Installing the same on
bare-iron nodes reboots properly.


The VM should be restarting... can you show an example command line and full
virt-install --debug output? Make sure you aren't passing --noreboot or --wait
timeout that is expiring.

The way it's supposed to work is that the VM fully shuts down, virt-install
changes the VM configuration to boot off the now installed disk, and restarts
the VM. It does this by telling VM to shutdown rather than perform a soft
reboot with <on_reboot>destroy</on_reboot> in the VM XML. It does this for all
VM installs regardless of the OS.

When the VM shuts down after install, virt-install should update the config,
restart the VM, and exit. But clearly that's failing here

- Cole

Here is an example install which showed the problem. It is very similar to how I do all my EL6/EL7 installs (save for sometimes installing from PXE/http):

virt-install --connect qemu:///system \
  --name an-a03n01 \
  --ram 2048 \
  --arch x86_64 \
  --vcpus 2 \
  --cdrom /mnt/usb/VMs/files/CentOS-7.0-1406-x86_64-Everything.iso \
  --os-variant rhel7 \
  --network bridge=virbr0,model=virtio \
  --network bridge=virbr0,model=virtio \
  --network bridge=virbr0,model=virtio \
  --network bridge=virbr0,model=virtio \
  --network bridge=virbr0,model=virtio \
  --network bridge=virbr0,model=virtio \
  --disk path=/mnt/usb/VMs/images/an-a03n01.img,bus=virtio,size=40 \
  --graphics vnc

Note that the XML definition is properly updated (ie: boots of disk instead of CDROM in the above example). The above was run on a Fedora 20 x86_64 host.

Please also note that, in this case, I created six NICs but I've seen this happen with just one defined (which is actually the majority of installs... this is a special case).

Here are the install logs:

====
  0 root@lemass:/mnt/usb/VMs# cat /var/log/libvirt/qemu/an-a03n01.log
2014-07-28 15:28:14.414+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -name an-a03n01 -S -machine pc-i440fx-1.6,accel=kvm,usb=off -cpu SandyBridge -m 2048 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid ed83b7c8-413b-4f2a-be09-6ecf06bb7523 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/an-a03n01.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-reboot -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x9.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x9 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x9.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x9.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0xa -drive file=/mnt/usb/VMs/images/an-a03n01.img,if=none,id=drive-virtio-disk0,format=raw -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0xb,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=2 -drive file=/mnt/usb/VMs/files/CentOS-7.0-1406-x86_64-Everything.iso,if=none,id=drive-ide0-0-0,readonly=on,format=raw -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fd=24,id=hostnet0,vhost=on,vhostfd=25 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:a4:ed:45,bus=pci.0,addr=0x3 -netdev tap,fd=26,id=hostnet1,vhost=on,vhostfd=27 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:00:5e:ba,bus=pci.0,addr=0x4 -netdev tap,fd=28,id=hostnet2,vhost=on,vhostfd=29 -device virtio-net-pci,netdev=hostnet2,id=net2,mac=52:54:00:af:d7:73,bus=pci.0,addr=0x5 -netdev tap,fd=30,id=hostnet3,vhost=on,vhostfd=31 -device virtio-net-pci,netdev=hostnet3,id=net3,mac=52:54:00:f1:63:2a,bus=pci.0,addr=0x6 -netdev tap,fd=32,id=hostnet4,vhost=on,vhostfd=33 -device virtio-net-pci,netdev=hostnet4,id=net4,mac=52:54:00:50:a0:a4,bus=pci.0,addr=0x7 -netdev tap,fd=34,id=hostnet5,vhost=on,vhostfd=35 -device virtio-net-pci,netdev=hostnet5,id=net5,mac=52:54:00:db:a9:ec,bus=pci.0,addr=0x8 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/an-a03n01.org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev pty,id=charconsole0 -device virtconsole,chardev=charconsole0,id=console0 -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0xc
char device redirected to /dev/pts/7 (label charconsole0)
2014-07-28 15:32:21.585+0000: shutting down
2014-07-28 15:33:06.900+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -name an-a03n01 -S -machine pc-i440fx-1.6,accel=kvm,usb=off -cpu SandyBridge -m 2048 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid ed83b7c8-413b-4f2a-be09-6ecf06bb7523 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/an-a03n01.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x9.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x9 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x9.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x9.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0xa -drive file=/mnt/usb/VMs/images/an-a03n01.img,if=none,id=drive-virtio-disk0,format=raw -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0xb,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,id=drive-ide0-0-0,readonly=on,format=raw -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,fd=24,id=hostnet0,vhost=on,vhostfd=25 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:a4:ed:45,bus=pci.0,addr=0x3 -netdev tap,fd=26,id=hostnet1,vhost=on,vhostfd=27 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:00:5e:ba,bus=pci.0,addr=0x4 -netdev tap,fd=28,id=hostnet2,vhost=on,vhostfd=29 -device virtio-net-pci,netdev=hostnet2,id=net2,mac=52:54:00:af:d7:73,bus=pci.0,addr=0x5 -netdev tap,fd=30,id=hostnet3,vhost=on,vhostfd=31 -device virtio-net-pci,netdev=hostnet3,id=net3,mac=52:54:00:f1:63:2a,bus=pci.0,addr=0x6 -netdev tap,fd=32,id=hostnet4,vhost=on,vhostfd=33 -device virtio-net-pci,netdev=hostnet4,id=net4,mac=52:54:00:50:a0:a4,bus=pci.0,addr=0x7 -netdev tap,fd=34,id=hostnet5,vhost=on,vhostfd=35 -device virtio-net-pci,netdev=hostnet5,id=net5,mac=52:54:00:db:a9:ec,bus=pci.0,addr=0x8 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/an-a03n01.org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev pty,id=charconsole0 -device virtconsole,chardev=charconsole0,id=console0 -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0xc
char device redirected to /dev/pts/7 (label charconsole0)
====

Let me know of I can help further.

--
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without access to education?

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux