From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Meneghel Rodrigues Subject: Re: [PATCH] KVM test: Unattended install - Give Linux VMs time to shutdown cleanly Date: Wed, 13 Apr 2011 13:35:10 -0300 Message-ID: <1302712512.2033.8.camel@freedom> References: <1302647295-24257-1-git-send-email-lmr@redhat.com> <20110413161613.GC27651@otherpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: autotest@test.kernel.org, kvm@vger.kernel.org To: Eduardo Habkost Return-path: In-Reply-To: <20110413161613.GC27651@otherpad.lan.raisama.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org On Wed, 2011-04-13 at 13:16 -0300, Eduardo Habkost wrote: > On Tue, Apr 12, 2011 at 07:28:15PM -0300, Lucas Meneghel Rodrigues wrote: > > During unattended install, right after we receive the ACK from the guest > > the test is deemed to be finished, and as shutdown_vm = yes, it'll try > > to end the vm issuing a shutdown command to it. However, on virtually > > all Linux guests an SSH server is not available at the end of install, > > so KVM autotest will end the VM forcefully, which is not really safe, > > although it has served us well so far. > > > > We did not fix this 'problem' so far because on RHEL3, a supported > > guest, the anaconda syntax does not support the 'poweroff' directive, > > only 'reboot', so if we don't finish the VM right after the ACK from > > guest we really can't prevent it from starting the install again, > > getting an infinite loop. > > On the other hand, RHEL 3 supports 'reboot'[1], so we could simply run > the install-finished notification on first boot (it's the method we use > for Windows guests, right?), and simply shut down the machine cleanly > using ssh or the virtual power button. Nope, as the VM is started with -kernel and -initrd options, the machine will start anaconda and therefore, install again. I wish we could do it as you described, really. Windows is a different beast, we don't start it with -kernel and -initrd options, just regular boot from the CD + the unattended floppy, so the VM can first boot nice and fine, and then we execute the finish.exe program, telling autotest the install is done. > > [1] http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/3/html/System_Administration_Guide/s1-kickstart2-options.html >