History | View | Annotate | Download (27.3 kB)
KVM: don't boot from a virtio cdrom
Apparently it's not supported. Also add -boot command line parametersto kvm, since they seem to help booting from the right place. Everythingwill still only work when not using a kernel, but well... :)
Reviewed-by: iustinp
KVM: don't boot from cdrom with no cdrom
Support cdrom image and boot order for KVM
The cdrom image has the same meaning than in Xen HVM, and so doesboot_order, even though it has a slightly different syntax, and uses thevalue 'disk' too boot from disk and 'cdrom' to boot from cdrom.
KVM: add VNC TLS and X509 parameters
With this parameters VNC for KVM is able to be protected by tls,optionally with an x509 certificate, and optionally verifying theclient as well. Additionally in this patch we limit the bind address tobeing a directory, rather than a file or a directory, for simplicity, as...
KVM: allow binding vnc to a file
Before we forced the VNC_BIND_ADDRESS to be an ip. Now we also accept apath, and bind the instance to it, or to a file in it if it's adirectory.
KVM: Make GetAllInstancesInfo concurrency-safe
Or actually more so. If this function gets called while instances getshut down, it might try to report information on instances which don'texits. Try to fail gracefully if that happens, by just skipping an...
KVM: advise about VNC support on GetShellCommand
KVM: enable VNC if a VNC_BIND_ADDRESS is defined
We'll also enable a tablet usb device, as suggested by the kvm man page.
KVM: Allow the HV_VNC_BIND_ADDRESS parameter
KVM: make the kernel and initrd arguments optional
Under KVM we don't strictly need a kernel and initrd. If some are passedwe'll use them, otherwise the guest OS will need to behave as fullynative, and have its own boot loader and kernel.The root_path hypervisor parameter becomes mandatory only if a kernel is...
KVM: add the HV_SERIAL_CONSOLE parameter
Up until now a KVM instance was forced to have a serial port.With this change this is no longer mandatory, by default we'll use one,but if the HV_SERIAL_CONSOLE parameter is set to False we'll do without.
GetShellCommand: get hvparams and beparams
Sometimes the hypervisor will use the instance hv and/or be parametersto determine the best shell command. This is not possible, though,currently, as the instance hv/beparams are not filled, so we have topass the filled versions separately....
Actually mark drives as read-only if so configured
This patch correctly marks the drives as read-only for Xen, and raisesand exception for KVM since it doesn't support read-only drives.
Reviewed-by: ultrotter
KVM and Xen: add the HV_ROOT_PATH parameter
This parameter allows a different path to be passed to the instancekernel. The new parameter is mandatory, and by default has the value ofthe old hardcoded value for both kvm and xen.
Beta1 clusters will need to have this parameter added for their...
KVM: implement GetShellCommandForConsole
This is a class method, because it calls _InstanceSerial, which isanother class method. The patch changes it to classmethod for all thehypervisor classes.
KVM: classify _Instance{Monitor,Serial,KVMRuntime}
Those methods need nothing from the instantiated class, and justmanipulate strings, and fetch some class global variables, so they canbe classmethods.
Xen and KVM: correct a typo when checking args
A missing 'be' was present in the error string for both xen and kvm,when the kernel or initrd path was not absolute.
Reviewed-by: imsnah
KVM live migration: handle failure
If the KVM live migration ends up in a 'failed' state it has beenaborted at the kvm level, and the machine is still running locally.We support also the 'cancelled' state even though there should be no wayof reaching it, without manual intervention....
KVM: change a few IOError with EnvironmentError
KVM: instance migration
The tcp port used for migrating KVM instances is selectable at./configure time. We use a single port as nodes are locked anyway duringa migration, so no two migrations can happen at the same time to thesame node.
KVM: add the _InstancePidAlive function
Throughout the kvm code we very often look for the instance pidfilename, read it, and check if the process is alive. Abstract this into aprivate function and use that one instead.
This patch also changes RebootInstance to check whether the instance is...
KVM: fix RebootInstance
RebootInstance was broken, because it just used to call StartInstancewith wrong parameters. With this patch we still stop the instance, butuse the saved kvm runtime to start it again.
KVM: retry the instance shutdown command
When we ask the instance to shutdown sometimes the command won't work,especially if the instance isn't fully booted up. We'll wait for a bit,and give it a few chances before giving up.
KVM: save and remove the KVM runtime
At instance startup time we save the kvm runtime, and at stop time wedelete it. This patch also includes a function to load the kvm runtime,which is unused yet.
KVM: split KVM runtime generation and startup
Before we used to generate the kvm command line and then just run it.With this patch we split the generation from the time it is run,allowing us to save it and replay it at reboot.
We must take special care about instance nics:...
KVM: add a _CONF_DIR
Currently we keep pid files and control files. In the conf dir we'llalso keep the data to start the instance anew, and the networkinterface scripts. These will then be copied to a separate area (since_CONF_DIR could be mounted 'noexec') and used to start the instance....
KVM: Remove sockets after shutdown
Abstract the monitor and serial socket naming in two functions, andreuse them to cleanup the files after shutdown.
KVM: fix class docstring
Simplify hypervisor block_devices structure
This is a partial forward-port of commit 1136 on the 1.2 branch:
The hypervisor doesn't need to be passed the whole block device structure, so we'll just give it the block device name on the local node, and the name as seen by the instance. This will make it easier to...
KVM: improve socat interface
Call socat with a full path specified at configure time, rather thanjust by its name, and check for the binary to exist at hypervisorverify.
cleanup: kvm code likes to redefine names
Reviewed-by: amishchenko
Fix epydoc format warnings
This patch should fix all outstanding epydoc parsing errors; as such, weswitch epydoc into verbose mode so that any new errors will be visible.
KVMHypervisor add two missing 'constants.'
Some calls to the HV parameters were missing them.
KVMHypervisor fix to case misspellings
Convert the KVM hypervisor to hvparams
I'm not sure which parameters it should use, I took all I saw in thecode. Update: ultrotter says the list is OK for now.
Change hypervisors to use the beparams
This patch changes the hypervisor functions to use the beparams dictinstead of the instance attributes.
KVM Hypervisor Cleanup
- Remove a few experiemental code lines left as comments- Rework first disks' boot=on addition, which was calculated twice- Remove an empty line- Remove reference to hvm_pae which doesn't apply to kvm
Add KVM hypervisor code
ht_kvm.py contains the code for ganeti to work under kvm.This patch also modifies Makefile.am to ship that file, andlib/hypervisor/__init__.py to import it, and add kvm to thehypervisors map.