search for: uuidgen

Displaying 20 results from an estimated 121 matches for "uuidgen".

2006 Aug 08
8
Generating a unique id ?
Hello, I need to generate a unique ID, so far I''ve unit tested this under 100000 iterations and it seems to work : now.to_i.to_s + ''-'' + now.usec.to_s + ''-'' + rand(1000).to_s Is there a better way ? Thanks Notes : 1) without usec, few percents of generated values are not uniques 2) the id generated is a string so the presence of
2015 Jun 26
1
Re: [PATCH v3.1 7/9] New API: swap_set_uuid_random
...fe30d..923adb2 100644 > --- a/daemon/swap.c > +++ b/daemon/swap.c > @@ -34,6 +34,7 @@ GUESTFSD_EXT_CMD(str_mkswap, mkswap); > GUESTFSD_EXT_CMD(str_swapon, swapon); > GUESTFSD_EXT_CMD(str_swapoff, swapoff); > GUESTFSD_EXT_CMD(str_swaplabel, swaplabel); > +GUESTFSD_EXT_CMD(str_uuidgen, uuidgen); > > /* Confirmed this is true for Linux swap partitions from the Linux sources. */ > #define SWAP_LABEL_MAX 16 > @@ -255,3 +256,34 @@ swap_set_uuid (const char *device, const char *uuid) > > return 0; > } > + > +char * > +get_random_uuid (void) &gt...
2017 Apr 06
2
[PATCH] v2v: ovf: Add virtio-rng and memory balloon device
...Add the miscellaneous KVM devices. *) + if guestcaps.gcaps_virtio_rng then + append virtual_hardware_section_items [ + e "Item" [] [ + e "rasd:Description" [] [PCData "RNG Device"]; + e "rasd:InstanceId" [] [PCData (uuidgen ())]; + e "rasd:ResourceType" [] [PCData "0"]; + e "Type" [] [PCData "rng"]; + e "Device" [] [PCData "virtio"]; + ] + ]; + if guestcaps.gcaps_virtio_balloon then + append virtual...
2017 Apr 11
1
[PATCH v2] v2v: ovf: Add virtio-rng and memory balloon device
...(* Add the miscellaneous KVM devices. *) + if guestcaps.gcaps_virtio_rng then + append virtual_hardware_section_items [ + e "Item" [] [ + e "rasd:Caption" [] [PCData "RNG Device"]; + e "rasd:InstanceId" [] [PCData (uuidgen ())]; + e "rasd:ResourceType" [] [PCData "0"]; + e "Type" [] [PCData "rng"]; + e "Device" [] [PCData "virtio"]; + ] + ]; + if guestcaps.gcaps_virtio_balloon then + append virtual...
2007 Dec 27
3
facter''s uniqueid is not unique
...states, "This volume of IEEE Std 1003.1-2001 does not define the domain in which the return value is unique." Perhaps uniqueid should be keyed off of a UUID for the system. RedHat provides /etc/sysconfig/hw-uuid. I could not find the standard equivalent on Ubuntu, but you could pipe uuidgen into a file and have facter read from that. -g -- Garrett Honeycutt Sr. Systems Engineer Direct > 800.556.5829x2555 Fax > 206.728.1500 www.speakeasy.net Voice * Data * Managed Services
2015 Mar 18
0
[PATCH 1/2] mllib: allow external_command to return on nonzero return value
...s' exited with error %d") cmd i | Unix.WSIGNALED i -> error ~prog (f_"external command '%s' killed by signal %d") cmd i | Unix.WSTOPPED i -> error ~prog (f_"external command '%s' stopped by signal %d") cmd i - ); - lines (* Run uuidgen to return a random UUID. *) let uuidgen ~prog () = diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 28ba648..ce2242a 100644 --- a/mllib/common_utils.mli +++ b/mllib/common_utils.mli @@ -109,7 +109,7 @@ val compare_version : string -> string -> int val compare_lvm2_uuids :...
2017 Jul 21
3
[PATCH] common/mlstdutils: Add chomp function to remove \n from end of strings.
...an; + "strings.chomp" >:: test_string_chomp; ] let () = diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 73c6e2473..597128967 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -376,14 +376,8 @@ let shell_command ?(echo_cmd = true) cmd = let uuidgen () = let lines = external_command "uuidgen -r" in assert (List.length lines >= 1); - let uuid = List.hd lines in - let len = String.length uuid in - let uuid, len = - if len > 0 && uuid.[len-1] = '\n' then - String.sub uuid 0 (len-1), len-1 - else...
2010 Mar 01
3
Success moving Xen LVMs from 32 to 64bit host
...ated, we created the LV on the replacement server: lvcreate -l xxx -n xm_c32_001 rootvg Then used dd to recreate the file: dd if=xm_c32_001.out of=/dev/rootvg/xm_c32_001 Next, we copied the /etc/xen/xm_c32_001 configuration file to the replacement server. We generated a new UUID using the "uuidgen" utility. We also created a new MAC address. Finally, we started the instance: xm create xm_c32_001 Everything came up, but no network. From the root console we logged in then edited the /etc/sysconfig/network-scripts/ifcfg-eth0. Xen had apparently renamed the script and put in a DHCP con...
2016 Jul 07
7
[PATCH 0/3] fix btrfs subvolume procession in tools
This patcheset fixes errors in virt-sysprep and virt-sparsify. Here we have a common functionality: is_btrfs_subvolume. Doesn't it make sense to turn it into guestfs API? Also I found an issue. In 'virt-sysprep fs-uuids', the uuids for ALL filesystems are regenerated as many times as many roots are in guest. Is it done intentionally? Maxim Perevedentsev (3): mllib: add checking
2018 Jul 13
2
[PATCH 1/2] Revert "v2v: oVirt changed the ResourceType for QXL video devices (RHBZ#1598715)."
...28 100644 --- a/v2v/create_ovf.ml +++ b/v2v/create_ovf.ml @@ -646,7 +646,7 @@ let rec create_ovf source targets guestcaps inspect e "Item" [] [ e "rasd:Caption" [] [PCData "Graphical Controller"]; e "rasd:InstanceId" [] [PCData (uuidgen ())]; - e "rasd:ResourceType" [] [PCData "32768"]; + e "rasd:ResourceType" [] [PCData "20"]; e "Type" [] [PCData "video"]; e "rasd:VirtualQuantity" [] [PCData "1"]; e &...
2016 Jul 07
0
[PATCH 3/3] sysprep: fix btrfs subvolume processing in fs-uuids
...l index ed4e81a..f125eb0 100644 --- a/sysprep/sysprep_operation_fs_uuids.ml +++ b/sysprep/sysprep_operation_fs_uuids.ml @@ -30,13 +30,15 @@ let rec fs_uuids_perform g root side_effects = List.iter (function | _, "unknown" -> () | dev, typ -> - let new_uuid = Common_utils.uuidgen () in - try - g#set_uuid dev new_uuid - with - G.Error msg -> - warning (f_"cannot set random UUID on filesystem %s type %s: %s") - dev typ msg + if not (is_btrfs_subvolume g dev) then ( + let new_uuid = Common_utils.uuidgen () in + try +...
2016 Jul 08
0
[PATCHv2 3/3] sysprep: fix btrfs subvolume processing in fs-uuids
...l index ed4e81a..f125eb0 100644 --- a/sysprep/sysprep_operation_fs_uuids.ml +++ b/sysprep/sysprep_operation_fs_uuids.ml @@ -30,13 +30,15 @@ let rec fs_uuids_perform g root side_effects = List.iter (function | _, "unknown" -> () | dev, typ -> - let new_uuid = Common_utils.uuidgen () in - try - g#set_uuid dev new_uuid - with - G.Error msg -> - warning (f_"cannot set random UUID on filesystem %s type %s: %s") - dev typ msg + if not (is_btrfs_subvolume g dev) then ( + let new_uuid = Common_utils.uuidgen () in + try +...
2017 Apr 07
0
Re: [PATCH] v2v: ovf: Add virtio-rng and memory balloon device
...tcaps.gcaps_virtio_rng then > + append virtual_hardware_section_items [ > + e "Item" [] [ > + e "rasd:Description" [] [PCData "RNG Device"]; Could it be rasd:Caption here? > + e "rasd:InstanceId" [] [PCData (uuidgen ())]; > + e "rasd:ResourceType" [] [PCData "0"]; > + e "Type" [] [PCData "rng"]; > + e "Device" [] [PCData "virtio"]; > + ] > + ]; > + if guestcaps.gcaps_virtio_balloo...
2023 Mar 17
0
Mount removed raid disk back on same machine as? original raid
...p I found with some digging that I needed to change the UUID of the drive to be able to mount it separately from the existing array.? I used "sgdisk -G /dev/sdg1" to do this.? It worked, but gave quite a few scary warning messages in the process.? A better idea would have been to use uuidgen to generate a random uuid and then start the array like this: ??? mdadm --assemble /dev/md99 --update=uuid --uuid=<newuuid> /dev/sdg1 (might require --force for a broken array, I'm not sure since I didn't actually do it this way) Once the array is running, there is another problem...
2016 May 20
1
[PATCH] tests: disable UUID change on ext journal_dev
...+++ b/generator/actions.ml @@ -5349,14 +5349,13 @@ of a filesystem." }; style = RString "uuid", [Device "device"], []; proc_nr = Some 83; deprecated_by = Some "vfs_uuid"; - tests = - (* Regression test for RHBZ#597112. *) - (let uuid = uuidgen () in [ - InitNone, Always, TestResultString ( - [["mke2journal"; "1024"; "/dev/sdc"]; - ["set_e2uuid"; "/dev/sdc"; uuid]; - ["get_e2uuid"; "/dev/sdc"]], uuid), [] - ]); + tests = [ +...
2015 Jun 15
3
Two partitions with samd UUID??
I seem to have partitions on two different disks with the same UUID: [tim at helen ~]$ sudo blkid /dev/sda2 /dev/sda2: LABEL="/boot1" UUID="5bbc8e95-6108-41f5-bc0e-5b5f8df5ce03" TYPE="ext3" [tim at helen ~]$ sudo blkid /dev/sdb2 /dev/sdb2: LABEL="/boot1" UUID="5bbc8e95-6108-41f5-bc0e-5b5f8df5ce03" TYPE="ext3" This is
2014 Nov 28
3
[PATCH 1/3] uuid: add support to change uuid of swap partition
...l @@ -29,8 +29,6 @@ let rec fs_uuids_perform ~verbose ~quiet g root side_effects = let fses = g#list_filesystems () in List.iter (function | _, "unknown" -> () - | _, "swap" -> - (* XXX Not implemented *) () | dev, typ -> let new_uuid = Common_utils.uuidgen ~prog () in try -- 1.9.3
2007 Jul 09
5
guest domain couldn''t be started
Hi, I install a guest Fedora inside the host Fedora. When I use the service xend status to check the status of xend. It shows xend is running. However when I use xm create xen1 to start the guest domain xen1, it failed. The corresponding file xen1 is in /etc/xen/xen1. The error msg is as follows: [root@phillis xen]# xm create xen1 Using config file "./xen1". Going to boot Fedora
2016 Jul 08
4
[PATCHv2 0/3] fix btrfs subvolume procession in tools
sparsify case: modified guestfs_is_lv mllib: fixed is_btrfs_subvolume Maxim Perevedentsev (3): mllib: add checking for btrfs subvolume lvm: modify guestfs_is_lv to take mountable sysprep: fix btrfs subvolume processing in fs-uuids daemon/lvm.c | 6 ++++-- generator/actions.ml | 6 +++--- mllib/common_utils.ml | 7 +++++++
2010 Aug 06
3
uuid configure issue?
I'm trying to build xapian-core-1.2.2 on Linux. After manually installing uuid.h and libuuid.a from e2fsprogs-1.41.12, I receive the following configure error: checking for uuid.h... yes checking for uuid_create... no configure: error: uuid.h found, but uuid_create() not found. You probably wants to install libuuid from e2fsprogs (you may need to install the uuid-dev, libuuid-devel or