[Bug 2073461] Re: virt-install ignores --cloud-init when --location is present

Olivier Gayot 2073461 at bugs.launchpad.net
Wed Jul 31 13:08:36 UTC 2024


** Description changed:

  [Impact]
  * To run a fully automated Ubuntu server installation (autoinstall) using virt-install, we want to use a combination of:
     * --cloud-init user-data=$path_to_autoinstall
     * --extra-args autoinstall
  
  * Unfortunately, when --location is used, the --cloud-init option gets
  silently ignored. This makes the installer start interactively ; instead
  of performing the  installation automatically using the autoinstall
  configuration from the cloud-init user-data file.
  
  * In certain scenarios, the --location option can be replaced by --cdrom
  (and then the --cloud-init option is honored). However, the --cdrom
  option is mutually exclusive with --extra-args ; so we can only get a
  partially automated installation (it requires confirmation from the
  user).
  
- [
- There is an upstream bug report [1] with an open PR [2]:
+ [Test plan]
+ * Ensuring that the following commands result in a fully automated (and successful) installation:
+ 
+ $ wget https://releases.ubuntu.com/noble/ubuntu-24.04-live-server-
+ amd64.iso
+ 
+ $ cat > autoinstall.yaml
+ #cloud-config
+ autoinstall:
+   version: 1
+   source:
+     id: ubuntu-server-minimal
+   identity:
+     hostname: ubuntu
+     realname: ubuntu
+     username: ubuntu
+     password: $6$VDuw.212hptHuNMP$id7Wzc0Lem9aUl9RqydBIehO.6J2Qud6jlhgLEgXa3cnql30XIGmP5c18FRZixH.6LsgFo336Azfce8Fht0t30
+ 
+ $ virt-install --noreboot --connect qemu:///session --disk size=10
+ --memory 1024 --virt-type kvm --location ubuntu-24.04-live-server-
+ amd64.iso --cloud-init user-data=autoinstall.yaml --extra-args
+ autoinstall
+ 
+ [Where problems could occur]
+ It seems unlikely, but if someone relies on virt-install's current behavior (i.e.,  silently ignoring the --cloud-config option in the presence of --location), they might be surprised to witness a different behavior after virt-manager gets upgraded.
+ 
+ [Additional information]
+ There is an upstream bug report [1] with a merged PR [2]:
  
  [1] https://github.com/virt-manager/virt-manager/issues/469
  [2] https://github.com/virt-manager/virt-manager/pull/485

** Summary changed:

- virt-install ignores --cloud-init when --location is present
+ [SRU] virt-install ignores --cloud-init when --location is present

** Also affects: virt-manager (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Changed in: virt-manager (Ubuntu Noble)
     Assignee: (unassigned) => Olivier Gayot (ogayot)

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2073461

Title:
  [SRU] virt-install ignores --cloud-init when --location is present

Status in virt-manager package in Ubuntu:
  Fix Released
Status in virt-manager source package in Noble:
  New
Status in virt-manager package in Debian:
  New

Bug description:
  [Impact]
  * To run a fully automated Ubuntu server installation (autoinstall) using virt-install, we want to use a combination of:
     * --cloud-init user-data=$path_to_autoinstall
     * --extra-args autoinstall

  * Unfortunately, when --location is used, the --cloud-init option gets
  silently ignored. This makes the installer start interactively ;
  instead of performing the  installation automatically using the
  autoinstall configuration from the cloud-init user-data file.

  * In certain scenarios, the --location option can be replaced by
  --cdrom (and then the --cloud-init option is honored). However, the
  --cdrom option is mutually exclusive with --extra-args ; so we can
  only get a partially automated installation (it requires confirmation
  from the user).

  [Test plan]
  * Ensuring that the following commands result in a fully automated (and successful) installation:

  $ wget https://releases.ubuntu.com/noble/ubuntu-24.04-live-server-
  amd64.iso

  $ cat > autoinstall.yaml
  #cloud-config
  autoinstall:
    version: 1
    source:
      id: ubuntu-server-minimal
    identity:
      hostname: ubuntu
      realname: ubuntu
      username: ubuntu
      password: $6$VDuw.212hptHuNMP$id7Wzc0Lem9aUl9RqydBIehO.6J2Qud6jlhgLEgXa3cnql30XIGmP5c18FRZixH.6LsgFo336Azfce8Fht0t30

  $ virt-install --noreboot --connect qemu:///session --disk size=10
  --memory 1024 --virt-type kvm --location ubuntu-24.04-live-server-
  amd64.iso --cloud-init user-data=autoinstall.yaml --extra-args
  autoinstall

  [Where problems could occur]
  It seems unlikely, but if someone relies on virt-install's current behavior (i.e.,  silently ignoring the --cloud-config option in the presence of --location), they might be surprised to witness a different behavior after virt-manager gets upgraded.

  [Additional information]
  There is an upstream bug report [1] with a merged PR [2]:

  [1] https://github.com/virt-manager/virt-manager/issues/469
  [2] https://github.com/virt-manager/virt-manager/pull/485

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/2073461/+subscriptions




More information about the Ubuntu-sponsors mailing list