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

Multi disk support #91

Open
Katana-Steel opened this issue Aug 5, 2016 · 10 comments
Open

Multi disk support #91

Katana-Steel opened this issue Aug 5, 2016 · 10 comments

Comments

@Katana-Steel
Copy link
Contributor

I got a VirtualBox .box with 2 disks, but running it through mutate only converted the
1st disk from the box.ovf file
(meaning I could boot the VM but it's data disk wasn't available)

@sciurus
Copy link
Owner

sciurus commented Aug 7, 2016

Thanks for the report @Katana-Steel . That's a known limitation right now, but if anyone wants to add support for multiple disks it's definitely welcome.

@swills
Copy link
Contributor

swills commented Aug 16, 2016

@Katana-Steel Could you share an example of a box with two disks?

@Katana-Steel
Copy link
Contributor Author

I have the vagrant box image which is hosted on s3:
https://s3.amazonaws.com/edu-downloads.10gen.com/m202/m202-ubuntu1404-2015-08.box

I can get to my vagrant file tomorrow, mutate converted box-disk1 of the
ovf file to a qcow2 image, but not box-disk2 (had to create that one
manually luckily it is mounting with lvm paths) pressing s at startup skips
mounting /data (a 20G lvm volume)

On Aug 15, 2016 7:43 PM, "Steve Wills" notifications@github.com wrote:

@Katana-Steel https://github.com/Katana-Steel Could you share an
example of a box with two disks?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#91 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADECW60xAAhK7JNvkcAWTYbHJC_yrTTDks5qgSPvgaJpZM4JeAC5
.

@Katana-Steel
Copy link
Contributor Author

 # -*- mode: ruby -*-
 # vi: set ft=ruby :

 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
 VAGRANTFILE_API_VERSION = "2"

 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

   config.vm.box = "m202-ubuntu1404-2015-08"
   config.vm.box_url = "https://s3.amazonaws.com/edu-downloads.10gen.com/m202/m202-ubuntu1404-2015-08.box"

   config.vm.provision "shell", path: "provisioners/setup.sh"
-
+  config.vm.provider "libvirt" do |v|
+    # Uncomment the next line to show VM window. User/pass = vagrant/vagrant
+    v.memory = 2048
+    v.cpus = 1
+    v.video_type = "qxl"
+    v.video_vram = 65536
+    v.graphics_type = "spice"
+  end

   config.vm.provider "virtualbox" do |vb|
     # Uncomment the next line to show VM window. User/pass = vagrant/vagrant
     vb.gui = true

     vb.name = "m202-ubuntu1404-2015-10"
     vb.customize ["modifyvm", :id, "--memory", "2048"]
     vb.customize ["modifyvm", :id, "--cpus", "1"]  
   end

   config.ssh.username = "m202"
   config.ssh.password = "m202"

 end

@bjne
Copy link

bjne commented Aug 20, 2016

This also applies to ubuntu/xenial64 that uses 2nd disk as a configdrive, and not converting this
drive breaks booting it after mutate.

@Katana-Steel
Copy link
Contributor Author

any interest in this issue?

@iam-TJ
Copy link

iam-TJ commented Jul 30, 2018

Confirming this affects the Ubuntu cloud-image boxes since they are for VirtualBox and contain 2 disk images: the root-fs and the cloud-init data. E.g the ubuntu/bionic64 image when mutated results in:

boxes  ubuntu-VAGRANTSLASH-bionic  0  find . -ls
   270462      4 drwxrwxr-x   4 tj       tj           4096 Jul 29 17:43 .
   270457      4 drwxrwxr-x   2 tj       tj           4096 Jul 29 17:43 ./libvirt
   262177 1028044 -rw-r--r--   1 tj       tj       1052704768 Jul 29 18:21 ./libvirt/box.img
   267960      12 -rw-rw-r--   1 tj       tj              136 Jul 29 17:43 ./libvirt/Vagrantfile
   267827      12 -rw-rw-r--   1 tj       tj               57 Jul 29 17:43 ./libvirt/metadata.json
   270463       4 drwxrwxr-x   2 tj       tj             4096 Jul 28 13:15 ./virtualbox
   268076      80 -rw-r--r--   1 tj       tj            72192 Jul 28 13:15 ./virtualbox/ubuntu-bionic-18.04-cloudimg-configdrive.vmdk
   268075  307892 -rw-r--r--   1 tj       tj        315267584 Jul 28 13:15 ./virtualbox/ubuntu-bionic-18.04-cloudimg.vmdk
   268074      12 -rw-r--r--   1 tj       tj              310 Jul 28 13:15 ./virtualbox/ubuntu-bionic-18.04-cloudimg.mf
   268066      20 -rw-r--r--   1 tj       tj            11061 Jul 28 13:15 ./virtualbox/box.ovf
   268071      12 -rw-r--r--   1 tj       tj              478 Jul 28 13:15 ./virtualbox/Vagrantfile
   268072      12 -rw-r--r--   1 tj       tj               31 Jul 28 13:15 ./virtualbox/metadata.json

@Katana-Steel
Copy link
Contributor Author

Thank you @iam-TJ it would be nice if vagrant-mutate would support extra disk images.
because if it can convert the first disk... why not the others

@iam-TJ
Copy link

iam-TJ commented Aug 2, 2018

I've just about finished adding the functionality - need to do some thorough testing then I'll publish the code in my forked repo. Have had to give myself a crash-course in Ruby, and Vagrant!

Tracking it here:

iam-TJ#1

iam-TJ pushed a commit to iam-TJ/vagrant-mutate that referenced this issue Aug 6, 2018
@sciurus
Copy link
Owner

sciurus commented Aug 9, 2018

@iam-TJ if you're interested in maintaining vagrant-mutate I'd be happy to give you commit access here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants