multipass
multipass copied to clipboard
Additional disk device (/dev/sdb) on Multipass instance
How do I add an additional disk device on Multipass instance? Multipass already comes with /dev/sda1 which has its own partitions. What I am looking is to create another device disk like /dev/sdb and /dev/sdc.
Hi @javisnche what would those devices be?
Hi @javisnche what would those devices be?
@Saviq when I do lsblk, this is what I get: loop0 7:0 0 4K 1 loop /snap/bare/5 loop1 7:1 0 61.9M 1 loop /snap/core20/1169 loop2 7:2 0 67.3M 1 loop /snap/lxd/21545 loop3 7:3 0 1M 1 loop /snap/multipass-sshfs/145 loop4 7:4 0 32.4M 1 loop /snap/snapd/13270 sda 8:0 0 5G 0 disk ├─sda1 8:1 0 4.9G 0 part / ├─sda14 8:14 0 4M 0 part └─sda15 8:15 0 106M 0 part /boot/efi sr0 11:0 1 52K 0 rom
Now I want to add additional devices like sdb and sdc where I can partition to sdb1 and sdc1 respectively.
@javisnche why do you want those extra disks? They would just end up as extra files on the host file system.
You can use launch --disk
to choose the size of the default disk, if you're lacking space.
I would like to understand what can't you achieve with just one disk.
@Saviq I want to be able to do a block back up and restore from /dev/sda to /dev/sdb. It is very important for us to have more than one disk device with its corresponding partitions on our working environment.
I have a similar requirement. I want to do some development and want to setup the disk as ceph osd disks.
What I think we could do is accept multiple values of --disk
, the first one would still refer to the main drive, the extra ones could create additional disks.
It's not something near the top of our roadmap, though, so contributions welcome.
We're working on instance modification now, allowing to modify the size of the main disk, but I don't think we'd be implementing that for any extra disks.
If the extra disk capability will be implemented, then that will be a big plus. It is a requirement from my job side of things to have at least a backup of my environment. And I can only back up on an additional disk. A few days ago, my multipass environment was corrupted and I lost all my data. This happened because of lack of back up.
this feature would be great as in many cases you want more than 1 disk attached to a VM
Accepting multiple values of --disk with the first one remaining as the main drive would be excellent. That will be the ultimate solution as I will be able to create multiple disks. I hope this will be implemented asap.
If I launch a multipass instance say with 50G disk space,
multipass launch --cpus 2 --disk 50G --mem 6G --name secondary
Does this take away 50G immediately from your Mac's volume available storage space?
Does it also immediately take away the cpus (s) and/or the mem.
@javisnche no, disk is sparse - it will grow up (and slightly beyond, until it cleans up) to the requested size. CPUs are also dynamic (you don't "give" CPUs to instances, but just run "up to" that many tasks on your host's CPU). Memory will also only be allocated as the instance needs it (although that differs between hypervisors), but other than through restarting the instance it won't get freed up again.
@javisnche no, disk is sparse - it will grow up (and slightly beyond, until it cleans up) to the requested size. CPUs are also dynamic (you don't "give" CPUs to instances, but just run "up to" that many tasks on your host's CPU). Memory will also only be allocated as the instance needs it (although that differs between hypervisors), but other than through restarting the instance it won't get freed up again.
Thanks Saviq
I noticed that Multipass instances location on Mac is /var/root/Library/Application Support/multipassd/vault/instances Can you please clarify my doubts with the following questions? a. Is there a way to not run multipass as root? c. There is some image there in the above path - How can I locate this image, and and is it possible to open this image on Virtual Box? d. If I am able to open the image on Virtual Box, does it also come with the data lets say data within /home/ubuntu. Say I write files on my multipass /home/ubuntu/a.txt - does this a.txt also comes when I import the image in VirtualBox?
a. Is there a way to not run multipass as root?
Not at the moment, no.
c. There is some image there in the above path - How can I locate this image, and and is it possible to open this image on Virtual Box?
See https://multipass.run/docs/using-virtualbox-in-multipass-macos
d. If I am able to open the image on Virtual Box, does it also come with the data lets say data within /home/ubuntu. Say I write files on my multipass /home/ubuntu/a.txt - does this a.txt also comes when I import the image in VirtualBox?
You don't import it into VirtualBox, it's there in the first place, if you use the virtualbox driver.
a. Is there a way to not run multipass as root?
Not at the moment, no.
c. There is some image there in the above path - How can I locate this image, and and is it possible to open this image on Virtual Box?
See https://multipass.run/docs/using-virtualbox-in-multipass-macos
d. If I am able to open the image on Virtual Box, does it also come with the data lets say data within /home/ubuntu. Say I write files on my multipass /home/ubuntu/a.txt - does this a.txt also comes when I import the image in VirtualBox?
You don't import it into VirtualBox, it's there in the first place, if you use the virtualbox driver.
Thanks @Saviq
i am also looking for this feature for development purposes, would be great to add that feature !
for development, simulating and testing real-world scenarios with multiple disks i'am also looking for this feature.
As an example, if you want to test the operation of a MinIO distributed cluster, then it is impossible to do with a single root device.
"Error: Drive http://minio-1.multipass:9091/data_2
is part of root drive, will not be used"
Please add support for multiple drives.
Is there any update on this one ?
any update on this issue? It's important to many to have the ability to define multiple hard disks (raw and attached)....
@Saviq would. you be willing to provide guidance for somebody to add this feature ?
Hi @cryptosven76, I am afraid this would require a good deal of time from our side, to provide design and implementations for the different backends and platforms. I agree it would be nice to have this, but our hands are pretty full of other nice things at the moment. We'll be sure to discuss this internally for upcoming roadmap plans though.
I am removing the "help wanted" tag because I think that is misleading in this case.
You can add a new disk using VirtualBox GUI app to your instance (sudo VirtualBox
). I did it on mac os with VirtualBox driver, and it worked after starting the instance I had /dev/sdb
.
I’m also looking forward this function to be added. l don’t know how often Multipass VM runs on production, I rather want to see Multipass has all of these basic functions like this one since Multipass is more likely to be used for test purpose.
Having said that, it’s great app. Thank you so much!
@Saviq @ricab any news on this requested feature. you mentioned in Nov there are no cycles but it will be added to the roadmap. anything you can share on this ?
Hi @cryptosven76, no news on this yet, I am afraid. We did discuss it when planning the last roadmap cycle, but we did not have space to include it quite yet.
@Saviq @ricab , my quarterly checkin :-) anything we can help to move this forward ?
Out of curiosity, could a cloud-init file be used to specify the disks / partitions of a Multipass VM ?
Hey all,
We plan in 6 month cycles that roughly align with the Ubuntu releases. This did not make our current cycle which ends in October. We will consider it again when planning for the next cycle. Part of this is the actual user experience which are very deliberate about. We strive for a simple interface and as such, we need to think about the best way to make this happen without overcomplicating the CLI. Also, we have to consider multiple platforms with multiple hypervisors and make this work in such a way that it is transparent to the user what platform and hypervisor they are using.
Regarding cloud-init, that would only help partition and initialize a filesystem on a disk that is already attached to the virtual machine. The hypervisor has to be told to pass in the extra disk when booting the OS.
I have a similar requirement. I want to do some development and want to setup the disk as ceph osd disks.
Hi there, have you solve the problem and deploy the ceph successfully?