Changes between Version 1 and Version 2 of Web/VirtualMachinesMigration
- Timestamp:
- Mar 21, 2010, 11:32:36 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Web/VirtualMachinesMigration
v1 v2 7 7 = Data structures = 8 8 VMs are declared as usual, on ncm-xen and ncm-openvz components. But if we add two fields, migration is possible: 9 9 {{{ 10 10 master : fqdn 11 11 host : fqdn 12 13 <tt>master</tt>is the name of the physical machine that is expected to usually own the VM. This PM is responsible for creating the VM.14 <tt>host</tt>is the name of the PM where the machine must be actually running. When this changes a migration must be triggered.12 }}} 13 `master` is the name of the physical machine that is expected to usually own the VM. This PM is responsible for creating the VM. 14 `host` is the name of the PM where the machine must be actually running. When this changes a migration must be triggered. 15 15 16 16 = How it should behave = 17 This is the pseudo-code the components should have. {{$guest}}is the VM description.18 17 This is the pseudo-code the components should have. '''$guest''' is the VM description. 18 {{{ 19 19 if (!$profile->contains($guest)) { 20 20 destroy($guest) … … 28 28 do_nothing(); 29 29 } 30 }}} 30 31 31 32 So, only the master is allowed to create a given VM. Then, a VM description is included by a pool of physical machines. The component will, as usual, check its current state and if it doesn't match with the profile, trigger the appropriate actions. … … 34 35 So, suppose we have two physical machines, called Springfield and Shelbyville. And we have Homer, Marge, Bart, Lisa and Maggie hosted on Springfield. But Bart grows up (he should be 28 by now, why is he still in 3rd grade??) and there is no room for him in Springfield, so he moves to Shelbyville. Let's explain this in Pan language: 35 36 Springfield city looks like this: 36 37 {{{ 37 38 object template springfield; 38 39 … … 45 46 46 47 ... 47 48 }}} 48 49 And Shelbyville is well aware of the existence of the Simpson family, although they don't live there. 49 50 {{{ 50 51 object template shelbyville; 51 52 … … 58 59 59 60 ... 61 }}} 60 62 61 63 Similar, right? But now, let's describe how Bart is seen by both cities: 62 64 {{{ 63 65 template vms/simpsons/bart; 64 66 … … 69 71 ) 70 72 ); 73 }}} 71 74 72 75 Easy to remember: Bart is born in Springfield and lives on Springfield. Now, to trigger a migration just change the above template to this: 73 76 {{{ 74 77 template vms/simpsons/bart; 75 78 … … 80 83 ) 81 84 ); 82 85 }}} 83 86 And now, no matter where Bart was living, he will move to Shelbyville. 84 87 … … 87 90 88 91 = To be thought = 89 * How to detect a scheduled downtime on a VM and avoid triggering a new VM machine creation? Perhaps we should check something on the guest's {{/system/maintenance}}?92 * How to detect a scheduled downtime on a VM and avoid triggering a new VM machine creation? Perhaps we should check something on the guest's `/system/maintenance`? 90 93