[virt-tools-list] virt-install doesn't reboot rhel6/7 VMs after install

Cole Robinson crobinso at redhat.com
Tue Jul 29 14:36:02 UTC 2014


On 07/28/2014 12:55 PM, Digimer wrote:
> 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
> 

I just tried a centos 7 install from cdrom with a nearly identical command
line using stock f20 host, and virt-install rebooted the guest correctly at
the end of the VM install. So you'll need to provide the virt-install --debug
output of a failing invocation so I can see what's going wrong

Thanks,
Cole




More information about the virt-tools-list mailing list