Skip to content

User data is applied to a virtual machine on a specific host. #11206

Closed

Description

@miloserdoff

Hello. I have a Ubuntu 22.04 cloud image, user data and several hosts connected.

When I create a VM and assign UserData to it on host A, it creates fine and I can log into it.

UserData:
Image

VM-1

Image

VNC:

Image

But when I create a virtual machine on host B, specify the same image and the same UserData, it does not apply it and does not even change the name of the virtual machine inside (it remains ubuntu)

VM-2

Image

VNC VM-2:

Image

### Could you please advise what needs to be done to make UserData work on other hosts?

Activity

  1. shwstppr commented on Jul 16, 2025

    @shwstppr
    Contributor

    Are VMs on host B able to access network?

  2. miloserdoff commented on Jul 16, 2025

    @miloserdoff
    Author

    @shwstppr

    Hi, I decided to check your proposal and saw that the virtual machine has no Internet access. And also in ip a I did not see the IP address that should have been assigned to the VM. in /etc/netplan there is dhcp4: true.

    Image
  3. miloserdoff commented on Jul 16, 2025

    @miloserdoff
    Author

    @shwstppr

    Updated: Noticed some interesting behavior. Created another guest network and launched it on another host. Launched 2 virtual machines: one on the same host as the virtual router, and the second on another host. Result: The network appeared only on the virtual machine that is on the same host as the virtual router.

    And how can I make it so that VMs running on different hosts can use the router and access the network?

  4. shwstppr commented on Jul 16, 2025

    @shwstppr
    Contributor

    @miloserdoff seems like some host configuration issue. You may check the past issues like this,
    #9027

  5. miloserdoff commented on Jul 16, 2025

    @miloserdoff
    Author

    @shwstppr Unfortunately, your solution did not help me. Maybe I am doing something wrong. Can you give me more specific advice on where to start analyzing this problem?

  6. weizhouapache commented on Jul 17, 2025

    @weizhouapache
    Member

    @shwstppr Unfortunately, your solution did not help me. Maybe I am doing something wrong. Can you give me more specific advice on where to start analyzing this problem?

    If you use vlan, may check if switch ports are configured to trunk mode

  7. miloserdoff commented on Jul 17, 2025

    @miloserdoff
    Author

    @weizhouapache Do I understand correctly that I need to check the ports of the physical switch to which the physical server is connected?

  8. locked and limited conversation to collaborators on Jul 17, 2025
  9. converted this issue into a discussion #11233 on Jul 17, 2025
  10. added this to the unplanned milestone on Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions