Chris Lalancette
2008-Aug-28 15:20 UTC
[Ovirt-devel] VM Installation problem (and proposed solution)
Hello all (Ian especially), apevec pointed out a problem with installation of guests under oVirt. What currently happens is that after you finish the installation of (say) Fedora in a VM, the VM reboots, but then immediately PXE boots again. This is because we haven't killed the guest and re-defined the XML to have the boot device be the hard drive, like it should. Now, we could solve this by having a flag in the database for "install", setting "on_restart" = "destroy", and then creating the domain. Once the install finished, the guest would die, host-status would detect this, and then restart the guest with the hard drive as the boot device. This would be similar to how virt-install manages the problem. However, that is kind of hacky, and seems a little fragile since we are then going to depend on host-status to update the status and restart the guest. The better way to do this is to have the remote node take care of the details. That is, with the messaging stuff, we would have an "install_vm" remote call; then this entire operation would happen over on the node in question, and we wouldn't have to have hacky model changes to support it. First, I wanted to be sure this was an approach people agreed with (or if they had other ideas how to approach it). Second, I wanted to make Ian aware that this is one of the "ovirt-specific" methods that we are going to need in the AMQP model, once that is in place. Chris Lalancette
Daniel P. Berrange
2008-Aug-28 15:26 UTC
[Ovirt-devel] VM Installation problem (and proposed solution)
On Thu, Aug 28, 2008 at 05:20:06PM +0200, Chris Lalancette wrote:> Hello all (Ian especially), > apevec pointed out a problem with installation of guests under oVirt. What > currently happens is that after you finish the installation of (say) Fedora in a > VM, the VM reboots, but then immediately PXE boots again. This is because we > haven't killed the guest and re-defined the XML to have the boot device be the > hard drive, like it should.You don't have to wait for installation to finish before re-defining the XML with hard drive as the boot device You can define the post-install XML config the moment the guest has booted. When it shuts down, libvirt will automatically switch over to the newly defined config. This is how virt-install handles it. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|