2 | | I have tried 5.0 (ubuntu xenial virtualbox package), but it also was not working.[[BR]] |
3 | | Here is a was to reproduce it. (It "works" 100% for me.)[[BR]] |
4 | | [[BR]] |
5 | | curl http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img -o /tmp/ubuntu.img[[BR]] |
6 | | qemu-img convert -O vdi /tmp/ubuntu.img /tmp/ubuntu.vdi[[BR]] |
7 | | VBoxManage internalcommands sethduuid /tmp/ubuntu.vdi[[BR]] |
8 | | VBoxManage createvm --name tst --register[[BR]] |
9 | | VBoxManage modifyvm tst --cpus 1 --memory 256 --boot1 disk --boot2 none --boot3 none --boot4 none --nic1 nat --cableconnected1 on --ostype Linux_64 --ioapic on --defaultfrontend headless[[BR]] |
| 2 | I have tried 5.0 (ubuntu xenial virtualbox package), but it also was not working. |
| 3 | |
| 4 | Here is a was to reproduce it. It "works" 100% for me. |
| 5 | {{{ |
| 6 | curl http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img -o /tmp/ubuntu.img |
| 7 | qemu-img convert -O vdi /tmp/ubuntu.img /tmp/ubuntu.vdi |
| 8 | VBoxManage internalcommands sethduuid /tmp/ubuntu.vdi |
| 9 | VBoxManage createvm --name tst --register |
| 10 | VBoxManage modifyvm tst --cpus 1 --memory 256 --boot1 disk --boot2 none --boot3 none --boot4 none --nic1 nat --cableconnected1 on --ostype Linux_64 --ioapic on --defaultfrontend headless |
11 | | VBoxManage storageattach tst --storagectl SATA --port 0 --device 0 --type hdd --medium /tmp/ubuntu.vdi[[BR]] |
12 | | VBoxManage startvm --type headless tst[[BR]] |
13 | | sleep 20[[BR]] |
14 | | VBoxManage controlvm tst savestate[[BR]] |
15 | | VBoxManage snapshot tst take 'system-initial'[[BR]] |
16 | | [[BR]] |
17 | | GUI:[[BR]] |
18 | | Right click on tst VM -> group[[BR]] |
19 | | snapshots -> restore to system-initial (do not create new snapshot)[[BR]] |
20 | | start the tst VM in headless mode[[BR]] |
21 | | It should crash, VM state should be Aborted.[[BR]] |
22 | | [[BR]] |
23 | | VBoxManage unregistervm --delete tst[[BR]] |
24 | | Throws error, files should be deleted manually...[[BR]] |
25 | | [[BR]] |
| 12 | VBoxManage storageattach tst --storagectl SATA --port 0 --device 0 --type hdd --medium /tmp/ubuntu.vdi |
| 13 | VBoxManage startvm --type headless tst |
| 14 | sleep 20 |
| 15 | VBoxManage controlvm tst savestate |
| 16 | VBoxManage snapshot tst take 'system-initial' |
| 17 | }}} |
| 18 | GUI: |
| 19 | * Right click on tst VM -> group |
| 20 | * snapshots -> restore to system-initial (do not create new snapshot) |
| 21 | * start the tst VM in headless mode |
| 22 | * It should crash, VM state should be Aborted. |
| 23 | |
| 24 | {{{ |
| 25 | VBoxManage unregistervm --delete tst |
| 26 | }}} |
| 27 | Throws error, files should be deleted manually... |
| 28 | |