Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create Ubuntu VM #2090

Closed
JZambranoIT opened this issue Nov 22, 2023 · 11 comments
Closed

Unable to create Ubuntu VM #2090

JZambranoIT opened this issue Nov 22, 2023 · 11 comments
Labels
🐞 bug Something isn't working ✅ Completed

Comments

@JZambranoIT
Copy link

Please verify that you have read and understood the guidelines.

yes

A clear and concise description of the issue.

Running the script to create the Ubuntu VM generates an error on line 406 when pvesm alloc is run:

image

Please let me know what other data is needed on my end. I am on PVE 8.0.4 with a zfs volume consisting of three 1TB ssd that other vm's are able to use fine. For example I was able to create a Debian VM (using the amazing script from tteck) without issues.

i7-4930K (6 cores, 12 threads)
64GB RAM
Two 128GB SSD in ZFS RaidZ for redundancy of the host OS
Basic AMD GPU for video out

Which Linux distribution are you employing?

Default Settings

If relevant, including screenshots or a code block can be helpful in clarifying the issue.

No response

Please provide detailed steps to reproduce the issue.

Running the script using default or advanced (advanced using the same settings as default) causes the script to fail on line 406. No other steps needed to reproduce.

@tteck tteck added the 🧐 Not a Script Issue Not a Script Issue label Nov 22, 2023
@FrodoVDR
Copy link

Could it be that you don't have local lvm storage?
I had the same problem in the last few days in the script local-lvm is hardwired for the cloud init volume, this would have to be dynamically adapted to the same storage that is used to install the VM.

@tteck
Copy link
Owner

tteck commented Nov 22, 2023

The script runs without any problems from this end.

   __  ____                __           ___  ___    ____  __ __     _    ____  ___
  / / / / /_  __  ______  / /___  __   |__ \|__ \  / __ \/ // /    | |  / /  |/  /
 / / / / __ \/ / / / __ \/ __/ / / /   __/ /__/ / / / / / // /_    | | / / /|_/ /
/ /_/ / /_/ / /_/ / / / / /_/ /_/ /   / __// __/_/ /_/ /__  __/    | |/ / /  / /
\____/_.___/\__,_/_/ /_/\__/\__,_/   /____/____(_)____/  /_/       |___/_/  /_/

Using Default Settings
Using Virtual Machine ID: 111
Using Machine Type: i440fx
Using Disk Cache: None
Using Hostname: ubuntu
Using CPU Model: KVM64
Allocated Cores: 2
Allocated RAM: 2048
Using Bridge: vmbr0
Using MAC Address: 02:39:54:6E:DB:44
Using VLAN: Default
Using Interface MTU Size: Default
Start VM when completed: no
Creating an Ubuntu 22.04 VM using the above default settings
 ✓ Using local-lvm for Storage Location.
 ✓ Virtual Machine ID is 111.
 ✓ https://cloud-images.ubuntu.com/jammy/20231027/jammy-server-cloudimg-amd64.img
 ✓ Downloaded jammy-server-cloudimg-amd64.img
 ✓ Created a Ubuntu 22.04 VM (ubuntu)
 ✓ Completed Successfully!

Setup Cloud-Init before starting 

More info at https://github.com/tteck/Proxmox/discussions/2072 

@JZambranoIT
Copy link
Author

JZambranoIT commented Nov 22, 2023

Could it be that you don't have local lvm storage? I had the same problem in the last few days in the script local-lvm is hardwired for the cloud init volume, this would have to be dynamically adapted to the same storage that is used to install the VM.

This is likely the issue:

image

I dont have a local-lvm and that explains why the Debian VM script ran fine, since it doesnt use cloud init.

Any suggestions on how i can create a local-lvm volume?

Quick edit - I believe local-lvm is created when installing proxmox and so my question above is more about how to get around this since I am using zfs and it created a local-zfs volume instead.

@tteck
Copy link
Owner

tteck commented Nov 22, 2023

@FrodoVDR has a good point, download the script and remove line 411, create the VM the add CloudInit drive.

-ide2 local-lvm:cloudinit \

@tteck tteck removed the 🧐 Not a Script Issue Not a Script Issue label Nov 22, 2023
@tteck
Copy link
Owner

tteck commented Nov 22, 2023

Maybe I should remove that from the script and instruct people to add the CloudInit drive. Thoughts?

@JZambranoIT
Copy link
Author

Maybe I should remove that from the script and instruct people to add the CloudInit drive. Thoughts?

I am personally a big fan of leaving it in as I plan to use this script for template purposes.

I was able to make the edit to line 411 and still get the same error:

image

image

@tteck
Copy link
Owner

tteck commented Nov 22, 2023

Take a look at #1628

@JZambranoIT
Copy link
Author

Take a look at #1628

Yeah I had a stray vm disk named 101.

I removed it and am able to create the VM.

image

Regarding leaving the cloud init portion in I support it, maybe just make it a step where a user specifies where to create the cloudinit disk. This way users can put it wherever they want.

@tteck
Copy link
Owner

tteck commented Nov 22, 2023

Testing -ide2 ${STORAGE}:cloudinit \

@tteck tteck closed this as completed in 04a0a41 Nov 22, 2023
@tteck tteck added 🐞 bug Something isn't working ✅ Completed labels Nov 22, 2023
@tteck
Copy link
Owner

tteck commented Nov 22, 2023

That fixed the issue.

@JZambranoIT
Copy link
Author

That fixed the issue.

Thank you so much, bought ya a coffee!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working ✅ Completed
Projects
None yet
Development

No branches or pull requests

3 participants