Virtual machine – how does the vagrant package save changes to the new box

My question is about this here, but I didn't let it work

I use from vagrant@R_355_2419 @.es( http://goo.gl/KwQSa2 )I want to make some changes and repackage the new virtual machine into a new stray box file

To get the initial box, I'll config vm.@ R_ 355_ 2419@_url =“ http://goo.gl/KwQSa2 ”Add to my vagrant file

After calling vagrant, I did vagrant SSH and then did some operations (such as touch testfile. Txt)

After logging out, I use the vagrant package to create the package@ R_ 355_ 2419@.

Then I do vagrant destroy and put the package@ R_ 355_ Add the path of 2419 @ to config. In my vagrant file vm.@ R_ 355_ 2419@_url And perform vagrant again

When I log in to VM, my testfile Txt does not exist, so it looks like I packed the unchanged box

I tried other things, such as the tramp box, repackaging without success

What do I miss here?

Solution

When packaging, you must specify the UUID of the new VM created according to the basic box (through vagrant up)

When running

Vagrant package – base name – output / path / to / name@ R_ 355_ 2419@

– base name, which should be the name of the new VM or its UUID

You can get it using the following command:

$V@R_355_2419@Manage list vms
"oracle65" {5f9e6136-7773-4cd5-99a1-3a66b5e48045}
"Ubuntu" {e8c5a28c-788d-4d57-8c4a-c1f032a02443}
"oracle510" {fed5f379-495e-4b4b-b4e2-24f98edd2e72}
"archlinux" {c79dcee9-a523-4300-b026-cbc93ad37062}
"Windows" {fa768a76-5710-4b07-a4df-cc388370f038}
"Wiki" {a50ce314-6af8-4633-b02e-82b765cbf401}
"openSUSE" {af3cdf13-7e00-4c24-ae52-423919359b18}
"Debian" {37680776-73b9-44fd-8348-f60fd3895624}
"Solaris" {bc7be4ab-293d-4c94-b591-b5445a954f6c}
"centos_default_1395637517620_29337" {03d1282a-c7ba-493b-91ad-ec26ed763b6c}
"Kubuntu" {787ce012-00ef-4f90-acda-1b65c6d9941b}
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>