[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Add uuid check to domain creation
Hi, This patch prevents uuid double use. A check_uuid() in this patch checks on uuid of the VM configuration definition. If specified uuid is already used with the others VM, the xm create command does not create the VM. The xm create command error occurs. Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx> Best regards, Kan --------- When I found the problem of uuid, operations were as follows. I created VM with the following VM configuration definitions. (I specified the same uuid.) uuid1.conf: kernel = "/boot/vmlinuz-2.6-xenU" memory = 256 name = "vm1" disk = [ 'file:/xen/xen-test/image/rhel4_1.img,sda1,w' ] vif = [ '' ] root = "/dev/sda1 ro" uuid = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" uuid2.conf: kernel = "/boot/vmlinuz-2.6-xenU" memory = 256 name = "vm2" disk = [ 'file:/xen/xen-test/image/rhel4_2.img,sda1,w' ] vif = [ '' ] root = "/dev/sda1 ro" uuid = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" The result was as follows. - The same uuid is used in domain 1 and domain 2. - The domain name of domain 1 was changed from vm1 to vm2. # xm create /home/kanno/uuid1.conf Using config file "/home/kanno/uuid1.conf". Started domain vm1 # xm create /home/kanno/uuid2.conf Using config file "/home/kanno/uuid2.conf". Error: an integer is required # xm list -l (domain (domid 0) (uuid 00000000-0000-0000-0000-000000000000) (vcpus 2) (cpu_weight 1.0) (memory 1024) (maxmem 1024) (features ) (name Domain-0) (on_poweroff destroy) (on_reboot restart) (on_crash restart) (state r-----) (shutdown_reason poweroff) (cpu_time 34.941371157) (online_vcpus 2) ) (domain (domid 1) (uuid aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa) (vcpus 1) (cpu_weight 1.0) (memory 256) (maxmem 256) (features ) (name vm2) (on_poweroff destroy) (on_reboot restart) (on_crash restart) (image (linux (kernel /boot/vmlinuz-2.6-xenU) (root '/dev/sda1 ro'))) (device (vif (backend 0) (script vif-bridge) (mac 00:16:3e:17:14:cb))) (device (vbd (backend 0) (dev sda1) (uname file:/xen/xen-test/image/rhel4_1.img) (mode w) ) ) (state -b----) (shutdown_reason poweroff) (cpu_time 3.610959097) (online_vcpus 1) (up_time 78.2889318466) (start_time 1151666985.97) (store_mfn 1048657) (console_mfn 1048656) ) (domain (domid 2) (uuid aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa) (vcpus 1) (cpu_weight 1.0) (memory 256) (maxmem 256) (features ) (name vm2) (on_poweroff destroy) (on_reboot restart) (on_crash restart) (image (linux (kernel /boot/vmlinuz-2.6-xenU) (root '/dev/sda1 ro'))) (device (vif (backend 0) (script vif-bridge) (mac 00:16:3e:7e:ee:5c))) (device (vbd (backend 0) (dev sda1) (uname file:/xen/xen-test/image/rhel4_2.img) (mode w) ) ) (state --p---) (shutdown_reason poweroff) (cpu_time 0.0) (online_vcpus 1) (up_time 14.7986199856) (start_time 1151667049.47) (store_mfn 737361) (console_mfn 737360) ) Attachment:
uuid_check.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |