Project

General

Profile

Actions

Bug #25870

open

Foreman can't differentiate VMware VMs if they were manually copied (not cloned)!

Added by Michael Schiessl about 5 years ago. Updated about 5 years ago.

Status:
New
Priority:
High
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

At home I use a single ESXi server (v6.5) without vCenter. To clone VMs there, I have to manually copy and rename the VM at file level. It will then be added to the inventory list. On first power-on, VMware asks if the VM has been moved or copied, giving the answer "copied".

Although most relevant IDs are changed, this does not apply to the vc.uuid setting, but it is exactly this setting that Foreman uses to enumerate the VMs on a computing resource.

Steps to reproduce:
(Suppose VM1 is copied to VM2)
  • Create VM1 (Installation of OS is not required)
  • Connect to the server via console or SSH
  • Copy the directory of the VM
    cp -a /vmfs/volumes/<name>/VM1 /vmfs/volumes/<name>/VM2
  • Step into directory of new VM
    cd /vmfs/volumes/<name>/VM2
  • Rename the virtual drive(s)
    vmkfstools -E VM1.vmdk VM2.vmdk
  • Rename the remaining files (each separate)
    mv VM1<*.*> VM2<*.*>
  • Open the vmx file
    vi VM2.vmx
  • Replace the names there
    :%s/VM1/VM2/g
  • Save and close the file
    :wq
  • Register the new VM
  • Power-on the newly registered VM
  • Answer question with "Copied"
  • Register the new VM in Forman.

Although this is a VMware bug, Foreman should at least detect and respond to it. Instead, one of the two VMs can be added to the host list, the other not. In best case this results to undefined state for both VMs. (On which VM are commands executed?)

Actions #1

Updated by Michael Schiessl about 5 years ago

  • Category set to Foreman modules

Set forgotten category.

Actions #2

Updated by Ewoud Kohl van Wijngaarden about 5 years ago

  • Project changed from Installer to Foreman
  • Category changed from Foreman modules to Compute resources - VMware
Actions #3

Updated by Ewoud Kohl van Wijngaarden about 5 years ago

  • Triaged changed from No to Yes
  • Found in Releases 1.20.1 added

I assume this is with 1.20.1, please modify if it's a different version.

Actions #4

Updated by Michael Schiessl about 5 years ago

  • Found in Releases deleted (1.20.1)

I can't believe I set the wrong category. My apologies for that. I'm definitely overloaded with work.

Yes, it is version 1.20.1. Which version should I use?

Actions #5

Updated by Michael Schiessl about 5 years ago

  • Found in Releases 1.20.1 added

Oh Jesus, what's wrong with me today?

Accidently deleted 'Found in Releases' => re-added.

Actions #6

Updated by Michael Schiessl about 5 years ago

Also applies to ddb.uuid in each virtual hard disk of the copied VM.

Actions

Also available in: Atom PDF