Matthew Booth
2010-Jun-01 10:33 UTC
[Libguestfs] [PATCH] RHEV: OVF must have the same name as the OS UUID
ovf:Envelope/Content/Section[xsi:type='ovf:OperatingSystemSection_Type']/@ovf:id is actually the canonical UUID of the guest, and must correspond to the filename. If it doesn't, the VM cannot be deleted from the export domain. Fixes RHBZ#583536 --- lib/Sys/VirtV2V/Target/RHEV.pm | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Sys/VirtV2V/Target/RHEV.pm b/lib/Sys/VirtV2V/Target/RHEV.pm index 867923b..9dd9013 100644 --- a/lib/Sys/VirtV2V/Target/RHEV.pm +++ b/lib/Sys/VirtV2V/Target/RHEV.pm @@ -562,7 +562,7 @@ sub create_guest # Generate a creation date my $vmcreation = _format_time(gmtime()); - my $osuuid = Sys::VirtV2V::Target::RHEV::UUIDHelper::get_uuid(); + my $vmuuid = Sys::VirtV2V::Target::RHEV::UUIDHelper::get_uuid(); my $ovf = new XML::DOM::Parser->parse(<<EOF); <ovf:Envelope @@ -597,7 +597,7 @@ sub create_guest <VmType>1</VmType> <DefaultDisplayType>0</DefaultDisplayType> - <Section ovf:id="$osuuid" ovf:required="false" xsi:type="ovf:OperatingSystemSection_Type"> + <Section ovf:id="$vmuuid" ovf:required="false" xsi:type="ovf:OperatingSystemSection_Type"> <Info>Guest Operating System</Info> <Description>Unassigned</Description> </Section> @@ -644,8 +644,6 @@ EOF my $mountdir = $self->{mountdir}; my $domainuuid = $self->{domainuuid}; - my $vmuuid = Sys::VirtV2V::Target::RHEV::UUIDHelper::get_uuid(); - my $dir = $mountdir.'/'.$domainuuid.'/master/vms/'.$vmuuid; mkdir($dir) or die(user_message(__x("Failed to create directory {dir}: {error}", -- 1.7.0.1
Richard W.M. Jones
2010-Jun-01 12:35 UTC
[Libguestfs] [PATCH] RHEV: OVF must have the same name as the OS UUID
On Tue, Jun 01, 2010 at 11:33:57AM +0100, Matthew Booth wrote:> ovf:Envelope/Content/Section[xsi:type='ovf:OperatingSystemSection_Type']/@ovf:id > is actually the canonical UUID of the guest, and must correspond to the > filename. If it doesn't, the VM cannot be deleted from the export domain. > > Fixes RHBZ#583536Looks OK, ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
Possibly Parallel Threads
- [PREVIEW ONLY] Refactor data transfer code
- [PATCH] RHEV: Pad disk sizes up to a multiple of 1024 bytes
- [PATCH 1/2] Refactor guest and volume creation into Sys::VirtV2V::Target::LibVirt
- [PATCH] Change the date format used in RHEV OVF output
- [PATCH 1/2] Target: Pass os description to create_guest